1 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
3 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
4 (mulsi3_600_lib): Remove pattern.
5 (umulsi3_highpart_600_lib_le): Likewise.
6 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
7 (umulsidi3): Remove call to umulsidi3_600_lib.
8 (umulsidi3_600_lib): Remove pattern.
9 (peephole2): Remove peephole using the above deprecated patterns.
11 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
14 * config/arm/arm.c (arm_option_check_internal): Disable the combined
15 use of -mslow-flash-data and -mword-relocations.
16 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
17 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
19 * doc/invoke.texi (-mword-relocations): Mention conflict with
21 (-mslow-flash-data): Reciprocally.
23 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
25 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
26 16-byte modes held in GP registers to use an even regno.
28 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
29 (aarch64_atomic_ldop_supported_p): Remove.
30 (aarch64_gen_atomic_ldop): Remove.
31 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
32 Fully expand LSE operations here.
33 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
34 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
35 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
36 and use ATOMIC_LDOP instead; use register_operand for the input;
37 drop the split and emit insns directly.
38 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
39 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
40 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
42 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
43 (aarch64_gen_atomic_ldop): Don't call it.
44 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
45 Use aarch64_reg_or_zero.
46 (aarch64_atomic_exchange<ALLI>): Likewise.
47 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
48 operand 0; use aarch64_reg_or_zero for input; merge ...
49 (@aarch64_atomic_swp<ALLI>): ... this and remove.
51 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
52 (aarch64_split_compare_and_swap): Use it.
53 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
54 test oldval against the proper predicate.
55 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
56 Use nonmemory_operand for expected.
57 (cas_short_expected_pred): New.
58 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
59 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
60 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
61 (aarch64_plushi_operand): New.
63 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
64 Force oldval into the rval register for TARGET_LSE; emit the compare
65 during initial expansion so that it may be deleted if unused.
66 (aarch64_gen_atomic_cas): Remove.
67 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
68 Change =&r to +r for operand 0; use match_dup for operand 2;
69 remove is_weak and mod_f operands as unused. Drop the split
71 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
72 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
73 (@aarch64_atomic_cas<GPI>): Similarly.
75 2018-10-31 Richard Biener <rguenther@suse.de>
77 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
80 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
82 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
83 * config/aarch64/aarch64.md: Include saphira.md
84 * config/aarch64/saphira.md: New file for pipeline description.
86 2018-10-30 Martin Sebor <msebor@redhat.com>
89 * gimple-ssa-sprintf.c (format_directive): Use %G to include
91 (sprintf_dom_walker::compute_format_length):
92 Avoid setting POSUNDER4K here.
93 (get_destination_size): Handle null argument values.
94 (get_user_idx_format): New function.
95 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
96 functions, including user-defined with attribute format printf.
97 Use %G to include inlining context.
100 2018-10-30 Jan Hubicka <jh@suse.cz>
102 * params.def (lto-partitions): Bump from 32 to 128.
104 2018-10-30 Jan Hubicka <jh@suse.cz>
107 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
109 (free_lang_data_in_type): Forward declare.
110 (fld_type_variant_equal_p): New function.
111 (fld_type_variant): New function
112 (fld_incomplete_types): New hash.
113 (fld_incomplete_type_of): New function
114 (fld_simplfied-type): New function.
115 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
116 (free_lang_data): Allocate and free fld_incomplete_type; update call
117 of free_lang_data_in_decl.
119 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
121 * gcov.c (output_lines): Remove duplicate line.
123 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
125 * config/rs6000/rs6000.md (bswapdi2): Force address into register
126 if not in indexed or indirect form.
127 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
128 (bswapdi2_store): Ditto.
129 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
131 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
132 Prototype for helper function.
134 2018-10-30 Martin Sebor <msebor@redhat.com>
136 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
137 (target, pragma GCC optimize, pragma GCC target): Ditto.
139 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
141 * doc/extend.texi: Fix prototype and description of
142 __builtin_expect_with_probability.
144 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
146 * cgraph.h (clone_function_name_1): Replaced by new
147 clone_function_name_numbered that takes name as string; for
148 privatize_symbol_name_1 use only.
149 (clone_function_name): Renamed to
150 clone_function_name_numbered to be explicit about numbering.
151 (clone_function_name): New two-argument function that does
152 not number its output.
153 (clone_function_name): New three-argument function that
154 takes a number to append to its output.
155 * cgraphclones.c (duplicate_thunk_for_node):
156 (clone_function_name_1): Renamed.
157 (clone_function_name_numbered): Two new functions.
158 (clone_function_name): Improved documentation.
159 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
160 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
161 * final.c (final_scan_insn_1): Use the new clone_function_name
163 * multiple_target.c (create_dispatcher_calls): Ditto.
164 (create_target_clone): Ditto.
165 * omp-expand.c (grid_expand_target_grid_body): Ditto.
166 * omp-low.c (create_omp_child_function_name): Ditto.
167 * omp-simd-clone.c (simd_clone_create): Ditto.
168 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
169 new clone_function_name without numbering.
171 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
173 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
174 Assert that the allocation size is not zero.
176 2018-10-30 Richard Biener <rguenther@suse.de>
178 PR tree-optimization/87800
179 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
180 non-induction or reduction PHIs.
182 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
184 * config/aarch64/falkor-tag-collision-avoidance.c
185 (execute_tag_collision_avoidance): Call df_note_add_problem.
187 2018-10-30 Martin Liska <mliska@suse.cz>
189 * doc/extend.texi: Fix typo in documentation
190 of __builtin_expect_with_probability.
192 2018-10-29 David Malcolm <dmalcolm@redhat.com>
195 * input.c (get_substring_ranges_for_loc): Detect if
196 linemap_resolve_location gives us a NULL map, and reject
199 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
201 * config.gcc (xstormy16-*-elf): Set tm_d_file.
203 2018-10-29 David Malcolm <dmalcolm@redhat.com>
204 Martin Sebor <msebor@redhat.com>
205 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
207 * doc/ux.texi (Quoting): New subsection, adapted from material at
208 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
209 MartinSebor and ManuelLopezIbanez.
210 (Fix-it hints): Note that fix-it hints shouldn't be marked for
213 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
216 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
219 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
221 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
223 2018-10-29 Paul Koning <ni1d@arrl.net>
225 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
227 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
229 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
230 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
231 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
232 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
233 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
234 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
235 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
236 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
237 Change 'vector' to '__vector'.
238 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
239 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
240 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
241 _mm_avg_pu16): Likewise. And, whitespace corrections.
243 2018-10-29 Richard Biener <rguenther@suse.de>
245 PR tree-optimization/87785
246 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
249 2018-10-29 Olivier Hainque <hainque@adacore.com>
251 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
253 2018-10-29 Olivier Hainque <hainque@adacore.com>
255 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
256 ports configuration macro, defaults to "gnu".
257 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
258 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
260 2018-10-29 Olivier Hainque <hainque@adacore.com>
262 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
264 2018-10-29 Richard Biener <rguenther@suse.de>
266 PR tree-optimization/87790
267 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
268 (vect_make_slp_decision): Adjust.
269 (vect_slp_analyze_bb_1): Likewise.
270 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
273 2018-10-29 Richard Biener <rguenther@suse.de>
275 PR tree-optimization/87785
276 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
278 (vect_build_slp_tree): Likewise.
279 (vect_gather_slp_loads): New function.
280 (vect_analyze_slp_instance): Gather loads separately from the
283 2018-10-29 Martin Liska <mliska@suse.cz>
285 * Makefile.in: Make dependency to json.o.
286 * doc/gcov.texi: Document new JSON format, remove
287 old intermediate format documentation.
288 * gcov.c (struct function_info): Come up with m_name and
290 (function_info::function_info): Initialize it.
291 (function_info::~function_info): Release it.
292 (main): Rename flag_intermediate_format to flag_json_format.
293 (print_usage): Describe --json-format.
294 (process_args): Set flag_json_format.
295 (output_intermediate_line): Remove.
296 (output_intermediate_json_line): Likewise.
297 (get_gcov_intermediate_filename): Return new extension
299 (output_intermediate_file): Implement JSON emission.
300 (output_json_intermediate_file): Implement JSON emission.
301 (generate_results): Use ::get_name for function name.
302 Handle JSON output file.
303 (read_graph_file): Use ::get_name instead of cplus_demangle.
304 (read_count_file): Likewise.
305 (solve_flow_graph): Likewise.
306 (add_line_counts): Likewise.
307 (accumulate_line_counts): Use new flag_json_format.
308 (output_function_details): Use ::get_name instead of cplus_demangle.
309 (output_lines): Likewise.
310 * json.cc (test_writing_literals): Add new tests.
311 * json.h (class literal): Add new boolean constructor.
313 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
315 PR rtl-optimization/87701
316 PR rtl-optimization/87780
317 * combine.c (make_more_copies): Rewrite.
319 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
321 * doc/generic.texi (ABSU_EXPR): Document.
322 * match.pd (absu(x)*absu(x) -> x*x): Handle.
323 (absu(absu(X)) -> absu(X)): Likewise.
324 (absu(-X) -> absu(X)): Likewise.
325 (absu(X) where X is nonnegative -> X): Likewise.
327 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
329 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
330 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
331 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
332 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
333 (s-tm-texi): Also check timestamp on d-target.def.
334 (generated_files): Add TM_D_H and d-target-hooks-def.h.
335 (build/genhooks.o): Also depend on D_TARGET_DEF.
336 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
338 * config/aarch64/aarch64-d.c: New file.
339 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
341 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
343 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
344 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
345 * config/arm/arm-d.c: New file.
346 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
347 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
348 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
349 * config/arm/t-arm (arm-d.o): New rule.
350 * config/default-d.c: New file.
351 * config/glibc-d.c: New file.
352 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
353 * config/i386/i386-d.c: New file.
354 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
355 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
356 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
357 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
358 * config/i386/t-i386 (i386-d.o): New rule.
359 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
360 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
361 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
362 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
363 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
364 * config/mips/mips-d.c: New file.
365 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
366 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
367 * config/mips/t-mips (mips-d.o): New rule.
368 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
369 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
370 * config/powerpcspe/powerpcspe-d.c: New file.
371 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
373 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
374 Support GNU D by using 0 as the language type.
375 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
376 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
377 * config/riscv/riscv-d.c: New file.
378 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
380 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
381 * config/riscv/t-riscv (riscv-d.o): New rule.
382 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
383 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
384 * config/rs6000/rs6000-d.c: New file.
385 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
387 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
388 Support GNU D by using 0 as the language type.
389 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
390 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
391 * config/s390/s390-d.c: New file.
392 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
393 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
394 * config/s390/t-s390 (s390-d.o): New rule.
395 * config/sparc/sparc-d.c: New file.
396 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
398 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
399 * config/sparc/t-sparc (sparc-d.o): New rule.
400 * config/t-glibc (glibc-d.o): New rule.
401 * configure: Regenerated.
402 * configure.ac (tm_d_file): New variable.
403 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
404 * doc/contrib.texi (Contributors): Add self for the D frontend.
405 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
406 * doc/install.texi (Configuration): Mention libphobos as an option for
407 --enable-shared. Mention d as an option for --enable-languages.
408 (Testing): Mention check-d as a target.
409 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
410 name suffixes. Mention d as a -x option.
411 * doc/sourcebuild.texi (Top Level): Mention libphobos.
412 * doc/standards.texi (Standards): Add section on D language.
413 * doc/tm.texi: Regenerated.
414 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
415 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
416 * dwarf2out.c (is_dlang): New function.
417 (gen_compile_unit_die): Use DW_LANG_D for D.
418 (declare_in_namespace): Return module die for D, instead of adding
419 extra declarations into the namespace.
420 (gen_namespace_die): Generate DW_TAG_module for D.
421 (gen_decl_die): Handle CONST_DECLSs for D.
422 (dwarf2out_decl): Likewise.
423 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
424 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
426 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
427 * genhooks.c: Include d/d-target.def.
429 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
432 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
433 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
434 (STACK_DYNAMIC_OFFSET): Likewise.
436 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
439 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
442 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
444 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
445 return type and other typos.
447 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
449 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
450 a shorter sequence with fewer branches.
451 (emit_final_str_compare_gpr): Ditto.
453 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
455 * config/rs6000/tmmintrin.h: New file.
456 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
458 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
460 * config/rs6000/mmintrin.h: Enable 32bit compilation.
461 * config/rs6000/xmmintrin.h: Likewise.
463 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
465 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
467 2018-10-26 Richard Biener <rguenther@suse.de>
469 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
471 (vect_mark_slp_stmts_relevant): Likewise.
472 (vect_detect_hybrid_slp_stmts): Likewise.
473 (vect_bb_slp_scalar_cost): Likewise.
474 (vect_remove_slp_scalar_calls): Likewise.
476 2018-10-26 Jan Hubicka <jh@suse.cz>
478 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
479 (warn_types_mismatch): Fix walk of DECL_NAME.
480 (odr_types_equivalent_p): Fix overactive assert.
482 2018-10-26 Richard Biener <rguenther@suse.de>
484 PR tree-optimization/87105
485 * tree-vectorizer.h (_slp_tree::refcnt): New member.
486 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
488 (vect_create_new_slp_node): Initialize refcnt to one.
490 (scalar_stmts_set_t, bst_fail): Remove.
491 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
492 (vect_build_slp_tree): Add bst_map argument and lookup
493 already created SLP nodes.
494 (vect_print_slp_tree): Handle a SLP graph, print SLP node
496 (vect_slp_rearrange_stmts): Handle a SLP graph.
497 (vect_analyze_slp_instance): Adjust and free SLP nodes from
498 the CSE map. Fix indenting.
499 (vect_schedule_slp_instance): Add short-cut.
501 2018-10-26 Martin Liska <mliska@suse.cz>
504 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
505 addr_expr and not with pointers.
507 2018-10-26 Jan Hubicka <jh@suse.cz>
509 * tree.c (free_lang_data_in_type): Only check main variants.
510 * ipa-devirt.c (warn_odr): Make static.
511 (types_same_for_odr): Drop strict variant.
512 (types_odr_comparable): Likewise.
513 (odr_or_derived_type_p): Look for main variants.
514 (odr_name_hasher::equal): Cleanup comment.
515 (odr_subtypes_equivalent): Add warn and warned arguments; check main
517 (type_variants_equivalent_p): break out from ...
518 (odr_types_equivalent): ... here; go for main variants where needed.
519 (warn_odr): ... here; turn static.
520 (warn_types_mismatch): Compare mangled names of main variants.
521 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
522 (type_with_linkage_p): Sanity check that we look at main variant.
523 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
524 * tree.h (types_same_for_odr): Drop strict argument.
526 2018-10-26 Richard Biener <rguenther@suse.de>
528 PR tree-optimization/87746
529 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
530 Simplify and fix WRT strided store groups with size not
531 equal to step in element count.
532 (vect_analyze_group_access_1): Dump the whole group.
534 2018-10-25 Carl Love <cel@us.ibm.com>
536 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
537 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
538 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
539 precicion entry for each overloaded builtin.
540 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
541 VSCEDPUO): Rename overloaded name.
542 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
543 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
544 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
545 define_expand for xscmpexqp instruction.
546 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
548 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
549 Jinsong Ji <jji@us.ibm.com>
551 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
552 function with vec_sl.
553 (_mm_slli_epi32): Likewise.
554 (_mm_slli_epi64): Likewise.
555 (_mm_srai_epi16): Replace deprecated function with vec_sra.
556 (_mm_srai_epi32): Likewise.
557 (_mm_srli_epi16): Replace deprecated function with vec_sr.
558 (_mm_srli_epi32): Likewise.
559 (_mm_srli_epi64): Likewise.
560 (_mm_sll_epi16): Replace deprecated function with vec_sl.
561 (_mm_sll_epi32): Likewise.
562 (_mm_sll_epi64): Likewise.
563 (_mm_sra_epi16): Replace deprecated function with vec_sra.
564 (_mm_sra_epi32): Likewise.
565 (_mm_srl_epi16): Replace deprecated function with vec_sr.
566 (_mm_srl_epi32): Likewise.
567 (_mm_srl_epi64): Likewise.
569 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
570 Jinsong Ji <jji@us.ibm.com>
572 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
573 comparison operators with vec_cmp* for compatibility due to
574 unfortunate history; clean up formatting and use types more
576 (_mm_sll_epi32): Likewise.
577 (_mm_sll_epi64): Likewise.
578 (_mm_srl_epi16): Likewise.
579 (_mm_srl_epi32): Likewise.
580 (_mm_srl_epi64): Likewise.
582 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
583 Jinsong Ji <jji@us.ibm.com>
585 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
586 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
587 __vector __bool int. Use vec_cmpgt in preference to deprecated
588 function vec_vcmpgtfp.
589 (_mm_max_ps): Likewise.
591 2018-10-25 Jeff Law <law@redhat.com>
593 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
596 2018-10-25 Martin Sebor <msebor@redhat.com>
598 * doc/extend.texi (aligned): Expand attribute description.
599 (Alignment): Rename section. Discuss function arguments.
601 2018-10-25 Jan Hubicka <jh@suse.cz>
603 * ipa-devirt.c (main_odr_variant): Remove.
604 (hash_odr_name, types_same_for_odr, types_odr_comparable,
605 odr_name_hasher::equal, odr_subtypes_equivalent_p):
606 Drop use of main_odr_variant.
607 (add_type_duplicate): Silence confused warnings on integer types.
608 (get_odr_type): Always look for main variant.
609 (register_odr_type): Simplify.
611 2018-10-25 Richard Biener <rguenther@suse.de>
613 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
614 Initialize ng to silence error with release checking bootstrap.
616 2018-10-25 Richard Biener <rguenther@suse.de>
618 * tree-if-conv.c: Include tree-ssa-sccvn.h.
619 (tree_if_conversion): Run CSE on the if-converted loop body.
621 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
623 * config/s390/constraints.md (ZL): New constraint.
624 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
626 * config/s390/s390.md (movdi_larl): Remove.
627 (movdi_64): Add the LARL alternative.
629 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
632 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
633 (RTX_CODE_HWINT_P): New macro.
634 (rtx_code_size): Use RTX_CODE_HWINT_P ().
636 2018-10-25 Jan Hubicka <jh@suse.cz>
638 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
641 2018-10-25 Richard Biener <rguenther@suse.de>
643 PR tree-optimization/87665
644 PR tree-optimization/87745
645 * tree-vectorizer.h (get_earlier_stmt): Remove.
646 (get_later_stmt): Pick up UID from the original non-pattern stmt.
648 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
650 * options.texi (Deprecated): Move list to Var section.
652 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
653 Jinsong Ji <jji@us.ibm.com>
655 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
656 __vector long to __vector long long.
657 (_mm_cvtpd_ps): Likewise.
658 (_mm_cvttpd_epi32): Likewise.
659 (_mm_cvtpi32_pd): Likewise.
660 (_mm_unpackhi_epi64): Likewise.
661 (_mm_unpacklo_epi64): Likewise.
663 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
665 PR rtl-optimization/87720
666 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
668 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
670 * gimple-ssa-isolate-paths.c
671 (find_implicit_erroneous_behavior): Do not change code if the
672 pass is running for warnings only.
673 (find_explicit_erroneous_behavior): Likewise.
675 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
677 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
678 Define as rs6000_mangle_decl_assembler_name.
679 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
680 long double to IEEE long double, switch the names of the long
681 double built-in functions to be <func>f128 instead of <func>l.
683 2018-10-24 Martin Sebor <msebor@redhat.com>
685 * doc/extend.texi (nonnull): List no-argument form. Reference
686 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
688 2018-10-24 Richard Biener <rguenther@suse.de>
690 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
692 2018-10-24 Martin Liska <mliska@suse.cz>
694 PR tree-optimization/84436
695 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
697 (switch_conversion::contains_linear_function_p): New.
698 (switch_conversion::build_one_array): Support linear
699 transformation on input.
700 * tree-switch-conversion.h (struct switch_conversion): Add
701 contains_linear_function_p declaration.
703 2018-10-24 Richard Biener <rguenther@suse.de>
705 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
706 if its argument is CONSTANT_CLASS_P.
708 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
710 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
711 it is wrong for forward declarations.
713 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
715 * config/s390/s390.c (s390_check_qrst_address): Add the missing
716 SYMBOL_REF_P () check.
718 2018-10-24 Richard Biener <rguenther@suse.de>
720 PR tree-optimization/87105
721 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
723 (vect_analyze_data_ref_accesses): Handle duplicate loads and
724 stores by splitting the affected group after the fact.
725 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
726 fail the SLP build because of size constraints.
728 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
730 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
731 * configure: Regenerate.
732 * config.in: Regenerate.
733 * varasm.c (mergeable_string_section): Use readonly_data_section
734 if linker doesn't support SHF_MERGE with alignment > 8.
735 (mergeable_constant_section): Likewise.
737 2018-10-24 Richard Biener <rguenther@suse.de>
739 PR tree-optimization/84013
740 * tree-ssa-structalias.c (struct msdi_data): New struct for
741 marshalling data to walk_stmt_load_store_ops.
742 (maybe_set_dependence_info): Refactor as callback for
743 walk_stmt_load_store_ops.
744 (compute_dependence_clique): Set restrict info on all stmt kinds.
746 2018-10-24 Martin Liska <mliska@suse.cz>
748 * cgraph.c (cgraph_node::dump):
749 Remove reduntant dumps and make tp_first_run dump more compact.
751 2018-10-24 Richard Biener <rguenther@suse.de>
753 PR tree-optimization/87665
754 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
757 2018-10-12 Jeff Law <law@redhat.com>
759 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
762 2018-10-23 Richard Biener <rguenther@suse.de>
764 * tree-vrp.c (add_assert_info): Guard dump_printf with
766 * gimple-ssa-evrp-analyze.c
767 (evrp_range_analyzer::record_ranges_from_incoming_edge):
768 Use value_range::ignore_equivs_equal_p.
770 2018-10-23 Richard Biener <rguenther@suse.de>
772 PR tree-optimization/87105
773 PR tree-optimization/87608
774 * passes.def (pass_all_early_optimizations): Add early phi-opt
776 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
777 addition to debug stmts.
778 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
779 and abs replacement early.
780 * tree-cfg.c (gimple_empty_block_p): Likewise.
782 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
785 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
786 specified to configure.
787 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
789 2018-10-23 Richard Biener <rguenther@suse.de>
791 PR tree-optimization/87700
792 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
794 2018-10-23 Jakub Jelinek <jakub@redhat.com>
797 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
798 second argument from __mmask16 to __mmask8.
799 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
800 _mm_mask_packs_epi32): Likewise.
801 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
803 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
805 2018-10-23 Richard Biener <rguenther@suse.de>
807 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
809 2018-10-23 Richard Biener <rguenther@suse.de>
811 PR tree-optimization/86144
812 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
815 2018-10-23 Richard Biener <rguenther@suse.de>
817 PR tree-optimization/87693
818 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
819 the case we do not find the taken edge.
821 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
822 Jinsong Ji <jji@us.ibm.com>
824 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
825 (_mm_store_pd): Use unaligned vector type for pointer cast.
826 (_mm_maskmoveu_si128): Likewise.
827 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
828 (_mm_store_ps): Use unaligned vector type for pointer cast.
830 2018-10-22 Paul Koning <ni1d@arrl.net>
832 * symtab.c (symtab_node::increase_alignment): Correct max
835 2018-10-22 Yury Gribov <tetra2005@gmail.com>
837 PR tree-optimization/87633
838 * match.pd: Do not generate unordered integer comparisons.
840 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
842 PR rtl-optimization/87600
843 * combine.c: Add include of expr.h.
844 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
845 register to a pseudo.
846 (make_more_copies): New function, add a copy to a new pseudo after
847 the moves from hard registers into pseudos.
848 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
849 later. Call make_more_copies.
851 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
853 * lra-constraints.c (process_alt_operands): New local array,
854 matching_early_clobber. Check matching_early_clobber before
855 decrementing reject, and set matching_early_clobber after.
857 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
860 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
861 call output_addr_const and hope for the best.
863 2018-10-22 Richard Biener <rguenther@suse.de>
865 * gimple-ssa-evrp-analyze.c
866 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
867 smarter about what ranges to use.
868 * tree-vrp.c (add_assert_info): Dump here.
869 (register_edge_assert_for_2): Instead of here at multiple but
872 * gcc.dg/tree-ssa/evrp12.c: New testcase.
873 * gcc.dg/predict-6.c: Adjust.
874 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
875 * gcc.dg/tree-ssa/vrp02.c: Likewise.
876 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
878 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
879 Richard Biener <rguenther@suse.de>
881 * bitmap.h: Update data structure documentation, including a
882 description of bitmap views as either linked-lists or splay trees.
883 (struct bitmap_element_def): Update comments for splay tree bitmaps.
884 (struct bitmap_head_def): Likewise.
885 (bitmap_list_view, bitmap_tree_view): New prototypes.
886 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
888 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
889 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
890 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
891 released bitmap element here.
892 (bitmap_element_free): Remove.
893 (bitmap_elt_clear_from): Work on splay tree bitmaps.
894 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
895 this function similar ones such that linked-list bitmap implementation
896 functions are grouped.
897 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
898 and moved for grouping.
899 (bitmap_list_insert_element_after): Renamed from
900 bitmap_elt_insert_after, and moved for grouping.
901 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
902 (bitmap_tree_link_left, bitmap_tree_link_right,
903 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
904 bitmap_tree_link_element, bitmap_tree_unlink_element,
905 bitmap_tree_find_element): New functions for splay-tree bitmap
907 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
908 Renamed and moved, see above entries.
909 (bitmap_tree_listify_from): New function to convert part of a splay
910 tree bitmap to a linked-list bitmap.
911 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
912 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
913 (bitmap_find_bit): Remove.
914 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
915 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
916 Handle splay tree bitmaps.
917 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
918 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
919 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
920 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
921 bitmap_intersect_compl_p, bitmap_ior_and_compl,
922 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
923 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
924 corresponding changes to use linked-list specific bitmap_element
925 manipulation functions as applicable for efficiency.
926 (bitmap_tree_to_vec): New function.
927 (debug_bitmap_elt_file): New function split out from ...
928 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
929 (bitmap_print): Likewise.
931 PR tree-optimization/63155
932 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
934 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
937 2018-10-22 Martin Liska <mliska@suse.cz>
939 PR tree-optimization/87686
941 2018-08-29 Martin Liska <mliska@suse.cz>
943 * tree-switch-conversion.c (switch_conversion::expand):
944 Strenghten assumption about gswitch statements.
946 2018-10-22 Martin Liska <mliska@suse.cz>
948 * ipa-icf.c (sem_item::compare_attributes): Remove.
949 (sem_item::compare_referenced_symbol_properties): Use
950 attribute_list_equal instead.
951 (sem_function::equals_wpa): Likewise.
952 * ipa-icf.h: Remove compare_attributes.
954 2018-10-22 Richard Biener <rguenther@suse.de>
957 * mem-stats.h (mem_usage::operator==): Fix pasto.
959 2018-10-22 Richard Biener <rguenther@suse.de>
961 PR tree-optimization/87640
962 * tree-vrp.c (set_value_range_with_overflow): Decompose
964 (extract_range_from_binary_expr_1): Adjust.
966 2018-10-22 Martin Jambor <mjambor@suse.cz>
968 * tree-eh.h (stmt_could_throw_p): Add function parameter.
969 (stmt_can_throw_external): Likewise.
970 (stmt_can_throw_internal): Likewise.
971 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
972 (lower_eh_constructs_2): Likewise.
973 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
974 (stmt_can_throw_external): Likewise.
975 (stmt_can_throw_internal): Likewise.
976 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
977 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
978 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
979 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
980 (pass_lower_eh_dispatch::execute): Pass cfun to
981 stmt_can_throw_external.
982 (cleanup_empty_eh): Likewise.
983 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
984 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
985 stmt_can_throw_external instead of pushing it to cfun.
986 (symbol_table::create_edge): Likewise.
987 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
988 stmt_can_throw_internal.
989 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
990 to stmt_could_throw_p.
991 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
992 stmt_can_throw_internal.
993 (pass_store_merging::execute): Likewise.
994 * gimple-ssa-strength-reduction.c
995 (find_candidates_dom_walker::before_dom_children): Pass cfun to
997 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
998 stmt_can_throw_internal.
999 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
1000 to stmt_can_throw_external.
1001 (check_stmt): Pass cfun to stmt_could_throw_p.
1002 (check_stmt): Pass cfun to stmt_can_throw_external.
1003 (pass_nothrow::execute): Likewise.
1004 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
1005 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
1006 stmt_can_throw_internal.
1007 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
1008 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
1009 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
1010 * tree-complex.c (expand_complex_libcall): Pass cfun to
1011 stmt_could_throw_p and to stmt_can_throw_internal.
1012 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
1013 * tree-inline.c (copy_edges_for_bb): Likewise.
1014 (maybe_move_debug_stmts_to_successors): Likewise.
1015 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
1017 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
1018 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
1019 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
1020 stmt_can_throw_internal.
1021 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
1022 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
1024 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
1025 stmt_can_throw_internal.
1026 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
1027 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
1029 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
1030 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
1031 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1032 (convert_mult_to_fma_1): Likewise.
1033 (convert_to_divmod): Likewise.
1034 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
1035 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
1036 * tree-ssa-propagate.c
1037 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
1038 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
1039 (maybe_optimize_range_tests): Likewise.
1040 (linearize_expr_tree): Likewise.
1041 (reassociate_bb): Likewise.
1042 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
1043 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
1044 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
1045 (handle_char_store): Likewise.
1046 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
1047 stmt_can_throw_internal.
1048 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
1050 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1051 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
1052 (vectorizable_simd_clone_call): Likewise.
1053 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
1054 (gimple_stringop_fixed_value): Likewise.
1056 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
1058 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
1059 literal pool references.
1060 (s390_check_qrst_address): Adapt to the new behavior of
1061 s390_loadrelative_operand_p ().
1063 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1066 * config/i386/sse.md (*andnot<mode>3_bcst): New.
1068 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1071 * config/i386/sse.md (*<code><mode>3_bcst): New.
1073 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1076 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
1077 V4DI, V16SI and V8DI.
1078 (*sub<mode>3<mask_name>_bcst): New.
1079 (*add<mode>3<mask_name>_bcst): Likewise.
1081 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
1082 Jinsong Ji <jji@us.ibm.com>
1084 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
1085 __m64 with __vector unsigned long long for compatibility.
1086 (_mm_movemask_epi8): Likewise.
1087 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
1088 (_mm_cvttps_pi32): Likewise.
1089 (_mm_cvtpi32_ps): Likewise.
1090 (_mm_cvtps_pi16): Likewise.
1091 (_mm_loadh_pi): Likewise.
1092 (_mm_storeh_pi): Likewise.
1093 (_mm_movehl_ps): Likewise.
1094 (_mm_movelh_ps): Likewise.
1095 (_mm_loadl_pi): Likewise.
1096 (_mm_storel_pi): Likewise.
1097 (_mm_movemask_ps): Likewise.
1098 (_mm_shuffle_pi16): Likewise.
1100 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1103 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
1104 __builtin_ia32_vfnmsubpd512_mask.
1105 (_mm512_mask_fnmsub_round_pd): Likewise.
1106 (_mm512_fnmsub_pd): Likewise.
1107 (_mm512_mask_fnmsub_pd): Likewise.
1108 (_mm512_maskz_fnmsub_round_pd): Use
1109 __builtin_ia32_vfnmsubpd512_maskz.
1110 (_mm512_maskz_fnmsub_pd): Likewise.
1111 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
1112 (_mm512_mask_fnmsub_round_ps): Likewise.
1113 (_mm512_fnmsub_ps): Likewise.
1114 (_mm512_mask_fnmsub_ps): Likewise.
1115 (_mm512_maskz_fnmsub_round_ps): Use
1116 __builtin_ia32_vfnmsubps512_maskz.
1117 (_mm512_maskz_fnmsub_ps): Likewise.
1118 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
1119 __builtin_ia32_vfnmsubpd256_mask.
1120 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
1121 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1122 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
1123 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1124 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1125 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
1126 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
1127 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
1128 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
1129 __builtin_ia32_vfnmsubpd.
1130 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
1131 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
1132 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
1133 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
1134 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
1135 * config/i386/i386-builtin.def: Add
1136 __builtin_ia32_vfnmsubpd256_mask,
1137 __builtin_ia32_vfnmsubpd256_maskz,
1138 __builtin_ia32_vfnmsubpd128_mask,
1139 __builtin_ia32_vfnmsubpd128_maskz,
1140 __builtin_ia32_vfnmsubps256_mask,
1141 __builtin_ia32_vfnmsubps256_maskz,
1142 __builtin_ia32_vfnmsubps128_mask,
1143 __builtin_ia32_vfnmsubps128_maskz,
1144 __builtin_ia32_vfnmsubpd512_mask,
1145 __builtin_ia32_vfnmsubpd512_maskz,
1146 __builtin_ia32_vfnmsubps512_mask,
1147 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
1148 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
1149 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
1150 __builtin_ia32_vfnmsubpd256.
1151 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
1152 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
1153 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
1155 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
1157 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
1159 (fmai_vmfnmsub_<mode><round_name>): Likewise.
1161 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1164 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
1165 __builtin_ia32_vfnmaddpd512_mask.
1166 (_mm512_mask_fnmadd_round_pd): Likewise.
1167 (_mm512_fnmadd_pd): Likewise.
1168 (_mm512_mask_fnmadd_pd): Likewise.
1169 (_mm512_maskz_fnmadd_round_pd): Use
1170 __builtin_ia32_vfnmaddpd512_maskz.
1171 (_mm512_maskz_fnmadd_pd): Likewise.
1172 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
1173 (_mm512_mask_fnmadd_round_ps): Likewise.
1174 (_mm512_fnmadd_ps): Likewise.
1175 (_mm512_mask_fnmadd_ps): Likewise.
1176 (_mm512_maskz_fnmadd_round_ps): Use
1177 __builtin_ia32_vfnmaddps512_maskz.
1178 (_mm512_maskz_fnmadd_ps): Likewise.
1179 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
1180 __builtin_ia32_vfnmaddpd256_mask.
1181 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
1182 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
1183 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
1184 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1185 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1186 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
1187 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
1188 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
1189 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
1190 __builtin_ia32_vfnmaddpd.
1191 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
1192 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
1193 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
1194 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
1195 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
1196 * config/i386/i386-builtin.def: Add
1197 __builtin_ia32_vfnmaddpd256_mask,
1198 __builtin_ia32_vfnmaddpd256_maskz,
1199 __builtin_ia32_vfnmaddpd128_mask,
1200 __builtin_ia32_vfnmaddpd128_maskz,
1201 __builtin_ia32_vfnmaddps256_mask,
1202 __builtin_ia32_vfnmaddps256_maskz,
1203 __builtin_ia32_vfnmaddps128_mask,
1204 __builtin_ia32_vfnmaddps128_maskz,
1205 __builtin_ia32_vfnmaddpd512_mask,
1206 __builtin_ia32_vfnmaddpd512_maskz,
1207 __builtin_ia32_vfnmaddps512_mask,
1208 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
1209 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
1210 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
1211 __builtin_ia32_vfnmaddpd256.
1212 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
1213 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
1214 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
1216 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
1218 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
1220 (fmai_vmfnmadd_<mode><round_name>): Likewise.
1222 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1225 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
1226 __builtin_ia32_vfmsubpd512_mask.
1227 (_mm512_mask_fmsub_round_pd): Likewise.
1228 (_mm512_fmsub_pd): Likewise.
1229 (_mm512_mask_fmsub_pd): Likewise.
1230 (_mm512_maskz_fmsub_round_pd): Use
1231 __builtin_ia32_vfmsubpd512_maskz.
1232 (_mm512_maskz_fmsub_pd): Likewise.
1233 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
1234 (_mm512_mask_fmsub_round_ps): Likewise.
1235 (_mm512_fmsub_ps): Likewise.
1236 (_mm512_mask_fmsub_ps): Likewise.
1237 (_mm512_maskz_fmsub_round_ps): Use
1238 __builtin_ia32_vfmsubps512_maskz.
1239 (_mm512_maskz_fmsub_ps): Likewise.
1240 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
1241 __builtin_ia32_vfmsubpd256_mask.
1242 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
1243 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1244 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
1245 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1246 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1247 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
1248 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
1249 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
1250 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
1251 __builtin_ia32_vfmsubpd.
1252 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
1253 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
1254 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
1255 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1256 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1257 * config/i386/i386-builtin.def: Add
1258 __builtin_ia32_vfmsubpd256_mask,
1259 __builtin_ia32_vfmsubpd256_maskz,
1260 __builtin_ia32_vfmsubpd128_mask,
1261 __builtin_ia32_vfmsubpd128_maskz,
1262 __builtin_ia32_vfmsubps256_mask,
1263 __builtin_ia32_vfmsubps256_maskz,
1264 __builtin_ia32_vfmsubps128_mask,
1265 __builtin_ia32_vfmsubps128_maskz,
1266 __builtin_ia32_vfmsubpd512_mask,
1267 __builtin_ia32_vfmsubpd512_maskz,
1268 __builtin_ia32_vfmsubps512_mask,
1269 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1270 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1271 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1272 __builtin_ia32_vfmsubpd256.
1273 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1274 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1275 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1277 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1279 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1281 (fmai_vmfmsub_<mode><round_name>): Likewise.
1283 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1285 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1286 Remove plus. Renamed to ...
1287 (*sub<mode>3<mask_name>_bcst): This.
1288 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1289 (*add<mode>3<mask_name>_bcst): This.
1291 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1294 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1296 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1299 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1300 (_mm_or_epi32): Likewise.
1301 (_mm256_xor_epi32): Likewise.
1302 (_mm_xor_epi32): Likewise.
1303 (_mm256_or_epi64): Likewise.
1304 (_mm_or_epi64): Likewise.
1305 (_mm256_xor_epi64): Likewise.
1306 (_mm_xor_epi64): Likewise.
1308 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
1311 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1313 2018-10-20 Jakub Jelinek <jakub@redhat.com>
1316 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1318 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
1320 * doc/ux.texi: Move @section directly after @node.
1322 2018-10-19 Jakub Jelinek <jakub@redhat.com>
1326 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1327 depend closely nested inside of loop with ordered clause with
1330 2018-10-19 David Malcolm <dmalcolm@redhat.com>
1332 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1333 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1334 * doc/ux.texi: New file.
1336 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
1338 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1339 be the first CR field allocated.
1341 2018-10-19 Richard Biener <rguenther@suse.de>
1344 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1345 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1347 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1350 * config/i386/sse.md
1351 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1352 (*add<mode>3<mask_name>_bcst_2): Likewise.
1354 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1356 * config/i386/sse.md
1357 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1358 Replace nonimmediate_operand with register_operand.
1359 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1361 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1364 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
1366 PR rtl-optimization/87596
1367 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1368 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1369 for instructions in FROM..TO range.
1371 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
1373 * cfgexpand.c (expand_one_var): Use specific wording in error message
1374 for non-local frame variables.
1375 * stor-layout.c (layout_decl): Do not issue a warning for them.
1377 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
1379 * haifa-sched.c (priority): Add force_recompute parameter.
1380 (apply_replacement): Call priority () with force_recompute = true.
1381 (restore_pattern): Likewise.
1383 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1385 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
1386 HOST_BITS_PER_WIDE_INT.
1387 (test_vector_ops_duplicate): Likewise.
1389 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1392 * config/i386/sse.md (VF_AVX512): New.
1393 (avx512bcst): Likewise.
1394 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1396 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1398 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1401 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
1403 * doc/invoke.texi (-dumpversion): Improve grammar.
1404 (-dumpfullversion): Make more consistent with -dumpversion.
1406 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
1408 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
1409 Set JUMP_LABEL to the jump insn.
1410 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
1411 Predict emitted jump and add label to jump insn.
1413 2018-10-18 David Malcolm <dmalcolm@redhat.com>
1415 PR tree-optimization/87562
1416 * input.c (get_substring_ranges_for_loc): Use
1417 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
1418 getting the linemap for the endpoint. Verify that it's either
1419 in the same linemap as the start point's spelling location, or
1420 at least in the same file.
1422 2018-10-18 Richard Biener <rguenther@suse.de>
1424 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
1425 feed width-specific load/store costs through ix86_vec_cost.
1426 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
1427 (k8_cost): Likewise.
1428 (bdver_cost): Likewise.
1429 (znver1_cost): Likewise.
1430 (btver1_cost): Likewise.
1431 (btver2_cost): Likewise.
1433 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1435 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
1436 to simplify subreg of vec_merge.
1438 2018-10-18 Richard Biener <rguenther@suse.de>
1440 * config/i386/i386.c: Fix costing of vector FMA.
1442 2018-10-18 Richard Biener <rguenther@suse.de>
1444 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
1446 (ix86_builtin_vectorization_cost): For vec_construct properly
1447 cost insertion into SSE regs.
1448 (...): Adjust calls to ix86_vec_cost.
1450 2018-10-18 Richard Biener <rguenther@suse.de>
1454 2018-02-07 Richard Biener <rguenther@suse.de>
1456 PR tree-optimization/84204
1457 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
1460 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1463 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
1465 (test_vector_ops_duplicate): Add test for a scalar subreg of a
1466 VEC_MERGE of a VEC_DUPLICATE.
1468 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1470 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
1471 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
1472 * doc/standards.texi (C Language): Document C2X.
1473 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
1474 (rl78_option_override): Handle "GNU C2X" language name.
1476 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1478 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
1479 Document C17 as published in 2018.
1481 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
1484 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
1485 bail out if both sides do not have the same storage order.
1487 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1489 * bitmap.c (bitmap_head::dump): New.
1490 * bitmap.h (bitmap_head): Add dump().
1491 * gimple-ssa-evrp-analyze.c
1492 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
1493 (evrp_range_analyzer::set_ssa_range_info): Same.
1494 (evrp_range_analyzer::record_ranges_from_phis): Same.
1495 (evrp_range_analyzer::record_ranges_from_stmt): Same.
1496 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
1497 * gimple-ssa-sprintf.c (get_int_range): Same.
1498 (format_integer): Same.
1499 (sprintf_dom_walker::handle_gimple_call): Same.
1500 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
1501 (ipcp_vr_lattice::top_p): Same.
1502 (ipcp_vr_lattice::bottom_p): Same.
1503 (ipcp_vr_lattice::set_to_bottom): Same.
1504 (ipa_vr_operation_and_type_effects): Same.
1505 (propagate_vr_across_jump_function): Same.
1506 (ipcp_store_vr_results): Same.
1507 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
1508 (ipa_print_node_jump_functions_for_edge): Same.
1509 (ipa_get_value_range): Same.
1510 (ipa_compute_jump_functions_for_edge): Same.
1511 (ipa_write_jump_function): Same.
1512 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
1513 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1515 * vr-values.c (set_value_range_to_nonnegative): Same.
1516 (set_value_range_to_truthvalue): Same.
1517 (vr_values::get_value_range): Same.
1518 (vr_values::set_defs_to_varying): Same.
1519 (vr_values::update_value_range): Same.
1520 (symbolic_range_based_on_p): Same.
1521 (vr_values::op_with_boolean_value_range_p): Same.
1522 (vr_values::extract_range_for_var_from_comparison_expr): Same.
1523 (vr_values::extract_range_from_ssa_name): Same.
1524 (vr_values::extract_range_from_binary_expr): Same.
1525 (vr_values::extract_range_from_unary_expr): Same.
1526 (vr_values::extract_range_from_cond_expr): Same.
1527 (vr_values::extract_range_from_comparison): Same.
1528 (vr_values::check_for_binary_op_overflow): Same.
1529 (vr_values::extract_range_basic): Same.
1530 (vr_values::extract_range_from_assignment): Same.
1531 (compare_ranges): Same.
1532 (compare_range_with_value): Same.
1533 (vr_values::adjust_range_with_scev): Same.
1534 (vrp_valueize): Same.
1535 (vrp_valueize_1): Same.
1536 (vr_values::get_vr_for_comparison): Same.
1537 (vr_values::compare_name_with_value): Same.
1538 (vr_values::compare_names): Same.
1539 (vr_values::vrp_evaluate_conditional): Same.
1540 (find_case_label_ranges): Same.
1541 (vr_values::vrp_visit_switch_stmt): Same.
1542 (vr_values::extract_range_from_phi_node): Same.
1543 (vr_values::simplify_div_or_mod_using_ranges): Same.
1544 (vr_values::simplify_bit_ops_using_ranges): Same.
1545 (test_for_singularity): Same.
1546 (range_fits_type_p): Same.
1547 (vr_values::simplify_cond_using_ranges_1): Same.
1548 (vr_values::simplify_switch_using_ranges): Same.
1549 (vr_values::simplify_float_conversion_using_ranges): Same.
1550 (vr_values::two_valued_val_range_p): Same.
1551 (vr_values::add_equivalence): Move to value_range::equiv_add.
1552 * vr-values.h (vr_values::add_equivalence): Remove.
1553 (VR_INITIALIZER): Remove.
1554 * tree-vrp.c (value_range::set): New.
1555 (value_range::equiv_add): New.
1556 (value_range::value_range): New.
1557 (value_range::deep_copy): New.
1558 (value_range::check): New.
1559 (value_range::equal_p): New.
1560 (value_range::ignore_equivs_equal_p): New.
1561 (value_range::operator==): New.
1562 (value_range::operator!=): New.
1563 (value_range::symbolic_p): New.
1564 (value_range::numeric_p): New.
1565 (value_range::set_undefined): New.
1566 (value_range::set_varying): New.
1567 (value_range::may_contain_p): New.
1568 (value_range::equiv_clear): New.
1569 (value_range::singleton_p): New.
1570 (value_range::intersect): New.
1571 (value_range::dump): New.
1572 (value_range::set_and_canonicalize): New.
1573 (set_value_range): Adjust for value_range API.
1574 (set_value_range_to_undefined): Same.
1575 (set_value_range_to_varying): Same.
1576 (set_and_canonicalize_value_range): Same.
1577 (set_value_range_to_nonnull): Same.
1578 (set_value_range_to_null): Same.
1579 (range_is_null): Same.
1580 (range_is_nonnull): Same.
1581 (range_int_cst_p): Same.
1582 (range_int_cst_singleton_p): Same.
1583 (symbolic_range_p): Same.
1584 (range_includes_zero_p): Same.
1585 (value_range_constant_singleton): Same.
1586 (vrp_set_zero_nonzero_bits): Same.
1587 (ranges_from_anti_range): Same.
1588 (extract_range_into_wide_ints): Same.
1589 (extract_range_from_multiplicative_op): Same.
1590 (set_value_range_with_overflow): Same.
1591 (extract_range_from_binary_expr_1): Same.
1592 (extract_range_from_unary_expr): Same.
1593 (dump_value_range): Same.
1594 (debug_value_range): Same.
1595 (vrp_prop::check_array_ref): Same.
1596 (vrp_prop::check_mem_ref): Same.
1597 (vrp_prop::vrp_initialize): Same.
1598 (vrp_prop::visit_stmt): Same.
1599 (intersect_ranges): Same.
1600 (vrp_prop::visit_phi): Same.
1601 (vrp_prop::vrp_finalize): Same.
1602 (determine_value_range_1): Same.
1603 (determine_value_range): Same.
1604 (vrp_intersect_ranges_1): Rename to...
1605 (vrp_intersect_1): this.
1606 (vrp_intersect_ranges): Rename to...
1607 (value_range::intersect_helper): ...this.
1608 (vrp_meet_1): Rename to...
1609 (value_range::union_helper): ...this.
1610 (vrp_meet): Rename to...
1611 (value_range::union_): ...this.
1612 (copy_value_range): Remove.
1613 * tree-vrp.h (struct value_range): Rewrite into a proper class.
1614 (value_range::vrtype): New.
1615 (value_range::type): New.
1616 (value_range::equiv): New.
1617 (value_range::min): New.
1618 (value_range::max): New.
1619 (value_range::varying_p): New.
1620 (value_range::undefined_p): New.
1621 (value_range::null_p): New.
1622 (value_range::equiv_add): New.
1623 (copy_value_range): Remove.
1625 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1627 * Makefile.in (SELFTEST_TARGETS): New.
1628 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
1629 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1630 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
1632 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
1633 (selftest-c++-gdb, selftest-c++-valgrind): Move to
1635 * configure: Regenerate.
1636 * configure.ac (selftest_languages): New.
1638 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1640 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
1641 overflow wraps argument.
1642 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
1643 wide_int_range_multiplicative_op.
1644 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
1645 overflow wraps argument.
1646 (wide_int_range_multiplicative_op): Same.
1647 (wide_int_range_lshift): Same.
1648 (wide_int_range_div): Same.
1649 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
1650 (wide_int_range_lshift): Same.
1651 (wide_int_range_div): Same.
1653 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1655 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
1656 use sign as argument.
1657 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
1658 wide_int_range_shift_undefined_p.
1660 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1662 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
1664 (@despeculate_copy<ALLI_TI:mode>): ... This.
1665 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
1668 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1670 * config.gcc: Obsolete *-*-solaris2.10*.
1671 * doc/install.texi (Specific, *-*-solaris2*): Document it.
1673 2018-10-12 Jeff Law <law@redhat.com>
1675 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
1676 reg + sym +- const_int addressing modes.
1678 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1680 * common.opt (fdiagnostics-minimum-margin-width=): New option.
1681 * diagnostic-show-locus.c (layout::layout): Apply the minimum
1683 (layout::start_annotation_line): Only print up to 3 of the
1684 margin character, to avoid touching the left-hand side.
1685 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
1686 minimum margin width, as set by test_diagnostic_context's ctor.
1687 (selftest::test_fixit_insert_containing_newline): Likewise.
1688 (selftest::test_fixit_insert_containing_newline_2): Likewise.
1689 (selftest::test_line_numbers_multiline_range): Clear
1690 dc.min_margin_width.
1691 * diagnostic.c (diagnostic_initialize): Initialize
1693 * diagnostic.h (struct diagnostic_context): Add field
1695 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
1696 * opts.c (common_handle_option): Handle
1697 OPT_fdiagnostics_minimum_margin_width_.
1698 * selftest-diagnostic.c
1699 (selftest::test_diagnostic_context::test_diagnostic_context):
1700 Initialize min_margin_width to 6.
1701 * toplev.c (general_init): Initialize global_dc->min_margin_width.
1703 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1705 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
1706 Fix usage of "error_at_rich_loc" in the comment.
1708 2018-10-15 Renlin Li <renlin.li@arm.com>
1711 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
1712 if-conversioned loop when it contains ifn with types not
1713 supported by backend.
1714 * internal-fn.c (expand_direct_optab_fn): Add an assert.
1715 (direct_internal_fn_supported_p): New helper function.
1716 * internal-fn.h (direct_internal_fn_supported_p): Declare.
1718 2018-10-15 Jakub Jelinek <jakub@redhat.com>
1721 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1722 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1723 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1725 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
1727 PR tree-optimization/87022
1728 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
1729 bits in dist vector rather than the first one.
1731 2018-10-15 Richard Biener <rguenther@suse.de>
1734 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
1735 (visit_loadstore): When a used restrict tag escaped verify that
1736 the points-to solution of "other" pointers do not include
1738 (compute_dependence_clique): If a used restrict tag escaped
1739 communicated that down to visit_loadstore.
1741 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
1743 * config/s390/s390.c (s390_expand_vec_init): Force vector element
1744 into reg if it isn't a general operand.
1746 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1749 * config/i386/sse.md (*vec_dupv2di): Add register source to
1752 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1755 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1756 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
1757 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1758 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1760 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
1762 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
1763 (notice_args_size): Set it in the current trace if no insn that can
1764 throw internally has been seen yet.
1765 (connect_traces): When connecting args_size between traces, allow the
1766 incoming values not to match if there is an insn setting it before the
1767 first insn that can throw internally; in that case, force the creation
1768 of a CFI note on this latter insn.
1770 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
1772 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
1773 the base class, because using the injected-class-name was not clearly
1774 specified until DR 176.
1776 2018-10-12 Paul Koning <ni1d@arrl.net>
1778 * config/pdp11/pdp11.md (doloop_end): New expander.
1779 (doloop_end_insn): renamed from "doloop_end".
1780 (addqi3): New pattern.
1781 (subqi3): New pattern.
1782 * config/pdp11/predicates.md (incdec_operand): New predicate.
1784 2018-10-12 Yury Gribov <tetra2005@gmail.com>
1787 * real.c (format_helper::can_represent_integral_type_p): New function
1788 * real.h (format_helper::can_represent_integral_type_p): Ditto.
1789 * match.pd: New pattern.
1791 2018-10-12 Alexandre Oliva <oliva@adacore.com>
1793 * configure.ac: Introduce --enable-large-address-aware
1794 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
1795 * doc/install.texi: Document it.
1796 * configure, config.in: Rebuilt.
1797 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
1798 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
1799 (LINK_SPEC): Insert it.
1800 * config/i386/mingw-264.h: Likewise.
1802 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
1804 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
1806 PR rtl-optimization/87600
1807 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
1809 2018-10-12 Paul Koning <ni1d@arrl.net>
1811 * doc/md.texi (doloop_end): Document that the pattern code may
1812 need to check operand mode.
1814 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
1816 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
1817 to zero-extend between int and floating-point registers.
1818 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
1819 ldp into floating-point registers. Add type and arch attributes.
1820 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
1821 Use f_loads for type attribute.
1823 2018-10-11 Martin Sebor <msebor@redhat.com>
1825 * doc/extend.texi (attribute packed): Correct typos.
1827 2018-10-11 Martin Sebor <msebor@redhat.com>
1829 * doc/extend.texi (attribute flatten): Mention interaction with
1832 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
1835 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
1836 Set new_decl virtual flag to zero.
1838 2018-10-11 Martin Sebor <msebor@redhat.com>
1841 * doc/extend.texi (attribute format_arg): Discuss using multiple
1842 attributes on a single function.
1844 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
1846 PR tree-optimization/86829
1847 * match.pd (sin (atan (x))): New simplification rules.
1848 (cos (atan (x))): Likewise.
1849 * real.c (build_sinatan_real): New function.
1850 * real.h (build_sinatan_real): Prototype.
1852 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
1854 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
1856 (fold_mergeeo_helper): New helper function.
1857 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
1858 intrinsics. Correct some whitespace indentation issues.
1860 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
1863 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
1864 Use HOST_WIDE_INT_1U for shift.
1866 2018-10-11 Doug Rupp <rupp@adacore.com>
1867 Olivier Hainque <hainque@adacore.com>
1869 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
1870 Pass --relax to the linker for RTPs.
1871 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
1873 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
1874 Jan Hubicka <jh@suse.cz>
1875 Martin Jambor <mjambor@suse.cz>
1877 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
1878 the same elements are repeated rather than printing all of them.
1879 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
1880 "repeated" elements.
1881 * read-rtl-function.c (test_loading_repeat): New function.
1882 (read_rtl_function_c_tests): Call test_loading_repeat.
1883 * rtl-tests.c (test_dumping_repeat): New function.
1884 (rtl_tests_c_tests): Call test_dumping_repeat.
1886 2018-10-11 Richard Biener <rguenther@suse.de>
1888 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
1889 bdver?_cost): Unify to ...
1890 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
1891 * config/i386/i386.c (processor_cost_table): Adjust.
1893 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
1896 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
1897 the thunk when expanding to GIMPLE.
1899 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
1901 * varasm.c (mergeable_string_section): Don't try to move zero-length
1902 strings to the merge section.
1904 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
1907 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
1909 2018-10-10 Jakub Jelinek <jakub@redhat.com>
1912 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
1913 to special_args set.
1915 2018-10-10 Richard Biener <rguenther@suse.de>
1917 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
1918 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
1919 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
1920 and recursing and pattern terminating the recursion on SSE
1921 vector width using ix86_expand_reduc.
1922 (reduc_sminmax_scal_<mode>): Split into part reducing to half
1923 width and recursing and SSE2 vector variant doing the final
1924 reduction with ix86_expand_reduc.
1925 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
1926 with terminating the recursion at AVX level, splitting that
1929 2018-10-09 David Malcolm <dmalcolm@redhat.com>
1931 * genmatch.c (error_cb): Rename to...
1932 (diagnostic_cb): ...this, converting int params to enums.
1933 (fatal_at): Update for renaming.
1934 (warning_at): Likewise.
1936 * input.c (selftest::ebcdic_execution_charset::apply):
1937 Update for renaming of...
1938 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
1940 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
1941 converting level and reason to enums.
1942 (class selftest::lexer_error_sink): Rename to...
1943 (class selftest::lexer_test_options): ...this, renaming field
1944 "m_errors" to "m_diagnostics".
1945 (selftest::lexer_test_options::apply): Update for renaming of...
1946 (selftest::lexer_test_options::on_error): ...this, renaming to...
1947 (selftest::lexer_test_options::on_diagnostic): ...this
1948 converting level and reason to enums.
1949 (selftest::test_lexer_string_locations_raw_string_unterminated):
1950 Update for renamings.
1951 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
1954 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
1956 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
1957 * config/rs6000/pmmintrin.h: New file.
1959 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
1961 PR tree-optimization/86659
1962 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
1964 2018-10-09 Richard Biener <rguenther@suse.de>
1966 PR tree-optimization/63155
1967 * tree-ssa-structalias.c: Include tree-ssa.h.
1968 (get_constraint_for_ssa_var): For undefs return nothing_id.
1969 (find_func_aliases): Cleanup PHI handling.
1971 2018-10-09 Richard Biener <rguenther@suse.de>
1973 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
1976 2018-10-09 Martin Liska <mliska@suse.cz>
1978 * asan.c (asan_emit_stack_protection): If a stack variable
1979 is located in a same file as current function, then emit
1980 line info into variable definition string.
1982 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1984 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
1987 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1989 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
1992 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1994 PR tree-optimization/86659
1995 * gimple-match.h (struct gimple_match_op): Add reverse field.
1996 (gimple_match_op::set_op): New overloaded method.
1997 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
1998 the REF_REVERSE_STORAGE_ORDER flag on the value.
1999 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
2000 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
2002 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2005 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
2006 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
2008 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
2011 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
2012 Defined with __builtin_ia32_vfmaddsubpd512_mask.
2014 2018-10-08 Richard Biener <rguenther@suse.de>
2016 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
2017 cost the same as AVX128 ones.
2019 2018-10-08 Paul Koning <ni1d@arrl.net>
2021 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
2022 (expand_block_move): New function.
2023 * config/pdp11/pdp11.c (output_block_move): Remove.
2024 (expand_block_move): New function.
2025 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
2026 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
2027 (*movmemhi1): Remove.
2029 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
2031 * config/s390/2827.md: Increase latencies for some FP instructions.
2033 2018-10-08 Richard Biener <rguenther@suse.de>
2035 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
2037 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
2038 * tree-vectorizer.h (dump_stmt_cost): Adjust.
2039 (add_stmt_cost): Dump return value of the hook.
2041 2018-10-08 Richard Biener <rguenther@suse.de>
2043 PR tree-optimization/63155
2044 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
2045 (ssa_propagation_engine::ssa_propagate): Remove redundant
2046 bitmap bit clearing.
2048 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
2050 PR rtl-optimization/86939
2051 PR rtl-optimization/87479
2052 * ira.h (non_conflicting_reg_copy_p): New prototype.
2053 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
2054 (make_hard_regno_dead): Don't add conflicts for register
2055 ignore_reg_for_conflicts.
2056 (make_object_dead): Likewise.
2057 (non_conflicting_reg_copy_p): New function.
2058 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
2059 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
2060 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
2061 (make_hard_regno_dead): Don't add conflicts for register
2062 ignore_reg_for_conflicts. Remove special conflict handling of
2063 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
2064 check_pic_pseudo_p and update callers.
2065 (mark_pseudo_dead): Don't add conflicts for register
2066 ignore_reg_for_conflicts.
2067 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
2069 2018-10-05 Andrew Waterman <andrew@sifive.com>
2070 Jim Wilson <jimw@sifive.com>
2072 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
2073 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
2074 new pattern using HONOR_SNANS that emits one extra instruction.
2076 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2078 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
2079 patterns): Merge SI and DI patterns to a GPR pattern.
2080 (unnamed define_insn and define_split for record form of that): Merge
2081 to a single define_insn_and_split pattern.
2083 2018-10-05 David Malcolm <dmalcolm@redhat.com>
2086 * input.c (expand_location_to_spelling_point): Add param "aspect"
2087 and use rather than hardcoding LOCATION_ASPECT_CARET.
2088 (get_substring_ranges_for_loc): Handle the case of a single token
2089 within a macro expansion.
2090 * input.h (expand_location_to_spelling_point): Add "aspect" param,
2091 defaulting to LOCATION_ASPECT_CARET.
2093 2018-10-05 Paul Koning <ni1d@arrl.net>
2095 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
2096 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
2097 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
2098 (pdp11_guard_type): New function.
2100 2018-10-05 Paul Koning <ni1d@arrl.net>
2102 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
2103 * config/pdp11/pdp11.opt (mfloat32): Remove.
2105 * doc/invoke.texi (pdp11 -mfloat32): Remove:
2106 (pdp11 -mfloat64): Remove.
2108 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2110 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
2111 (*cmp<mode>_cc_i387): Ditto.
2112 (*cmpu<mode>_cc_i387): Ditto.
2113 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2114 * config/i386/i386.c (ix86_expand_fp_compare): Remove
2116 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
2117 Emit x86_sahf_1 pattern.
2118 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
2119 (ix86_expand_carry_flag_compare): Ditto.
2121 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2123 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
2124 to reg_or_0_operand. Add "C" constraint.
2125 (*cmpxf_cc_i387): Ditto.
2126 (*cmp<mode>_i387): Change operand 2 predicate
2127 to nonimm_or_0_operand. Add "C" constraint.
2128 (*cmp<mode>_cc_i387): Ditto.
2129 (*cmp<mode>_0_i387): Remove insn pattern.
2130 (*cmp<mode>_0_cc_i387): Ditto.
2132 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2134 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
2135 * config/i386/predicates.md (nonimm_or_0_operand): Rename
2136 from vector_move_operand. Update all uses.
2138 2018-10-05 Martin Sebor <msebor@redhat.com>
2140 PR tree-optimization/87490
2141 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
2144 2018-10-05 Richard Biener <rguenther@suse.de>
2146 PR tree-optimization/63155
2147 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2148 vertical space in dumpfiles.
2149 * tree-ssa-propagate.h
2150 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2151 * tree-ssa-propagate.c (cfg_blocks_back): New global.
2152 (ssa_edge_worklist_back): Likewise.
2153 (curr_order): Likewise.
2154 (cfg_blocks_get): Remove abstraction.
2155 (cfg_blocks_add): Likewise.
2156 (cfg_blocks_empty_p): Likewise.
2157 (add_ssa_edge): Add to current or next worklist based on
2159 (add_control_edge): Likewise.
2160 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2162 (ssa_propagation_engine::ssa_propagate): ... here. Unify
2163 iteration from CFG and SSA edge worklist so we process
2164 everything in RPO order, prioritizing forward progress
2166 (ssa_prop_init): Allocate new worklists, do not dump
2168 (ssa_prop_fini): Free new worklists.
2170 2018-10-05 Richard Biener <rguenther@suse.de>
2172 * tree-core.h (tree_block::abstract_flag): Remove.
2173 (tree_block::block_num): Make full 32bits.
2174 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
2175 * tree.h (BLOCK_ABSTRACT): Remove.
2176 * dwarf2out.c (gen_lexical_block_die): Remove dead code
2177 resulting from BLOCK_ABSTRACT being always false.
2178 (gen_inlined_subroutine_die): Likewise.
2179 (gen_block_die): Likewise.
2180 * tree.c (block_ultimate_origin): Likewise.
2181 * tree-pretty-print.c (dump_block_node): Remove code dealing
2182 with BLOCK_ABSTRACT.
2183 * tree-ssa-live.c (dump_scope_block): Likewise.
2184 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
2185 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
2187 2018-10-05 Richard Biener <rguenther@suse.de>
2189 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
2190 is asked for initialize mode to the component mode of the
2193 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2196 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2197 assembler for -mavx.
2198 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2200 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2203 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
2205 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
2206 to be DImode. When using mffscrn, force the operand to a register.
2208 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
2210 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
2211 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
2212 X87MODEF mode iterator.
2213 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
2214 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
2215 X87MODEF mode iterator.
2217 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2219 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
2220 -Wno-prio-ctor-dtor.
2222 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2224 * Makefile.in (OBJS): Add opt-problem.o.
2225 * dump-context.h: Include "selftest.h.
2226 (selftest::temp_dump_context): New forward decl.
2227 (class dump_context): Make friend of class
2228 selftest::temp_dump_context.
2229 (dump_context::dump_loc_immediate): New decl.
2230 (class dump_pretty_printer): Move here from dumpfile.c.
2231 (class temp_dump_context): Move to namespace selftest.
2232 (temp_dump_context::temp_dump_context): Add param
2233 "forcibly_enable_dumping".
2234 (selftest::verify_dumped_text):
2235 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
2236 (selftest::verify_item):
2237 (ASSERT_IS_TEXT): Move here from dumpfile.c.
2238 (ASSERT_IS_TREE): Likewise.
2239 (ASSERT_IS_GIMPLE): Likewise.
2240 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
2242 (dump_context::dump_loc_immediate): ...this new function.
2243 (class dump_pretty_printer): Move to dump-context.h.
2244 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
2245 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
2246 (temp_dump_context::temp_dump_context): Move to "selftest"
2247 namespace. Add param "forcibly_enable_dumping", and use it to
2248 conditionalize the use of m_pp;
2249 (selftest::verify_dumped_text): Make non-static.
2250 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
2251 (selftest::verify_item): Make non-static.
2252 (ASSERT_IS_TEXT): Move to dump-context.h.
2253 (ASSERT_IS_TREE): Likewise.
2254 (ASSERT_IS_GIMPLE): Likewise.
2255 (selftest::test_capture_of_dump_calls): Pass "true" for new
2256 param of temp_dump_context.
2257 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2258 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
2260 * opt-problem.cc: New file.
2261 * opt-problem.h: New file.
2262 * optinfo-emit-json.cc
2263 (selftest::test_building_json_from_dump_calls): Pass "true" for
2264 new param of temp_dump_context.
2265 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2266 (optinfo::emit_for_opt_problem): New function.
2267 (optinfo::emit): Clarity which emit_item is used.
2268 * optinfo.h (optinfo::get_dump_location): New accessor.
2269 (optinfo::emit_for_opt_problem): New decl.
2270 (optinfo::emit): Make const.
2271 * selftest-run-tests.c (selftest::run_tests): Call
2272 selftest::opt_problem_cc_tests.
2273 * selftest.h (selftest::opt_problem_cc_tests): New decl.
2274 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2275 bool to opt_result, converting fprintf messages to
2276 opt_result::failure_at calls. Add "stmt" param for use by the
2278 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2279 (runtime_alias_check_p): Convert return type from bool to
2280 opt_result, converting dump_printf calls to
2281 opt_result::failure_at, using the statement DDR_A for their
2283 (find_data_references_in_stmt): Convert return type from bool to
2284 opt_result, converting "return false" to opt_result::failure_at
2286 * tree-data-ref.h: Include "opt-problem.h".
2287 (dr_analyze_innermost): Convert return type from bool to opt_result,
2288 and add a const gimple * param.
2289 (find_data_references_in_stmt): Convert return type from bool to
2291 (runtime_alias_check_p): Likewise.
2292 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2293 dr_analyze_innermost.
2294 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2295 Convert return type from bool to opt_result, adding a message for
2296 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2297 (vect_analyze_data_ref_dependence): Convert return type from bool
2298 to opt_result. Change sense of return type from "false"
2299 effectively meaning "no problems" to "false" meaning a problem,
2300 so that "return false" becomes "return opt_result::success".
2301 Convert "return true" calls to opt_result::failure_at, using
2302 the location of statement A rather than vect_location.
2303 (vect_analyze_data_ref_dependences): Convert return type from bool
2305 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2306 calls to opt_result::failure_at, using the stmt location rather
2308 (vect_verify_datarefs_alignment): Convert return type from bool
2310 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
2311 into multiple more-tightly-scoped copies.
2312 (vect_analyze_data_refs_alignment): Convert return type from bool
2314 (vect_analyze_data_ref_accesses): Likewise, converting a
2315 "return false" to a "return opt_result::failure_at", adding a
2317 (vect_prune_runtime_alias_test_list): Convert return type from
2318 bool to opt_result, converting dump_printf_loc to
2319 opt_result::failure_at. Add a %G to show the pertinent statement,
2320 and use the stmt's location rather than vect_location.
2321 (vect_find_stmt_data_reference): Convert return type from
2322 bool to opt_result, converting dump_printf_loc to
2323 opt_result::failure_at, using stmt's location.
2324 (vect_analyze_data_refs): Convert return type from bool to
2325 opt_result. Convert "return false" to "return
2326 opt_result::failure_at", adding messages as needed.
2327 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2328 type from bool to opt_result.
2329 (vect_determine_vf_for_stmt): Likewise.
2330 (vect_determine_vectorization_factor): Likewise, converting
2331 dump_printf_loc to opt_result::failure_at, using location of phi
2332 rather than vect_location.
2333 (vect_analyze_loop_form_1): Convert return type from bool to
2334 opt_result, converting dump_printf_loc calls, retaining the use of
2336 (vect_analyze_loop_form): Convert return type from loop_vec_info
2337 to opt_loop_vec_info.
2338 (vect_analyze_loop_operations): Convert return type from bool to
2339 opt_result, converting dump_printf_loc calls, using the location
2340 of phi/stmt rather than vect_location where available. Convert
2341 various "return false" to "return opt_result::failure_at" with
2342 "unsupported phi" messages.
2343 (vect_get_datarefs_in_loop): Convert return type from bool to
2344 opt_result. Add a message for the
2345 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2346 (vect_analyze_loop_2): Convert return type from bool to
2347 opt_result. Ensure "ok" is set to a opt_result::failure_at before
2348 each "goto again;", adding new messages where needed.
2349 Add "unsupported grouped {store|load}" messages.
2350 (vect_analyze_loop): Convert return type from loop_vec_info to
2352 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2354 * tree-vect-stmts.c (process_use): Likewise, converting
2355 dump_printf_loc call and using stmt location, rather than
2357 (vect_mark_stmts_to_be_vectorized): Likeise.
2358 (vect_analyze_stmt): Likewise, adding a %G.
2359 (vect_get_vector_types_for_stmt): Convert return type from bool to
2360 opt_result, converting dump_printf_loc calls and using stmt
2361 location, rather than vect_location.
2362 (vect_get_mask_type_for_stmt): Convert return type from tree to
2363 opt_tree, converting dump_printf_loc calls and using stmt location.
2364 * tree-vectorizer.c: Include "opt-problem.h.
2365 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2366 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
2367 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
2368 enabled, use it to report at the top level "couldn't vectorize
2369 loop" followed by the problem.
2370 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2371 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2373 (vect_analyze_stmt): Likewise.
2374 (vect_get_vector_types_for_stmt): Likewise.
2375 (tree vect_get_mask_type_for_stmt): Likewise.
2376 (vect_analyze_data_ref_dependences): Likewise.
2377 (vect_enhance_data_refs_alignment): Likewise.
2378 (vect_analyze_data_refs_alignment): Likewise.
2379 (vect_verify_datarefs_alignment): Likewise.
2380 (vect_analyze_data_ref_accesses): Likewise.
2381 (vect_prune_runtime_alias_test_list): Likewise.
2382 (vect_find_stmt_data_reference): Likewise.
2383 (vect_analyze_data_refs): Likewise.
2384 (vect_analyze_loop): Convert return type from loop_vec_info to
2386 (vect_analyze_loop_form): Likewise.
2387 (vect_analyze_slp): Convert return type from bool to opt_result.
2389 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2391 * doc/invoke.texi (-fopt-info): Document new "internals"
2393 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
2394 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
2396 (optinfo_verbosity_options): Add "internals".
2397 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
2398 (dump_context::apply_dump_filter_p): New member function.
2399 (dump_context::dump_loc): Use apply_dump_filter_p rather than
2400 explicitly masking the dump_kind.
2401 (dump_context::begin_scope): Increment the scope depth first. Use
2402 apply_dump_filter_p rather than explicitly masking the dump_kind.
2403 (dump_context::emit_item): Use apply_dump_filter_p rather than
2404 explicitly masking the dump_kind.
2405 (dump_dec): Likewise.
2406 (dump_hex): Likewise.
2407 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
2408 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
2409 (opt_info_switch_p): Update handling of default
2410 MSG_OPTIMIZED_LOCATIONS to cope with default of
2411 MSG_PRIORITY_USER_FACING.
2412 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
2413 masking the dump_kind.
2414 (selftest::test_capture_of_dump_calls): Update test_dump_context
2415 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
2416 than MSG_ALL. Generalize scope test to be run at all four
2417 combinations of with/without MSG_PRIORITY_USER_FACING and
2418 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
2419 for each of the two values.
2420 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
2421 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
2422 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
2423 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
2424 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
2425 with MSG_PRIORITY_*.
2426 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
2427 dump messages as MSG_PRIORITY_USER_FACING.
2428 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
2429 about the interaction with MSG_PRIORITY_*.
2431 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2433 * varasm.c (output_constant): Add new parameter merge_strings.
2434 Make strings properly zero terminated in merge string sections.
2435 (mergeable_string_section): Don't fail if the last char is non-zero.
2436 (assemble_variable_contents): Handle merge string sections.
2437 (assemble_variable): Likewise.
2438 (assemble_constant_contents): Likewise.
2439 (output_constant_def_contents): Likewise.
2440 (output_constructor_array_range,
2441 output_constructor_regular_field): Adjust call to output_constant.
2442 (output_object_block): Adjust call to assemble_constant_contents
2443 and assemble_variable_contents.
2445 2018-10-04 Martin Liska <mliska@suse.cz>
2448 * cgraphunit.c (process_function_and_variable_attributes):
2449 Warn about a function with alias attribute and a body.
2451 2018-10-04 Martin Liska <mliska@suse.cz>
2454 * multiple_target.c (redirect_to_specific_clone): New function.
2455 (ipa_target_clone): Use it.
2456 * tree-inline.c: Fix comment.
2458 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2460 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
2462 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
2463 (gcc::dump_manager::register_pass): New member function, adapted
2464 from loop body in gcc::pass_manager::register_pass, adding a
2465 call to update_dfi_for_opt_info.
2466 (gcc::dump_manager::opt_info_enable_passes): Store the
2467 -fopt-info options into the new fields. Move the loop
2469 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
2471 * dumpfile.h (struct opt_pass): New forward decl.
2472 (gcc::dump_manager::register_pass): New decl.
2473 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
2474 (class gcc::dump_manager): Add fields "m_optgroup_flags",
2475 "m_optinfo_flags", and "m_optinfo_filename".
2476 * passes.c (gcc::pass_manager::register_pass): Move all of the
2477 dump-handling code to gcc::dump_manager::register_pass.
2479 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
2481 PR rtl-optimization/87466
2482 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
2483 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
2484 * doc/tm.texi: Regenerate.
2485 * ira-lives.c (process_bb_node_lives): Use the new target hook.
2486 * lra-lives.c (process_bb_lives): Likewise.
2487 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
2490 2018-10-04 Tamar Christina <tamar.christina@arm.com>
2492 * params.c (add_params): Fix initialization.
2494 2018-10-04 Martin Liska <mliska@suse.cz>
2496 PR gcov-profile/84107
2497 * tree-profile.c (init_ic_make_global_vars):
2498 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
2499 Come up with new ic_tuple* variables. Emit
2500 __gcov_indirect_call{,_topn} variables.
2501 (gimple_gen_ic_profiler): Access the variable
2503 (gimple_gen_ic_func_profiler): Access
2504 __gcov_indirect_call.callee field.
2505 (gimple_init_gcov_profiler): Use ptr_type_node.
2506 * value-prof.c (gimple_ic): Use ptr_type_node.
2508 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2510 PR tree-optimization/85787
2511 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
2512 into this function and add support for detecting multiple phis.
2513 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
2515 2018-10-04 Martin Liska <mliska@suse.cz>
2518 * ipa-inline.c (inline_to_all_callers_1):
2519 Call ultimate_alias_target for node being inlined.
2521 2018-10-03 Jeff Law <law@redhat.com>
2523 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
2525 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
2526 * tree.h (get_typenode_from_name): Prototype.
2528 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2530 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
2531 Change operand 2 predicate to nonimmediate_operand.
2532 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2534 2018-10-03 Martin Sebor <msebor@redhat.com>
2535 Jeff Law <law@redhat.com>
2537 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
2539 (get_string_length): Detect unterminated arrays.
2540 (format_string): Same.
2541 (format_directive): Warn about unterminated arrays.
2542 (handle_gimple_call): Mark statements with no_warning as needed.
2544 2018-10-03 Jim Wilson <jimw@sifive.com>
2546 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
2547 also define __riscv_abi_rve. Delete trailing white space.
2549 2018-10-03 Paul Koning <ni1d@arrl.net>
2551 Enable LRA register allocator for PDP11.
2552 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
2555 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
2556 * config/pdp11/pdp11.opt (-mlra): New option.
2557 * doc/invoke.texi (PDP-11 Options): Document -mlra.
2559 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2561 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
2562 (*<absneg:code>extend<mode>xf2): Ditto.
2564 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2566 PR tree-optimization/87415
2567 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
2570 2018-10-02 Jeff Law <law@redhat.com>
2572 * gimple-fold.c (get_range_strlen): Only set *nonstr when
2573 an unterminated string is discovered. Bubble up range
2574 even for unterminated strings.
2575 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
2576 indicates the string was not terminated via NONSTR.
2578 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2580 * tree-vrp.c (extract_range_from_unary_expr): Special case all
2581 pointer conversions.
2582 Do not do anything special for anti-ranges.
2584 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
2586 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
2587 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
2589 2018-10-03 Martin Liska <mliska@suse.cz>
2591 PR gcov-profile/86109
2592 * coverage.c (coverage_begin_function): Do not
2593 mark lambdas as artificial.
2594 * tree-core.h (struct GTY): Remove tm_clone_flag
2595 and introduce new lambda_function.
2596 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
2598 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2601 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
2602 P8_VECTOR and VSX are enabled.
2604 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2606 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
2607 0x3907 as CPU model number.
2609 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2611 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
2612 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
2613 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
2614 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
2615 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
2616 * config/s390/s390.md: Likewise. Rename also the cpu attribute
2617 value from arch12 to z14.
2619 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2621 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
2623 (isinf<mode>2): Ditto.
2625 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2627 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
2628 before emitting fxam. Perform calculations in XFmode.
2630 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2632 * match.pd (((X /[ex] A) +- B) * A): New transformation.
2634 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2637 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
2638 * tree.c (signed_or_unsigned_type_for): Handle complex.
2640 2018-10-02 Jeff Law <law@redhat.com>
2642 * gimple-fold.c (get_range_strlen): Remove dead code.
2644 2018-10-02 Martin Sebor <msebor@redhat.com>
2645 Jeff Law <law@redhat.com>
2647 * builtins.c (unterminated_array): Add new arguments.
2648 If argument is not terminated, bubble up size and exact
2650 (expand_builtin_strnlen): Detect, avoid expanding
2651 and diagnose unterminated arrays.
2652 (c_strlen): Fill in offset of start of unterminated strings.
2653 * builtins.h (unterminated_array): Update prototype.
2655 2018-10-02 Richard Biener <rguenther@suse.de>
2657 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
2658 of haddv4df, first reduce to SSE width and exploit the fact
2659 that we only need element zero with the reduction result.
2660 (reduc_plus_scal_v2df): Likewise.
2662 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2664 * dojump.h (do_jump): Delete.
2665 (do_jump_1): Likewise.
2666 (split_comparison): Move around.
2667 * dojump.c (do_jump): Make static.
2668 (do_jump_1): Likewise.
2669 (jumpifnot): Move around.
2670 (jumpifnot_1): Likewise.
2672 (jumpif_1): Likewise.
2673 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
2675 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2677 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
2678 insns in the delay slot and add_insn_after for the jump insn.
2680 2018-10-02 Richard Biener <rguenther@suse.de>
2682 * tree-inline.c (expand_call_inline): Use the location of
2683 the callee declaration for the inline-entry marker.
2684 * final.c (notice_source_line): Remove special-casing of
2685 NOTE_INSN_INLINE_ENTRY.
2687 2018-10-01 Carl Love <cel@us.ibm.com>
2690 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
2691 (__builtin_mtfsb0): New.
2692 (__builtin_mtfsb1): New.
2693 ( __builtin_set_fpscr_rn): New.
2694 (__builtin_set_fpscr_drn): New.
2695 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
2696 (rs6000_expand_set_fpscr_rn_builtin): Add.
2697 (rs6000_expand_set_fpscr_drn_builtin): Add.
2698 (rs6000_expand_builtin): Add case statement entries for
2699 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
2700 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
2701 RS6000_BUILTIN_MFFSL.
2702 (rs6000_init_builtins): Add ftype initialization and def_builtin
2703 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
2704 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
2705 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
2706 rs6000_mffscdrn): Add define_insn.
2707 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
2708 * doc/extend.texi: Add documentation for the builtins.
2710 2018-10-01 Richard Biener <rguenther@suse.de>
2712 PR tree-optimization/87465
2713 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
2714 causing branch miscounts.
2716 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2718 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
2719 aarch64_option_default_param): New.
2720 (params.h): Include.
2721 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
2722 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
2723 stack-clash protection validation code.
2725 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2727 * params.c (validate_param): New.
2728 (add_params): Use it.
2729 (set_param_value): Refactor param validation into validate_param.
2730 (diagnostic.h): Include.
2731 * diagnostic.h (diagnostic_ready_p): New.
2733 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2735 * params.c (set_param_value):
2736 Add index of parameter being validated.
2737 * common/common-target.def (option_validate_param): New.
2738 * common/common-targhooks.h (default_option_validate_param): New.
2739 * common/common-targhooks.c (default_option_validate_param): New.
2740 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
2741 * doc/tm.texi: Regenerate.
2743 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2746 * config/aarch64/aarch64.c (aarch64_override_options_internal):
2747 Add validation for stack-clash parameters and set defaults.
2749 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2752 * configure.ac: Add stack-clash-protection-guard-size.
2753 * doc/install.texi: Document it.
2754 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
2755 * params.def: Update comment for guard-size.
2756 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
2757 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
2758 * configure: Regenerate.
2760 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2763 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
2764 STACK_DYNAMIC_OFFSET): New.
2765 * config/aarch64/aarch64.c (aarch64_layout_frame):
2766 Update outgoing args size.
2767 (aarch64_stack_clash_protection_alloca_probe_range,
2768 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2770 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2773 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
2775 * target.def (stack_clash_protection_alloca_probe_range): New.
2776 (stack_clash_protection_final_dynamic_probe): Remove.
2777 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
2778 (default_stack_clash_protection_final_dynamic_probe): Remove.
2779 * targhooks.c: Likewise.
2780 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2781 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
2782 * doc/tm.texi: Regenerate.
2784 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2787 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
2788 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
2789 aarch64_clamp_to_uimm12_shift): New.
2790 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
2791 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
2793 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2796 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
2798 2018-10-01 Jeff Law <law@redhat.com>
2799 Richard Sandiford <richard.sandiford@linaro.org>
2800 Tamar Christina <tamar.christina@arm.com>
2803 * config/aarch64/aarch64.md
2804 (probe_stack_range): Add k (SP) constraint.
2805 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
2806 STACK_CLASH_MAX_UNROLL_PAGES): New.
2807 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
2808 stack probes for stack clash.
2809 (aarch64_allocate_and_probe_stack_space): New.
2810 (aarch64_expand_prologue): Use it.
2811 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
2812 (aarch64_sub_sp): Add emit_move_imm optional param.
2814 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
2816 PR tree-optimization/87261
2817 * match.pd: Remove trailing whitespace.
2818 Add (x & y) | ~(x | y) -> ~(x ^ y),
2819 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
2821 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2823 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
2825 (ashlsi3_insn): Update instruction constraints.
2826 (ashrsi3_insn): Likewise.
2827 (rotrsi3): Likewise.
2828 (add_shift): Likewise.
2829 * config/arc/constraints.md (Csz): New 32 bit constraint. It
2830 avoids placing in the limm field small constants which, otherwise,
2831 could end into a small instruction.
2833 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2835 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
2836 destination register is not odd-even.
2837 (umaddsidi4_split): Likewise.
2839 2018-10-01 Richard Biener <rguenther@suse.de>
2841 * tree-inline.c (expand_call_inline): Store origin of fn
2842 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
2843 * tree.c (block_ultimate_origin): Simplify and do some
2846 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
2848 * config/i386/mmx.md (EMMS): New int iterator.
2849 (emms): New int attribute.
2850 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
2851 EMMS int iterator. Explicitly declare clobbers.
2852 (mmx_emms): Remove expander.
2854 * config/i386/predicates.md (emms_operation): Remove predicate.
2855 (vzeroall_pattern): New predicate.
2856 (vzeroupper_pattern): Rename from vzeroupper_operation.
2857 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
2858 vzeroupper_pattern and vzeroall_pattern predicates.
2860 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
2862 PR rtl-optimization/86939
2863 * ira-lives.c (make_hard_regno_born): Rename from this...
2864 (make_hard_regno_live): ... to this. Remove update to conflict
2865 information. Update function comment.
2866 (make_hard_regno_dead): Add conflict information update. Update
2868 (make_object_born): Rename from this...
2869 (make_object_live): ... to this. Remove update to conflict information.
2870 Update function comment.
2871 (make_object_dead): Add conflict information update. Update function
2873 (mark_pseudo_regno_live): Call make_object_live.
2874 (mark_pseudo_regno_subword_live): Likewise.
2875 (mark_hard_reg_dead): Update function comment.
2876 (mark_hard_reg_live): Call make_hard_regno_live.
2877 (process_bb_node_lives): Likewise.
2878 * lra-lives.c (make_hard_regno_born): Rename from this...
2879 (make_hard_regno_live): ... to this. Remove update to conflict
2880 information. Remove now uneeded check_pic_pseudo_p argument.
2881 Update function comment.
2882 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
2883 to conflict information. Update function comment.
2884 (mark_pseudo_live): Remove update to conflict information. Update
2886 (mark_pseudo_dead): Add conflict information update.
2887 (mark_regno_live): Call make_hard_regno_live.
2888 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
2889 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
2891 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
2894 * config/i386/i386.c (construct_container): Use TImode for
2895 BLKmode values in 2 integer registers.
2897 2018-09-29 Jeff Law <law@redhat.com>
2899 * builtins.c (unterminated_array): Pass in c_strlen_data * to
2900 c_strlen rather than just a tree *.
2901 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
2902 Update recursive calls appropriately. If caller did not provide a
2903 suitable data pointer, create a local one. When a non-terminated
2904 string is discovered, bubble up information about the string via the
2905 c_strlen_data object.
2906 * builtins.h (c_strlen): Update prototype.
2907 (c_strlen_data): New structure.
2908 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
2909 For a type 2 call, if c_strlen indicates a non-terminated string
2910 use the length of the non-terminated string.
2911 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
2913 2018-09-29 Jakub Jelinek <jakub@redhat.com>
2916 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
2917 __m512d type for __A argument rather than __m512.
2919 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
2921 * match.pd (simple_comparison): Don't optimize if either operand is
2922 a function pointer when target needs function pointer canonicalization.
2924 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2926 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
2927 power5 .. power9 to remove indirection.
2928 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
2929 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
2930 ASM_CPU_476_SPEC): Delete.
2931 (ASM_CPU_SPEC): Adjust.
2932 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
2933 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
2935 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2937 * config.in: Delete HAVE_AS_DCI.
2938 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
2939 * config/rs6000/rs6000.h: Ditto.
2940 * configure.ac: Delete HAVE_AS_DCI.
2941 * configure: Regenerate.
2943 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2945 * config.in (HAVE_AS_LWSYNC): Delete.
2946 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2947 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
2949 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2950 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
2952 * configure.ac: Delete HAVE_AS_LWSYNC.
2953 * configure: Regenerate.
2955 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
2956 Pierre-Marie de Rodat <derodat@adacore.com>
2958 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
2959 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
2960 (cgraph_node::create_thunk): Add indirect_offset parameter.
2961 (thunk_adjust): Likewise.
2962 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
2963 and initialize the corresponding field with it.
2964 (cgraph_node::dump): Dump indirect_offset field.
2965 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
2966 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
2967 (thunk_adjust): Add indirect_offset parameter and deal with it.
2968 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
2969 pass it to thunk_adjust. Do not call the target hook if it's non-zero
2970 or if the thunk is external or local. Fix formatting. Do not chain
2971 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
2972 if any, in the GIMPLE representation.
2973 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
2974 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
2975 (input_node): Read indirect_offset field.
2976 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
2977 call to thunk_adjust.
2978 * tree-nested.c (struct nesting_info): Add thunk_p field.
2979 (create_nesting_tree): Set it.
2980 (convert_all_function_calls): Copy static chain from targets to thunks.
2981 (finalize_nesting_tree_1): Return early for thunks.
2982 (unnest_nesting_tree_1): Do not finalize thunks.
2983 (gimplify_all_functions): Do not gimplify thunks.
2985 2018-09-28 David Malcolm <dmalcolm@redhat.com>
2987 * opt-suggestions.c (option_proposer::build_option_suggestions):
2988 Release "option_values".
2990 2018-09-28 David Malcolm <dmalcolm@redhat.com>
2992 * coverage.c (get_coverage_counts): Convert problem-reporting dump
2993 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
2994 * dumpfile.c (kind_as_string): New function.
2995 (dump_loc): Rather than a hardcoded prefix of "note: ", use
2996 kind_as_string to vary the prefix based on dump_kind.
2997 (selftest::test_capture_of_dump_calls): Update for above.
2999 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3001 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
3002 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
3004 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3006 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
3007 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
3008 INVALID_REGNUM instead of FPSR_REG.
3009 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
3010 * config/i386/i386.md: Update comment of FP compares.
3011 (fldenv): Do not clobber FPSR_REG.
3013 2018-09-28 Richard Biener <rguenther@suse.de>
3015 * tree.h (BLOCK_ORIGIN): New.
3016 * omp-expand.c (grid_expand_target_grid_body): Assign
3017 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
3018 * tree-inline.c (remap_block): Likewise.
3019 * auto-profile.c (get_function_decl_from_block): Simplify
3020 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
3021 * langhooks.c (lhd_print_error_function): Likewise.
3022 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
3024 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
3025 * tree.c (block_nonartificial_location): Likewise.
3026 (block_ultimate_origin): Likewise.
3027 * tree-pretty-print.c (percent_K_format): Likewise. Remove
3028 no longer needed LTO case.
3030 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
3031 Jan Hubicka <jh@suse.cz>
3032 Martin Jambor <mjambor@suse.cz>
3034 * simplify-rtx.c (simplify_merge_mask): New function.
3035 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
3036 same masks are used in op1 or op2.
3037 (test_vec_merge): New function.
3038 (test_vector_ops): Call test_vec_merge.
3040 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3042 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
3043 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
3044 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
3045 (cypress_costs): Set it.
3046 (supersparc_costs): Likewise.
3047 (hypersparc_costs): Likewise.
3048 (leon_cost): Likewise.
3049 (leon3_costs): Likewise.
3050 (sparclet_costs): Likewise.
3051 (ultrasparc_costs): Likewise.
3052 (ultrasparc_costs): Likewise.
3053 (niagara_costs): Likewise.
3054 (niagara2_costs): Likewise.
3055 (niagara3_costs): Likewise.
3056 (niagara4_costs): Likewise.
3057 (niagara7_costs): Likewise.
3058 (m8_costs): Likewise.
3059 (TARGET_CAN_FOLLOW_JUMP): Define.
3060 (pass_work_around_errata::gate): Minor tweak.
3061 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
3062 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
3063 Automaitcally clear MASK_FSMULD mask for V7 processors.
3064 (sparc_can_follow_jump): New static function.
3065 (output_ubranch): Deal with CROSSING_JUMP_P.
3066 (sparc_use_sched_lookahead): Rewrite using switch statement.
3067 (sparc_issue_rate): Reorder.
3068 (sparc_branch_cost): New function.
3070 2018-09-27 Martin Sebor <msebor@redhat.com>
3072 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
3073 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
3074 (int_fits_type_p): Same.
3076 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
3078 * config/i386/i386.md (FPCR_REG): Remove.
3079 (UNSPEC_FLDCW): Remove.
3080 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
3081 (x86_fldcw_1): Remove insn pattern.
3082 (fnstenv): Do not clobber FPCR_REG.
3084 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
3085 (CALL_USED_REGISTERS): Ditto.
3086 (REG_ALLOC_ORDER): Ditto.
3087 (REG_CLASS_CONTENTS): Ditto.
3088 (HI_REGISTER_NAMES): Ditto.
3089 (ADDITIONAL_REGISTER_NAMES): Use defines instead
3090 of numerical constants.
3091 * config/i386/i386.c (regclass_map): Remove fpsr register.
3092 (dbx_register_map): Ditto.
3093 (dbx64_register_map): Ditto.
3094 (svr4_dbx_register_map): Ditto.
3095 (print_reg): Do not handle FPCR_REG.
3097 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
3100 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
3101 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
3102 Delete, always treat as true.
3103 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3104 Ditto. Simplify remaining code.
3105 * config/powerpcspe/powerpcspe.h: Ditto.
3106 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
3107 Simplify remaining code.
3108 (rs6000_expand_builtin): Ditto.
3109 * config/rs6000/rs6000.h: Ditto.
3110 * configure.ac: Ditto.
3111 * configure: Regenerate.
3113 2018-09-27 Martin Liska <mliska@suse.cz>
3115 * coverage.c (get_coverage_counts): Revert the formatting
3116 of missing profile opt info.
3118 2018-09-27 Richard Biener <rguenther@suse.de>
3122 * dwarf2out.c (set_block_origin_self): Do not mark outermost
3123 block as we do not output that.
3124 (gen_inlined_subroutine_die): Elide the originally outermost
3125 block, matching what we do for concrete instances.
3126 (decls_for_scope): Add parameter specifying whether to recurse
3129 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
3130 Tom de Vries <tom@codesourcery.com>
3134 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
3135 STORE_FLAG_VALUE == 1.
3137 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
3139 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
3140 constant definitions.
3141 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
3142 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
3143 ("speculation_barrier"): New expander definition.
3145 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
3147 PR gcov-profile/86957
3148 * common.opt: New warning option -Wmissing-profile.
3149 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
3150 * doc/invoke.texi: Document -Wmissing-profile.
3152 2018-09-26 Jim Wilson <jimw@sifive.com>
3154 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
3155 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
3157 2018-09-26 Martin Sebor <msebor@redhat.com>
3159 * tree.c (zerop): Change return type to bool.
3160 (integer_zerop, integer_onep, integer_each_onep): Same.
3161 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3162 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3163 (real_onep, real_minus_onep, chain_index): Same.
3164 (print_type_hash_statistics, type_list_equal): Same.
3165 * tree.h (zerop): Same.
3166 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
3167 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3168 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3169 (real_onep, real_minus_onep, chain_index): Same.
3170 (print_type_hash_statistics, type_list_equal): Same.
3172 2018-09-26 Jim Wilson <jimw@sifive.com>
3174 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
3176 2018-09-26 Jakub Jelinek <jakub@redhat.com>
3179 * config/i386/i386.c: Include debug.h and dwarf2out.h.
3180 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
3183 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
3185 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
3187 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3189 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
3190 and FP_SECOND_SSE_REGS.
3191 (REG_CLASS_NAMES): Ditto.
3192 (REG_CLASS_CONTENTS): Ditto.
3193 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
3194 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
3195 (ix86_preferred_output_reload_class): Ditto.
3196 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
3197 clobber constraint to "=&f".
3198 (fix_truncdi_i387): Ditto.
3199 (lrintxfdi2): Ditto.
3200 (fistdi2_<rounding>): Ditto.
3201 (fpremxf4_i387): Change "=u" constraint to "=f".
3202 (fprem1xf4_i387): Ditto.
3204 (fptanxf4_i387): Ditto.
3205 (fxtractxf3_i387): Ditto.
3206 (fscalexf4_i387): Ditto.
3207 (atan2xf3): Change "u" constraint to "f".
3208 (fyl2xxf3_i387): Ditto.
3209 (fyl2xp1xf3_i387): Ditto.
3211 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3214 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
3215 for removed I387_MASK_PM entity.
3218 2018-09-26 Jeff Law <law@redhat.com>
3220 2018-09-26 Alexey Neyman <stilor@att.net>
3222 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3223 headers are no longer pulled in by <isl/val.h>.
3225 2018-09-26 Richard Biener <rguenther@suse.de>
3228 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
3229 or concrete instance DIE to the tree. Create abstract origin
3230 attributes also for concrete instances.
3232 2018-09-26 Alexey Neyman <stilor@att.net>
3234 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3235 headers are no longer pulled in by <isl/val.h>.
3237 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
3239 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
3240 Use new helper functions.
3241 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
3242 Use new helper functions.
3243 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
3244 aarch_mm_needs_release): New declarations.
3245 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
3246 aarch_mm_needs_release): New.
3248 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
3250 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
3251 (arm32_output_mi_thunk): Deal with long calls.
3253 2018-09-26 Richard Biener <rguenther@suse.de>
3257 * tree-inline.c (expand_call_inline): When the location
3258 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3259 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3260 the inserted BLOCK to make inlined_function_outer_scope_p
3262 * dwarf2out.c (add_call_src_coords_attributes): Do not add
3263 coords for reserved locations.
3265 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3267 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3268 (*call_indirect_nonlocal_sysv<mode>): Ditto.
3269 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3270 (*sibcall_nonlocal_sysv<mode>): Ditto.
3271 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3272 (<bd>_<mode>): Ditto.
3273 (<bd>tf_<mode>): Ditto.
3275 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3277 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3278 control string as a list of templates instead of as C code.
3279 (*altivec_movti): Ditto.
3280 * config/rs6000/darwin.md (movdf_low_di): Ditto.
3282 2018-09-25 Jim Wilson <jimw@sifive.com>
3284 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3285 when target symbol is weak.
3287 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3290 * builtins.c (unterminated_array): Simplify.
3291 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
3292 where pointer arithmetic is safe.
3294 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3297 * config/rs6000/altivec.md (altivec_vspltb): Use
3298 const_0_to_15_operand instead of u5bit_cint_operand.
3299 (*altivec_vspltb_internal): Ditto.
3300 (altivec_vspltb_direct): Ditto.
3301 (altivec_vsplth): Use const_0_to_7_operand instead of
3303 (*altivec_vsplth_internal): Ditto.
3304 (altivec_vsplth_direct): Ditto.
3305 (altivec_vspltw): Use const_0_to_3_operand instead of
3307 (*altivec_vspltw_internal): Ditto.
3308 (altivec_vspltw_direct): Ditto.
3309 (altivec_vspltsf): Ditto.
3310 (*altivec_vspltsf_internal): Ditto.
3311 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3312 various splats with the proper size immediate. Reorder the various
3313 cases by ascending size of immediate, and put all such together.
3315 2018-09-25 Richard Biener <rguenther@suse.de>
3318 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3320 (maybe_create_die_with_external_ref): Do not create
3321 DW_TAG_imported_unit here.
3322 (add_abstract_origin_attribute): Handle external BLOCK refs.
3323 (dwarf2out_abstract_function): Simplify LTO case.
3324 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3325 rather than using maybe_create_die_with_external_ref.
3327 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
3330 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3331 (frndintxf2_mask_pm_i387): Ditto.
3332 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3333 Enable for !flag_trapping_math.
3334 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3335 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3336 Change operand 1 predicate to nonimmediate_operand.
3337 (attr "i387_cw"): Remove mask_pm.
3338 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3339 (enum ix86_entity): Remove I387_MASK_PM.
3340 * config/i386/i386.c (ix86_i387_mode_needed): Do not
3341 handle I387_MASK_PM.
3342 (ix86_mode_needed): Ditto.
3343 (ix86_mode_after): Ditto.
3344 (ix86_mode_entry): Ditto.
3345 (ix86_mode_exit): Ditto.
3346 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3348 2018-09-25 Jakub Jelinek <jakub@redhat.com>
3350 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3351 to_update_switch_stmts to vNULL instead of calling create on them
3354 2018-09-25 Richard Biener <rguenther@suse.de>
3356 PR tree-optimization/87402
3357 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3358 (visit_phi): Re-instantiate handling of supposed to be VARYING
3359 but non-VARYING backedge value.
3361 2018-09-25 Richard Biener <rguenther@suse.de>
3364 * dwarf2out.c (struct sym_off_pair): New.
3365 (external_die_map): New global.
3366 (lookup_decl_die): When in LTO create DIEs lazily from the
3368 (lookup_block_die): New function, create DIEs lazily in LTO.
3369 (equate_block_to_die): New function.
3370 (dwarf2out_die_ref_for_decl): During WPA get the association
3371 from the external DIE map.
3372 (dwarf2out_register_external_die): Record mapping into the
3374 (maybe_create_die_with_external_ref): New function split out from
3375 DIE generation part of old dwarf2out_register_external_die.
3376 (add_abstract_origin_attribute): Do not return the DIE. When
3377 in LTO reference externals directly.
3378 (dwarf2out_abstract_function): When in LTO ignore calls for
3379 decls with external DIEs (already present abstract instances).
3380 (gen_call_site_die): Adjust.
3381 (add_high_low_attributes): Likewise.
3382 (gen_lexical_block_die): Likewise.
3383 (gen_inlined_subroutine_die): Likewie.
3384 (gen_block_die): Likewise.
3385 (dwarf2out_inline_entry): Likewise.
3386 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
3389 2018-09-25 Martin Liska <mliska@suse.cz>
3391 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
3392 integers and not by a float value.
3394 2018-09-25 Martin Liska <mliska@suse.cz>
3397 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
3399 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
3400 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
3401 * godump.c (go_format_type): Remove extra parenthesis.
3403 2018-09-25 Martin Liska <mliska@suse.cz>
3405 * alias.c (set_dest_equal_p): Remove unused function.
3406 * config/i386/i386.c (def_builtin_pure2): Likewise.
3407 * diagnostic-show-locus.c (class layout): Remove
3409 (layout::layout): Likewise here.
3410 * dump-context.h (class temp_dump_context): Likewise.
3411 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
3412 (add_AT_loclistsptr): Likewise.
3413 (add_AT_offset): Likewise.
3414 (get_AT_hi_pc): Likewise.
3415 (is_comdat_die): Likewise.
3416 (type_is_enum): Likewise.
3417 (ceiling): Likewise.
3418 (add_AT_vms_delta): Likewise.
3419 (is_class_die): Likewise.
3420 * edit-context.c (class line_event): Remove unused field.
3421 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
3423 * ipa-cp.c (ipa_get_vr_lat): Likewise.
3424 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
3425 (ok_for_base_p_nonstrict): Likewise.
3426 * tree-chrec.c (is_not_constant_evolution): Likewise.
3427 (chrec_fold_poly_cst): Likewise.
3428 * tree-if-conv.c (has_pred_critical_p): Likewise.
3429 * tree-ssa-coalesce.c (print_exprs): Likewise.
3430 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
3431 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
3432 * tree-vrp.c (value_ranges_intersect_p): Likewise.
3433 (value_range_nonnegative_p): Likewise.
3435 2018-09-25 Martin Liska <mliska@suse.cz>
3437 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3438 Do not handle "GNU Pascal".
3439 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3441 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
3442 from documentation. Likewise.
3443 * dbxout.c (dbxout_range_type): Likewise.
3444 * doc/cpp.texi: Likewise.
3445 * doc/extend.texi: Likewise.
3446 * doc/frontends.texi: Likewise.
3447 * doc/invoke.texi: Remove Pascal entry.
3448 * tree.def (CLEANUP_POINT_EXPR): Likewise.
3449 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
3451 2018-09-25 Martin Liska <mliska@suse.cz>
3454 * doc/invoke.texi: Document all parameters and remove default
3457 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
3460 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
3461 contains HOST_WIDE_INTs when computing its size.
3463 2018-09-24 Jim Wilson <jimw@sifive.com>
3466 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
3468 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
3470 2018-09-24 Andrew Pinski <apinski@marvell.com>
3472 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
3473 access prev before checking it for NULLness in the
3474 AARCH64_FUSE_CMP_BRANCH case.
3476 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
3479 * config/i386/i386.c (rest_of_insert_endbranch): Set
3480 endbr_queued_at_entrance to true and don't insert ENDBR if
3481 x86_function_profiler will be called.
3482 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
3484 * config/i386/i386.h (machine_function): Add
3485 endbr_queued_at_entrance.
3487 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3489 * genattrtab.c (mk_attr_alt): Use alternative_mask.
3490 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
3492 (check_attr_test): Use alternative_mask.
3493 (get_attr_value): Likewise.
3494 (compute_alternative_mask): Use alternative_mask and XWINT.
3495 (make_alternative_compare): Use alternative_mask.
3496 (attr_alt_subset_p): Use XWINT.
3497 (attr_alt_subset_of_compl_p): Likewise.
3498 (attr_alt_intersection): Use alternative_mask and XWINT.
3499 (attr_alt_union): Likewise.
3500 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
3501 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
3502 (simplify_test_exp): Use alternative_mask and XWINT.
3503 (write_test_expr): Use alternative_mask and XWINT, adjust bit
3504 number calculation to support 64 bits. Generate code that
3505 checks 64-bit masks.
3506 (main): Use alternative_mask.
3507 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
3509 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3512 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
3513 RETURN+USE when returning via %r14.
3515 2018-09-24 Martin Liska <mliska@suse.cz>
3517 * gcov.c (output_lines): Print colorization legend
3518 for both flag_use_colors and flag_use_hotness_colors.
3521 2018-09-24 Martin Liska <mliska@suse.cz>
3523 * coverage.c (get_coverage_counts): Use warning_at
3524 with current_function_decl location. Use %qD in warning
3527 2018-09-24 Martin Liska <mliska@suse.cz>
3529 * memory-block.h (memory_block_pool::release): Annotate with
3530 valgrind that the memory is not accessible.
3532 2018-09-24 Martin Liska <mliska@suse.cz>
3535 * asan.c: Make asan_handled_variables extern.
3537 * cfgexpand.c (expand_stack_vars): Make sure
3538 a representative is unpoison if another
3539 variable in the partition is handled by
3540 use-after-scope sanitization.
3542 2018-09-24 Richard Biener <rguenther@suse.de>
3544 PR tree-optimization/63155
3545 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
3546 the worklist when the edge of the respective argument isn't
3549 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3551 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
3552 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
3553 (MASK_CLASS_P): Update for rename.
3554 (MAYBE_MASK_CLASS_P): Ditto.
3555 (REG_CLASS_NAMES): Update.
3556 (REG_CLASS_CONTENT): Update.
3557 * config/i386/i386.c (regclass_map): Update for MASK_REG
3558 and ALL_MASK_REGS rename.
3559 * config/i386/constraints.md (Yk): Update for rename.
3562 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3564 * config/i386/i386.h (enum reg_class): Remove
3565 EVEX_SSE_REGS and MOD4_SSE_REGS.
3566 (REG_CLASS_NAMES): Update.
3567 (REG_CLASS_CONTENT): Update.
3568 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
3569 registers as ALL_SSE_REGS.
3570 (ix86_additional_allocno_class_p): Remove.
3571 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
3572 (ix86_register_priority): Lower priority of EVEX SSE registers.
3573 Use IN_RANGE macro where appropriate.
3574 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
3575 AVX-5124VNNIW checks.
3576 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
3577 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
3578 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
3579 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
3580 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
3581 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
3582 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
3583 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
3584 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
3585 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
3586 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
3587 * config/i386/constraints.md (Yh): Remove.
3589 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3591 * config/i386/i386.c (regclass_map): Declare integer REX registers
3594 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
3596 * doc/service.texi (Service): Switch the fsf.org link to https.
3598 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
3601 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3602 Define to speculation_safe_value_not_needed.
3604 2018-09-21 Florian Weimer <fweimer@redhat.com>
3607 * doc/extend.texi (Common Function Attributes): Mention that
3608 noreturn suppresses tail call optimization.
3610 2018-09-21 Jeff Law <law@redhat.com>
3612 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
3613 vr_values::cleanup_edges_and_switches.
3614 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
3616 (identify_jump_threads): Remove EDGE_IGNORE handling.
3617 (execute_vrp): Move handling of to_remove_edges and
3618 to_update_switch_stmts into vr_values class member functions.
3619 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
3620 (to_update_switch_stmts): Likewise.
3621 * vr-values.c: Include cfghooks.h.
3622 (vr_values::vr_values): Initialize to_remove_edges and
3623 to_update_switch_stmts.
3624 (vr_values::~vr_values): Verify to_remove_edges and
3625 to_update_switch_stmts are empty.
3626 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
3627 (vr_values::cleanup_edges_and_switches): New member function.
3628 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
3629 function. Add new data members.
3631 2018-09-21 David Malcolm <dmalcolm@redhat.com>
3633 PR tree-optimization/87309
3634 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
3635 calls with pflags and alt_flags.
3636 (selftest::test_capture_of_dump_calls): Add test of interaction of
3637 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
3639 2018-09-21 Olivier Hainque <hainque@adacore.com>
3641 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
3643 2018-09-21 Olivier Hainque <hainque@adacore.com>
3645 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
3647 2018-09-21 Olivier Hainque <hainque@adacore.com>
3649 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
3650 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
3651 (VXWORKS_LIBS_RTP): Minor reordering.
3653 2018-09-21 Olivier Hainque <hainque@adacore.com>
3655 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
3656 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
3658 2018-09-21 Olivier Hainque <hainque@adacore.com>
3660 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
3661 (PTRDIFF_TYPE): Likewise.
3663 2018-09-21 Olivier Hainque <hainque@adacore.com>
3665 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
3666 triplet, similar to support for VxWorks7.
3667 * config/vxworks-dummy.h: Provide a default definition
3668 of TARGET_VXWORKS64 to 0.
3670 2018-09-21 Olivier Hainque <hainque@adacore.com>
3672 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
3673 * config/vxworks-dummy.h: here.
3675 2018-09-21 Olivier Hainque <hainque@adacore.com>
3677 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
3679 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
3680 Bo Zhou <zbo.zhou@hisilicon.com>
3682 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
3683 * config/aarch64/aarch64-tune.md: Regenerated.
3684 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
3685 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
3686 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
3688 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
3689 Julian Brown <julian@codesourcery.com>
3691 * builtins.c (get_builtin_sync_mem): Handle address spaces.
3693 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3695 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
3696 if the call takes a static chain.
3698 2018-09-21 Martin Liska <mliska@suse.cz>
3700 * auto-profile.c (autofdo_source_profile::read): Do not
3702 (read_profile): Do not add working sets.
3703 (read_autofdo_file): Remove sum_all.
3704 (afdo_callsite_hot_enough_for_early_inline): Remove const
3706 * coverage.c (struct counts_entry): Remove gcov_summary.
3707 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
3708 do not support GCOV_TAG_PROGRAM_SUMMARY.
3709 (get_coverage_counts): Remove summary and expected
3711 * coverage.h (get_coverage_counts): Likewise.
3712 * doc/gcov-dump.texi: Remove -w option.
3713 * gcov-dump.c (dump_working_sets): Remove.
3714 (main): Do not support '-w' option.
3715 (print_usage): Likewise.
3716 (tag_summary): Likewise.
3717 * gcov-io.c (gcov_write_summary): Do not dump
3719 (gcov_read_summary): Likewise.
3720 (gcov_histo_index): Remove.
3721 (gcov_histogram_merge): Likewise.
3722 (compute_working_sets): Likewise.
3723 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
3725 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
3726 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
3727 (GCOV_HISTOGRAM_SIZE): Remove.
3728 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
3729 (struct gcov_summary): Simplify rapidly just
3730 to runs and sum_max fields.
3731 (gcov_histo_index): Remove.
3732 (NUM_GCOV_WORKING_SETS): Likewise.
3733 (compute_working_sets): Likewise.
3734 * gcov-tool.c (print_overlap_usage_message): Remove
3735 trailing empty line.
3736 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
3737 (output_lines): Remove program related line.
3738 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
3739 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
3741 (input_profile_summary): Do not read it.
3742 (merge_profile_summaries): And do not merge it.
3743 (input_symtab): Do not call removed function.
3744 * modulo-sched.c (sms_schedule): Do not print sum_max.
3745 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
3746 removed when histogram method was invented.
3747 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
3749 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
3751 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
3752 and dump selected value.
3753 * profile.c (add_working_set): Remove.
3754 (get_working_sets): Likewise.
3755 (find_working_set): Likewise.
3756 (get_exec_counts): Do not work with working sets.
3757 (read_profile_edge_counts): Do not inform as sum_max is removed.
3758 (compute_branch_probabilities): Likewise.
3759 (compute_value_histograms): Remove argument for call of
3760 get_coverage_counts.
3761 * profile.h: Do not make gcov_summary const.
3763 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
3765 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
3767 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3769 PR tree-optimization/86990
3770 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
3771 Check that the entire merged store group is made of constants only for
3774 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
3776 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
3777 (VTABLE_VERIFICATION_SPEC): Likewise.
3778 (SANITIZER_EARLY_SPEC): Likewise.
3779 (SANITIZER_SPEC): Likewise.
3780 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
3781 * doc/invoke.texi (Link Options): Document -r.
3783 2018-09-20 Richard Biener <rguenther@suse.de>
3786 * gimplify.c (gimplify_expr): Retain alignment of
3787 addressable lvalue in dereference.
3789 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
3792 * configure.ac: Check for .loc is_stmt support.
3793 * configure, config.in: Rebuilt.
3794 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
3797 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3799 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
3800 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
3803 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3805 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
3807 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
3810 2018-09-20 Marek Polacek <polacek@redhat.com>
3812 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
3814 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3816 PR tree-optimization/87288
3817 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
3818 into account when determining PEELING_FOR_NITERS.
3820 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3822 PR tree-optimization/86877
3823 * tree-vect-loop.c (vect_analyze_loop_2): Call
3824 vect_verify_datarefs_alignment.
3826 2018-09-19 Marek Polacek <polacek@redhat.com>
3828 * doc/invoke.texi: Document -Wclass-conversion.
3830 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
3832 * config/pa/pa.c (pa_adjust_priority): Delete.
3833 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
3835 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
3836 (atomic_storehi): Likewise.
3837 (atomic_storesi): Likewise.
3838 (atomic_loaddi): Restore compare and swap exchange loop code.
3840 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
3842 PR rtl-optimization/86902
3843 * combine.c (try_combine): When changing the CC mode used, don't change
3844 an unrelated mode in other_insn to that new CC mode.
3846 2018-09-19 David Malcolm <dmalcolm@redhat.com>
3848 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
3849 with %T in place of calls to dump_generic_expr.
3850 (prune_runtime_alias_test_list): Likewise.
3851 (create_runtime_alias_checks): Likewise.
3852 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
3853 (vect_analyze_data_ref_dependence): Likewise.
3854 (vect_slp_analyze_data_ref_dependence): Likewise.
3855 (vect_record_base_alignment): Likewise. Use %G in place of call
3856 to dump_gimple_stmt.
3857 (vect_compute_data_ref_alignment): Likewise.
3858 (verify_data_ref_alignment): Likewise.
3859 (vect_find_same_alignment_drs): Likewise.
3860 (vect_analyze_group_access_1): Likewise.
3861 (vect_analyze_data_ref_accesses): Likewise.
3862 (dependence_distance_ge_vf): Likewise.
3863 (dump_lower_bound): Likewise.
3864 (vect_prune_runtime_alias_test_list): Likewise.
3865 (vect_find_stmt_data_reference): Likewise.
3866 (vect_analyze_data_refs): Likewise.
3867 (vect_create_addr_base_for_vector_ref): Likewise.
3868 (vect_create_data_ref_ptr): Likewise.
3869 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
3870 (vect_can_advance_ivs_p): Likewise.
3871 (vect_update_ivs_after_vectorizer): Likewise.
3872 (vect_gen_prolog_loop_niters): Likewise.
3873 (vect_prepare_for_masked_peels): Likewise.
3874 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3875 (vect_determine_vectorization_factor): Likewise.
3876 (vect_is_simple_iv_evolution): Likewise.
3877 (vect_analyze_scalar_cycles_1): Likewise.
3878 (vect_analyze_loop_operations): Likewise.
3879 (report_vect_op): Likewise.
3880 (vect_is_slp_reduction): Likewise.
3881 (check_reduction_path): Likewise.
3882 (vect_is_simple_reduction): Likewise.
3883 (vect_create_epilog_for_reduction): Likewise.
3884 (vect_finalize_reduction:): Likewise.
3885 (vectorizable_induction): Likewise.
3886 (vect_transform_loop_stmt): Likewise.
3887 (vect_transform_loop): Likewise.
3888 (optimize_mask_stores): Likewise.
3889 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
3890 (vect_split_statement): Likewise.
3891 (vect_recog_over_widening_pattern): Likewise.
3892 (vect_recog_average_pattern): Likewise.
3893 (vect_determine_min_output_precision_1): Likewise.
3894 (vect_determine_precisions_from_range): Likewise.
3895 (vect_determine_precisions_from_users): Likewise.
3896 (vect_mark_pattern_stmts): Likewise.
3897 (vect_pattern_recog_1): Likewise.
3898 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3899 (vect_record_max_nunits): Likewise.
3900 (vect_build_slp_tree_1): Likewise.
3901 (vect_build_slp_tree_2): Likewise.
3902 (vect_print_slp_tree): Likewise.
3903 (vect_analyze_slp_instance): Likewise.
3904 (vect_detect_hybrid_slp_stmts): Likewise.
3905 (vect_detect_hybrid_slp_1): Likewise.
3906 (vect_slp_analyze_operations): Likewise.
3907 (vect_slp_analyze_bb_1): Likewise.
3908 (vect_transform_slp_perm_load): Likewise.
3909 (vect_schedule_slp_instance): Likewise.
3910 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3911 (vect_mark_stmts_to_be_vectorized): Likewise.
3912 (vect_init_vector_1): Likewise.
3913 (vect_get_vec_def_for_operand): Likewise.
3914 (vect_finish_stmt_generation_1): Likewise.
3915 (vect_check_load_store_mask): Likewise.
3916 (vectorizable_call): Likewise.
3917 (vectorizable_conversion): Likewise.
3918 (vectorizable_operation): Likewise.
3919 (vectorizable_load): Likewise.
3920 (vect_analyze_stmt): Likewise.
3921 (vect_is_simple_use): Likewise.
3922 (vect_get_vector_types_for_stmt): Likewise.
3923 (vect_get_mask_type_for_stmt): Likewise.
3924 * tree-vectorizer.c (increase_alignment): Likewise.
3926 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
3928 * doc/rtl.texi: Adjust vec_select description.
3929 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
3930 non-constant selectors.
3932 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
3934 * config/aarch64/aarch64-protos.h
3935 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
3936 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
3937 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
3938 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
3939 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
3940 (AARCH64_FL_PROFILE): Move index so flags are ordered.
3941 (AARCH64_ISA_RCPC8_4): New flag.
3942 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
3943 to aarch64_offset_9bit_signed_unscaled_p.
3944 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
3946 * config/aarch64/constraints.md (Ust): New constraint.
3947 * config/aarch64/predicates.md.
3948 (aarch64_9bit_offset_memory_operand): New predicate.
3949 (aarch64_rcpc_memory_operand): New predicate.
3951 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
3953 PR rtl-optimization/87361
3954 * rtlanal.c (nonzero_bits1): Revert accidental change.
3956 2018-09-19 Richard Biener <rguenther@suse.de>
3958 PR tree-optimization/87349
3959 PR tree-optimization/87342
3960 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
3962 2018-09-18 Marek Polacek <polacek@redhat.com>
3964 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
3965 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
3967 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
3969 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
3971 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
3973 PR rtl-optimization/86882
3974 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
3976 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
3978 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
3979 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
3981 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
3984 * doc/invoke.texi (Link Options): Fix formatting and grammar.
3986 2018-09-18 Richard Biener <rguenther@suse.de>
3989 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
3990 (compute_samebase_partition_bases): Likewise.
3991 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
3992 (gimple_can_coalesce_p): Simplify.
3994 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
3996 Handle a library implementation of ffs calling __builtin_ffs.
3997 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
3998 (mmix_init_libfuncs): New function: make __builtin_ffs expand
4001 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4003 * diagnostic-show-locus.c (class layout_range): Add field
4005 (layout_range::layout_range): Add "original_idx" param and use it
4006 to initialize new field.
4007 (make_range): Use 0 for original_idx.
4008 (layout::layout): Pass in index to calls to
4009 maybe_add_location_range.
4010 (layout::maybe_add_location_range): Add param "original_idx" and
4011 pass it on to layout_range.
4012 (layout::print_any_labels): Pass on range->m_original_idx to
4014 (gcc_rich_location::add_location_if_nearby): Use 0 for
4016 * gcc-rich-location.h (text_range_label::get_text): Update for new
4018 (range_label_for_type_mismatch::get_text): Likewise.
4020 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4022 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
4024 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4026 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
4027 format_string_diagnostic_t.
4028 (fmtwarn_n): Likewise.
4029 * substring-locations.c
4030 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
4031 (format_warning_n_va): Convert to...
4032 (format_string_diagnostic_t::emit_warning_n_va): ...this.
4033 (format_warning_va): Convert to...
4034 (format_string_diagnostic_t::emit_warning_va): ...this.
4035 (format_warning_at_substring): Convert to...
4036 (format_string_diagnostic_t::emit_warning): ...this.
4037 (format_warning_at_substring_n): Convert to...
4038 (format_string_diagnostic_t::emit_warning_n): ...this.
4039 * substring-locations.h (class format_string_diagnostic_t): New
4041 (format_warning_va): Convert to
4042 format_string_diagnostic_t::emit_warning_va.
4043 (format_warning_n_va): Convert to
4044 format_string_diagnostic_t::emit_warning_n_va.
4045 (format_warning_at_substring): Convert to
4046 format_string_diagnostic_t::emit_warning.
4047 (format_warning_at_substring_n): Convert to
4048 format_string_diagnostic_t::emit_warning_n.
4050 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
4051 Bernd Schmidt <bernds_cb1@t-online.de>
4053 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
4056 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4058 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
4059 operand 0 predicate to nonimmediate operand.
4060 (rint<mode>2_frndint): Remove insn pattern.
4061 (rint<mode>2): Change operand 1 predicate to general_operand.
4062 Extend operand 1 to XFmode and generate rintxf2 insn.
4063 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
4064 Do not use X87MODEF mode macro.
4065 (frndintxf2_<rounding>_i387): Rename from
4066 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
4067 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
4068 to XFmode and generate significandxf3 insn.
4070 2018-09-17 Richard Biener <rguenther@suse.de>
4072 PR tree-optimization/87328
4073 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
4074 visiting unexecutable backedges when not iterating.
4075 (do_rpo_vn): Mark all edges not executable even when not
4078 2018-09-17 Martin Jambor <mjambor@suse.cz>
4081 * doc/invoke.texi (Warning Options): Likewise.
4083 2018-09-17 Richard Biener <rguenther@suse.de>
4085 PR tree-optimization/87301
4086 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
4087 clean EH info from leftover copy assignments.
4089 2018-09-17 Martin Liska <mliska@suse.cz>
4091 PR gcov-profile/85871
4092 * gcov.c (output_intermediate_file): Fix out of bounds
4095 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
4097 * config/arc/arc.c: Object attributes for core4 not reflected
4099 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
4102 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
4104 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
4106 2018-09-17 Martin Liska <mliska@suse.cz>
4108 * doc/gcov.texi: Document new option --use-hotness-colors.
4109 * gcov.c (struct source_info): Declare new field.
4110 (source_info::source_info): Set default for maximum_count.
4111 (print_usage): Add new -q option.
4112 (process_args): Process it.
4113 (accumulate_line_info): Save src->maximum_count.
4114 (output_line_beginning): Make color line number if
4115 flag_use_hotness_colors is set.
4116 (output_line_details): Pass default argument value.
4117 (output_lines): Pass src->maximum_count.
4119 2018-09-17 Martin Liska <mliska@suse.cz>
4121 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
4122 Use processor_names table.
4123 * config/i386/i386.c (ix86_default_align): Use
4124 processor_cost_table for alignment values.
4125 (ix86_option_override_internal): Use processor_names.
4126 (ix86_function_specific_print): Likewise.
4127 * config/i386/i386.h (struct processor_costs):
4128 Add alignment values.
4129 (struct ptt): Remove and replace with const char *.
4130 * config/i386/x86-tune-costs.h (struct processor_costs):
4131 Declare default alignments for all costs.
4133 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
4135 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
4136 symbolics or VR_VARYING ranges for ABS_EXPR.
4137 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
4138 when range will wrap.
4140 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
4143 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
4144 before and after a JUMP_TABLE_DATA.
4146 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
4149 * dojump.c (do_compare_and_jump): Canonicalize function pointers
4150 when one operand is a function pointer. Use POINTER_TYPE_P and
4151 FUNC_OR_METHOD_TYPE_P.
4152 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
4153 * fold-const.c (build_range_check): Likewise.
4154 * match.pd (simple_comparison): Likewise.
4156 2018-09-14 David Malcolm <dmalcolm@redhat.com>
4159 * spellcheck.c (get_edit_distance_cutoff): New function.
4160 (selftest::test_edit_distance_unit_test_oneway): Rename to...
4161 (selftest::test_get_edit_distance_one_way): ...this.
4162 (selftest::test_get_edit_distance_unit): Rename to...
4163 (selftest::test_get_edit_distance_both_ways): ...this.
4164 (selftest::test_edit_distances): Move tests to this new function,
4165 and test some more pairs of strings. Update for above renaming.
4166 (selftest::get_old_cutoff): New function.
4167 (selftest::test_get_edit_distance_cutoff): New function.
4168 (selftest::assert_suggested_for): New function.
4169 (ASSERT_SUGGESTED_FOR): New macro.
4170 (selftest::assert_not_suggested_for): New function.
4171 (ASSERT_NOT_SUGGESTED_FOR): New macro.
4172 (selftest::test_suggestions): New function.
4173 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
4174 tests to selftest::test_edit_distances and call it. Add calls to
4175 selftest::test_get_edit_distance_cutoff and
4176 selftest::test_suggestions.
4177 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
4178 (best_match::consider): Replace hard-coded cutoff calculation with
4180 (best_match::get_cutoff): New declaration.
4181 (best_match::get_best_meaningful_candidate): Likewise.
4183 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4185 * builtins.c (fold_builtin_strlen): Remove TODO comment.
4187 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4190 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4192 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4193 terminated string literal.
4195 2018-09-14 Martin Sebor <msebor@redhat.com>
4197 * builtins.c (unterminated_array): Handle ARRAY_REF.
4198 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
4199 * builtins.h (unterminated_array): Declare extern.
4200 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
4202 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
4205 2018-09-14 Martin Sebor <msebor@redhat.com>
4206 Jeff Law <law@redhat.com>
4208 * builtins.c (unterminated_array): New.
4209 (expand_builtin_strcpy): Adjust.
4210 (expand_builtin_strcpy_args): Detect unterminated arrays.
4211 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
4212 unterminated arrays.
4213 * gimple-fold.h (get_maxval_strlen): Add argument.
4214 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
4216 * gimple-fold.c (get_range_strlen): Add argument.
4217 (get_maxval_strlen): Adjust.
4218 * gimple-fold.h (get_range_strlen): Add argument.
4220 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
4222 * config/i386/movdirintrin.h: Fix copyright year.
4224 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
4226 * reg-stack.c: Include regs.h.
4227 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
4228 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
4229 FIRST_STACK_REG, not DFmode.
4230 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
4231 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
4232 (change stack): Default register mode to the reg_raw_mode of
4233 FIRST_STACK_REG, not DFmode.
4234 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
4235 (*swapxf): Rename from swapxf.
4237 2018-09-14 Carl Love <cel@us.ibm.com>
4239 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
4240 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
4242 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
4245 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
4248 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
4251 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
4253 2018-09-14 Jason Merrill <jason@redhat.com>
4255 Fix --enable-gather-detailed-mem-stats.
4256 * hash-table.c (hash_table_usage): Change from variable to function.
4257 * hash-table.h: Adjust.
4258 * Makefile.in: Add missing dependencies on hash-table.h.
4260 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4262 PR tree-optimization/87259
4264 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4265 execute_cse_reciprocals_1 has tried transforming.
4267 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
4269 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4270 VR_VARYING for PLUS/MINUS_EXPR.
4272 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
4274 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4277 2018-09-14 Richard Biener <rguenther@suse.de>
4280 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4281 bits for the merged partition.
4283 2018-09-13 Martin Sebor <msebor@redhat.com>
4284 Bernd Edlinger <bernd.edlinger@hotmail.de>
4286 * builtins.h (c_srlen): Add argument.
4287 * builtins.c (warn_string_no_nul): New function.
4288 (c_strlen): Add argument and use it. Update recursive calls.
4289 Pass DECL argument to string_constant to get info on non
4290 terminated strings. Update *NONSTR as needed.
4291 (fold_builtin_strlen): Add argument to calls to c_strlen.
4292 Warn for unterminated arrays.
4293 (warn_string_no_null): Add prototype.
4294 * expr.c (string_constant): Update arguments. Update recursive
4295 calls appropriately. Detect missing NUL terminator and outermost
4296 declaration its missing in.
4297 Improve checks for arrays with nonzero lower bound or elements
4298 that are not a single byte. Simplify offset computation.
4299 Simplify checks for non-NUL terminated strings.
4300 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4301 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4303 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4305 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4307 * fold-const.c (c_getstr): Fix function comment. Remove unused third
4308 argument. Fix range checks.
4309 * fold-const.h (c_getstr): Adjust protoype.
4310 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4311 string is constant but contains no NUL byte.
4313 * expr.c (string_constant): Adjust function comment.
4314 Remove bogus check for zero termination.
4316 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4318 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4319 (get_constant_size): Don't make STRING_CSTs larger than they are.
4320 (check_string_literal): New check function for STRING_CSTs.
4321 (output_constant): Use it.
4323 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
4326 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4328 2018-09-13 Richard Biener <rguenther@suse.de>
4330 PR tree-optimization/87263
4331 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4332 (struct unwind_state): Add max_rpo field.
4333 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4334 Compute max_rpo, the max RPO number a block can be backwards reached
4335 from. Re-write non-iterating mode to a RPO ordered worklist approach,
4336 separating it from the iterating mode.
4338 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4340 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4341 (rfs_decision): New scheduling decision.
4343 2018-09-13 Richard Biener <rguenther@suse.de>
4346 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4347 (vn_nary_op_insert_pieces_predicated): Do not write useless
4348 valid_dominated_by_p entry outside of the allocated storage.
4350 2018-09-13 Omar Sandoval <osandov@osandov.com>
4351 Tom de Vries <tdevries@suse.de>
4354 * dwarf2out.c (is_c): New function.
4355 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4357 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
4360 * config/aarch64/aarch64.md (*aarch64_bfxil):
4362 * config/aarch64/constraints.md (Ulc): Define.
4363 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4365 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4368 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4370 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4371 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4372 aarch64_layout_frame call.
4373 (aarch64_expand_epilogue): Likewise.
4374 (aarch64_initial_elimination_offset): Likewise.
4375 (aarch64_get_separate_components): Likewise.
4376 (aarch64_use_return_insn_p): Likewise.
4377 (aarch64_layout_frame): Remove unneeded check.
4379 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4381 * configure.ac: Only append
4382 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
4383 gcc_config_arguments if it was never reconfigured or last reconfigure
4384 was with different arguments.
4385 * configure: Regenerated.
4387 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4388 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4391 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
4392 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
4394 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4396 PR tree-optimization/87287
4397 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
4398 X % C == 0 to X % (unsigned) C == 0 optimization to ...
4399 * match.pd (X % C == 0): ... here. New optimization.
4401 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4404 * expr.h (maybe_optimize_mod_cmp): Declare.
4405 * expr.c (mod_inv): New function.
4406 (maybe_optimize_mod_cmp): New function.
4407 (do_store_flag): Use it.
4408 * cfgexpand.c (expand_gimple_cond): Likewise.
4410 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
4411 Julian Brown <julian@codesourcery.com>
4414 * gimplify.c (gimplify_scan_omp_clauses): Set
4415 target_firstprivatize_array_bases in OpenACC parallel and kernels
4416 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
4417 OpenACC data regions.
4419 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
4421 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
4422 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
4424 2018-09-12 Richard Biener <rguenther@suse.de>
4426 PR tree-optimization/87280
4427 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
4428 edge but unreachable target.
4429 (do_rpo_vn): For conservatively handling a PHI only mark
4430 the backedge executable but not the block reachable.
4432 2018-09-12 Richard Biener <rguenther@suse.de>
4434 PR tree-optimization/87266
4435 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
4438 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
4440 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
4442 ("trunc<BFP:mode><DFP_ALL:mode>2")
4443 ("trunc<DFP_ALL:mode><BFP:mode>2")
4444 ("extend<BFP:mode><DFP_ALL:mode>2")
4445 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
4446 according to the target operand type.
4448 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4449 Andreas Krebbel <krebbel@linux.ibm.com>
4451 PR tree-optimization/86844
4452 * gimple-ssa-store-merging.c
4453 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
4454 there are any overlapping stores in between them, make sure they are
4455 also coalesced or we give up completely.
4457 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4460 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
4461 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
4463 2018-09-12 Tom de Vries <tdevries@suse.de>
4465 * common.opt (gdescribe-dies): Add option.
4466 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
4467 attribute for artifical and nameless decls.
4468 (dwarf2out_register_external_die): Add description attribute to
4469 external reference die.
4470 (add_desc_attribute): New functions.
4471 (gen_subprogram_die): Add description attribute to
4472 DW_TAG_call_site_parameter.
4473 * tree-pretty-print.c (print_generic_expr_to_str): New function.
4474 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
4475 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
4477 (@item -gdescribe-dies): Add.
4479 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4481 * tree-vrp.c (vrp_shift_undefined_p): Remove.
4482 (extract_range_from_binary_expr_1: Call
4483 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
4484 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
4487 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4489 * gimple-ssa-warn-alloca.c
4490 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
4491 field for ALLOCA_BOUND_*_LARGE.
4493 2018-09-11 Nathan Sidwell <nathan@acm.org>
4495 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
4497 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4499 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
4500 for clobbers. Remove obsolete comment.
4502 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4504 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
4505 mpxchk, mpxld and mpxst types.
4506 (define_attr length_immediate): Remove all processing of mpx types.
4507 (define_attr prefix_0f): Ditto.
4508 (define_attr memory): Ditto.
4510 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4512 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
4513 (log<mode>2): Change operand 1 predicate to general_operand.
4514 Extend operand 1 to XFmode and generate logxf3 insn.
4515 (log10<mode>2): Change operand 1 predicate to general_operand.
4516 Extend operand 1 to XFmode and generate log10xf3 insn.
4517 (log2<mode>2): Change operand 1 predicate to general_operand.
4518 Extend operand 1 to XFmode and generate log2xf3 insn.
4519 (fyl2xp1_extend<mode>xf3_i387): Remove.
4520 (log1p<mode>2): Change operand 1 predicate to general_operand.
4521 Extend operand 1 to XFmode and generate log1pxf3 insn.
4522 (fxtract_extend<mode>xf3_i387): Remove.
4523 (logb<mode>2): Change operand 1 predicate to general_operand.
4524 Extend operand 1 to XFmode and generate logbxf3 insn.
4525 (ilogb<mode>2): Change operand 1 predicate to general_operand.
4526 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
4527 (significand<mode>2): Change operand 1 predicate to general_operand.
4528 Extend operand 1 to XFmode and generate significandxf3 insn.
4530 2018-09-11 Nathan Sidwell <nathan@acm.org>
4532 * gcc.c (perror_with_name, pfatal_with_name): Delete.
4533 (load_specs): Use fatal_error.
4534 (DELETE_IF_ORDINARY, process_command): Use error.
4535 (execute, run_attempt): Use fatal_error.
4537 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
4539 * diagnostic-core.h (sorry_at): New prototype.
4540 * diagnostic.c (sorry_at): New function.
4542 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
4544 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
4545 by zero as VR_UNDEFINED.
4547 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4549 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
4550 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
4551 (<sincos>mode2): New expander.
4552 (sincos_extend<mode>xf3_i387): Remove insn pattern.
4553 (sincos -> sin, cos splitters): Remove splitter patterns.
4554 (sincos<mode>3): Change operand 2 predicate to general_operand.
4555 Extend operand 2 to XFmode and generate sincosxf3 insn.
4556 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
4557 Change operand 3 predicate to const1_operand.
4558 (fptan_extend<mode>xf4_i387): Remove insn pattern.
4559 (tanxf2): Update operands in the call to fptanxf4_i387.
4560 (tan<mode>2): Change operand 1 predicate to general_operand.
4561 Extend operand 1 to XFmode and generate tanxf3 insn.
4562 (atan2xf3): Rename from *fpatanxf3_i387.
4563 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
4564 (atan2xf3): Remove expander.
4565 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
4566 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
4567 (atan<mode>2): Change operand 1 predicate to general_operand.
4568 Extend operand 1 to XFmode and generate atanxf3 insn.
4570 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4572 * config/i386/i386.md (x87/SSE constant load splitter): Use
4573 memory_operand instead of nonimmediate_operand for input operand
4576 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
4578 * config/i386/i386.md (float partial SSE register stall splitter): Move
4579 splitter near its instruction pattern.
4580 (float_extend partial SSE register stall splitter): Ditto.
4581 (float_truncate partial SSE register stall splitter): Ditto.
4583 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
4586 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4587 to speculation_safe_value_not_needed.
4590 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
4591 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
4592 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
4593 leaf_function_p, instead use has_hard_reg_initial_val.
4595 2018-09-09 Nathan Sidwell <nathan@acm.org>
4597 * gcc.h (pfatal_with_name): Don't declare here.
4598 * gcc.c (pfatal_with_name): Make static.
4600 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
4602 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
4605 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
4607 PR rtl-optimization/85458
4608 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
4609 priority hook to reduce the priority of EXPR.
4611 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
4613 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
4614 DImode for x87 on 32bit targets. Conditionally disable x87 modes
4615 with X87_ENABLE_FLOAT. Remove preparation code.
4616 (*float<SWI48:mode><MODEF:mode>2): Rename from
4617 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
4618 math using "enabled" attribute.
4619 (*floatdi<MODEF:mode>2_i387): Rename from
4620 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
4621 enable for 32bit targets only.
4622 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
4624 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
4625 as operand 1 predicate. Rewrite as define_insn_and_split.
4626 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
4628 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4630 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
4631 to fallthru to FLOAT case.
4633 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4636 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
4637 around folding of vec_sl to handle out of range shift values.
4639 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4641 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
4642 Update callers to gen_fix_trunc<mode>_i387_fisttp
4643 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
4644 nonimmediate_operand.
4645 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
4646 and corresponding splitters.
4647 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
4648 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
4649 (fix_truncdi_i387_with_temp): Remove insn pattern
4650 and corresponding splitters.
4651 (fix_trunc<mode>_i387): Change operand 0 predicate to
4652 nonimmediate_operand.
4653 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
4654 and corresponding splitters.
4655 (*fistdi2_1): Remove.
4657 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
4658 (lrintxfdi2): Remove expander. Reimplement as define_insn.
4659 (*fist<mode>2_1): Remove.
4660 (fist<mode>2): Ditto.
4661 (fist<mode>2_with_temp): Remove insn pattern and corresponding
4663 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
4664 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
4665 (fistdi2_<rounding>): Change operand 0 predicate to
4666 nonimmediate_operand.
4667 (fistdi2_<rounding>_with_temp): Remove insn pattern
4668 and corresponding splitters.
4669 (fist<mode>2_<rounding>): Change operand 0 predicate to
4670 nonimmediate_operand.
4671 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
4672 and corresponding splitters.
4674 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
4676 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4678 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
4681 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4683 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
4684 early gimple folding of vec_splat().
4685 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
4686 * gimple-fold.h: Add an extern define for tree_vec_extract().
4688 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4690 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
4691 wrappers around TREE_TYPE comparisons.
4693 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4696 * config/s390/predicates.md: Add nonsym_memory_operand.
4697 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
4698 contains a SYMBOL_REF, load it into an intermediate pseudo.
4699 (s390_emit_compare_and_swap): Legitimize operand.
4700 * config/s390/s390.md: Use the new nonsym_memory_operand
4701 with UNSPECV_CAS patterns.
4703 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4706 * config/s390/s390-passes.def: New file.
4707 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
4709 (make_pass_s390_early_mach): Add declaration.
4710 * config/s390/s390.c (make_pass_s390_early_mach):
4711 (s390_option_override): Remove dynamic registration.
4712 * config/s390/t-s390: Add s390-passes.def.
4714 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4716 * config/s390/s390.c (s390_decompose_constant_pool_ref):
4717 Remove UNSPEC_LTREL_BASE check.
4718 (annotate_constant_pool_refs): Likewise.
4719 (find_constant_pool_ref): Likewise.
4720 (find_ltrel_base): Removed.
4721 (replace_ltrel_base): Removed.
4722 (s390_mainpool_finish): Remove replace_ltrel_base call.
4723 (s390_chunkify_start): Remove pending LTREL_BASE logic.
4724 (s390_chunkify_finish): Remove replace_ltrel_base call.
4725 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
4727 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
4730 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4731 to speculation_safe_value_not_needed.
4733 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
4734 Bernd Schmidt <bernds_cb1@t-online.de>
4736 * config/nvptx/nvptx-opts.h: New file.
4737 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
4738 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
4740 (TARGET_SM35): New macro.
4741 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
4743 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
4745 (misa=): New option.
4746 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
4748 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
4750 * config/i386/i386.md (truncdfsf2): Remove expander.
4751 (truncdfsf2_with_temp): Ditto.
4752 (truncxf<mode>2): Ditto.
4753 (*truncdfsf_fast_mixed): Remove insn pattern.
4754 (*truncdfsf_fast_i387): Ditto.
4755 (*truncdfsf_mixed): Ditto.
4756 (*truncdfsf_i387): Ditto.
4757 (*truncdfsf2_i387_1): Ditto.
4758 (*truncxfsf2_mixed): Ditto.
4759 (*truncxfdf2_mixed): Ditto.
4760 (*truncxf<mode>2_i387_noop): Ditto. Update callers
4761 to call gen_truncxf<mode>2 instead.
4762 (*truncxf<mode>2_i387): Remove.
4763 (reg->reg splitters): Remove splitter pattern.
4764 (reg->mem splitters): Ditto.
4766 (truncdfsf2): New insn pattern.
4767 (truncxf<mode>2): Ditto.
4769 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4771 * tree-ssa-math-opts.c (is_mult_by): New function.
4772 (is_square_of): Use the above.
4773 (optimize_recip_sqrt): New function.
4774 (pass_cse_reciprocals::execute): Use the above.
4776 2018-09-05 Richard Biener <rguenther@suse.de>
4779 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
4780 to zero-init the emplaced vec.
4782 2018-09-05 Martin Liska <mliska@suse.cz>
4784 PR tree-optimization/87205
4785 * tree-switch-conversion.c (pass_lower_switch::execute):
4786 Group cases for switch statements.
4788 2018-09-05 Richard Biener <rguenther@suse.de>
4790 PR tree-optimization/87217
4791 * tree-ssa-sccvn.c (vuse_valueize): New.
4792 (vn_reference_lookup_pieces): Use it.
4793 (vn_reference_lookup): Likewise.
4795 2018-09-05 Nathan Sidwell <nathan@acm.org>
4798 * stor-layout.c (place_field): Scan forwards to check last
4799 bitfield when ms_bitfield_placement is in effect.
4801 2018-09-05 Richard Biener <rguenther@suse.de>
4804 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
4807 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
4808 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
4810 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
4811 * config.gcc (extra_objs): Build it.
4812 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
4814 * config/aarch64/aarch64-passes.def
4815 (pass_tag_collision_avoidance): New pass.
4816 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
4817 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
4818 (aarch64_classify_address): Remove static qualifier.
4819 (aarch64_address_info, aarch64_address_type): Move to...
4820 * config/aarch64/aarch64-protos.h: ... here.
4821 (make_pass_tag_collision_avoidance): New function.
4822 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
4825 2018-09-05 Martin Liska <mliska@suse.cz>
4827 * doc/gcov.texi: Update documentation of humar
4829 * gcov.c (format_count): Print one decimal place, it provides
4830 more fine number of situations like '1G' vs. '1.4G'.
4832 2018-09-05 Martin Liska <mliska@suse.cz>
4835 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
4836 * optc-gen.awk: Allow 'Var' for Deprecated options in order
4837 to generate a MASK value.
4839 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
4842 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
4843 if frame pointer isn't used.
4844 (compute_frame_pointer_to_fb_displacement): Likewise.
4846 2018-09-04 Jakub Jelinek <jakub@redhat.com>
4849 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
4850 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
4851 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
4852 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
4853 and OPTION_MASK_ISA_XSAVEC_UNSET.
4855 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
4857 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
4858 XOR operations in NAND case.
4860 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
4862 * wide-int-range.cc (wide_int_range_convert): New.
4863 * wide-int-range.h (wide_int_range_convert): New.
4864 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
4865 code into wide_int_range_convert.
4866 (extract_range_into_wide_ints): Do not munge anti range constants
4867 into the entire domain. Just return the range back.
4869 2018-09-04 Martin Liska <mliska@suse.cz>
4871 * genmatch.c (output_line_directive): Add new argument
4873 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
4875 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
4877 * doc/invoke.texi (Option Summary): Add whitespace.
4879 * doc/invoke.texi (Option Summary): Add -Waligned-new.
4881 2018-09-04 Richard Biener <rguenther@suse.de>
4883 PR tree-optimization/87211
4884 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
4885 backedge value we're supposed to treat as VARYING also number
4886 the PHI to VARYING in case it got a different value-number already.
4888 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
4890 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
4891 (extract_range_from_binary_expr_1): Do not call
4892 vrp_can_optimize_bit_op.
4893 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
4895 (wide_int_range_get_mask_and_bounds): New.
4896 (wide_int_range_optimize_bit_op): New.
4897 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
4898 (wide_int_range_bit_and): Same.
4899 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
4900 (wide_int_range_optimize_bit_op): New.
4901 (wide_int_range_get_mask_and_bounds): New.
4903 2018-09-04 Richard Biener <rguenther@suse.de>
4905 PR tree-optimization/87176
4906 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
4907 variable. When value-numbering a virtual PHI node make sure
4908 to not value-number to the backedge value.
4910 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
4912 * doc/extend.texi (Long Long, Hex Floats): Document support for
4913 long long and hex floats in more recent versions of ISO C++.
4915 2018-09-03 Richard Biener <rguenther@suse.de>
4917 PR tree-optimization/87177
4918 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
4921 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4923 * bb-reorder.c (edge_order): Convert to C-qsort-style
4924 tri-state comparator.
4925 (reorder_basic_blocks_simple): Change std::stable_sort to
4928 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4930 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
4931 tri-state comparator.
4932 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
4934 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4936 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
4937 (mergesort): ... here as maximum count for using netsort.
4938 (gcc_qsort): Set nlim to 3 if stable sort is requested.
4939 (gcc_stablesort): New.
4940 * system.h (gcc_stablesort): Declare.
4942 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4944 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
4945 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
4946 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
4948 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
4950 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
4951 lxsdx and stxsdx alternatives.
4952 (*mov<mode>_hardfloat64): Ditto.
4953 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
4955 2018-09-03 Richard Biener <rguenther@suse.de>
4957 PR tree-optimization/87200
4958 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
4961 2018-09-03 Martin Liska <mliska@suse.cz>
4963 PR tree-optimization/87201
4964 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4965 Fix parenthesis in an expression.
4967 2018-09-03 Richard Biener <rguenther@suse.de>
4969 PR tree-optimization/87197
4970 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
4971 visited. CSE the VN_INFO hashtable lookup.
4973 PR tree-optimization/87169
4974 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
4975 iterating make sure there's no extra backedges from irreducible
4976 regions feeding the header. Mark the destination block
4979 2018-09-03 Martin Liska <mliska@suse.cz>
4982 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
4983 * common/common-targhooks.c (default_get_valid_option_values):
4985 * common/common-targhooks.h (default_get_valid_option_values):
4987 * common/config/i386/i386-common.c: Move processor_target_table
4989 (ix86_get_valid_option_values): New function.
4990 (TARGET_GET_VALID_OPTION_VALUES): New macro.
4991 * config/i386/i386.c (struct ptt): Move to i386-common.c.
4992 (PTA_*): Move all defined masks into i386-common.c.
4993 (ix86_function_specific_restore): Use new processor_cost_table.
4994 * config/i386/i386.h (struct ptt): Moved from i386.c.
4995 (struct pta): Likewise.
4996 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
4997 * doc/tm.texi.in: Likewise.
4998 * opt-suggestions.c (option_proposer::suggest_option):
4999 Pass prefix to build_option_suggestions.
5000 (option_proposer::get_completions): Likewise.
5001 (option_proposer::build_option_suggestions): Use the new target
5003 * opts.c (struct option_help_tuple): New struct.
5004 (print_filtered_help): Use the new target hook.
5006 2018-09-03 Martin Liska <mliska@suse.cz>
5009 * predict.c (set_even_probabilities): Add likely_edges
5010 argument and handle cases where we have precisely one
5012 (combine_predictions_for_bb): Catch also likely_edges.
5013 (tree_predict_by_opcode): Handle gswitch statements.
5014 * tree-cfg.h (find_case_label_for_value): New declaration.
5015 (find_taken_edge_switch_expr): Likewise.
5016 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5017 Find pivot in decision tree based on probabily, not by number of
5020 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
5022 * doc/standards.texi (Standards): Update Objective-C reference.
5024 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5026 * doc/install.texi (Prerequisites): Update link for MPC.
5028 2018-09-01 Michael Matz <matz@suse.de>
5030 PR tree-optimization/87074
5031 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
5032 PHIs for outer-loop uses.
5034 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5036 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
5037 * doc/invoke.texi (C Dialect Options): Ditto.
5039 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5041 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
5043 2018-08-31 Richard Biener <rguenther@suse.de>
5045 PR tree-optimization/87168
5046 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
5047 (rpo_elim::eliminate_avail): When OP was not visited it must
5050 2018-08-31 David Malcolm <dmalcolm@redhat.com>
5052 * tree-vrp.c (copy_value_range): Convert param "from" from
5053 "value_range *" to "const value_range *".
5054 (range_is_null): Likewise for param "vr".
5055 (range_int_cst_p): Likewise.
5056 (range_int_cst_singleton_p): Likewise.
5057 (symbolic_range_p): Likewise.
5058 (value_ranges_intersect_p): Likewise for both params.
5059 (value_range_nonnegative_p): Likewise for param "vr".
5060 (value_range_constant_singleton): Likewise.
5061 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
5062 (extract_range_into_wide_ints): Likewise for param "vr".
5063 (extract_range_from_multiplicative_op): Likewise for params "vr0"
5065 (vrp_can_optimize_bit_op): Likewise.
5066 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
5068 (extract_range_from_unary_expr): Likewise.
5069 (debug_value_range): Likewise for param "vr".
5070 (value_range::dump): Add "const" qualifier.
5071 (vrp_prop::check_array_ref): Convert local "vr" from
5072 "value_range *" to "const value_range *".
5073 (vrp_prop::check_mem_ref): Likewise.
5074 (vrp_prop::visit_stmt): Likewise for local "old_vr".
5075 (vrp_intersect_ranges_1): Likewise for param "vr_1".
5076 (vrp_intersect_ranges): Likewise.
5077 (simplify_stmt_for_jump_threading): Likewise for local "vr".
5078 (vrp_prop::vrp_finalize): Likewise.
5079 * tree-vrp.h (value_range::dump): Add "const" qualifier.
5080 (vrp_intersect_ranges): Add "const" qualifier to params as above.
5081 (extract_range_from_unary_expr): Likewise.
5082 (value_range_constant_singleton): Likewise.
5083 (symbolic_range_p): Likewise.
5084 (copy_value_range): Likewise.
5085 (extract_range_from_binary_expr_1): Likewise.
5086 (range_int_cst_p): Likewise.
5087 (vrp_set_zero_nonzero_bits): Likewise.
5088 (range_int_cst_singleton_p): Likewise.
5090 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
5092 * config/aarch64/arm_neon.h (vabsd_s64): New.
5093 (vnegd_s64): Likewise.
5095 2018-08-31 Martin Jambor <mjambor@suse.cz>
5097 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
5099 2018-08-31 Martin Liska <mliska@suse.cz>
5101 * ipa-icf.c (sem_item::add_type): Use
5102 sem_item::m_type_hash_cache.
5103 * ipa-icf.h: Move the cache from sem_item_optimizer
5106 2018-08-31 Nathan Sidwell <nathan@acm.org>
5108 * doc/extend.texi (Backwards Compatibility): Remove implicit
5109 extern C leeway of () being (...).
5111 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5113 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
5115 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
5119 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
5121 2018-08-31 Jakub Jelinek <jakub@redhat.com>
5124 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
5125 gen_int_mode. Formatting fixes.
5127 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
5129 * target.def (custom_function_descriptors): Improve documentation.
5130 * doc/tm.texi.in (Trampolines): Expand discussion of function
5131 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
5132 beginning of the section.
5133 * doc/tm.texi: Regenerated.
5135 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
5137 * cfg.h (class auto_edge_flag): Spell out the template-id of the
5138 base class in the initializer list. This is a workaround for
5139 building with older GCC.
5140 (class auto_bb_flag): Likewise.
5142 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
5144 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
5145 (altivec_vcmpequ<VI_char>_p): Remove star.
5146 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
5148 (expand_strncmp_vec_sequence): New function.
5149 (emit_final_str_compare_vec): New function.
5150 (expand_strn_compare): Add support for vector strncmp.
5151 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
5152 length specification to bytes.
5153 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
5154 (vcmpnezb_p): New pattern.
5155 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
5156 for option -mstring-compare-inline-limit.
5158 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
5160 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
5161 (PTA_SKYLAKE): Add PTA_AES.
5162 (PTA_GOLDMONT): Likewise.
5164 2018-08-29 Jan Hubicka <jh@suse.cz>
5167 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
5168 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
5170 2018-08-29 Jan Hubicka <jh@suse.cz>
5172 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
5174 (hash_tree): Do not visit TYPE_STUB_DECL.
5175 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
5176 stream TYPE_STUB_DECL.
5177 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
5178 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
5179 after free_lang_data.
5180 (type_in_anonymous_namespace_p): Likewise.
5182 2018-08-29 Jan Hubicka <jh@suse.cz>
5184 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5185 comment that it has to be even number.
5186 (class sreal): Change m_sig type to int32_t.
5187 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5188 int64_t for temporary calculations.
5189 (sreal_verify_basics): Drop one bit from minimum and maximum.
5191 2018-08-30 Richard Biener <rguenther@suse.de>
5193 PR tree-optimization/87147
5194 * tree-ssa-sccvn.c (SSA_VISITED): New function.
5195 (visit_phi): When the degenerate result is from the backedge and
5196 we didn't visit its definition yet drop to VARYING.
5197 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
5199 2018-08-29 Jan Hubicka <jh@suse.cz>
5201 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
5203 (hash_tree): Likewise.
5205 2018-08-29 Jan Hubicka <jh@suse.cz>
5207 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
5208 and TYPE_NEXT_REF_TO.
5210 2018-08-29 Jan Hubicka <jh@suse.cz>
5212 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5213 comment that it has to be even number.
5214 (class sreal): Change m_sig type to int32_t.
5215 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5216 int64_t for temporary calculations.
5217 (sreal_verify_basics): Drop one bit from minimum and maximum.
5219 2018-08-30 Tamar Christina <tamar.christina@arm.com>
5221 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
5223 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
5226 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
5227 if to_add is negative.
5229 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
5232 * builtins.c (c_strlen): Improve range checks.
5234 2018-08-29 Martin Sebor <msebor@redhat.com>
5235 Jeff Law <law@redhat.com>
5237 PR tree-optimization/86714
5238 PR tree-optimization/86711
5239 * builtins.c (c_strlen): Add arguments to call to string_constant.
5240 * expr.c (string_constant): Add argument. Detect missing nul
5241 terminator and outermost declaration it's missing in.
5242 * expr.h (string_constant): Add argument.
5243 * fold-const.c (read_from_constant_string): Add arguments to call to
5245 (c_getstr): Likewise.
5246 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5248 * tree-ssa-strlen.c (get_stridx): Likewise.
5250 2018-08-29 Jan Hubicka <jh@suse.cz>
5252 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
5253 Do not stream DECL_VINDEX.
5254 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
5255 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5256 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5258 2018-08-29 Richard Biener <rguenther@suse.de>
5260 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5261 virtual operands that are not default defs to honor region
5263 (rpo_vn_valueize): Remove ineffective code here.
5265 2018-08-29 Richard Biener <rguenther@suse.de>
5267 PR tree-optimization/87132
5268 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5269 when skipping defs reachable over backedges.
5271 2018-08-29 Richard Biener <rguenther@suse.de>
5273 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5274 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5275 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5276 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5277 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5278 (vn_reference_lookup_3): Remove use of const_parms.
5279 (free_rpo_vn): Do not free const_parms.
5280 (do_rpo_vn): Do not call init_const_parms.
5281 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5282 SSA_NAME_POINTS_TO_READONLY_MEMORY.
5283 (call_may_clobber_ref_p_1): Likewise.
5285 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
5288 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5290 (-ftree-scev-cprop): Document.
5292 2018-08-29 Jan Hubicka <jh@suse.cz>
5294 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5296 (sreal constructor): Update.
5297 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5298 sreal:operator/): Update.
5300 2018-08-29 Martin Liska <mliska@suse.cz>
5302 * tree-switch-conversion.c (switch_conversion::expand):
5303 Strenghten assumption about gswitch statements.
5305 2018-08-29 Richard Biener <rguenther@suse.de>
5307 PR tree-optimization/87117
5308 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5309 re-value-number released SSA VDEFs.
5311 2018-08-29 Richard Biener <rguenther@suse.de>
5313 PR tree-optimization/87126
5314 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5316 2018-08-28 Jim Wilson <jimw@sifive.com>
5318 * config/riscv/pic.md: Rewrite.
5319 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5321 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5322 (SOFTF, default_load, softload, softstore): New.
5324 2018-08-28 Jeff Law <law@redhat.com>
5326 * fold-const.c (fold_binary_loc): Remove recently added assert.
5328 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
5330 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5331 to OP parmeter of generated function.
5333 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
5335 PR tree-optimization/87009
5336 * match.pd: Add boolean optimizations.
5338 2018-08-28 Martin Sebor <msebor@redhat.com>
5341 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5342 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5343 (pass_walloca::gate): Use it.
5344 (alloca_call_type): Same.
5345 (pass_walloca::execute): Same.
5346 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5348 2018-08-28 David Malcolm <dmalcolm@redhat.com>
5350 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5351 GCC_VERSION for usage of "__gcc_dump_printf__" format from
5354 2018-08-28 Richard Biener <rguenther@suse.de>
5356 PR tree-optimization/87124
5357 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5358 constants before looking up avail.
5360 2018-08-28 Jakub Jelinek <jakub@redhat.com>
5363 * calls.c (maybe_warn_nonstring_arg): Punt early if
5364 warn_stringop_overflow is zero. Don't call get_range_strlen
5365 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5366 Swap comparison operands to have constants on rhs. Only use
5367 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
5368 increment lenrng[0].
5370 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
5372 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5373 use of tree_to_shwi. Remove duplicated test for the size being
5374 a whole number of bytes.
5376 2018-08-28 Richard Biener <rguenther@suse.de>
5378 PR tree-optimization/87117
5379 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
5380 Handle removed stmt without LHS (GIMPLE_NOP).
5382 2018-08-28 Richard Biener <rguenther@suse.de>
5384 PR tree-optimization/87117
5385 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
5386 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
5388 2018-08-28 Richard Biener <rguenther@suse.de>
5390 PR tree-optimization/87117
5391 * tree-ssa-pre.c (compute_avail): Do not make expressions
5392 with predicated values available.
5393 (get_expr_value_id): Assert we do not run into predicated value
5396 2018-08-28 Richard Biener <rguenther@suse.de>
5398 PR tree-optimization/87117
5399 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
5400 get virtual operands.
5401 (get_expr_operands): Handle STRING_CST like other decls.
5403 2018-08-28 Martin Liska <mliska@suse.cz>
5405 * tree.h: Update documentation of fndecl_built_in_p
5409 2018-08-27 Jeff Law <law@redhat.com>
5410 PR tree-optimization/87110
5411 * tree-ssa-dse.c (compute_trims): Handle non-constant
5414 2018-08-27 Martin Sebor <msebor@redhat.com>
5416 PR tree-optimization/86914
5417 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
5419 2018-08-27 Martin Sebor <msebor@redhat.com>
5421 PR tree-optimization/87112
5422 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
5423 the type of the bound argument.
5425 2018-08-27 Jeff Law <law@redhat.com>
5427 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
5428 type does not have a TYPE_SIZE_UNIT.
5430 2018-08-27 Steve Ellcey <sellcey@cavium.com>
5432 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
5433 with include of backend.h.
5435 2018-08-27 Richard Biener <rguenther@suse.de>
5437 PR tree-optimization/86927
5438 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
5439 use const cond reduction code.
5441 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
5443 PR tree-optimization/85758
5444 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
5446 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5449 * diagnostic-show-locus.c (class layout_range): Update for
5450 conversion of show_caret_p to a tri-state.
5451 (layout_range::layout_range): Likewise.
5452 (make_range): Likewise.
5453 (layout::maybe_add_location_range): Likewise.
5454 (layout::should_print_annotation_line_p): Don't show annotation
5455 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
5456 (layout::get_state_at_point): Update for conversion of
5457 show_caret_p to a tri-state. Bail out early for
5458 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
5459 underlining or source colorization.
5460 (gcc_rich_location::add_location_if_nearby): Update for conversion
5461 of show_caret_p to a tri-state.
5462 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
5463 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
5465 (selftest::test_one_liner_labels): Likewise.
5466 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
5467 conversion of show_caret_p to a tri-state.
5468 * pretty-print.c (text_info::set_location): Likewise.
5469 * pretty-print.h (text_info::set_location): Likewise.
5470 * substring-locations.c (format_warning_n_va): Likewise.
5471 * tree-diagnostic.c (default_tree_printer): Likewise.
5472 * tree-pretty-print.c (newline_and_indent): Likewise.
5474 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5477 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
5478 line above for line-insertion fix-it hints.
5479 (selftest::test_fixit_insert_containing_newline): Update the
5480 expected results, and add a test with line-numbering enabled.
5482 2018-08-27 Martin Liska <mliska@suse.cz>
5485 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
5486 params with DECL_HAS_VALUE_EXPR_P.
5488 2018-08-27 Martin Liska <mliska@suse.cz>
5490 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
5491 selected expansion strategy.
5493 2018-08-27 Martin Liska <mliska@suse.cz>
5495 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
5496 * builtins.c (is_builtin_fn): Likewise.
5497 * attribs.c (diag_attr_exclusions): Use new function
5498 fndecl_built_in_p and remove check for FUNCTION_DECL if
5500 (builtin_mathfn_code): Likewise.
5501 (fold_builtin_expect): Likewise.
5502 (fold_call_expr): Likewise.
5503 (fold_builtin_call_array): Likewise.
5504 (fold_call_stmt): Likewise.
5505 (set_builtin_user_assembler_name): Likewise.
5506 (is_simple_builtin): Likewise.
5507 * calls.c (gimple_alloca_call_p): Likewise.
5508 (maybe_warn_nonstring_arg): Likewise.
5509 * cfgexpand.c (expand_call_stmt): Likewise.
5510 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
5511 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
5512 (cgraph_node::verify_node): Likewise.
5513 * cgraphclones.c (build_function_decl_skip_args): Likewise.
5514 (cgraph_node::create_clone): Likewise.
5515 * config/arm/arm.c (arm_insert_attributes): Likewise.
5516 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
5517 * dse.c (scan_insn): Likewise.
5518 * expr.c (expand_expr_real_1): Likewise.
5519 * fold-const.c (operand_equal_p): Likewise.
5520 (fold_binary_loc): Likewise.
5521 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
5522 * gimple-low.c (lower_stmt): Likewise.
5523 * gimple-pretty-print.c (dump_gimple_call): Likewise.
5524 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
5526 * gimple.c (gimple_build_call_from_tree): Likewise.
5527 (gimple_call_builtin_p): Likewise.
5528 (gimple_call_combined_fn): Likewise.
5529 * gimplify.c (gimplify_call_expr): Likewise.
5530 (gimple_boolify): Likewise.
5531 (gimplify_modify_expr): Likewise.
5532 (gimplify_addr_expr): Likewise.
5533 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
5534 * ipa-cp.c (determine_versionability): Likewise.
5535 * ipa-fnsummary.c (compute_fn_summary): Likewise.
5536 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
5537 * ipa-split.c (visit_bb): Likewise.
5538 (split_function): Likewise.
5539 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5540 * lto-cgraph.c (input_node): Likewise.
5541 * lto-streamer-out.c (write_symbol): Likewise.
5542 * omp-low.c (setjmp_or_longjmp_p): Likewise.
5543 (lower_omp_1): Likewise.
5544 * predict.c (strip_predict_hints): Likewise.
5545 * print-tree.c (print_node): Likewise.
5546 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
5547 * trans-mem.c (is_tm_irrevocable): Likewise.
5548 (is_tm_load): Likewise.
5549 (is_tm_simple_load): Likewise.
5550 (is_tm_store): Likewise.
5551 (is_tm_simple_store): Likewise.
5552 (is_tm_abort): Likewise.
5553 (tm_region_init_1): Likewise.
5554 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
5555 * tree-cfg.c (verify_gimple_call): Likewise.
5556 (move_stmt_r): Likewise.
5557 (stmt_can_terminate_bb_p): Likewise.
5558 * tree-eh.c (lower_eh_constructs_2): Likewise.
5559 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
5560 * tree-inline.c (remap_gimple_stmt): Likewise.
5561 (copy_bb): Likewise.
5562 (estimate_num_insns): Likewise.
5563 (fold_marked_statements): Likewise.
5564 * tree-sra.c (scan_function): Likewise.
5565 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
5566 (optimize_stack_restore): Likewise.
5567 (pass_fold_builtins::execute): Likewise.
5568 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
5569 (mark_all_reaching_defs_necessary_1): Likewise.
5570 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
5571 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5572 (pass_forwprop::execute): Likewise.
5573 * tree-ssa-loop-im.c (stmt_cost): Likewise.
5574 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5575 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
5576 * tree-ssa-strlen.c (get_string_length): Likewise.
5577 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
5578 (find_func_aliases_for_call): Likewise.
5579 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
5580 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
5581 * tree-tailcall.c (find_tail_calls): Likewise.
5582 * tree.c (need_assembler_name_p): Likewise.
5583 (free_lang_data_in_decl): Likewise.
5584 (get_call_combined_fn): Likewise.
5585 * ubsan.c (is_ubsan_builtin_p): Likewise.
5586 * varasm.c (incorporeal_function_p): Likewise.
5587 * tree.h (DECL_BUILT_IN): Remove and replace with
5589 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
5590 (fndecl_built_in_p): New.
5592 2018-08-27 Martin Liska <mliska@suse.cz>
5594 PR tree-optimization/86847
5595 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
5596 Dump also subtree probability.
5597 (switch_decision_tree::do_jump_if_equal): New function.
5598 (switch_decision_tree::emit_case_nodes): Handle special
5599 situations in balanced tree that can be emitted much simpler.
5600 Fix calculation of probabilities that happen in tree expansion.
5601 * tree-switch-conversion.h (struct cluster): Add
5603 (struct simple_cluster): Likewise.
5604 (struct case_tree_node): Add new function has_child.
5605 (do_jump_if_equal): New.
5607 2018-08-27 Martin Liska <mliska@suse.cz>
5609 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
5610 Add new argument to bit_test_cluster constructor.
5611 (bit_test_cluster::emit): Set bits really number of values
5613 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
5614 probability argument.
5615 * tree-switch-conversion.h (struct bit_test_cluster):
5616 Add m_handles_entire_switch.
5618 2018-08-27 Martin Liska <mliska@suse.cz>
5620 PR tree-optimization/86702
5621 * tree-switch-conversion.c (jump_table_cluster::emit):
5622 Make probabilities even for values in jump table
5623 according to number of cases handled.
5624 (switch_decision_tree::compute_cases_per_edge): Pass
5625 argument to reset_out_edges_aux function.
5626 (switch_decision_tree::analyze_switch_statement): Likewise.
5627 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
5630 2018-08-27 Martin Liska <mliska@suse.cz>
5632 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
5633 cfun argument explicitly.
5634 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
5635 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
5636 function gimple_switch_default_bb.
5637 (convert_switch_statements):
5639 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
5640 * stmt.c (label_to_block_fn): Use label_to_block and pass
5641 cfun argument explicitly and use gimple_switch_label_bb.
5642 (expand_case): Likewise.
5643 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
5644 cfun argument explicitly. Likewise.
5645 (make_edges_bb): Likewise.
5646 (make_cond_expr_edges): Likewise.
5647 (get_cases_for_edge): Likewise.
5648 (make_gimple_switch_edges): Likewise.
5649 (label_to_block_fn): Likewise.
5650 (label_to_block): Likewise.
5651 (make_goto_expr_edges): Likewise.
5652 (make_gimple_asm_edges): Likewise.
5653 (main_block_label): Likewise.
5654 (group_case_labels_stmt): Likewise.
5655 (find_taken_edge_computed_goto): Likewise.
5656 (find_taken_edge_switch_expr): Likewise.
5657 (gimple_verify_flow_info): Likewise.
5658 (gimple_redirect_edge_and_branch): Likewise.
5659 (gimple_switch_label_bb): New function.
5660 (gimple_switch_default_bb): Likewise.
5661 (gimple_switch_edge): Likewise.
5662 (gimple_switch_default_edge): Likewise.
5663 * tree-cfg.h (label_to_block_fn): Remove and replace ...
5664 (label_to_block): ... with this.
5665 (gimple_switch_label_bb): New.
5666 (gimple_switch_default_bb): Likewise.
5667 (gimple_switch_edge): Likewise.
5668 (gimple_switch_default_edge): Likewise.
5669 * tree-cfgcleanup.c (convert_single_case_switch): Use
5670 new gimple functions and pass new argument to label_to_block.
5671 (cleanup_control_flow_bb):
5672 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
5673 cfun argument explicitly.
5674 (make_eh_edges): Likewise.
5675 (redirect_eh_dispatch_edge): Likewise.
5676 (lower_resx): Likewise.
5677 (lower_eh_dispatch): Likewise.
5678 (maybe_remove_unreachable_handlers): Likewise.
5679 (unsplit_eh): Likewise.
5680 (cleanup_empty_eh): Likewise.
5681 (verify_eh_edges): Likewise.
5682 (verify_eh_dispatch_edge): Likewise.
5683 * tree-ssa-dom.c (record_edge_info): Likewise.
5684 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
5685 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
5686 (thread_through_normal_block): Likewise.
5687 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
5688 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
5689 * tree-switch-conversion.c (switch_conversion::collect): Use new
5691 (switch_conversion::check_final_bb): Likewise.
5692 (switch_conversion::gather_default_values): Pass new argument
5694 (switch_conversion::build_constructors): Likewise.
5695 (switch_decision_tree::compute_cases_per_edge): Use new
5696 gimple_switch_edge function.
5697 (switch_decision_tree::analyze_switch_statement): Pass new argument
5699 (switch_decision_tree::try_switch_expansion): Use
5700 gimple_switch_default_edge.
5701 * tree-vrp.c (find_switch_asserts): Pass new argument
5703 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
5704 (vr_values::simplify_switch_using_ranges): Likewise.
5706 2018-08-27 Richard Biener <rguenther@suse.de>
5708 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
5709 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
5711 * tree-ssa-sccvn.h (struct vn_pval): New structure.
5712 (struct vn_nary_op_s): Add unwind_to member. Add
5713 predicated_values flag and put result into a union together
5714 with a linked list of vn_pval.
5715 (struct vn_ssa_aux): Add name member to make maintaining
5716 a map of SSA name to vn_ssa_aux possible. Remove no longer
5717 needed info, dfsnum, low, visited, on_sccstack, use_processed
5718 and range_info_anti_range_p members.
5719 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
5720 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
5722 (vn_valueize): New global.
5723 (vn_context_bb): Likewise.
5724 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
5725 VN_INFO_PTR_INFO): Remove.
5726 * tree-ssa-sccvn.c: ... (rewrite)
5727 (pass_fre::execute): For -O2+ initialize loops and run
5728 RPO VN in optimistic mode (iterating). For -O1 and -Og
5729 run RPO VN in non-optimistic mode.
5730 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
5731 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
5732 * doc/invoke.texi (sccvn-max-scc-size): Remove.
5733 (rpo-vn-max-loop-depth): Document.
5734 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
5735 when valuezing the VUSE signals we walked out of the region.
5736 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
5737 (phi_translate): Set VN context block to use for availability
5739 (compute_avail): Likewise.
5740 (pre_valueize): New function.
5741 (pass_pre::execute): Adjust to the RPO VN API.
5743 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
5744 (propagate_constants_for_unrolling): Remove.
5745 (tree_unroll_loops_completely): Perform value-numbering
5746 on the unrolled bodies loop parent.
5748 2018-08-27 Richard Biener <rguenther@suse.de>
5750 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
5751 for partial antic compute.
5753 2018-08-27 Jakub Jelinek <jakub@redhat.com>
5755 PR rtl-optimization/87065
5756 * combine.c (simplify_if_then_else): Formatting fix.
5757 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
5759 (known_cond): Don't return const_true_rtx for vector modes. Use
5760 CONST0_RTX instead of const0_rtx. Formatting fixes.
5762 2018-08-27 Martin Liska <mliska@suse.cz>
5764 PR gcov-profile/87069
5765 * gcov.c (process_file): Record files already processed
5766 and warn about a file being processed multiple times.
5768 2018-08-27 Martin Liska <mliska@suse.cz>
5771 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5772 Set default values for x_aarch64_*_string strings.
5773 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
5774 prefix. For -mabi do not print '=ABI' in help and use
5775 <option_value> format for -msve-vector-bits and -moverride
5778 2018-08-26 Jeff Law <law@redhat.com>
5780 * config/mips/frame-header-opt.c: Include "backend.h" rather than
5783 2018-08-26 Marek Polacek <polacek@redhat.com>
5785 PR c++/87029, Implement -Wredundant-move.
5786 * doc/invoke.texi: Document -Wredundant-move.
5788 2018-08-25 Martin Sebor <msebor@redhat.com>
5790 PR tree-optimization/87059
5791 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
5792 to the same type as the other.
5793 * fold-const.c (fold_binary_loc): Assert expectation.
5795 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
5797 * config/darwin.c (machopic_legitimize_pic_address): Clean up
5798 extraneous parentheses, dead code section and formatting.
5800 2018-08-24 David Malcolm <dmalcolm@redhat.com>
5803 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
5804 wide enough for jumps in the line-numbering to be visible.
5805 (layout::print_gap_in_line_numbering): New member function.
5806 (layout::calculate_line_spans): When using line numbering, merge
5807 line spans that are only 1 line apart.
5808 (diagnostic_show_locus): When printing line numbers, show gaps in
5809 line numbering directly, rather than printing headers.
5810 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
5811 line-numbering with multiple line spans.
5812 (selftest::test_fixit_insert_containing_newline_2): Add test of
5813 line-numbering, in which the spans are close enough to be merged.
5815 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
5817 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
5818 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
5819 * tree-vrp.c (range_is_nonnull): Remove.
5820 (range_includes_zero_p): Accept value_range instead of min/max.
5821 (extract_range_from_binary_expr_1): Do not early bail on
5823 Use range_includes_zero_p instead of range_is_nonnull.
5824 (extract_range_from_unary_expr): Use range_includes_zero_p instead
5825 of range_is_nonnull.
5826 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
5827 special case VR_ANTI_RANGE.
5828 (vrp_finalize): Same.
5829 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
5831 (range_is_nonnull): Remove.
5832 * vr-values.c (vrp_stmt_computes_nonzero): Use
5833 range_includes_zero_p instead of range_is_nonnull.
5834 (extract_range_basic): Pass value_range to range_includes_zero_p
5835 instead of range_is_nonnull.
5837 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
5839 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
5840 * emit-rtl.h (rtl_data): Remove return_bnd.
5841 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
5842 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
5843 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
5844 (POINTER_BOUNDS_MODE): Remove definition.
5845 (make_pointer_bounds_mode): Remove.
5846 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
5847 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
5848 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
5849 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
5850 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
5851 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
5852 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
5854 * config/i386/i386-modes.def (BND32, BND64): Remove.
5855 * config/i386/i386.c (dbx_register_map): Remove bound registers.
5856 (dbx64_register_map): Ditto.
5857 (svr4_dbx_register_map): Ditto.
5858 (indirect_thunk_bnd_needed): Remove.
5859 (indirect_thunks_bnd_used): Ditto.
5860 (indirect_return_bnd_needed): Ditto.
5861 (indirect_return_via_cx_bnd): Ditto.
5862 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
5863 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
5864 (output_indirect_thunk): Ditto. Remove need_prefix argument.
5865 (output_indirect_thunk_function): Remove handling of
5866 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
5867 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
5868 (ix86_save_reg): Remove handling of crtl->return_bnd.
5869 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
5870 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
5871 and UNSPEC_BNDLX_ADDR.
5872 (ix86_output_indirect_branch_via_reg): Remove handling of
5873 indirect_thunk_prefix_bnd.
5874 (ix86_output_indirect_branch_via_push): Ditto.
5875 (ix86_output_function_return): Ditto.
5876 (ix86_output_indirect_function_return): Ditto.
5877 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
5878 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
5879 (CALL_USED_REGISTERS): Ditto.
5880 (REG_ALLOC_ORDER): Update for removal of bound registers.
5881 (HI_REGISTER_NAMES): Ditto.
5882 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
5883 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
5884 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
5885 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
5886 (FIRST_PSEUDO_REG): Update.
5887 (BND): Remove mode iterator.
5888 * config/i386/predicates.md (bnd_mem_operator): Remove.
5890 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
5892 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
5895 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
5897 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
5898 the case in which the permute needs only a single element and
5899 repeats for every vector of the result. Extend that case to
5900 handle variable-length vectors.
5901 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
5903 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
5906 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
5907 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
5909 2018-08-24 Richard Biener <rguenther@suse.de>
5911 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
5912 bb_flags_allocated members.
5913 (auto_flag): New RAII class for allocating flags.
5914 (auto_edge_flag): New RAII class for allocating edge flags.
5915 (auto_bb_flag): New RAII class for allocating bb flags.
5916 * cfgloop.c (verify_loop_structure): Allocate temporary edge
5918 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
5919 in favor of temporarily allocated BB flag.
5920 * hsa-brig.c: Re-order includes.
5921 * hsa-dump.c: Likewise.
5922 * hsa-regalloc.c: Likewise.
5923 * print-rtl.c: Likewise.
5924 * profile-count.c: Likewise.
5926 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
5929 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
5932 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
5935 * wide-int-range.cc (wide_int_range_div): Do not ignore result
5936 from wide_int_range_multiplicative_op.
5938 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5940 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
5943 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
5945 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
5948 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
5950 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
5951 full GENERIC expression used for replacement.
5953 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
5955 * tree-vrp.c (abs_extent_range): Remove.
5956 (extract_range_into_wide_ints): Pass wide ints by reference.
5957 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
5958 Pass wide ints by reference in all calls to
5959 extract_range_into_wide_ints.
5960 * wide-int-range.cc (wide_int_range_div): New.
5961 * wide-int-range.h (wide_int_range_div): New.
5962 (wide_int_range_includes_zero_p): New.
5963 (wide_int_range_zero_p): New.
5965 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
5967 * config/aarch64/aarch64.md (arches): New enum.
5968 (arch): New enum attr.
5969 (arch_enabled): New attr.
5970 (enabled): Now uses arch_enabled only.
5971 (simd, sve, fp16): Removed attribute.
5972 (fp): Attr now defined in terms of 'arch'.
5973 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
5974 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
5975 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
5976 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
5977 attributes into 'arch'.
5978 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
5979 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
5980 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
5981 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
5982 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
5983 'simd' attribute into 'arch'.
5984 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
5985 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
5986 Convert use of 'fp' attribute to 'arch'.
5987 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
5988 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
5990 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
5991 (different modes) Merge 'fp' and 'simd' into 'arch'.
5992 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
5995 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
5997 PR rtl-optimization/87026
5998 * expmed.c (canonicalize_comparison): If we can no longer create
5999 pseudoregisters, don't.
6001 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
6004 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
6006 * config/arm/arm.c (speculation_barrier_libfunc): New static
6008 (arm_init_libfuncs): Initialize it.
6009 (arm_emit_speculation_barrier): New function.
6010 * config/arm/arm.md (speculation_barrier): Call
6011 arm_emit_speculation_barrier for architectures that do not have
6013 (speculation_barrier_insn): Only match on Armv7 or later.
6015 2018-08-23 Richard Biener <rguenther@suse.de>
6018 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
6021 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6023 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
6024 of single-vector TBLs.
6025 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
6028 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6031 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
6032 aarch64_evpc_tbl guard.
6034 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
6036 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
6039 2018-08-22 Martin Sebor <msebor@redhat.com>
6042 * tree-pretty-print.c (pretty_print_string): Add argument.
6043 (dump_generic_node): Call to pretty_print_string with string size.
6045 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
6047 PR rtl-optimization/86771
6048 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
6049 of two SETs into those two SETs, one to be placed at i2, if that SETs
6050 destination is modified between i2 and i3.
6052 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6054 PR tree-optimization/86725
6055 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
6057 (vect_analyze_scalar_cycles_1): Check it.
6059 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6061 PR tree-optimization/86725
6062 * tree-vect-loop.c (vect_is_simple_reduction): When treating
6063 an outer loop phi as a double reduction, make sure that the
6064 single user of the phi result is an inner loop phi.
6066 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6068 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
6069 grouped stores with gaps to a strided group.
6071 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6073 * tree-vect-stmts.c (get_group_load_store_type)
6074 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
6075 first statement in a group.
6077 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6079 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
6080 the sequence used in gcc/gcc.c.
6082 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6085 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
6088 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6090 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
6091 Darwin10-specific unwinder-shim.
6092 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
6093 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
6094 New to cater for Darwin10 Rosetta.
6096 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6098 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
6099 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
6101 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6106 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
6107 (dwarf2out_switch_text_section): Generate a local label for the
6108 second function sub-section and apply it as the second FDE start
6110 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
6111 second sub-section start.
6113 2018-08-22 Richard Biener <rguenther@suse.de>
6115 PR tree-optimization/86988
6116 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
6118 2018-08-22 Richard Biener <rguenther@suse.de>
6120 PR tree-optimization/86945
6121 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
6123 2018-08-22 Alexandre Oliva <oliva@adacore.com>
6125 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
6126 a comment about how uses of r2 for .sdata2 come about.
6128 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
6130 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
6132 2018-08-21 Marek Polacek <polacek@redhat.com>
6134 PR c++/86981, Implement -Wpessimizing-move.
6135 * doc/invoke.texi: Document -Wpessimizing-move.
6137 2018-08-21 Jan Hubicka <jh@suse.cz>
6139 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
6140 * tree.h (is_redundant_typedef): Remove.
6141 * dwarf2out.c (is_redundant_typedef): Turn into static function.
6143 2018-08-21 Jan Hubicka <jh@suse.cz>
6145 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
6148 2018-08-21 Tamar Christina <tamar.christina@arm.com>
6150 * expmed.c (extract_low_bits): Reject invalid subregs early.
6152 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6155 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
6158 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6160 * config/vxworks.h: Guard vxworks_asm_out_constructor and
6161 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
6162 * config/vxworks.c: Likewise.
6164 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6166 * config/vxworks.c: Set targetm.have_ctors_dtors
6167 if HAVE_INITFINI_ARRAY_SUPPORT.
6168 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
6169 if HAVE_INITFINI_ARRAY_SUPPORT.
6171 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6173 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
6174 default search path for VxWorks < 7.
6176 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6178 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
6179 (get_format_string): Refer to c_getstr.
6181 2018-08-21 Tom de Vries <tdevries@suse.de>
6183 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6184 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6185 (debuginfo_early_stop): Declare.
6186 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6187 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6188 (debuginfo_early_stop): New function.
6189 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
6190 and debuginfo_early_stop.
6191 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
6192 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
6193 (general_init): Call debuginfo_early_init.
6194 (finalize): Call debuginfo_fini.
6195 (do_compile): Call debuginfo_init.
6196 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
6198 (@item -fdump-debug, @item -fdump-earlydebug): Add.
6200 2018-08-21 Tom de Vries <tdevries@suse.de>
6202 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
6203 flag_dump_noaddr and flag_dump_unnumbered.
6205 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
6207 * wide-int-range.cc (wide_int_range_abs): New.
6208 (wide_int_range_order_set): Rename from wide_int_range_min_max.
6209 * wide-int-range.h (wide_int_range_abs): New.
6210 (wide_int_range_min_max): New.
6211 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
6212 case to call wide_int_range_abs.
6213 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
6214 (extract_range_from_abs_expr): Delete.
6216 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
6219 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
6220 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
6223 2018-08-20 Nathan Sidwell <nathan@acm.org>
6224 Jeff Law <law@redhat.com>
6226 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
6227 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
6229 2018-08-20 David Malcolm <dmalcolm@redhat.com>
6232 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
6233 (decl_attributes): Likewise.
6234 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
6236 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6237 * diagnostic-core.h (class auto_diagnostic_group): New class.
6238 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
6239 (diagnostic_report_diagnostic): Handle the first diagnostics within
6241 (emit_diagnostic): Add auto_diagnostic_group instance.
6243 (inform_n): Likewise.
6244 (warning): Likewise.
6245 (warning_at): Likewise.
6246 (warning_n): Likewise.
6247 (pedwarn): Likewise.
6248 (permerror): Likewise.
6250 (error_n): Likewise.
6251 (error_at): Likewise.
6253 (fatal_error): Likewise.
6254 (internal_error): Likewise.
6255 (internal_error_no_backtrace): Likewise.
6256 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6257 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6258 * diagnostic.h (struct diagnostic_context): Add fields
6259 "diagnostic_group_nesting_depth",
6260 "diagnostic_group_emission_count", "begin_group_cb",
6262 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6263 Add auto_diagnostic_group instance(s).
6264 (find_explicit_erroneous_behavior): Likewise.
6265 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6266 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6267 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6268 (gimplify_va_arg_expr): Likewise.
6269 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6270 (HSA_SORRY_AT): Likewise.
6271 * ipa-devirt.c (compare_virtual_tables): Likewise.
6272 (warn_odr): Likewise.
6273 * multiple_target.c (expand_target_clones): Likewise.
6274 * opts-common.c (cmdline_handle_error): Likewise.
6275 * reginfo.c (globalize_reg): Likewise.
6276 * substring-locations.c (format_warning_n_va): Likewise.
6277 * tree-inline.c (expand_call_inline): Likewise.
6278 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6279 * tree-ssa-loop-niter.c
6280 (do_warn_aggressive_loop_optimizations): Likewise.
6281 * tree-ssa-uninit.c (warn_uninit): Likewise.
6282 * tree.c (warn_deprecated_use): Likewise.
6284 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
6287 * config/i386/i386.md (eh_return): Always update EH return
6288 address in word_mode.
6290 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
6292 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6293 TARGET_SPLIT_COMPLEX_ARG is defined.
6295 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6297 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6299 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6302 * expr.c (expand_assignment): Assert that bitpos is positive.
6303 (store_field): Likewise
6304 (expand_expr_real_1): Make sure that bitpos is positive.
6305 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6308 2018-08-20 Nathan Sidwell <nathan@acm.org>
6310 * Makefile.in (CPP_ID_DATA_H): Delete.
6311 (CPP_INTERNAL_H): Don't add it.
6312 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6313 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6315 2018-08-20 Richard Biener <rguenther@suse.de>
6317 PR tree-optimization/78655
6318 * tree-vrp.c (extract_range_from_binary_expr_1): Make
6319 pointer + offset nonnull if either operand is nonnull work.
6321 2018-08-20 Tom de Vries <tdevries@suse.de>
6323 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6324 unless the referenced die describes the added property using
6325 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
6326 Otherwise, add a DW_AT_location to the referenced die.
6328 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
6331 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6332 register_operand when calling ix86_set_reg_reg_cost.
6333 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6334 Set *total to 0 for operands that satisfy x86_64_immediate_operand
6335 predicate and to 1 otherwise.
6337 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
6339 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6340 emit a diagnostic that it is not supported and reset the option.
6341 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6342 supported and consume the option. (ASM_FINAL_SPEC): New.
6344 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6346 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6349 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
6351 C-SKY port: Documentation
6353 * doc/extend.texi (C-SKY Function Attributes): New section.
6354 * doc/invoke.texi (Option Summary): Add C-SKY options.
6355 (C-SKY Options): New section.
6356 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6358 2018-08-17 Jojo <jijie_rong@c-sky.com>
6359 Huibin Wang <huibin_wang@c-sky.com>
6360 Sandra Loosemore <sandra@codesourcery.com>
6361 Chung-Lin Tang <cltang@codesourcery.com>
6363 C-SKY port: Backend implementation
6365 * config/csky/*: New.
6366 * common/config/csky/*: New.
6368 2018-08-17 Jojo <jijie_rong@c-sky.com>
6369 Huibin Wang <huibin_wang@c-sky.com>
6370 Sandra Loosemore <sandra@codesourcery.com>
6371 Chung-Lin Tang <cltang@codesourcery.com>
6372 Andrew Jenner <andrew@codesourcery.com>
6374 C-SKY port: Configury
6376 * config.gcc (csky-*-*): New.
6377 * configure.ac: Add csky to targets for dwarf2 debug_line support.
6378 * configure: Regenerated.
6380 2018-08-17 David Malcolm <dmalcolm@redhat.com>
6382 * dump-context.h: Include "dumpfile.h".
6383 (dump_context::dump_printf_va): Convert final param from va_list
6384 to va_list *. Convert from ATTRIBUTE_PRINTF to
6385 ATTRIBUTE_GCC_DUMP_PRINTF.
6386 (dump_context::dump_printf_loc_va): Likewise.
6387 * dumpfile.c: Include "stringpool.h".
6388 (make_item_for_dump_printf_va): Delete.
6389 (make_item_for_dump_printf): Delete.
6390 (class dump_pretty_printer): New class.
6391 (dump_pretty_printer::dump_pretty_printer): New ctor.
6392 (dump_pretty_printer::emit_items): New member function.
6393 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
6395 (dump_pretty_printer::emit_item): New member function.
6396 (dump_pretty_printer::stash_item): New member function.
6397 (dump_pretty_printer::format_decoder_cb): New member function.
6398 (dump_pretty_printer::decode_format): New member function.
6399 (dump_context::dump_printf_va): Reimplement in terms of
6400 dump_pretty_printer.
6401 (dump_context::dump_printf_loc_va): Convert final param from va_list
6403 (dump_context::begin_scope): Reimplement call to
6404 make_item_for_dump_printf.
6405 (dump_printf): Update for change to dump_printf_va.
6406 (dump_printf_loc): Likewise.
6407 (selftest::test_capture_of_dump_calls): Convert "stmt" from
6408 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
6409 with %T, %E, and %G.
6410 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
6411 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
6412 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
6413 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
6414 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
6415 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
6416 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
6417 within a dump_printf_loc call to "%wu".
6418 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
6419 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
6420 missing space after "=".
6421 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
6422 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
6423 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
6424 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
6425 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
6426 duplicate "vectorized" from message.
6428 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
6430 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
6431 polyNxK_t element's TYPE_STRING_FLAG.
6433 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6435 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
6436 (they were unnamed before). Fix comments.
6438 2018-08-17 Nathan Sidwell <nathan@acm.org>
6440 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
6442 2018-08-17 Richard Biener <rguenther@suse.de>
6444 PR tree-optimization/86841
6445 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
6447 2018-08-17 Martin Liska <mliska@suse.cz>
6449 * common.opt: Remove Warn, Init and Report for options with
6450 Ignore/Deprecated flag. Warning is done automatically for
6452 * config/i386/i386.opt: Likewise.
6453 * config/ia64/ia64.opt: Likewise.
6454 * config/rs6000/rs6000.opt: Likewise.
6455 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
6456 Remove usage of flag_check_pointer_bounds.
6457 * lto-wrapper.c (merge_and_complain): Do not handle
6458 OPT_fcheck_pointer_bounds.
6459 (append_compiler_options): Likewise.
6460 * opt-functions.awk: Do not handle Deprecated.
6461 * optc-gen.awk: Check that Var, Report and Init are not
6462 used for an option with Ignore/Deprecated flag.
6463 * opts-common.c (decode_cmdline_option): Do not report
6465 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
6467 * opts.h (struct cl_option): Remove cl_deprecated flag.
6468 (CL_ERR_DEPRECATED): Remove error enum value.
6470 2018-08-17 Richard Biener <rguenther@suse.de>
6473 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
6474 across a va-arg-pack using call adjust its return value accordingly.
6476 2018-08-16 Martin Sebor <msebor@redhat.com>
6478 PR tree-optimization/86853
6479 * gimple-ssa-sprintf.c (struct format_result): Rename member.
6480 (struct fmtresult): Add member and initialize it in ctors.
6481 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
6482 (format_string): Handle %S the same as %ls. Set MAYFAIL.
6483 (format_directive): Set POSUNDER4K when MAYFAIL is set.
6484 (parse_directive): Handle %C same as %c.
6485 (sprintf_dom_walker::compute_format_length): Adjust.
6486 (is_call_safe): Adjust.
6488 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
6490 * builtins.c (c_strlen): Add new parameter eltsize. Use it
6491 for determining how to count the elements.
6492 * builtins.h (c_strlen): Adjust prototype.
6493 * expr.c (string_constant): Add new parameter mem_size.
6494 Set *mem_size appropriately.
6495 * expr.h (string_constant): Adjust protoype.
6496 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
6497 * gimple-fold.h (get_range_strlen): Adjust prototype.
6498 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
6499 (format_string): Call get_string_length with eltsize.
6501 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6503 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
6504 to emit the span, rather than setting it as the prefix.
6506 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6508 * diagnostic-show-locus.c (layout::start_annotation_line): Add
6509 "margin_char" parameter, defaulting to space. Use it in place
6510 of pp_space for the initial part of the margin.
6511 (layout::print_leading_fixits): Use '+' when filling the margin
6512 of line-insertion fix-it hints.
6514 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6516 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
6519 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6521 * config/rs6000/altivec.md: Don't set length attribute to the default
6523 * config/rs6000/darwin.md: Ditto.
6524 * config/rs6000/dfp.md: Ditto.
6525 * config/rs6000/htm.md: Ditto.
6526 * config/rs6000/rs6000.md: Ditto.
6527 * config/rs6000/sync.md: Ditto.
6528 * config/rs6000/vsx.md: Ditto.
6530 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6532 * config/rs6000/altivec.md: Don't set length attribute to the default
6533 value, for branch instructions.
6534 * config/rs6000/darwin.md: Ditto.
6535 * config/rs6000/rs6000.md: Ditto.
6537 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6539 * config/rs6000/rs6000.md (length): Always define as const_int 4.
6540 (unnamed conditional branch define_insn): Set length to 4 or 8
6541 depending on offset.
6542 (<bd>_<mode>): Similar, for alternative 0.
6543 (<bd>tf_<mode>): Ditto.
6545 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6547 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
6549 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
6551 * doc/rtl.texi: Replace old RTX class names with new names.
6554 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
6556 * expmed.h (canonicalize_comparison): New declaration.
6557 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
6558 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
6559 * optabs.c (prepare_cmp_insn): Likewise.
6560 * rtl.h (unsigned_condition_p): New function which checks if a
6561 comparison operator is unsigned.
6563 2018-08-16 Nathan Sidwell <nathan@acm.org>
6565 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
6566 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
6568 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6571 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
6572 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
6573 (mov<mov>): ..this and enable unconditionally.
6575 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6577 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
6579 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
6581 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
6582 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
6583 "Common" with "Target".
6585 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6587 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
6588 * doc/invoke.texi (mmitigate-rop): Remove.
6589 * config/i386/i386.c: Do not include "regrename.h".
6590 (ix86_rop_should_change_byte_p, reg_encoded_number)
6591 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
6593 (ix86_reorg): Remove call to ix86_mitigate_rop.
6594 * config/i386/i386.md (attr "modrm_class"): Remove.
6595 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
6596 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
6597 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
6599 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
6601 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
6602 allow folding of mergeh() and mergel() for the float and double types.
6603 (fold_mergehl_helper): Rework to handle building a permute tree
6606 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6608 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
6611 2018-08-15 David Malcolm <dmalcolm@redhat.com>
6613 * common.opt (fdiagnostics-show-labels): New option.
6614 * diagnostic-show-locus.c (class layout_range): Add field
6616 (class layout): Add field "m_show_labels_p".
6617 (layout_range::layout_range): Add param "label" and use it to
6619 (make_range): Pass in NULL for new "label" param of layout_range's
6621 (layout::layout): Initialize m_show_labels_p.
6622 (layout::maybe_add_location_range): Pass in loc_range->m_label
6623 when constructing layout_range instances.
6624 (struct line_label): New struct.
6625 (layout::print_any_labels): New member function.
6626 (layout::print_line): Call it if label-printing is enabled.
6627 (selftest::test_one_liner_labels): New test.
6628 (selftest::test_diagnostic_show_locus_one_liner): Call it.
6629 * diagnostic.c (diagnostic_initialize): Initialize
6630 context->show_labels_p.
6631 * diagnostic.h (struct diagnostic_context): Add field
6633 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6634 -fno-diagnostics-show-labels.
6635 * dwarf2out.c (gen_producer_string): Add
6636 OPT_fdiagnostics_show_labels to the ignored options.
6637 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
6639 (gcc_rich_location::maybe_add_expr): Likewise.
6640 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
6641 label" param, defaulting to NULL.
6642 (gcc_rich_location::add_expr): Add "label" param.
6643 (gcc_rich_location::maybe_add_expr): Likewise.
6644 (class text_range_label): New class.
6645 (class range_label_for_type_mismatch): New class.
6646 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
6647 of format_warning_va.
6648 (fmtwarn_n): Likewise for new params of format_warning_n_va.
6649 * lto-wrapper.c (merge_and_complain): Add
6650 OPT_fdiagnostics_show_labels to the "pick one setting" options.
6651 (append_compiler_options): Likewise to the dropped options.
6652 (append_diag_options): Likewise to the passed-on options.
6653 * opts.c (common_handle_option): Handle the new option.
6654 * selftest-diagnostic.c
6655 (test_diagnostic_context::test_diagnostic_context): Enable
6657 * substring-locations.c: Include "gcc-rich-location.h".
6658 (format_warning_n_va): Add "fmt_label" and "param_label" params
6659 and use them as appropriate.
6660 (format_warning_va): Add "fmt_label" and "param_label" params,
6661 passing them on to format_warning_n_va.
6662 (format_warning_at_substring): Likewise.
6663 (format_warning_at_substring_n): Likewise.
6664 * substring-locations.h (format_warning_va): Add "fmt_label" and
6665 "param_label" params.
6666 (format_warning_n_va): Likewise.
6667 (format_warning_at_substring): Likewise.
6668 (format_warning_at_substring_n): Likewise.
6669 * toplev.c (general_init): Initialize global_dc->show_labels_p.
6671 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
6674 * builtins.c (expand_builtin_memcmp): Do not expand the call
6675 when overflow is detected.
6677 2018-08-15 Martin Sebor <msebor@redhat.com>
6679 PR tree-optimization/71625
6680 * config/aarch64/aarch64-builtins.c
6681 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
6683 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
6685 * config/s390/s390.c (s390_reorg): Remove loop.
6687 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6690 (darwin_function_switched_text_sections): Delete.
6691 * gcc/config/darwin.h
6692 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
6694 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6697 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
6698 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
6699 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
6701 2018-08-15 Martin Liska <mliska@suse.cz>
6703 PR tree-optimization/86925
6704 * predict.c (expr_expected_value_1): When taking
6705 later predictor, assign also probability.
6706 Use fold_build2_initializer_loc in order to fold
6707 the expression in -frounding-math.
6709 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
6711 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
6713 (expand_vec_perm_1): Try the new method.
6715 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
6718 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
6719 Check whether lra_live_max_point is 0 before dividing.
6721 2018-08-14 Martin Sebor <msebor@redhat.com>
6723 PR tree-optimization/86650
6724 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
6725 (vrp_prop::check_mem_ref): Same.
6727 2018-08-13 Liu Hao <lh_mouse@126.com>
6729 * pretty-print.c (eat_esc_sequence): Swap the foreground and
6730 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
6731 and clear it thereafter, as it only works for DBCS.
6733 2018-08-13 Liu Hao <lh_mouse@126.com>
6735 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
6736 handle returned by _get_osf_handle().
6738 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6740 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
6741 for folding vec_perm.
6743 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6745 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
6746 Add support for gimple-folding of vec_pack() and vec_unpack()
6749 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6751 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
6752 vec_xst variants to the list.
6753 (rs6000_gimple_fold_builtin): Add support for folding unaligned
6754 vector loads and stores.
6756 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
6758 * config.gcc (rs6000-ibm-aix4.x): Delete.
6759 (rs6000-ibm-aix5.1): Delete.
6760 (rs6000-ibm-aix5.2): Delete.
6761 (rs6000-ibm-aix5.3): Delete.
6762 * config/rs6000/aix43.h: Delete.
6763 * config/rs6000/aix51.h: Delete.
6764 * config/rs6000/aix52.h: Delete.
6765 * config/rs6000/t-aix43: Delete.
6767 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
6769 * config/s390/s390.c (s390_decompose_constant_pool_ref):
6771 (s390_decompose_address): Factor out constant pool ref
6774 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6776 * config/nds32/nds32-predicates.c
6777 (nds32_can_use_bclr_p): Change return type as bool.
6778 (nds32_can_use_bset_p): Ditto.
6779 (nds32_can_use_btgl_p): Ditto.
6780 (nds32_can_use_bitci_p): Ditto.
6781 * config/nds32/nds32-protos.h
6782 (nds32_can_use_bclr_p): Change declaration.
6783 (nds32_can_use_bset_p): Ditto.
6784 (nds32_can_use_btgl_p): Ditto.
6785 (nds32_can_use_bitci_p): Ditto.
6787 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6789 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
6790 Support -msched-prolog-epilog option.
6791 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
6793 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6795 * common/config/nds32/nds32-common.c
6796 (nds32_option_optimization_table): Enalbe -malways-align.
6798 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6800 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
6802 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
6803 OPT_misr_secure_ case.
6804 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
6805 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
6806 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
6808 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
6809 (nds32_isr_info): New field security_level.
6810 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
6811 * config/nds32/nds32.md (return_internal): Consider critical attribute.
6812 * config/nds32/nds32.opt (misr-secure): New option.
6813 * config/nds32/nds32_init.inc: New file.
6814 * config/nds32/nds32_isr.h: New file.
6816 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
6818 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
6819 Update comment for atomic instructions.
6820 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
6821 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
6823 (atomic_loaddi): Revise fence expansion to only emit fence prior to
6824 load for __ATOMIC_SEQ_CST model.
6825 (atomic_loaddi_1): Remove float register target.
6826 (atomic_storedi): Handle CONST_INT values.
6827 (atomic_storedi_1): Remove float register source. Add special case
6829 (memory_barrier): New expander and insn.
6831 2018-08-11 Jakub Jelinek <jakub@redhat.com>
6833 PR tree-optimization/86835
6834 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
6835 new_stmt after def_gsi, make sure to insert new_square_stmt after
6836 that stmt, not 2 stmts before it.
6838 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
6841 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
6844 2018-08-10 Martin Liska <mliska@suse.cz>
6847 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
6849 * builtins.c (expand_builtin_expect_with_probability):
6851 (expand_builtin_expect_with_probability): New function.
6852 (build_builtin_expect_predicate): Add new argumnet probability
6853 for BUILT_IN_EXPECT_WITH_PROBABILITY.
6854 (fold_builtin_expect):
6857 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
6858 * builtins.h (fold_builtin_expect): Set new argument.
6859 * doc/extend.texi: Document __builtin_expect_with_probability.
6860 * doc/invoke.texi: Likewise.
6861 * gimple-fold.c (gimple_fold_call): Pass new argument.
6862 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
6863 also BUILT_IN_EXPECT_WITH_PROBABILITY.
6864 * predict.c (get_predictor_value): New function.
6865 (expr_expected_value): Add new argument probability. Assume
6866 that predictor and probability are always non-null.
6867 (expr_expected_value_1): Likewise. For __builtin_expect and
6868 __builtin_expect_with_probability set probability. Handle
6869 combination in binary expressions.
6870 (tree_predict_by_opcode): Simplify code by simply calling
6871 get_predictor_value.
6872 (pass_strip_predict_hints::execute): Add handling of
6873 BUILT_IN_EXPECT_WITH_PROBABILITY.
6874 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
6876 * tree.h (DECL_BUILT_IN_P): New function.
6878 2018-08-10 Martin Liska <mliska@suse.cz>
6880 PR tree-optimization/85799
6881 * passes.def: Add argument for pass_strip_predict_hints.
6882 * predict.c (class pass_strip_predict_hints): Add new argument
6884 (strip_predictor_early): New function.
6885 (pass_strip_predict_hints::execute): Call the function to
6887 (strip_predict_hints): New function.
6888 * predict.def: Fix comment.
6890 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
6892 * Makefile.in: Clarify which tm.texi to copy over to assert the
6893 right to grant a GFDL license for all.
6895 2018-08-09 Jeff Law <law@redhat.com>
6897 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
6900 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
6902 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
6905 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6907 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
6908 reductions for variable-length vectors.
6910 2018-08-09 David Malcolm <dmalcolm@redhat.com>
6913 * common.opt (fdiagnostics-show-line-numbers): New option.
6914 * diagnostic-show-locus.c (class layout): Add fields
6915 "m_show_line_numbers_p" and "m_linenum_width";
6916 (num_digits): New function.
6917 (test_num_digits): New function.
6918 (layout::layout): Initialize new fields. Update m_x_offset
6919 logic to handle any left margin.
6920 (layout::print_source_line): Print line number when requested.
6921 (layout::start_annotation_line): New member function.
6922 (layout::print_annotation_line): Call it.
6923 (layout::print_leading_fixits): Likewise.
6924 (layout::print_trailing_fixits): Likewise. Update calls to
6925 move_to_column for new parameter.
6926 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
6927 it to potentially call start_annotation_line.
6928 (layout::show_ruler): Call start_annotation_line.
6929 (selftest::test_line_numbers_multiline_range): New selftest.
6930 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
6931 and selftest::test_line_numbers_multiline_range.
6932 * diagnostic.c (diagnostic_initialize): Initialize
6933 show_line_numbers_p.
6934 * diagnostic.h (struct diagnostic_context): Add field
6935 "show_line_numbers_p".
6936 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6937 -fno-diagnostics-show-line-numbers.
6938 * dwarf2out.c (gen_producer_string): Add
6939 OPT_fdiagnostics_show_line_numbers to the ignored options.
6940 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
6941 one setting" options.
6942 (append_compiler_options): Likewise to the dropped options.
6943 (append_diag_options): Likewise to the passed-on options.
6944 * opts.c (common_handle_option): Handle the new option.
6945 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
6947 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
6949 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
6950 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
6951 third argument of type "const signed char" to descriptions of
6952 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
6953 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
6954 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
6955 __builtin_bcdsub_ov functions.
6957 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6959 PR tree-optimization/86858
6960 * tree-vect-loop.c (vect_is_simple_reduction): Restore
6961 flow_bb_inside_loop_p calls.
6963 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6965 PR tree-optimization/86871
6966 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
6967 instead of gimple_assign_lhs.
6969 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
6972 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
6973 register constraint to operand 0.
6974 (add<mode>3_carryinC): Likewise.
6975 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
6977 2018-08-09 Martin Liska <mliska@suse.cz>
6980 * common.opt: Remove extra line.
6982 2018-08-09 Martin Liska <mliska@suse.cz>
6984 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
6985 at the end of a line, make first letter capital and end up
6986 a sentence with a dot.
6987 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
6988 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
6989 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
6990 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
6991 (PARAM_MAX_ISL_OPERATIONS): Likewise.
6992 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
6993 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
6994 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
6995 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
6996 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
6997 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
6998 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
6999 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
7000 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
7001 (PARAM_TREE_REASSOC_WIDTH): Likewise.
7002 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
7003 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
7004 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
7006 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
7009 * config/s390/s390.c (s390_option_override_internal): Reduce the
7010 stack-clash-protection-probe-interval param if it would be too big
7013 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
7016 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
7017 * config/m68k/m68k.c (handle_move_double): Don't call
7018 m68k_final_prescan_insn.
7019 (m68k_adjust_decorated_operand): Renamed from
7020 m68k_final_prescan_insn, remove first and third operand and
7022 (print_operand): Call it.
7023 (print_operand_address): Call it.
7025 2018-08-08 Nathan Sidwell <nathan@acm.org>
7027 * diagnostic.c (diagnostic_report_current_module): Use
7028 linemap_included_from & linemap_included_from_linemap.
7030 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
7032 * config/aarch64/aarch64-cores.def: Add phecda core.
7033 * config/aarch64/aarch64-tune.md: Regenerate.
7034 * doc/invoke.texi: Add phecda core.
7036 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7039 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
7041 * config/s390/s390.md ("movti"): Add more alternatives for
7042 constant to GPR copies.
7044 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7046 * config/s390/s390.c: Fix whitespace damage throughout the file.
7047 * config/s390/s390.h: Likewise.
7048 * config/s390/tpf.h: Likewise.
7050 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7052 * config/s390/s390.c (s390_loadrelative_operand_p):
7053 Remove TARGET_CPU_ZARCH usages.
7054 (s390_rtx_costs): Likewise.
7055 (s390_legitimate_constant_p): Likewise.
7056 (s390_cannot_force_const_mem): Likewise.
7057 (legitimate_reload_constant_p): Likewise.
7058 (s390_preferred_reload_class): Likewise.
7059 (legitimize_pic_address): Likewise.
7060 (legitimize_tls_address): Likewise.
7061 (s390_split_branches): Removed.
7062 (s390_add_execute): Removed.
7063 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
7064 (s390_mainpool_start): Likewise.
7065 (s390_mainpool_finish): Likewise.
7066 (s390_mainpool_cancel): Removed.
7067 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
7068 (s390_chunkify_cancel): Likewise.
7069 (s390_return_addr_rtx): Likewise.
7070 (s390_register_info): Remove split_branches_pending_p uages.
7071 (s390_optimize_register_info): Likewise.
7072 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
7073 split_branches_pending_p usages.
7074 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
7075 (s390_load_got): Likewise.
7076 (s390_expand_split_stack_prologue): Likewise.
7077 (output_asm_nops): Likewise.
7078 (s390_function_profiler): Likewise.
7079 (s390_emit_call): Likewise.
7080 (s390_conditional_register_usage): Likewise.
7081 (s390_optimize_prologue): Likewise.
7082 (s390_reorg): Remove TARGET_CPU_ZARCH and
7083 split_branches_pending_p usages.
7084 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
7086 (s390_output_indirect_thunk_function): Likewise.
7087 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
7088 (TARGET_CPU_ZARCH_P): Removed.
7089 (struct machine_function): Remove split_branches_pending_p.
7090 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
7092 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7094 * common/config/s390/s390-common.c (processor_flags_table):
7096 * config.gcc: Remove with_arch/with_tune support.
7097 * config/s390/2064.md: Remove cpu attribute comparisons.
7098 * config/s390/driver-native.c (s390_host_detect_local_cpu):
7100 * config/s390/linux.h (ASM_SPEC):
7101 Remove -march support.
7102 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
7103 Use a table to get an arch level.
7104 * config/s390/s390-opts.h (enum processor_type):
7106 * config/s390/s390.c
7107 (processor_table): Remove entries, add arch_level values.
7108 (s390_issue_rate): Remove cases.
7109 (s390_option_override): Adjust
7110 s390_option_override_internal() call.
7111 (s390_option_override_internal): Remove deprecation warning.
7112 (s390_valid_target_attribute_tree): Adjust
7113 s390_option_override_internal() call.
7114 * config/s390/s390.h (struct s390_processor):
7115 Share with s390-c.c, add arch_level field.
7116 * config/s390/s390.md:
7117 Remove occurrences in cpu attribute.
7118 * config/s390/s390.opt: Remove -march/-mtune support.
7119 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
7120 * doc/invoke.texi: Remove deprecation warning.
7122 2018-08-08 Luis Machado <luis.machado@linaro.org>
7124 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
7126 (qdf24xx_tunings): Set vector cost structure to
7127 qdf24xx_vector_cost.
7129 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
7130 <register_sextend>: Set to 3.
7132 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
7135 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
7136 * config/aarch64/aarch64-simd.md
7137 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
7138 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
7139 (aarch64_frecpx<mode>): ...this new pattern.
7140 * config/aarch64/aarch64-simd-builtins.def: Remove comment
7141 about aarch64_frecp<FRECP:frecp_suffix><mode>.
7143 2018-08-07 Martin Liska <mliska@suse.cz>
7146 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
7147 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
7148 * predict.def (PRED_MALLOC_NONNULL): New predictor.
7149 * doc/extend.texi: Document that malloc attribute adds
7152 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
7155 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7156 Define to speculation_safe_value_not_needed.
7158 2018-08-06 Jeff Law <law@redhat.com>
7160 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
7161 the vr_values instance to cprop_into_stmt.
7162 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
7163 (cprop_operand): Also query EVRP to determine if OP is a constant.
7165 2018-08-06 Nathan Sidwell <nathan@acm.org>
7167 * diagnostic.c (diagnostic_report_current_module): Reroll
7168 included-at loop. Translate text.
7170 2018-08-06 David Malcolm <dmalcolm@redhat.com>
7172 * function-tests.c (selftest::test_expansion_to_rtl): Call
7173 free_after_compilation.
7175 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7177 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
7179 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
7181 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
7182 loops with memory block operations from getting unrolled.
7184 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
7187 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7188 Define to speculation_safe_value_not_needed.
7190 2018-08-06 Jeff Law <law@redhat.com>
7192 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
7195 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7198 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
7199 with all enabled __intN types.
7201 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
7203 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7205 * alias.c (record_set): Check for clobber high.
7206 * cfgexpand.c (expand_gimple_stmt): Likewise.
7207 * combine-stack-adj.c (single_set_for_csa): Likewise.
7208 * combine.c (find_single_use_1): Likewise.
7209 (set_nonzero_bits_and_sign_copies): Likewise.
7210 (get_combine_src_dest): Likewise.
7211 (is_parallel_of_n_reg_sets): Likewise.
7212 (try_combine): Likewise.
7213 (record_dead_and_set_regs_1): Likewise.
7214 (reg_dead_at_p_1): Likewise.
7215 (reg_dead_at_p): Likewise.
7216 * dce.c (deletable_insn_p): Likewise.
7217 (mark_nonreg_stores_1): Likewise.
7218 (mark_nonreg_stores_2): Likewise.
7219 * df-scan.c (df_find_hard_reg_defs): Likewise.
7220 (df_uses_record): Likewise.
7221 (df_get_call_refs): Likewise.
7222 * dwarf2out.c (mem_loc_descriptor): Likewise.
7223 * haifa-sched.c (haifa_classify_rtx): Likewise.
7224 * ira-build.c (create_insn_allocnos): Likewise.
7225 * ira-costs.c (scan_one_insn): Likewise.
7226 * ira.c (equiv_init_movable_p): Likewise.
7227 (rtx_moveable_p): Likewise.
7228 (interesting_dest_for_shprep): Likewise.
7229 * jump.c (mark_jump_label_1): Likewise.
7230 * postreload-gcse.c (record_opr_changes): Likewise.
7231 * postreload.c (reload_cse_simplify): Likewise.
7232 (struct reg_use): Add source expr.
7233 (reload_combine): Check for clobber high.
7234 (reload_combine_note_use): Likewise.
7235 (reload_cse_move2add): Likewise.
7236 (move2add_note_store): Likewise.
7237 * print-rtl.c (print_pattern): Likewise.
7238 * recog.c (decode_asm_operands): Likewise.
7239 (store_data_bypass_p): Likewise.
7240 (if_test_bypass_p): Likewise.
7241 * regcprop.c (kill_clobbered_value): Likewise.
7242 (kill_set_value): Likewise.
7243 * reginfo.c (reg_scan_mark_refs): Likewise.
7244 * reload1.c (maybe_fix_stack_asms): Likewise.
7245 (eliminate_regs_1): Likewise.
7246 (elimination_effects): Likewise.
7247 (mark_not_eliminable): Likewise.
7248 (scan_paradoxical_subregs): Likewise.
7249 (forget_old_reloads_1): Likewise.
7250 * reorg.c (find_end_label): Likewise.
7251 (try_merge_delay_insns): Likewise.
7252 (redundant_insn): Likewise.
7253 (own_thread_p): Likewise.
7254 (fill_simple_delay_slots): Likewise.
7255 (fill_slots_from_thread): Likewise.
7256 (dbr_schedule): Likewise.
7257 * resource.c (update_live_status): Likewise.
7258 (mark_referenced_resources): Likewise.
7259 (mark_set_resources): Likewise.
7260 * rtl.c (copy_rtx): Likewise.
7261 * rtlanal.c (reg_referenced_p): Likewise.
7262 (single_set_2): Likewise.
7263 (noop_move_p): Likewise.
7264 (note_stores): Likewise.
7265 * sched-deps.c (sched_analyze_reg): Likewise.
7266 (sched_analyze_insn): Likewise.
7268 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7270 * cse.c (invalidate_reg): New function extracted from...
7271 (invalidate): ...here.
7272 (canonicalize_insn): Check for clobber high.
7273 (invalidate_from_clobbers): invalidate clobber highs.
7274 (invalidate_from_sets_and_clobbers): Likewise.
7275 (count_reg_usage): Check for clobber high.
7276 (insn_live_p): Likewise.
7277 * cselib.c (cselib_expand_value_rtx_1):Likewise.
7278 (cselib_invalidate_regno): Check for clobber in setter.
7279 (cselib_invalidate_rtx): Pass through setter.
7280 (cselib_invalidate_rtx_note_stores):
7281 (cselib_process_insn): Check for clobber high.
7282 * cselib.h (cselib_invalidate_rtx): Add operand.
7284 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7286 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7287 (mark_not_eliminable): Likewise.
7288 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7289 * lra-lives.c (process_bb_lives): Check for clobber high.
7290 * lra.c (new_insn_reg): Remember clobber highs.
7291 (collect_non_operand_hard_regs): Check for clobber high.
7292 (lra_set_insn_recog_data): Likewise.
7293 (add_regs_to_insn_regno_info): Likewise.
7294 (lra_update_insn_regno_info): Likewise.
7296 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7298 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7299 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7301 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7303 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7304 (copy_insn_1): Likewise.
7305 (gen_hard_reg_clobber_high): New gen function.
7306 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7307 * genemit.c (gen_exp): Likewise.
7308 (gen_emit_seq): Pass through info.
7309 (gen_insn): Check for CLOBBER_HIGH.
7310 (gen_expand): Pass through info.
7311 (gen_split): Likewise.
7312 (output_add_clobbers): Likewise.
7313 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7314 (remove_clobbers): Likewise.
7315 * rtl.h (gen_hard_reg_clobber_high): New declaration.
7317 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7319 * doc/rtl.texi (clobber_high): Add.
7320 (parallel): Add in clobber high
7321 * rtl.c (rtl_check_failed_code3): Add function.
7322 * rtl.def (CLOBBER_HIGH): Add expression.
7323 * rtl.h (RTL_CHECKC3): Add macro.
7324 (rtl_check_failed_code3): Add declaration.
7325 (XC3EXP): Add macro.
7327 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
7330 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7331 cfun->machine->max_used_stack_alignment if needed.
7333 2018-08-04 Martin Sebor <msebor@redhat.com>
7335 PR tree-optimization/86571
7336 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7339 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
7342 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7345 2018-08-03 Jeff Law <law@redhat.com>
7348 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7349 Define to speculation_safe_value_not_needed.
7351 2018-08-03 David Malcolm <dmalcolm@redhat.com>
7353 * doc/gcov.texi (-x): Remove duplicate "to".
7354 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7355 (-Wif-not-aligned): Remove duplicate "is".
7356 (-flto): Remove duplicate "the".
7357 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7358 duplicate "v5.00.b".
7359 (MSP430 Options): Remove duplicate "and" from the description
7360 of "-mgprel-sec=regexp".
7361 (x86 Options): Remove duplicate copies of "vmldLog102" and
7362 vmlsLog104 from description of "-mveclibabi=type".
7364 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
7366 * internal-fn.h (first_commutative_argument): Declare.
7367 * internal-fn.c (first_commutative_argument): New function.
7368 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7369 restrictions for pattern statements. Use first_commutative_argument
7370 to look for commutative operands in calls to internal functions.
7372 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
7374 * Makefile.in (wide-int-range.o): New.
7375 * tree-vrp.c: Move all the wide_int_* functions to...
7376 * wide-int-range.cc: ...here.
7377 * tree-vrp.h: Move all the wide_int_* prototypes to...
7378 * wide-int-range.h: ...here.
7380 2018-08-03 Tom de Vries <tdevries@suse.de>
7382 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
7384 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
7385 * except.c (output_function_exception_table): Do early exit if
7386 targetm_common.except_unwind_info (&global_options) == UI_NONE.
7388 2018-08-03 Martin Liska <mliska@suse.cz>
7390 * predict.c (dump_prediction): Change to 2 digits
7393 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
7395 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
7397 (falkor_am_1_gtov_gtov): ... a new insn reservation.
7399 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
7401 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
7402 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
7403 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
7404 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
7405 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
7407 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7409 * diagnostic-show-locus.c (diagnostic_show_locus): Use
7410 pp_take_prefix when saving the existing prefix.
7411 * diagnostic.c (diagnostic_append_note): Likewise.
7412 * langhooks.c (lhd_print_error_function): Likewise.
7413 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
7414 param's type. Free the existing prefix.
7415 (pp_take_prefix): New function.
7416 (pretty_printer::pretty_printer): Drop the prefix parameter.
7417 Rename the length parameter to match the comment.
7418 (pretty_printer::~pretty_printer): Free the prefix.
7419 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
7421 (struct pretty_printer): Drop the "const" from "prefix" field's
7422 type and clarify memory management.
7423 (pp_set_prefix): Drop the "const" from the 2nd param.
7424 (pp_take_prefix): New decl.
7426 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
7428 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
7429 for word_mode_ok here instead of passing as argument.
7430 (expand_block_compare): Change select_block_compare_mode() call.
7431 (expand_strncmp_gpr_sequence): New function.
7432 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
7434 2018-08-02 Jeff Law <law@redhat.com>
7437 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7438 Define to speculation_safe_value_not_needed.
7441 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7442 Define to speculation_safe_value_not_needed.
7444 2018-08-02 Tom de Vries <tdevries@suse.de>
7447 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
7448 function. Return UI_TARGET unconditionally.
7449 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
7450 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
7452 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7454 * genemit.c (print_overload_test): Fix typo.
7456 2018-08-02 Richard Biener <rguenther@suse.de>
7458 PR tree-optimization/86816
7459 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
7460 which checks for value availability before querying it.
7461 (gvn_uses_equal): Use it.
7462 (same_succ_hash): Likewise.
7463 (gimple_equal_p): Likewise.
7465 2018-08-02 Nick Clifton <nickc@redhat.com>
7468 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7469 Define to speculation_safe_value_not_needed.
7472 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7473 Define to speculation_safe_value_not_needed.
7476 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7477 Define to speculation_safe_value_not_needed.
7480 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7481 Define to speculation_safe_value_not_needed.
7484 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7485 Define to speculation_safe_value_not_needed.
7488 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7489 Define to speculation_safe_value_not_needed.
7492 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7493 Define to speculation_safe_value_not_needed.
7496 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7497 Define to speculation_safe_value_not_needed.
7500 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7501 speculation_safe_value_not_needed.
7504 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
7505 to speculation_safe_value_not_needed.
7507 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7509 * doc/md.texi: Expand the documentation of instruction names
7510 to mention port-local uses. Document '@' in pattern names.
7511 * read-md.h (overloaded_instance, overloaded_name): New structs.
7513 (md_reader::handle_overloaded_name): New member function.
7514 (md_reader::get_overloads): Likewise.
7515 (md_reader::m_first_overload): New member variable.
7516 (md_reader::m_next_overload_ptr): Likewise.
7517 (md_reader::m_overloads_htab): Likewise.
7518 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
7519 m_next_overload_ptr and m_overloads_htab.
7520 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
7521 (get_mode_token, get_code_token, get_int_token): New functions.
7522 (map_attr_string): Add an optional argument that passes back
7523 the associated iterator.
7524 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
7525 (md_reader::handle_overloaded_name, add_overload_instance): New
7527 (apply_iterators): Handle '@' names. Report an error if '@'
7528 is used without iterators.
7529 (initialize_iterators): Initialize the new iterator_group fields.
7530 * genopinit.c (handle_overloaded_code_for)
7531 (handle_overloaded_gen): New functions.
7532 (main): Use them to print declarations of maybe_code_for_* and
7533 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
7534 * genemit.c (print_overload_arguments, print_overload_test)
7535 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
7536 (main): Use it to print definitions of maybe_code_for_* and
7537 maybe_gen_* functions.
7538 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
7539 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
7540 instead of explicit mode checks.
7541 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
7542 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
7543 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
7544 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
7545 (aarch64_expand_compare_and_swap): Likewise
7546 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
7547 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
7548 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
7549 (aarch64_constant_pool_reload_icode): Delete.
7550 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
7551 instead of aarch64_constant_pool_reload_icode. Use
7552 code_for_aarch64_reload_mov instead of explicit mode checks.
7553 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
7554 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
7555 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
7556 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
7557 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
7558 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
7559 (aarch64_atomic_load_op_code): Delete.
7560 (aarch64_emit_atomic_load_op): Likewise.
7561 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
7562 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
7563 instead of aarch64_emit_atomic_load_op.
7564 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
7565 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
7566 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
7567 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
7568 character before the pattern name.
7569 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
7570 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
7571 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
7572 (aarch64_frecps<mode>): Likewise.
7573 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
7574 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
7575 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
7576 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
7577 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
7579 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7581 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
7582 Allow HFmode constants if TARGET_FP_F16INST.
7584 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
7587 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
7588 No longer check last store for clobber of address register.
7590 2018-08-02 Martin Liska <mliska@suse.cz>
7592 PR gcov-profile/86817
7593 * gcov.c (process_all_functions): New function.
7595 (process_file): Move functions processing to
7596 process_all_functions.
7598 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7600 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
7601 "const" to the "gimple *" and "rtx_insn *" parameters.
7602 * dumpfile.h (dump_user_location_t::dump_user_location_t):
7604 (dump_location_t::dump_location_t): Likewise.
7606 2018-08-01 Martin Sebor <msebor@redhat.com>
7608 PR tree-optimization/86650
7609 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
7610 rather than a "gcall *". Directly pass the data of interest
7611 to percent_K_format, rather than building a temporary CALL_EXPR
7613 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
7614 (gimple_fold_builtin_strncat): Adjust.
7615 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
7616 gcall* argument with gimple*.
7617 * gimple-ssa-warn-restrict.c (check_call): Same.
7618 (wrestrict_dom_walker::before_dom_children): Same.
7619 (builtin_access::builtin_access): Same.
7620 (check_bounds_or_overlap): Same
7621 (maybe_diag_overlap): Same.
7622 (maybe_diag_offset_bounds): Same.
7623 * tree-diagnostic.c (default_tree_printer): Move usage of
7624 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
7626 * tree-pretty-print.c (percent_K_format): Add argument.
7627 * tree-pretty-print.h: Add argument.
7628 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
7629 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
7630 (maybe_diag_stxncpy_trunc): Same.
7631 (handle_builtin_stxncpy): Same.
7632 (handle_builtin_strcat): Same.
7634 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7636 * match.pd: Optimise pointer range checks.
7638 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7640 PR tree-optimization/86758
7641 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
7642 to remove pattern statements.
7644 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7646 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
7647 result of dfs_enumerate_from when constructing stmt_vec_infos,
7648 instead of additionally calling get_loop_body.
7650 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7652 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
7654 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
7655 When creating an iv, assert that the step is not known to be zero.
7656 (vect_setup_realignment): Update call accordingly.
7657 * tree-vect-stmts.c (vectorizable_store): Likewise.
7658 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
7660 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7662 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
7663 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
7664 (vectorizable_reduction): Likewise.
7665 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7666 (vect_detect_hybrid_slp_stmts): Likewise.
7667 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7669 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
7671 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
7672 (wide_int_set_zero_nonzero_bits): ...this.
7673 (zero_nonzero_bits_from_vr): Rename to...
7674 (vrp_set_zero_nonzero_bits): ...this.
7675 (extract_range_from_multiplicative_op_1): Abstract wide int
7677 (wide_int_range_multiplicative_op): ...here.
7678 (extract_range_from_binary_expr_1): Extract wide int binary
7679 operations into their own functions.
7680 (wide_int_range_lshift): New.
7681 (wide_int_range_can_optimize_bit_op): New.
7682 (wide_int_range_shift_undefined_p): New.
7683 (wide_int_range_bit_xor): New.
7684 (wide_int_range_bit_ior): New.
7685 (wide_int_range_bit_and): New.
7686 (wide_int_range_trunc_mod): New.
7687 (extract_range_into_wide_ints): New.
7688 (vrp_shift_undefined_p): New.
7689 (extract_range_from_multiplicative_op): New.
7690 (vrp_can_optimize_bit_op): New.
7691 * tree-vrp.h (value_range::dump): New.
7692 (wide_int_range_multiplicative_op): New.
7693 (wide_int_range_lshift):New.
7694 (wide_int_range_shift_undefined_p): New.
7695 (wide_int_range_bit_xor): New.
7696 (wide_int_range_bit_ior): New.
7697 (wide_int_range_bit_and): New.
7698 (wide_int_range_trunc_mod): New.
7699 (zero_nonzero_bits_from_bounds): Rename to...
7700 (wide_int_set_zero_nonzero_bits): ...this.
7701 (zero_nonzero_bits_from_vr): Rename to...
7702 (vrp_set_zero_nonzero_bits): ...this.
7703 (range_easy_mask_min_max): Rename to...
7704 (wide_int_range_can_optimize_bit_op): this.
7705 * vr-values.c (simplify_bit_ops_using_ranges): Rename
7706 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
7708 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7710 * tree-vectorizer.h (vect_orig_stmt): New function.
7711 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
7712 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
7713 (vect_create_epilog_for_reduction): Likewise.
7714 (vectorizable_live_operation): Likewise.
7715 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7716 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
7717 * tree-vect-stmts.c (vectorizable_call): Likewise.
7718 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
7720 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7722 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
7724 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
7725 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
7726 (vect_transform_loop): Likewise.
7727 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7729 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7731 * tree-vectorizer.h (vect_schedule_slp): Return void.
7732 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7733 (vect_schedule_slp): Likewise.
7735 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7737 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
7739 (vect_transform_loop): Update calls accordingly. Schedule SLP
7740 instances before the main loop, if any exist.
7742 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7744 PR tree-optimization/86749
7745 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
7746 If the lhs is used in a COND_EXPR, check that it is being used
7747 as the "then" or "else" value.
7749 2018-08-01 Tom de Vries <tdevries@suse.de>
7752 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7753 speculation_safe_value_not_needed.
7755 2018-08-01 Richard Biener <rguenther@suse.de>
7757 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
7760 2018-08-01 Martin Liska <mliska@suse.cz>
7762 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
7763 format how successful transformation is dumped.
7764 (gimple_mod_pow2_value_transform): Likewise.
7765 (gimple_mod_subtract_transform): Likewise.
7766 (gimple_stringops_transform): Likewise.
7768 2018-08-01 Martin Liska <mliska@suse.cz>
7771 * value-prof.c (interesting_stringop_to_profile_p):
7772 Simplify the code and add BUILT_IN_MEMMOVE.
7773 (gimple_stringops_transform): Likewise.
7775 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
7777 * config/aarch64/aarch64-simd.md
7778 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
7779 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
7780 use GPI iterator instead of SI mode.
7782 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7784 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
7785 rs6000_speculation_barrier.
7786 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
7787 new barrier pattern name.
7789 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7791 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
7792 (speculation_barrier): New insn.
7794 2018-08-01 Richard Biener <rguenther@suse.de>
7797 * graphite.h: Include isl/id.h and isl/space.h to allow build
7800 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
7803 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7804 mode for COFF targets.
7805 * defaults.h (TARGET_COFF): Define.
7806 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
7807 TARGET_COFF): Define.
7808 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
7809 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
7810 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
7812 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7814 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
7815 * gimple-streamer-out.c (output_bb): Save it.
7816 * lto-streamer-in.c (input_struct_function_base): Restore
7817 instance discriminator if available. Create map on demand.
7818 * lto-streamer-out.c (output_struct_function_base): Save it if
7820 * final.c (decl_to_instance_map): Document LTO strategy.
7822 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7823 Olivier Hainque <hainque@adacore.com>
7825 * debug.h (decl_to_instance_map_t): New type.
7826 (decl_to_instance_map): Declare.
7827 (maybe_create_decl_to_instance_map): New inline function.
7828 * final.c (bb_discriminator, last_bb_discriminator): New statics,
7829 to track basic block discriminators.
7830 (final_start_function_1): Initialize them.
7831 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
7833 (decl_to_instance_map): New variable.
7834 (map_decl_to_instance, maybe_set_discriminator): New functions.
7835 (notice_source_line): Set discriminator.
7837 2018-07-31 Ian Lance Taylor <iant@golang.org>
7839 * targhooks.c (default_have_speculation_safe_value): Add
7842 2018-07-31 David Malcolm <dmalcolm@redhat.com>
7844 * dump-context.h: Include "pretty-print.h".
7845 (dump_context::refresh_dumps_are_enabled): New decl.
7846 (dump_context::emit_item): New decl.
7847 (class dump_context): Add fields "m_test_pp" and
7849 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7850 (temp_dump_context::get_dumped_text): New decl.
7851 (class temp_dump_context): Add field "m_pp".
7852 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
7853 (dump_context::refresh_dumps_are_enabled): ...and add a test for
7855 (set_dump_file): Update for above change.
7856 (set_alt_dump_file): Likewise.
7857 (dump_loc): New overload, taking a pretty_printer *.
7858 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
7859 to any test pretty-printer.
7860 (make_item_for_dump_gimple_stmt): New function, adapted from
7861 optinfo::add_gimple_stmt.
7862 (dump_context::dump_gimple_stmt): Call it, and use the result,
7863 eliminating the direct usage of dump_file and alt_dump_file in
7864 favor of indirectly using them via emit_item.
7865 (make_item_for_dump_gimple_expr): New function, adapted from
7866 optinfo::add_gimple_expr.
7867 (dump_context::dump_gimple_expr): Call it, and use the result,
7868 eliminating the direct usage of dump_file and alt_dump_file in
7869 favor of indirectly using them via emit_item.
7870 (make_item_for_dump_generic_expr): New function, adapted from
7872 (dump_context::dump_generic_expr): Call it, and use the result,
7873 eliminating the direct usage of dump_file and alt_dump_file in
7874 favor of indirectly using them via emit_item.
7875 (make_item_for_dump_printf_va): New function, adapted from
7876 optinfo::add_printf_va.
7877 (make_item_for_dump_printf): New function.
7878 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
7879 and use the result, eliminating the direct usage of dump_file and
7880 alt_dump_file in favor of indirectly using them via emit_item.
7881 (make_item_for_dump_dec): New function.
7882 (dump_context::dump_dec): Call it, and use the result,
7883 eliminating the direct usage of dump_file and alt_dump_file in
7884 favor of indirectly using them via emit_item.
7885 (make_item_for_dump_symtab_node): New function, adapted from
7886 optinfo::add_symtab_node.
7887 (dump_context::dump_symtab_node): Call it, and use the result,
7888 eliminating the direct usage of dump_file and alt_dump_file in
7889 favor of indirectly using them via emit_item.
7890 (dump_context::begin_scope): Reimplement, avoiding direct usage
7891 of dump_file and alt_dump_file in favor of indirectly using them
7893 (dump_context::emit_item): New member function.
7894 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7895 Set up test pretty-printer on the underlying context. Call
7896 refresh_dumps_are_enabled.
7897 (temp_dump_context::~temp_dump_context): Call
7898 refresh_dumps_are_enabled.
7899 (temp_dump_context::get_dumped_text): New member function.
7900 (selftest::verify_dumped_text): New function.
7901 (ASSERT_DUMPED_TEXT_EQ): New macro.
7902 (selftest::test_capture_of_dump_calls): Run all tests twice, with
7903 and then without optinfo enabled. Add uses of
7904 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
7905 * dumpfile.h: Update comment for the dump_* API.
7906 * optinfo-emit-json.cc
7907 (selftest::test_building_json_from_dump_calls): Update for new
7908 param for temp_dump_context ctor.
7909 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
7910 and "m_owned" field.
7911 (optinfo_item::~optinfo_item): Likewise.
7912 (optinfo::add_item): New member function.
7913 (optinfo::emit): Update comment.
7914 (optinfo::add_string): Delete.
7915 (optinfo::add_printf): Delete.
7916 (optinfo::add_printf_va): Delete.
7917 (optinfo::add_gimple_stmt): Delete.
7918 (optinfo::add_gimple_expr): Delete.
7919 (optinfo::add_tree): Delete.
7920 (optinfo::add_symtab_node): Delete.
7921 (optinfo::add_dec): Delete.
7922 * optinfo.h (class dump_context): New forward decl.
7923 (optinfo::add_item): New decl.
7924 (optinfo::add_string): Delete.
7925 (optinfo::add_printf): Delete.
7926 (optinfo::add_printf_va): Delete.
7927 (optinfo::add_gimple_stmt): Delete.
7928 (optinfo::add_gimple_expr): Delete.
7929 (optinfo::add_tree): Delete.
7930 (optinfo::add_symtab_node): Delete.
7931 (optinfo::add_dec): Delete.
7932 (optinfo::add_poly_int): Delete.
7933 (optinfo_item::optinfo_item): Remove "owned" param.
7934 (class optinfo_item): Remove field "m_owned".
7936 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7939 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
7940 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
7941 requested variable alignment.
7942 (expand_one_ssa_partition): Likewise.
7943 (expand_one_var): Likewise.
7945 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7947 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7948 to speculation_safe_value_not_needed.
7950 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7952 * targhooks.h (speculation_safe_value_not_needed): New prototype.
7953 * targhooks.c (speculation_safe_value_not_needed): New function.
7954 * target.def (have_speculation_safe_value): Update documentation.
7955 * doc/tm.texi: Regenerated.
7957 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7959 * config/aarch64/iterators.md (ALLI_TI): New iterator.
7960 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
7962 (despeculate_copy<ALLI:mode>_insn): New insn.
7963 (despeculate_copyti_insn): New insn.
7964 (despeculate_simple<ALLI:mode>): New insn
7965 (despeculate_simpleti): New insn.
7966 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
7968 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
7969 aarch64_speculation_safe_value.
7970 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
7972 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7974 * config/aarch64/aarch64-speculation.cc: New file.
7975 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
7976 before pass_reorder_blocks.
7977 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
7979 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
7980 X14 and X15 when tracking speculation.
7981 * config/aarch64/aarch64.md (register name constants): Add
7982 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
7983 (unspec): Add UNSPEC_SPECULATION_TRACKER.
7984 (speculation_barrier): New insn attribute.
7985 (cmp<mode>): Allow SP in comparisons.
7986 (speculation_tracker): New insn.
7987 (speculation_barrier): Add speculation_barrier attribute.
7988 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
7989 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
7990 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
7992 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7994 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
7995 aarch64_track_speculation is true.
7996 (tb<optab><mode>1): Likewise.
7997 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
7998 generate CB[N]Z when tracking speculation.
7999 (aarch64_split_compare_and_swap): Likewise.
8000 (aarch64_split_atomic_op): Likewise.
8002 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8004 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
8006 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8008 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
8009 (speculation_barrier): New insn.
8011 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8013 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
8014 * config/arm/arm.md (speculation_barrier): New expand.
8015 (speculation_barrier_insn): New pattern.
8017 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8019 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
8020 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
8021 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
8022 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
8024 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
8025 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
8026 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
8027 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
8028 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
8029 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
8030 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
8031 * builtins.c (expand_speculation_safe_value): New function.
8032 (expand_builtin): Call it.
8033 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
8034 * doc/extend.texi: Document __builtin_speculation_safe_value.
8035 * doc/md.texi: Document "speculation_barrier" pattern.
8036 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
8037 TARGET_HAVE_SPECULATION_SAFE_VALUE.
8038 * doc/tm.texi: Regenerated.
8039 * target.def (have_speculation_safe_value, speculation_safe_value): New
8041 * targhooks.c (default_have_speculation_safe_value): New function.
8042 (default_speculation_safe_value): New function.
8043 * targhooks.h (default_have_speculation_safe_value): Add prototype.
8044 (default_speculation_safe_value): Add prototype.
8046 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8048 * dump-context.h (dump_context::dump_loc): New decl.
8049 * dumpfile.c (dump_context::dump_loc): New member function.
8050 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
8051 and dump_gimple_stmt.
8052 (dump_context::dump_gimple_expr_loc): Likewise, using
8054 (dump_context::dump_generic_expr_loc): Likewise, using
8056 (dump_context::dump_printf_loc_va): Likewise, using
8058 (dump_context::begin_scope): Explicitly using the global function
8059 "dump_loc", rather than the member function.
8061 2018-07-31 Martin Sebor <msebor@redhat.com>
8063 PR tree-optimization/86741
8064 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
8066 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
8068 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
8069 depend on whether prefetch instructions will be emitted or not.
8070 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
8071 will be emitted or not.
8072 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
8073 (TARGET_SETMEM_PFD): New macros.
8075 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8077 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
8078 (NULL_STMT_VEC_INFO): Delete.
8079 (stmt_vec_info::operator*): Likewise.
8080 (stmt_vec_info::operator gimple *): Likewise.
8081 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
8082 of NULL_STMT_VEC_INFO.
8083 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8084 (vect_reassociating_reduction_p): Likewise.
8085 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8086 (vectorizable_store): Likewise.
8087 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
8088 (vec_info::free_stmt_vec_infos): Likewise.
8090 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8092 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
8093 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
8095 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8097 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
8098 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8099 (vec_info::free_stmt_vec_info): New private member functions.
8100 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
8101 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
8102 * tree-parloops.c (gather_scalar_reductions): Remove calls to
8103 set_stmt_vec_info_vec and free_stmt_vec_infos.
8104 * tree-vect-loop.c (_loop_vec_info): Remove call to
8105 set_stmt_vec_info_vec.
8106 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
8107 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
8108 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
8109 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8110 (vec_info::free_stmt_vec_info): ...these new functions. Remove
8111 assignments in {vec_info::,}new_stmt_vec_info that are redundant
8112 with the clearing in the xcalloc.
8113 (stmt_vec_info_vec): Delete.
8114 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
8115 (vectorize_loops): Likewise.
8116 (vec_info::~vec_info): Remove argument from call to
8117 free_stmt_vec_infos.
8118 (vec_info::add_stmt): Remove vinfo argument from call to
8121 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8123 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
8124 rather than a gimple stmt.
8125 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
8126 information for pattern statements when passed the original
8127 statement; instead wait to be passed the pattern statement itself.
8128 Don't call set_vinfo_for_stmt here.
8129 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
8130 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
8131 stmt_vec_infos here.
8132 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
8133 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
8134 stmt_vec_infos entry.
8136 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8138 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
8139 * tree-vectorizer.c (vec_info::replace_stmt): New function.
8140 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
8141 * tree-vect-stmts.c (vectorizable_call): Likewise.
8142 (vectorizable_simd_clone_call): Likewise.
8144 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8146 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
8147 * tree-vectorizer.c (vec_info::remove_stmt): New function.
8148 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
8149 * tree-vect-loop.c (vect_transform_loop): Likewise.
8150 * tree-vect-slp.c (vect_schedule_slp): Likewise.
8151 * tree-vect-stmts.c (vect_remove_stores): Likewise.
8153 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8155 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
8156 (vect_dr_stmt): Delete.
8157 * tree-vectorizer.c (vec_info::lookup_dr): New function.
8158 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
8160 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
8161 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
8162 (vect_verify_datarefs_alignment, vect_peeling_supportable)
8163 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8164 (vect_analyze_data_refs): Likewise.
8165 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
8167 (vect_find_same_alignment_drs): Likewise.
8168 (vect_slp_analyze_node_dependences): Update calls accordingly.
8169 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8170 instead of DR_VECT_AUX.
8171 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
8172 of a vector data references. Use vec_info::lookup_dr instead of
8174 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
8175 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8176 instead of DR_VECT_AUX.
8178 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8180 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
8182 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8184 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8185 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8186 (vect_gen_prolog_loop_niters): Likewise.
8188 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8190 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
8191 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
8192 (vect_known_alignment_in_bytes, vect_dr_behavior)
8193 (vect_get_scalar_dr_size): Take references as dr_vec_infos
8194 instead of data_references. Update calls to other routines for
8195 which the same change has been made.
8196 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
8197 dr_vec_infos instead of stmt_vec_infos.
8198 (vect_analyze_data_ref_dependence): Update call accordingly.
8199 (vect_slp_analyze_data_ref_dependence)
8200 (vect_record_base_alignments): Use DR_VECT_AUX.
8201 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
8202 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
8203 (vector_alignment_reachable_p, vect_get_data_access_cost)
8204 (vect_peeling_supportable, vect_analyze_group_access_1)
8205 (vect_analyze_group_access, vect_analyze_data_ref_access)
8206 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
8207 (vect_compile_time_alias, vect_small_gap_p)
8208 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
8209 (vect_supportable_dr_alignment): Take references as dr_vec_infos
8210 instead of data_references. Update calls to other routines for
8211 which the same change has been made.
8212 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
8213 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8214 (vect_slp_analyze_and_verify_node_alignment)
8215 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8216 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8217 (vect_setup_realignment): Use dr_vec_infos. Update calls after
8219 (_vect_peel_info::dr): Replace with...
8220 (_vect_peel_info::dr_info): ...this new field.
8221 (vect_peeling_hash_get_most_frequent)
8222 (vect_peeling_hash_choose_best_peeling): Update accordingly.
8223 (vect_peeling_hash_get_lowest_cost):
8224 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
8225 routines for which the same change has been made.
8226 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
8228 * tree-vect-loop-manip.c (get_misalign_in_elems)
8229 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
8231 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8232 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
8233 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
8234 (get_group_load_store_type, get_negative_load_store_type)
8235 (vect_get_data_ptr_increment, vectorizable_store)
8236 (vectorizable_load): Likewise.
8237 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
8238 Update calls to other routines for which the same change has been made.
8240 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8242 * tree-vectorizer.h (vec_info::move_dr): New member function.
8243 (dataref_aux): Rename to...
8244 (dr_vec_info): ...this and add "dr" and "stmt" fields.
8245 (_stmt_vec_info::dr_aux): Update accordingly.
8246 (_stmt_vec_info::data_ref_info): Delete.
8247 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
8248 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
8249 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
8250 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
8252 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
8253 (STMT_VINFO_DR_INFO): New macro.
8254 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
8255 (set_dr_misalignment): Update after rename of dataref_aux.
8256 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
8257 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8258 initialization of STMT_VINFO_DATA_REF.
8259 * tree-vectorizer.c (vec_info::move_dr): New function.
8260 * tree-vect-patterns.c (vect_recog_bool_pattern)
8261 (vect_recog_mask_conversion_pattern)
8262 (vect_recog_gather_scatter_pattern): Use it.
8263 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8264 the "dr" and "stmt" fields of dr_vec_info instead of
8265 STMT_VINFO_DATA_REF.
8267 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8269 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8270 (is_pattern_stmt_p): Use it.
8271 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8272 on pattern statements.
8274 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8276 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8277 original stmt as a stmt_vec_info rather than a gimple stmt.
8278 (vect_pattern_recog_1): Take the statement directly as a
8279 stmt_vec_info, rather than via a gimple_stmt_iterator.
8280 Update call to vect_mark_pattern_stmts.
8281 (vect_pattern_recog): Update calls accordingly.
8283 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8285 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8286 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8287 a vect_def_type for the first argument.
8288 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8289 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
8290 operand if it isn't defined by a vectorized statement.
8291 (vect_build_gather_load_calls): Remove the mask_dt argument and
8292 update calls to vect_get_vec_def_for_stmt_copy.
8293 (vectorizable_bswap): Likewise the dt argument.
8294 (vectorizable_call): Update calls to vectorizable_bswap and
8295 vect_get_vec_def_for_stmt_copy.
8296 (vectorizable_simd_clone_call, vectorizable_assignment)
8297 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8298 (vectorizable_comparison): Update calls to
8299 vect_get_vec_def_for_stmt_copy.
8300 (vectorizable_store): Likewise. Remove now-unnecessary calls to
8302 (vect_get_loop_based_defs): Remove dt argument and update call
8303 to vect_get_vec_def_for_stmt_copy.
8304 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8305 and vect_get_vec_def_for_stmt_copy.
8306 (vectorizable_load): Update calls to vect_build_gather_load_calls
8307 and vect_get_vec_def_for_stmt_copy.
8308 * tree-vect-loop.c (vect_create_epilog_for_reduction)
8309 (vectorizable_reduction, vectorizable_live_operation): Update calls
8310 to vect_get_vec_def_for_stmt_copy.
8312 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8314 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8315 and gimple stmt arguments with a stmt_vec_info.
8316 (vect_record_base_alignments): Update calls accordingly.
8317 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8318 and gimple stmt arguments with a stmt_vec_info.
8319 (vect_build_slp_tree_1): Remove vinfo argument and update call
8320 to vect_record_max_nunits.
8321 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8322 and vect_record_max_nunits.
8324 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8326 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8327 file and take a stmt_vec_info instead of a gimple stmt.
8328 (supportable_widening_operation, vect_finish_replace_stmt)
8329 (vect_finish_stmt_generation, vect_get_store_rhs)
8330 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8331 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8332 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8333 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8334 (vect_create_data_ref_ptr, bump_vector_ptr)
8335 (vect_permute_store_chain, vect_setup_realignment)
8336 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8337 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8338 (vectorizable_reduction, vectorizable_induction)
8339 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8340 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8341 than gimple stmts as arguments.
8342 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8343 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8344 (can_group_stmts_p, vect_check_gather_scatter)
8345 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8346 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8347 (vect_permute_load_chain, vect_shift_permute_load_chain)
8348 (vect_transform_grouped_load)
8349 (vect_record_grouped_load_vectors): Likewise.
8350 * tree-vect-loop.c (vect_fixup_reduc_chain)
8351 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8352 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8353 (vectorizable_reduction, vectorizable_induction)
8354 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8355 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8356 (vect_get_load_store_mask): Likewise.
8357 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8358 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8359 * tree-vect-stmts.c (vect_mark_relevant)
8360 (is_simple_and_all_uses_invariant)
8361 (exist_non_indexing_operands_for_use_p, process_use)
8362 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8363 (vect_get_vec_def_for_operand, vect_get_vec_defs)
8364 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8365 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8366 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8367 (get_negative_load_store_type, get_load_store_type)
8368 (vect_check_load_store_mask, vect_check_store_rhs)
8369 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8370 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8371 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8372 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8373 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8374 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8375 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8376 (supportable_widening_operation): Likewise.
8378 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8380 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
8381 a stmt_vec_info instead of a gcall.
8382 (vect_check_gather_scatter): Update call accordingly.
8383 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
8385 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
8386 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
8387 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
8388 instead of a gimple stmt.
8389 (vect_transform_loop): Update calls accordingly.
8390 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
8391 stmt_vec_infos instead of gimple stmts.
8392 (vect_analyze_slp_instance): Update use accordingly.
8393 * tree-vect-stmts.c (read_vector_array, write_vector_array)
8394 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
8395 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
8396 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
8397 (vect_gen_widened_results_half, vect_get_loop_based_defs)
8398 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
8399 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
8400 down to subroutines.
8402 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8404 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
8405 of the worklist from a vector of gimple stmts to a vector of
8407 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8408 (vect_mark_stmts_to_be_vectorized): Likewise
8410 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8412 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
8413 statement before passing it to vect_analyze_stmt.
8414 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
8415 the chain of phi vector definitions. Track the exit phi via its
8417 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
8418 STMT_VINFO_REDUC_DEF.
8419 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
8420 stmt_vec_infos to handle the statement chains.
8421 (vect_get_slp_defs): Record the first statement in the node
8422 using a stmt_vec_info.
8423 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
8424 statements here and pass their stmt_vec_info down to subroutines.
8425 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
8426 down to vect_finish_stmt_generation.
8427 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
8428 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
8429 stmt_vec_infos to subroutines.
8430 (vect_remove_stores): Use stmt_vec_infos to handle the statement
8433 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8435 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
8436 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
8437 (vect_permute_store_chain, vect_setup_realignment)
8438 (vect_permute_load_chain, vect_shift_permute_load_chain)
8439 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
8440 stmts internally, and when passing values to other vectorizer routines.
8441 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8442 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
8443 (vect_analyze_loop_operations, get_initial_def_for_reduction)
8444 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
8445 (vectorizable_reduction, vectorizable_induction)
8446 (vectorizable_live_operation, vect_transform_loop_stmt)
8447 (vect_transform_loop): Likewise.
8448 * tree-vect-patterns.c (vect_reassociating_reduction_p)
8449 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
8450 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
8451 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8452 (vect_slp_analyze_node_operations_1): Likewise.
8453 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8454 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
8455 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
8456 (vect_finish_stmt_generation_1, get_group_load_store_type)
8457 (get_load_store_type, vect_build_gather_load_calls)
8458 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8459 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8460 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8461 (vectorizable_store, vectorizable_load, vectorizable_condition)
8462 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
8463 (supportable_widening_operation): Likewise.
8464 (vect_get_vector_types_for_stmt): Likewise.
8465 * tree-vectorizer.h (vect_dr_behavior): Likewise.
8467 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8469 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8470 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
8471 (vect_permute_store_chain, vect_permute_load_chain)
8472 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
8473 repeated stmt_vec_info lookups.
8474 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8475 (vect_update_ivs_after_vectorizer): Likewise.
8476 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
8477 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8478 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
8479 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8480 (vect_bb_slp_scalar_cost): Likewise.
8481 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
8483 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8485 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
8486 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
8487 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
8488 to get gassigns and gcalls, rather than operating on generc gimple
8490 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
8491 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
8492 (vectorizable_load, vect_analyze_stmt): Likewise.
8493 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
8495 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8497 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
8498 return stmt_vec_infos rather than gimple stmts. Do not accept
8500 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
8502 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8503 Update use of get_later_stmt.
8504 (vect_get_constant_vectors): Update call accordingly.
8505 (vect_schedule_slp_instance): Likewise
8506 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
8507 (vect_slp_analyze_instance_dependence): Likewise.
8508 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
8510 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8512 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
8513 (stmt_info_for_cost::stmt_info): ...this new field.
8514 (add_stmt_costs): Update accordingly.
8515 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8516 (vect_get_known_peeling_cost): Likewise.
8517 (vect_estimate_min_profitable_iters): Likewise.
8518 * tree-vect-stmts.c (record_stmt_cost): Likewise.
8520 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8522 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
8523 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8524 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8526 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
8528 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8530 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
8531 a gimple stmt to a stmt_vec_info.
8532 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8534 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8536 * tree-vectorizer.h (vec_info::grouped_stores): Change from
8537 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8538 (_loop_vec_info::reduction_chains): Likewise.
8539 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
8541 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8543 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8545 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
8546 a gimple stmt to a stmt_vec_info.
8547 (_stmt_vec_info::next_element): Likewise.
8548 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
8549 (vect_slp_analyze_and_verify_node_alignment)
8550 (vect_analyze_group_access_1, vect_analyze_group_access)
8551 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
8552 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
8553 (vect_supportable_dr_alignment): Update accordingly.
8554 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
8555 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
8556 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
8557 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8558 * tree-vect-slp.c (vect_build_slp_tree_1)
8559 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
8560 (vect_split_slp_store_group, vect_analyze_slp_instance)
8561 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
8562 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
8563 (get_group_load_store_type, get_load_store_type)
8564 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
8565 (vect_transform_stmt, vect_remove_stores): Likewise.
8567 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8569 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
8571 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8572 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
8573 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
8574 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
8575 (vector_alignment_reachable_p, vect_get_data_access_cost)
8576 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
8577 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
8578 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8579 (vect_analyze_group_access_1, vect_analyze_group_access)
8580 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
8581 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
8582 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
8583 result of vect_dr_stmt and use the stmt_vec_info instead of
8584 the associated gimple stmt.
8585 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8586 (vect_gen_prolog_loop_niters): Likewise.
8587 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8589 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8591 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
8592 to a vec<stmt_vec_info>.
8593 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
8594 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
8596 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
8597 to a vec<stmt_vec_info>.
8598 (bst_traits::value_type, bst_traits::value_type): Likewise.
8599 (bst_traits::hash): Update accordingly.
8600 (vect_get_and_check_slp_defs): Change the stmts parameter from
8601 a vec<gimple *> to a vec<stmt_vec_info>.
8602 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
8603 (vect_build_slp_tree): Likewise.
8604 (vect_build_slp_tree_2): Likewise. Update uses of
8605 SLP_TREE_SCALAR_STMTS.
8606 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
8607 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
8608 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
8609 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
8610 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
8611 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
8612 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
8613 (vect_get_constant_vectors, vect_get_slp_defs)
8614 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
8615 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
8616 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
8617 instead of gimple stmts.
8618 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
8619 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
8620 (vect_slp_analyze_instance_dependence): Update uses of
8621 SLP_TREE_SCALAR_STMTS.
8622 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8623 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
8624 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
8625 (get_initial_defs_for_reduction): Likewise.
8626 (vect_create_epilog_for_reduction): Likewise.
8627 (vectorize_fold_left_reduction): Likewise.
8628 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
8629 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
8630 (can_vectorize_live_stmts): Likewise.
8632 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8634 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
8635 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8636 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
8638 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
8640 (gather_scalar_reductions): Update after above interface changes.
8641 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
8642 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
8644 (vect_force_simple_reduction): Likewise.
8645 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
8646 LOOP_VINFO_REDUCTIONS.
8647 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8649 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8651 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
8652 a gimple stmt to a stmt_vec_info.
8653 * tree-vect-loop.c (vect_active_double_reduction_p)
8654 (vect_force_simple_reduction, vectorizable_reduction): Update
8657 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8659 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
8660 vec<gimple *> to a vec<stmt_vec_info>.
8661 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
8662 the reduction_phis argument from a vec<gimple *> to a
8664 (vectorizable_reduction): Likewise the phis local variable that
8665 is passed to vect_create_epilog_for_reduction. Update for new type
8666 of SLP_TREE_VEC_STMTS.
8667 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
8668 (vectorizable_live_operation): Likewise.
8669 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
8670 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
8672 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8674 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
8675 a gimple stmt to a stmt_vec_info.
8676 (vectorizable_condition, vectorizable_live_operation)
8677 (vectorizable_reduction, vectorizable_induction): Pass back the
8678 vectorized statement as a stmt_vec_info.
8679 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
8680 use of STMT_VINFO_VEC_STMT.
8681 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
8682 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
8683 as stmt_vec_infos rather than gimple stmts.
8684 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
8686 (vectorizable_live_operation): Likewise.
8687 (vectorizable_reduction, vectorizable_induction): Likewise,
8688 updating use of STMT_VINFO_VEC_STMT.
8689 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
8690 of STMT_VINFO_VEC_STMT.
8691 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
8692 (vectorizable_simd_clone_call, vectorizable_conversion)
8693 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8694 (vectorizable_store, vectorizable_load, vectorizable_condition)
8695 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
8696 from a gimple stmt to a stmt_vec_info.
8697 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
8698 pointer to a stmt_vec_info to the vectorizable_* routines.
8700 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8702 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
8703 a gimple stmt to a stmt_vec_info.
8704 (is_pattern_stmt_p): Update accordingly.
8705 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
8706 (vect_record_grouped_load_vectors): Likewise.
8707 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8708 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
8709 (vect_model_reduction_cost): Likewise.
8710 (vect_create_epilog_for_reduction): Likewise.
8711 (vectorizable_reduction, vectorizable_induction): Likewise.
8712 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8713 Return the stmt_vec_info for the pattern statement.
8714 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
8715 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
8716 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8717 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
8718 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8719 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
8720 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
8721 (free_stmt_vec_info, vect_is_simple_use): Likewise.
8723 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8725 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
8726 (vect_finish_stmt_generation): Likewise.
8727 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8728 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
8729 (vect_build_gather_load_calls): Use the return value of the above
8730 functions instead of a separate call to vinfo_for_stmt. Use narrow
8731 scopes for the input gimple stmt and wider scopes for the associated
8732 stmt_vec_info. Use vec_info::lookup_def when setting these
8733 stmt_vec_infos from an SSA_NAME definition.
8734 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8735 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8736 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8737 (vectorizable_store, vectorizable_load, vectorizable_condition)
8738 (vectorizable_comparison): Likewise.
8739 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
8740 (vectorizable_reduction): Likewise.
8742 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8744 * tree-vectorizer.h (vect_is_simple_use): Add an optional
8745 stmt_vec_info * parameter before the optional gimple **.
8746 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8747 (process_use, vect_get_vec_def_for_operand_1): Update callers.
8748 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
8749 * tree-vect-loop.c (vectorizable_reduction): Likewise.
8750 (vectorizable_live_operation): Likewise.
8751 * tree-vect-patterns.c (type_conversion_p): Likewise.
8752 (vect_look_through_possible_promotion): Likewise.
8753 (vect_recog_rotate_pattern): Likewise.
8754 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8756 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8758 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
8759 a typedef to a wrapper class.
8760 (NULL_STMT_VEC_INFO): New macro.
8761 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
8762 (stmt_vec_info::operator*): New function.
8763 (stmt_vec_info::operator gimple *): Likewise.
8764 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
8765 (add_stmt_costs): Likewise.
8766 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
8767 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8768 (vect_get_known_peeling_cost): Likewise.
8769 (vect_estimate_min_profitable_iters): Likewise.
8770 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8771 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
8772 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8773 (vectorizable_store, free_stmt_vec_infos): Likewise.
8774 (new_stmt_vec_info): Change return type of xcalloc to
8777 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8779 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
8780 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
8781 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
8782 a single_imm_use-based sequence.
8783 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
8785 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8787 * tree-vectorizer.h (vec_info::lookup_def): Declare.
8788 * tree-vectorizer.c (vec_info::lookup_def): New function.
8789 * tree-vect-patterns.c (vect_get_internal_def): Use it.
8790 (vect_widened_op_tree): Likewise.
8791 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8792 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
8793 (vectorizable_reduction): Likewise.
8794 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
8796 (vect_is_slp_reduction): Update calls accordingly. Use
8797 vec_info::lookup_def.
8798 (vect_is_simple_reduction): Likewise
8799 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
8801 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8803 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
8804 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
8805 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
8807 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
8808 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
8809 (vect_update_vf_for_slp, vect_analyze_loop_operations)
8810 (vect_is_slp_reduction, vectorizable_induction)
8811 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
8812 * tree-vect-patterns.c (vect_init_pattern_stmt):
8813 (vect_determine_min_output_precision_1, vect_determine_precisions)
8814 (vect_pattern_recog): Likewise.
8815 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
8816 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
8817 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
8818 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8819 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
8820 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
8821 info field from a loop to a loop_vec_info.
8823 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8825 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
8826 (vec_info::add_stmt): Declare.
8827 * tree-vectorizer.c (vec_info::add_stmt): New function.
8828 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
8829 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
8830 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8831 (vectorizable_induction): Likewise.
8832 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
8833 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8834 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
8835 (vectorizable_load): Likewise.
8836 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8837 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
8838 (vect_recog_gather_scatter_pattern): Likewise.
8839 (append_pattern_def_seq): Likewise. Remove a check that is
8840 performed by add_stmt itself.
8842 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8844 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
8845 which make_ssa_name was called with new_stmt before new_stmt
8848 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8850 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
8852 (vect_is_slp_reduction): ...here...
8853 (vect_is_simple_reduction): ...and here. Remove repetition of tests
8854 that are already known to be false.
8856 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8858 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
8859 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
8860 STMT_VINFO_NUM_SLP_USES when it's true.
8861 (vect_free_slp_instance): Add a final_p parameter and pass it to
8863 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
8864 (vect_analyze_slp_instance): Likewise.
8865 (vect_slp_analyze_operations): Likewise.
8866 (vect_slp_analyze_bb_1): Likewise.
8867 * tree-vectorizer.c (vec_info): Likewise.
8868 * tree-vect-loop.c (vect_transform_loop): Likewise.
8870 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8872 * tree-vect-loop.c (vectorizable_reduction): Assert that the
8873 function is not called for second and subsequent members of
8876 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8878 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
8879 cases for nested loops from here to ...
8880 (vect_create_epilog_for_reduction): ...here. Only call
8881 vect_is_simple_use for inner-loop reductions.
8883 2018-07-31 Martin Liska <mliska@suse.cz>
8885 PR gcov-profile/85338
8886 PR gcov-profile/85350
8887 PR gcov-profile/85372
8888 * profile.c (struct location_triplet): New.
8889 (struct location_triplet_hash): Likewise.
8890 (output_location): Do not output a BB that
8891 is already recorded for a line.
8892 (branch_prob): Use streamed_locations.
8894 2018-07-31 Martin Liska <mliska@suse.cz>
8896 PR gcov-profile/85370
8897 * coverage.c (coverage_begin_function): Do not mark target
8898 clones as artificial functions.
8900 2018-07-31 Martin Liska <mliska@suse.cz>
8902 PR gcov-profile/83813
8903 PR gcov-profile/84758
8904 PR gcov-profile/85217
8905 PR gcov-profile/85332
8906 * profile.c (branch_prob): Do not record GOTO expressions
8907 for GIMPLE statements which locations are already streamed.
8909 2018-07-31 Olivier Hainque <hainque@adacore.com>
8911 * gcc.c (handle_spec_function): Accept a soft_matched_part
8912 argument, as do_spec_1. Pass it down to ...
8913 (eval_spec_function): Accept a soft_matched_part argument,
8914 and pass it down to ...
8915 (do_spec_2): Accept a soft_matched_part argument, and pass
8916 it down to do_spec_1.
8917 (do_spec_1): Pass soft_matched_part to handle_spec_function.
8918 (handle_braces): Update call to handle_spec_function.
8919 (driver::set_up_specs): Update calls to do_spec_2.
8920 (compare_debug_dump_opt_spec_function): Likewise.
8921 (compare_debug_self_opt_spec_function): Likewise.
8923 2018-07-31 Olivier Hainque <hainque@adacore.com>
8925 * common.opt (nolibc): New option.
8926 * doc/invoke.texi (Link Options): Document it.
8927 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
8928 * config/alpha/linux.h: Likewise.
8929 * config/arc/elf.h: Likewise.
8930 * config/arm/uclinux-elf.h: Likewise.
8931 * config/arm/unknown-elf.h: Likewise.
8932 * config/avr/avrlibc.h: Likewise.
8933 * config/bfin/bfin.h: Likewise.
8934 * config/bfin/linux.h: Likewise.
8935 * config/bfin/uclinux.h: Likewise.
8936 * config/darwin.h: Likewise.
8937 * config/darwin10.h: Likewise.
8938 * config/darwin12.h: Likewise.
8939 * config/gnu-user.h: Likewise.
8940 * config/lm32/uclinux-elf.h: Likewise.
8941 * config/pa/pa-hpux11.h: Likewise.
8942 * config/pa/pa64-hpux.h: Likewise.
8943 * config/sparc/sparc.h: Likewise.
8945 2018-07-31 Olivier Hainque <hainque@adacore.com>
8947 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
8948 undefined variables.
8950 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
8953 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
8956 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
8958 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
8959 terminated string literal.
8961 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
8963 PR rtl-optimization/85160
8964 * combine.c (is_just_move): New function.
8965 (try_combine): Allow combining two instructions into two if neither of
8966 the original instructions was a move.
8968 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
8971 * doc/extend.texi (Global Register Variables): Discourage use of type
8973 (Local Register Variables): Likewise.
8975 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
8977 PR tree-optimization/86506
8978 * hwint.h (ceil_log2): Resync with hwint.c implementation.
8980 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
8983 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
8984 hard_regno, make sure no insn between `from` and `to` clobbers it.
8986 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
8987 Tom de Vries <tdevries@suse.de>
8989 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
8990 (PTX_DEFAULT_RUNTIME_DIM): ... this.
8991 (nvptx_goacc_validate_dims): Set default worker and gang dims to
8992 PTX_DEFAULT_RUNTIME_DIM.
8993 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
8995 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
8997 * config/pa/pa.c (pa_output_addr_vec): Align address table.
8998 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
8999 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
9001 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
9003 * config/rs6000/constraints.md (wG constraint): Delete, no longer
9005 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
9006 predicate to reflect toc fusion has been deleted.
9007 (toc_fusion_mem_raw): Delete, no longer used.
9008 (toc_fusion_mem_wrapped): Likewise.
9009 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
9011 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
9012 Delete, no longer used.
9013 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
9014 meant to be used for toc fusion.
9015 (rs6000_debug_print_mode): Delete toc fusion debugging.
9016 (rs6000_debug_reg_global): Likewise.
9017 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
9018 fusion and secondary reload support that were never used.
9019 (rs6000_option_override_internal): Delete TOC fusion, that was only
9020 partially defined, and it did not work unless you also used the
9022 (rs6000_legitimate_address_p): Delete TOC fusion support.
9023 (rs6000_opt_masks): Likewise.
9024 (fusion_wrap_memory_address): Delete function, no longer used.
9025 (fusion_split_address); Delete TOC fusion support.
9026 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
9027 longer used with toc fusion being deleted.
9028 (TARGET_TOC_FUSION_FP): Likewise.
9029 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
9031 (toc fusion spliter): Delete TOC fusion support.
9032 (toc_fusionload_<mode>): Likewise.
9033 (toc_fusionload_di): Likewise.
9034 (fusion_gpr_load_<mode>): Delete generator function, this insn no
9035 longer needs to be named. Rename predicate to delete TOC fusion.
9036 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9037 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9038 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9039 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9040 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
9042 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
9044 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
9045 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
9046 __int128 in built-in function prototypes.
9047 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
9048 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
9050 2018-07-27 Martin Sebor <msebor@redhat.com>
9052 PR tree-optimization/86696
9053 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
9054 types, including enums.
9055 (handle_char_store): Be prepared for the above function to fail.
9057 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
9059 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
9060 when optimization level is lower than 2 or optimize for size.
9062 2018-07-26 Martin Sebor <msebor@redhat.com>
9064 PR tree-optimization/86043
9065 PR tree-optimization/86042
9066 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
9067 (get_string_cst_length): Rename...
9068 (get_min_string_length): ...to this. Add argument.
9069 (handle_char_store): Extend to handle multi-character stores by
9071 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
9072 * tree.h (initializer_zerop): Add argument.
9074 2018-07-26 Jakub Jelinek <jakub@redhat.com>
9077 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
9078 declare target to variables if they have always,{to,from,tofrom} map
9081 2018-07-26 Martin Liska <mliska@suse.cz>
9084 * lto-wrapper.c: Add linker_output as prefix
9085 for ltrans_output_file.
9087 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
9089 PR rtl-optimization/85805
9090 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
9091 value for hard registers if that was written in the same mode.
9093 2018-07-26 Martin Liska <mliska@suse.cz>
9095 PR gcov-profile/86536
9096 * gcov.c (format_gcov): Use printf format %.*f directly
9097 and do not handle special values.
9099 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9101 * common/config/arc/arc-common.c (arc_option_optimization_table):
9102 Update default optimizations for size.
9104 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9106 * config/arc/arc.md (movsf_insn): Add short instruction selection.
9107 * config/arc/constraints.md (CfZ): New constraint.
9108 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
9109 (subsf3_fpu): Likewise.
9110 (cmpsf_fpu): Likewise.
9111 (cmpsf_fpu_uneq): Likewise.
9113 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9115 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
9117 (arc_is_uncached_mem_p): uncached applies to both the variable and
9120 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9122 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
9125 2018-07-25 David Malcolm <dmalcolm@redhat.com>
9127 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
9128 field "m_scopes" from vec to auto_vec.
9130 2018-07-25 Martin Liska <mliska@suse.cz>
9132 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
9135 2018-07-25 Richard Biener <rguenther@suse.de>
9138 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
9139 special wrt context_die late.
9140 (gen_subprogram_die): Re-use DIEs in local scope.
9142 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
9144 PR tree-optimization/86644
9145 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
9147 2018-07-25 Martin Liska <mliska@suse.cz>
9150 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
9151 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
9153 2018-07-25 Martin Liska <mliska@suse.cz>
9156 * params.def: Explain ASan abbreviation and provide
9157 a documentation link.
9159 2018-07-24 Martin Sebor <msebor@redhat.com>
9161 PR tree-optimization/86622
9162 PR tree-optimization/86532
9163 * builtins.h (string_length): Declare.
9164 * builtins.c (c_strlen): Correct handling of non-constant offsets.
9165 (check_access): Be prepared for non-constant length ranges.
9166 (string_length): Make extern.
9167 * expr.c (string_constant): Only handle the minor non-constant
9168 array index. Use string_constant to compute the length of
9169 a generic string constant.
9171 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
9173 PR tree-optimization/86618
9174 * tree-vect-stmts.c (vectorizable_call): Don't take the address
9175 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
9177 2018-07-24 David Malcolm <dmalcolm@redhat.com>
9179 PR tree-optimization/86636
9180 * json.cc (json::object::set): Fix comment. Add assertions.
9181 (json::array::append): Move here from json.h. Add comment and an
9183 (json::string::string): Likewise.
9184 * json.h (json::array::append): Move to json.cc.
9185 (json::string::string): Likewise.
9186 * optinfo-emit-json.cc
9187 (optrecord_json_writer::impl_location_to_json): Assert that we
9188 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
9189 wrapper around it. Expand the location once, rather than three
9191 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
9192 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
9194 (optrecord_json_writer::optinfo_to_json): Likewise, in four
9195 places. Fix some overlong lines.
9197 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
9199 * config/aarch64/aarch64-simd.md
9200 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
9201 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
9202 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
9203 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
9204 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9205 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
9206 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
9207 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
9208 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
9210 2018-07-24 Jakub Jelinek <jakub@redhat.com>
9213 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
9214 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
9215 and abs_d == d, do the power of two handling if profitable.
9217 2018-07-24 Richard Biener <rguenther@suse.de>
9219 * match.pd: Add BIT_FIELD_REF canonicalizations.
9221 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9224 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
9226 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9228 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
9229 terminated STRING_CST object.
9231 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9233 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
9235 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9237 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
9238 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
9239 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
9240 the elements into a register.
9241 (rs6000_split_v4si_init_di_reg): Delete.
9242 (rs6000_split_v4si_init): Delete.
9243 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
9244 (vsx_init_v4si): Rewrite as a define_expand.
9246 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9248 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
9249 zero_extend argument from memory): New.
9251 2018-07-22 Martin Sebor <msebor@redhat.com>
9254 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
9255 diagnosing calls with unknown arguments unless -Walloca-larger-than
9256 is restricted to less than PTRDIFF_MAX bytes.
9258 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
9260 * doc/gcov.texi (Invoking Gcov): Editorial changes.
9262 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9264 * pretty-print.c (text_info::set_location): Remove redundant
9265 "line_table" parameter from call to rich_location::set_range.
9267 2018-07-20 Martin Sebor <msebor@redhat.com>
9270 * builtins.c (expand_builtin_alloca): Adjust.
9271 * calls.c (alloc_max_size): Simplify.
9272 * cgraphunit.c (cgraph_node::expand): Adjust.
9273 * common.opt (larger_than_size, warn_frame_larger_than): Remove
9275 (frame_larger_than_size): Same.
9276 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9277 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9279 * doc/invoke.texi (GCC Command Options): Document option arguments.
9280 Explain byte-size arguments and suffixes.
9281 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9282 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9283 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9284 * doc/options.texi (UInteger): Expand.
9285 (Host_Wide_Int, ByteSize): Document new properties.
9286 * final.c (final_start_function_1): Include sizes in an error message.
9287 * function.c (frame_offset_overflow): Same.
9288 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9289 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9290 Diagnose unbounded alloca calls only for limits of less than
9292 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
9293 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
9295 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
9296 only for limits of less than PTRDIFF_MAX.
9297 * langhooks-def.h (lhd_handle_option): Change function argument
9299 * langhooks.c (lhd_handle_option): Same.
9300 * langhooks.h (handle_option): Same.
9301 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9303 (var_type, var_type_struct): Same.
9304 (var_set): Handle ByteSize flag.
9305 * optc-gen.awk: Add comments to output to ease debugging. Make
9306 use of HOST_WIDE_INT where appropriate.
9307 * opts-gen-save.awk: Use %lx to format unsigned long.
9308 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9309 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9310 arguments. Parse bytes-size suffixes.
9311 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9312 (enum_value_to_arg): Same.
9313 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
9314 (handle_option): Adjust.
9315 (generate_option): Change function argument to HOST_WIDE_INT.
9316 (cmdline_handle_error): Adjust.
9317 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9318 (set_option): Change function argument to HOST_WIDE_INT.
9319 (option_enabled): Handle cl_host_wide_int.
9320 (get_option_state): Handle CLVC_SIZE.
9321 (control_warning_option): Same.
9322 * opts.c (common_handle_option): Change function argument to
9323 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
9324 OPT_Wvla_larger_than_.
9325 * opts.h (enum cl_var_type): Add an enumerator.
9326 * stor-layout.c (layout_decl): Print a more meaningful warning.
9327 * toplev.c (output_stack_usage): Adjust.
9329 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
9331 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9332 call to inline_expand_builtin_string_cmp.
9333 (expand_builtin_strcmp): Likewise.
9334 (expand_builtin_strncmp): Likewise.
9335 (inline_string_cmp): Delete the last parameter, change char_type_node
9336 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9338 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9339 the inlining expansion on target where the type of the call has same or
9340 narrower precision than unsigned char.
9342 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9344 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9345 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9346 * common.opt (fsave-optimization-record): New option.
9347 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9348 * doc/invoke.texi (-fsave-optimization-record): New option.
9349 * dumpfile.c: Include "optinfo-emit-json.h".
9350 (struct kv_pair): Move to coretypes.h.
9351 (optgroup_options): Make non-static.
9352 (dump_context::end_scope): Call
9353 optimization_records_maybe_pop_dump_scope.
9354 * dumpfile.h (optgroup_options): New decl.
9355 * json.cc: New file.
9357 * optinfo-emit-json.cc: New file.
9358 * optinfo-emit-json.h: New file.
9359 * optinfo.cc: Include "optinfo-emit-json.h".
9360 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9361 (optinfo_enabled_p): Check optimization_records_enabled_p.
9362 (optinfo_wants_inlining_info_p): Likewise.
9363 * optinfo.h: Update comment.
9364 * profile-count.c (profile_quality_as_string): New function.
9365 * profile-count.h (profile_quality_as_string): New decl.
9366 (profile_count::quality): New accessor.
9367 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9368 and optinfo_emit_json_cc_tests.
9369 * selftest.h (selftest::json_cc_tests): New decl.
9370 (selftest::optinfo_emit_json_cc_tests): New decl.
9371 * toplev.c: Include "optinfo-emit-json.h".
9372 (compile_file): Call optimization_records_finish.
9373 (do_compile): Call optimization_records_start.
9374 * tree-ssa-live.c: Include optinfo.h.
9375 (remove_unused_scope_block_p): Retain inlining information if
9376 optinfo_wants_inlining_info_p returns true.
9378 2018-07-20 Richard Biener <rguenther@suse.de>
9381 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
9382 to cover -flto-partition=none.
9384 2018-07-20 Martin Liska <mliska@suse.cz>
9386 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
9387 (get_decl_source_range): Remove unused function.
9389 2018-07-20 Richard Biener <rguenther@suse.de>
9391 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
9392 (struct vn_phi_s): Likewise.
9393 (struct vn_reference_s): Likewise.
9394 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
9395 for searching the slot of an entry known to be in the hash itself.
9396 (vn_phi_hasher::equal): Likewise.
9397 (vn_reference_hasher::equal): Likewise.
9398 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
9400 (optimistic_info, current_info): Remove, keeping only valid_info.
9401 (vn_reference_lookup_1): Remove fallback lookup.
9402 (vn_reference_lookup_2): Likewise.
9403 (vn_nary_op_lookup_1): Likewise.
9404 (vn_phi_lookup): Likewise.
9405 (vn_nary_build_or_lookup_1): Make sure to not chain the built
9407 (vn_reference_insert): Adjust, chain the inserted hash element
9408 at last_inserted_ref.
9409 (vn_reference_insert_pieces): Likewise.
9410 (visit_reference_op_call): Likewise.
9411 (vn_nary_op_insert_into): Chain the inserted hash element at
9413 (vn_nary_op_insert_pieces): Adjust.
9414 (vn_nary_op_insert): Likewise.
9415 (vn_nary_op_insert_stmt): Likewise.
9416 (vn_phi_insert): Adjust, chain the inserted hash element at
9418 (process_scc): Remove clearing and copying the optimistic
9419 table. Instead remove elements inserted during an optimistic
9420 iteration from the single table we maintain.
9421 (init_scc_vn): Adjust.
9422 (free_scc_vn): Likewise.
9423 (sccvn_dom_walker::record_cond): Likewise.
9424 (sccvn_dom_walker::after_dom_children): Likewise.
9426 2018-07-19 Martin Sebor <msebor@redhat.com>
9428 PR tree-optimization/84047
9429 PR tree-optimization/83776
9430 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
9431 (check_array_bounds): Call it.
9433 2018-07-19 Martin Sebor <msebor@redhat.com>
9435 * align.h (align_flags): Use member initialization.
9437 2018-07-19 David Malcolm <dmalcolm@redhat.com>
9439 * Makefile.in (OBJS): Add optinfo.o.
9440 * coretypes.h (class symtab_node): New forward decl.
9441 (struct cgraph_node): New forward decl.
9442 (class varpool_node): New forward decl.
9443 * dump-context.h: New file.
9444 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
9446 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
9447 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
9448 (set_alt_dump_file): Likewise.
9449 (dump_context::~dump_context): New dtor.
9450 (dump_gimple_stmt): Move implementation to...
9451 (dump_context::dump_gimple_stmt): ...this new member function.
9452 Add the stmt to any pending optinfo, creating one if need be.
9453 (dump_gimple_stmt_loc): Move implementation to...
9454 (dump_context::dump_gimple_stmt_loc): ...this new member function.
9455 Start a new optinfo and add the stmt to it.
9456 (dump_gimple_expr): Move implementation to...
9457 (dump_context::dump_gimple_expr): ...this new member function.
9458 Add the stmt to any pending optinfo, creating one if need be.
9459 (dump_gimple_expr_loc): Move implementation to...
9460 (dump_context::dump_gimple_expr_loc): ...this new member function.
9461 Start a new optinfo and add the stmt to it.
9462 (dump_generic_expr): Move implementation to...
9463 (dump_context::dump_generic_expr): ...this new member function.
9464 Add the tree to any pending optinfo, creating one if need be.
9465 (dump_generic_expr_loc): Move implementation to...
9466 (dump_context::dump_generic_expr_loc): ...this new member
9467 function. Add the tree to any pending optinfo, creating one if
9469 (dump_printf): Move implementation to...
9470 (dump_context::dump_printf_va): ...this new member function. Add
9471 the text to any pending optinfo, creating one if need be.
9472 (dump_printf_loc): Move implementation to...
9473 (dump_context::dump_printf_loc_va): ...this new member function.
9474 Start a new optinfo and add the stmt to it.
9475 (dump_dec): Move implementation to...
9476 (dump_context::dump_dec): ...this new member function. Add the
9477 value to any pending optinfo, creating one if need be.
9478 (dump_context::dump_symtab_node): New member function.
9479 (dump_context::get_scope_depth): New member function.
9480 (dump_context::begin_scope): New member function.
9481 (dump_context::end_scope): New member function.
9482 (dump_context::ensure_pending_optinfo): New member function.
9483 (dump_context::begin_next_optinfo): New member function.
9484 (dump_context::end_any_optinfo): New member function.
9485 (dump_context::s_current): New global.
9486 (dump_context::s_default): New global.
9487 (dump_scope_depth): Delete global.
9488 (dumpfile_ensure_any_optinfo_are_flushed): New function.
9489 (dump_symtab_node): New function.
9490 (get_dump_scope_depth): Reimplement in terms of dump_context.
9491 (dump_begin_scope): Likewise.
9492 (dump_end_scope): Likewise.
9493 (selftest::temp_dump_context::temp_dump_context): New ctor.
9494 (selftest::temp_dump_context::~temp_dump_context): New dtor.
9495 (selftest::verify_item): New function.
9496 (ASSERT_IS_TEXT): New macro.
9497 (ASSERT_IS_TREE): New macro.
9498 (ASSERT_IS_GIMPLE): New macro.
9499 (selftest::test_capture_of_dump_calls): New test.
9500 (selftest::dumpfile_c_tests): Call it.
9501 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
9502 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
9503 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
9504 descriptive comment.
9505 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
9506 (dump_node, dump_bb): Move these unrelated decls.
9507 (class dump_manager): Add leading comment.
9508 * optinfo.cc: New file.
9509 * optinfo.h: New file.
9511 2018-07-19 Michael Collison <michael.collison@arm.com>
9512 Richard Henderson <rth@redhat.com>
9514 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
9515 (subti): Handle op1 zero.
9516 (subvti4, usub4ti4): New.
9517 (*sub<GPI>3_compare1_imm): New.
9518 (sub<GPI>3_carryinCV): New.
9519 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
9520 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
9522 2018-07-19 Michael Collison <michael.collison@arm.com>
9523 Richard Henderson <rth@redhat.com>
9525 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
9526 (addti3): Create simpler code if low part is already known to be 0.
9527 (addvti4, uaddvti4): New.
9528 (*add<GPI>3_compareC_cconly_imm): New.
9529 (*add<GPI>3_compareC_cconly): New.
9530 (*add<GPI>3_compareC_imm): New.
9531 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
9532 handle constants within this pattern..
9533 (*add<GPI>3_compareV_cconly_imm): New.
9534 (*add<GPI>3_compareV_cconly): New.
9535 (*add<GPI>3_compareV_imm): New.
9536 (add<GPI>3_compareV): New.
9537 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
9538 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
9539 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
9540 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
9541 with 'comparison' operator.
9542 (*add<GPI>3_compareV_cconly_imm): Ditto.
9543 (*add<GPI>3_compareV_cconly): Ditto.
9544 (*add<GPI>3_compareV_imm): Ditto.
9545 (add<GPI>3_compareV): Ditto.
9546 (add<mode>3_carryinC): Ditto.
9547 (*add<mode>3_carryinC_zero): Ditto.
9548 (*add<mode>3_carryinC): Ditto.
9549 (add<mode>3_carryinV): Ditto.
9550 (*add<mode>3_carryinV_zero): Ditto.
9551 (*add<mode>3_carryinV): Ditto.
9553 2018-07-19 Michael Collison <michael.collison@arm.com>
9554 Richard Henderson <rth@redhat.com>
9556 * config/aarch64/aarch64-modes.def (CC_V): New.
9557 * config/aarch64/aarch64-protos.h
9558 (aarch64_addti_scratch_regs): Declare
9559 (aarch64_subvti_scratch_regs): Declare.
9560 (aarch64_expand_subvti): Declare.
9561 (aarch64_gen_unlikely_cbranch): Declare
9562 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
9563 for signed overflow using CC_Vmode.
9564 (aarch64_get_condition_code_1): Handle CC_Vmode.
9565 (aarch64_gen_unlikely_cbranch): New function.
9566 (aarch64_addti_scratch_regs): New function.
9567 (aarch64_subvti_scratch_regs): New function.
9568 (aarch64_expand_subvti): New function.
9570 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9572 * config/aarch64/aarch64-option-extensions.def: New entry for profile
9574 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
9575 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
9578 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9581 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9582 address check not strict.
9584 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9586 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
9588 (store_pair_lanes<mode>): Likewise.
9589 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
9590 enum value 'ADDR_QUERY_LDP_STP_N'.
9591 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
9592 (aarch64_print_address_internal): Add declaration.
9593 (aarch64_print_ldpstp_address): Remove.
9594 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
9595 (aarch64_print_operand): Change printing of 'y'.
9596 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
9597 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
9598 'true' rather than '1'.
9599 * config/aarch64/constraints.md (Uml): Likewise.
9600 (Uml): Rename to Umn.
9603 2018-07-19 Richard Biener <rguenther@suse.de>
9605 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
9607 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
9608 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
9609 (vn_reference_hasher): Likewise.
9610 (struct vn_tables_s): Remove obstack and alloc-pool members.
9611 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
9612 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
9613 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
9614 (vn_reference_insert_pieces): Likewise.
9615 (alloc_vn_nary_op_noinit): Adjust.
9616 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
9617 (vn_phi_eq): Adjust.
9618 (shared_lookup_phiargs): Remove.
9619 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
9620 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
9621 (visit_reference_op_call): Likewise.
9622 (copy_nary, copy_phi, copy_reference): Remove.
9623 (process_scc): Rewind the obstack when iterating. Do not
9624 copy the elements to valid_info but just move them from one
9625 hashtable to the other.
9626 (allocate_vn_table): Adjust.
9627 (free_vn_table): Likewise.
9628 (init_scc_vn): Likewise.
9629 (free_scc_vn): Likewise.
9631 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
9634 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
9635 indirect_return as function type attribute.
9636 (ix86_attribute_table): Change indirect_return to function
9638 * doc/extend.texi: Update indirect_return attribute.
9640 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
9642 * wide-int.h (widest2_int): New.
9643 * gimple-fold.c (arith_overflowed_p): Use it.
9644 * tree.h (widest2_int_cst): New.
9645 * tree-vrp.c (wide_int_binop_overflow): Rename from
9646 vrp_int_const_binop.
9647 Rewrite to work on trees.
9648 (extract_range_from_multiplicative_op_1): Abstract code to...
9649 (wide_int_range_min_max): ...here.
9650 (wide_int_range_cross_product): ...and here.
9651 (extract_range_from_binary_expr_1): Abstract overflow code to...
9652 (wide_int_range_mult_wrapping): ...here.
9653 * tree-vrp.h (wide_int_range_cross_product): New.
9654 (wide_int_range_mult_wrapping): New.
9656 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
9657 Julia Koval <julia.koval@intel.com>
9659 * config/i386/x86-tune-costs.h (skylake_memcpy,
9660 skylake_memset): Replace rep_prefix with unrolling for size 512.
9662 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
9665 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
9666 comparision with EQ_EXPR in last stmt.
9668 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
9670 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
9671 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
9672 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
9673 previously known as "PowerPC AltiVec Built-in Functions". Move
9674 some material to new subsubsections "PowerPC AltiVec Built-in
9675 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
9677 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
9678 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
9679 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
9680 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
9682 2018-07-18 Richard Biener <rguenther@suse.de>
9684 PR tree-optimization/86557
9685 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
9688 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
9690 * config/s390/s390.c (s390_function_profiler): Generate CFI.
9692 2018-07-17 Jeff Law <law@redhat.com>
9694 * config/arm/arm.c (get_label_padding): Update for recent
9695 changes to label_to_alignment.
9697 PR tree-optimization/86010
9698 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
9700 * config/mips/mips.c (vr4130_align_insns): Update for recent
9701 changes to label_to_alignment.
9703 * config/frv/frv.c (frv_label_align): Update for recent changes
9704 to label_to_alignment.
9706 * config/nios2/nios2.c (nios2_label_align): Update for recent
9707 changes which dropped ALIGN_LABELS_LOG.
9709 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
9711 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
9712 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
9714 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
9716 * config/arc/arc.c (arc_label_align): Use align_labels instead of
9717 deprecated align_labels_log.
9719 2018-07-17 Richard Biener <rguenther@suse.de>
9722 * dwarf2out.c (init_sections_and_labels): Always generate
9723 a debug_line_str_section for early LTO debug.
9724 (dwarf2out_finish): Reset debug_line_str_hash output early.
9725 Bump counter for extra dwarf5 .debug_loc labels to not conflict
9727 (dwarf2out_early_finish): Output debug_line_str.
9729 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9731 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
9732 index register on z196 or later.
9734 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9736 * config/s390/s390.c (s390_default_align): Set default function
9738 (s390_override_options_after_change): Call s390_default align.
9739 (s390_option_override_internal): Call s390_default_align.
9740 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
9742 2018-07-17 Jakub Jelinek <jakub@redhat.com>
9745 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
9746 to _looptemp_ clauses, other than the first two.
9748 2018-07-17 Martin Liska <mliska@suse.cz>
9750 * opts.c: Do not enable OPT_falign_* for -Os.
9752 2018-07-17 Martin Liska <mliska@suse.cz>
9754 * align.h (MAX_CODE_ALIGN): New.
9755 (MAX_CODE_ALIGN_VALUE): New.
9756 * common/config/i386/i386-common.c (ix86_handle_option):
9757 (MAX_CODE_ALIGN): Moved to align.h.
9758 * final.c (MAX_CODE_ALIGN): Likewise.
9759 * opts.c (parse_and_check_align_values):
9760 (MAX_CODE_ALIGN): Likewise.
9761 (MAX_CODE_ALIGN_VALUE): Likewise.
9763 2018-07-17 Martin Liska <mliska@suse.cz>
9765 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
9766 in order to fulfil coding style.
9767 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
9768 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9769 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9770 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
9771 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
9772 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
9773 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
9774 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
9775 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9777 2018-07-17 Martin Liska <mliska@suse.cz>
9779 * align.h: New file.
9780 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
9782 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
9783 align_flags of label_to_alignment.
9784 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
9786 * config/m68k/m68k.c: Do not use removed align_labels_value and
9788 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
9789 (LOOP_ALIGN): Likewise.
9790 (LABEL_ALIGN): Likewise.
9791 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9792 Remove not used macro.
9793 (rs6000_loop_align): Change return type to align_flags.
9794 (rs6000_loop_align_max_skip): Remove.
9795 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
9796 Change return type to align_flags.
9797 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9798 Remove not used macro.
9799 (rs6000_loop_align): Change return type to align_flags.
9800 (rs6000_loop_align_max_skip): Remove.
9801 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
9802 * config/rx/rx-protos.h (rx_align_for_label): Make it
9804 * config/rx/rx.c (rx_align_for_label): Change return type
9806 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
9808 into align_flags class.
9809 (LABEL_ALIGN): Likewise.
9810 (LOOP_ALIGN): Likewise.
9811 * config/s390/s390.c (s390_label_align): Use align_flags
9813 (s390_asm_output_function_label): Likewise.
9814 * config/sh/sh.c (sh_override_options_after_change):
9815 Use align_flags class directly without macros.
9816 (find_barrier): Likewise.
9817 (barrier_align): Likewise.
9818 (sh_loop_align): Likewise.
9819 * config/spu/spu.c (spu_option_override):
9820 Use align_flags_tuple::get_value instead of removed macros.
9821 (spu_sched_init): Likewise.
9822 * config/spu/spu.h (GTY): Likewise.
9823 * config/visium/visium.c (visium_option_override):
9824 Set "8" as default secondary alignment.
9825 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
9826 in order to guarantee secondary alignment of 8.
9827 * coretypes.h: Include align.h header file.
9828 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
9829 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
9830 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
9831 * doc/tm.texi.in: Likewise.
9832 * final.c (struct label_alignment): Remove not used structure.
9833 (LABEL_ALIGN): Change type to align_flags.
9834 (LOOP_ALIGN): Likewise.
9835 (JUMP_ALIGN): Likewise.
9836 (default_loop_align_max_skip): Remove.
9837 (default_label_align_max_skip): Likewise.
9838 (default_jump_align_max_skip): Likewise.
9839 (default_label_align_after_barrier_max_skip):
9840 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
9841 (LABEL_TO_MAX_SKIP): Remove.
9842 (label_to_alignment): Return align_flags type instead of integer.
9843 (label_to_max_skip): Remove.
9844 (align_fuzz): Use align_flags type.
9845 (compute_alignments): Use align_flags type and use align_flags::max
9846 to combine multiple alignments.
9847 (grow_label_align): Grow vec instead of C array.
9848 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
9849 (shorten_branches): Use align_flags type and use align_flags::max
9850 to combine multiple alignments.
9851 (final_scan_insn_1): Remove usage of secondary alignment that comes
9852 from label alignment, but instead use proper secondary alignment
9853 which is computed in grow_label_align.
9854 * flags.h (struct align_flags_tuple): Move to align.h.
9855 (struct align_flags): Likewise.
9856 (state_align_loops): Rename to align_loops.
9857 (state_align_jumps): Rename to align_jumps.
9858 (state_align_labels): Rename to align_labels.
9859 (state_align_functions): Rename to align_functions.
9860 (align_loops_log): Remove.
9861 (align_jumps_log): Remove.
9862 (align_labels_log): Remove.
9863 (align_functions_log): Remove.
9864 (align_loops_max_skip): Remove.
9865 (align_jumps_max_skip): Remove.
9866 (align_labels_max_skip): Remove.
9867 (align_functions_max_skip): Remove.
9868 (align_loops_value): Remove.
9869 (align_jumps_value): Remove.
9870 (align_labels_value): Remove.
9871 (align_functions_value): Remove.
9872 * output.h (label_to_alignment): Change return type to align_flags.
9873 (label_to_max_skip): Remove.
9874 * target.def: Remove loop_align_max_skip, label_align_max_skip,
9875 jump_align_max_skip macros.
9876 * targhooks.h (default_loop_align_max_skip): Remove.
9877 (default_label_align_max_skip): Likewise.
9878 (default_jump_align_max_skip): Likewise.
9879 (default_label_align_after_barrier_max_skip): Remove.
9880 * toplev.c (read_log_maxskip): Use ::normalize function.
9881 (parse_N_M): Remove not used argument and also call ::normalize.
9882 (parse_alignment_opts): Do not pass unused arguments.
9883 * varasm.c (assemble_start_function): Use directly align_functions
9884 instead of removed macros.
9885 * system.h: Do not poison removed macros.
9887 2018-07-17 Jakub Jelinek <jakub@redhat.com>
9890 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
9891 and cond temporaries don't have reference type if iterator has
9892 pointer type. For init use &for_pre_body instead of pre_p if
9893 for_pre_body is non-empty.
9895 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9897 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
9898 double-double modes to SFmode directly directly.
9899 (trunc<mode>sf2_fprs): Delete.
9901 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9903 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
9904 for conversions between IFmode and the decimal floating point modes.
9905 (init_float128_ieee): Use the correct names for conversions between
9906 KFmode and the decimal floating point modes.
9908 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9910 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
9911 for the conversions between TDmode and IFmode.
9912 (init_float128_ieee): Use more correct names for the conversions
9913 between TDmode and KFmode.
9915 2018-07-16 Jakub Jelinek <jakub@redhat.com>
9917 PR tree-optimization/86526
9918 * builtins.c (expand_builtin_memcmp): Formatting fixes.
9919 (inline_expand_builtin_string_cmp): Likewise.
9920 (inline_string_cmp): Likewise. Use c_readstr instead of
9921 builtin_memcpy_read_str. Add unit_mode temporary.
9923 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
9926 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
9927 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
9929 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
9931 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
9932 Alphabetize prototypes of built-in functions, separating out
9933 built-in functions that are listed in this section but should be
9934 described elsewhere.
9936 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
9939 * expmed.c (emit_store_flag): Do not emit setcc followed by a
9940 conditional move when trapping comparison was split to a
9941 non-trapping one (and vice versa).
9943 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9945 * config/s390/s390.c (s390_function_profiler): Generate nops
9946 instead of profiler call sequences.
9947 * config/s390/s390.opt: Add the new option.
9949 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9951 * config/s390/s390.c (s390_function_profiler): Generate
9952 __mcount_loc section.
9953 * config/s390/s390.opt: Add the new option.
9955 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9957 * common.opt: Add the new warning.
9958 * config/s390/s390.c (s390_function_profiler): Emit "brasl
9959 %r0,__fentry__" when -mfentry is specified.
9960 (s390_option_override_internal): Disallow -mfentry for 31-bit
9962 * config/s390/s390.opt: Add the new option.
9964 2018-07-16 Richard Biener <rguenther@suse.de>
9967 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
9968 for function-local FUNCTION_DECL and RESULT_DECL immediately.
9970 2018-07-16 Martin Liska <mliska@suse.cz>
9973 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
9976 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
9978 * config/arc/arcHS.md: Update ARCHS scheduling rules.
9980 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
9982 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
9984 * config/arc/arc-cpus.def (hs4x): New cpu.
9986 * config/arc/arc-tables.opt: Regenerate.
9987 * config/arc/arc.c (arc_sched_issue_rate): New function.
9988 (TARGET_SCHED_ISSUE_RATE): Define.
9989 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
9990 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
9992 (attr tune): Add ARCHS4x tune values.
9993 (attr tune_dspmpy): Define.
9994 (*tst): Correct instruction type.
9995 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
9996 * config/arc/arcHS4x.md: New file.
9997 * config/arc/fpu.md: Update instruction type attributes.
9998 * config/arc/t-multilib: Regenerate.
10000 2018-07-16 Tom de Vries <tdevries@suse.de>
10003 * var-tracking.c (vt_initialize): Fix pre_dec handling.
10005 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10007 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
10010 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
10012 PR tree-optimization/86514
10013 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
10014 conversion to a boolean type from a type with greater precision.
10016 2018-07-16 Tom de Vries <tdevries@suse.de>
10018 * var-tracking.c (vt_initialize): Print adjusted insn slim if
10019 dump_flags request TDF_SLIM.
10021 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
10023 * fold-const.c (int_const_binop_1): Abstract...
10024 (wide_int_binop): ...wide int code here.
10025 (poly_int_binop): ...poly int code here.
10026 Abstract the rest of int_const_binop_1 into int_const_binop.
10027 * fold-const.h (wide_int_binop): New.
10028 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
10029 Remove useless PLUS/MINUS_EXPR case.
10030 (zero_nonzero_bits_from_vr): Move wide int code...
10031 (zero_nonzero_bits_from_bounds): ...here.
10032 (extract_range_from_binary_expr_1): Move mask optimization code...
10033 (range_easy_mask_min_max): ...here.
10034 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
10035 (range_easy_mask_min_max): New.
10037 2018-07-15 Jeff Law <law@redhat.com>
10040 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
10043 2018-07-14 Jim Wilson <jimw@sifive.com>
10045 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
10047 2018-07-14 Paul Koning <ni1d@arrl.net>
10049 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
10051 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
10053 * lto-streamer-out.c (copy_function_or_variable): Dump info about
10056 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
10057 Steve Munroe <munroesj52@gmail.com>
10059 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
10060 (_mm_andnot_si128): Likewise.
10061 (_mm_or_si128): Likewise.
10062 (_mm_xor_si128): Likewise.
10064 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
10066 PR middle-end/78809
10067 * builtins.c (expand_builtin_memcmp): Inline the calls first
10068 when result_eq is false.
10069 (expand_builtin_strcmp): Inline the calls first.
10070 (expand_builtin_strncmp): Likewise.
10071 (inline_string_cmp): New routine. Expand a string compare
10072 call by using a sequence of char comparison.
10073 (inline_expand_builtin_string_cmp): New routine. Inline expansion
10074 a call to str(n)cmp/memcmp.
10075 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
10077 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
10079 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
10081 * config/arm/driver-arm.c: Include arm-native.h.
10082 (host_detect_local_cpu): Use auto-generated data tables.
10083 (vendors, arm_cpu_table): Delete. Move part information to ...
10084 * config/arm/arm-cpus.in: ... here.
10085 * config/arm/parsecpu.awk (gen_native): New function.
10086 (vendor, part): New CPU fields.
10087 (END): Add support for building the native CPU detection tables.
10088 * config/arm/t-arm (arm-native.h): Add build rule.
10089 (driver-arm.o): Add dependency on arm-native.h.
10091 2018-07-13 Richard Biener <rguenther@suse.de>
10093 PR middle-end/85974
10094 * match.pd (addr1 - addr2): Allow either of the operand to
10097 2018-07-13 Tom de Vries <tdevries@suse.de>
10099 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
10102 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
10104 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
10105 arrays instead of numbered variables.
10107 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
10109 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
10110 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
10112 2018-07-13 Richard Biener <rguenther@suse.de>
10115 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
10116 instead of get_context_die.
10118 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
10119 Richard Biener <rguenther@suse.de>
10121 PR middle-end/86489
10122 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
10123 that the loop latch destination where phi is defined.
10125 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
10127 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
10128 (riscv_expand_epilogue): Add assertion to check interrupt mode.
10129 (riscv_set_current_function): Extract getting interrupt type to new
10131 (riscv_get_interrupt_type): New function.
10132 (riscv_merge_decl_attributes): New function, checking interrupt type is
10134 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
10136 2018-07-12 Paul Koning <ni1d@arrl.net>
10138 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
10141 2018-07-12 Paul Koning <ni1d@arrl.net>
10143 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
10144 zero reference, add doloop_end instead.
10145 * doc/md.texi (decrement_and_branch_until_zero): Remove.
10146 (Looping patterns): Remove decrement_and_branch_until_zero. Add
10147 detail for doloop_end.
10149 2018-07-12 Martin Sebor <msebor@redhat.com>
10152 * attribs.c (decl_attributes): Reject conflicting attributes before
10153 calling attribute handlers.
10155 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10157 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
10159 (gcc::dump_manager::get_dump_file_name): likewise.
10160 (dump_begin): Likewise.
10161 * dumpfile.h (dump_begin): Update prototype.
10162 (gcc::dump_manager::get_dump_file_name,
10163 gcc::dump_manager::get_dump_file_name): Update prototype.
10165 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10167 * internal-fn.h (vectorizable_internal_fn_p): New function.
10168 * tree-vect-slp.c (compatible_calls_p): Likewise.
10169 (vect_build_slp_tree_1): Remove nops argument. Handle calls
10170 to internal functions.
10171 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
10173 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10175 * fold-const.h (inverse_conditions_p): Declare.
10176 * fold-const.c (inverse_conditions_p): New function.
10177 * match.pd: Use inverse_conditions_p. Add folds of view_converts
10178 that test the inverse condition of a conditional internal function.
10179 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
10180 * internal-fn.c (internal_fn_mask_index): Handle conditional
10181 internal functions.
10182 (vectorized_internal_fn_supported_p): New function.
10183 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
10184 (any_pred_load_store): Replace with...
10185 (need_to_predicate): ...this new variable.
10186 (redundant_ssa_names): New variable.
10187 (ifcvt_can_use_mask_load_store): Move initial checks to...
10188 (ifcvt_can_predicate): ...this new function. Handle tree codes
10189 for which a conditional internal function exists.
10190 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
10191 instead of ifcvt_can_use_mask_load_store. Update after variable
10193 (predicate_load_or_store): New function, split out from
10194 predicate_mem_writes.
10195 (check_redundant_cond_expr): New function.
10196 (value_available_p): Likewise.
10197 (predicate_rhs_code): Likewise.
10198 (predicate_mem_writes): Rename to...
10199 (predicate_statements): ...this. Use predicate_load_or_store
10200 and predicate_rhs_code.
10201 (combine_blocks, tree_if_conversion): Update after above name changes.
10202 (ifcvt_local_dce): Handle redundant_ssa_names.
10203 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
10204 general conditional functions.
10205 * tree-vect-stmts.c (vectorizable_call): Likewise.
10207 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10208 Alan Hayward <alan.hayward@arm.com>
10209 David Sherwood <david.sherwood@arm.com>
10211 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
10212 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
10213 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
10214 plus and minus and convert them into IFN_COND_FMA-based sequences.
10215 (convert_mult_to_fma): Handle conditional plus and minus.
10217 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10219 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
10220 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
10221 (cond_fnms_optab): New optabs.
10222 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
10223 internal functions.
10224 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
10225 * internal-fn.h (get_conditional_internal_fn): Declare.
10226 (get_unconditional_internal_fn): Likewise.
10227 * internal-fn.c (cond_ternary_direct): New macro.
10228 (expand_cond_ternary_optab_fn): Likewise.
10229 (direct_cond_ternary_optab_supported_p): Likewise.
10230 (FOR_EACH_COND_FN_PAIR): Likewise.
10231 (get_conditional_internal_fn): New function.
10232 (get_unconditional_internal_fn): Likewise.
10233 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
10234 (gimple_match_op::gimple_match_op): Add a new overload for 5
10236 (gimple_match_op::set_op): Likewise.
10237 (gimple_resimplify5): Declare.
10238 * genmatch.c (decision_tree::gen): Generate simplifications for
10240 * gimple-match-head.c (gimple_simplify): Define an overload for
10241 5 operands. Handle calls with 5 arguments in the top-level overload.
10242 (convert_conditional_op): Handle conversions from unconditional
10243 internal functions to conditional ones.
10244 (gimple_resimplify5): New function.
10245 (build_call_internal): Pass a fifth operand.
10246 (maybe_push_res_to_seq): Likewise.
10247 (try_conditional_simplification): Try converting conditional
10248 internal functions to unconditional internal functions.
10249 Handle 3-operand unconditional forms.
10250 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
10251 Define ternary equivalents of the current rules for binary conditional
10252 internal functions.
10253 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
10254 ternary operations.
10255 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10256 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10257 (optab): Handle them.
10258 (SVE_COND_FP_TERNARY): New int iterator.
10259 (sve_fmla_op, sve_fmad_op): New int attributes.
10260 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10261 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10262 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10264 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10266 * target.def (preferred_else_value): New target hook.
10267 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10268 * doc/tm.texi: Regenerate.
10269 * targhooks.h (default_preferred_else_value): Declare.
10270 * targhooks.c (default_preferred_else_value): New function.
10271 * internal-fn.h (conditional_internal_fn_code): Declare.
10272 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10273 (get_conditional_internal_fn): Use it.
10274 (conditional_internal_fn_code): New function.
10275 * gimple-match.h (gimple_match_cond): New struct.
10276 (gimple_match_op): Add a cond member function.
10277 (gimple_match_op::gimple_match_op): Update all forms to take a
10279 * genmatch.c (expr::gen_transform): Use the same condition as res_op
10280 for the suboperation, but don't specify a particular else_value.
10281 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10282 (visit_nary_op, visit_reference_op_load): Pass
10283 gimple_match_cond::UNCOND to the gimple_match_op constructor.
10284 * gimple-match-head.c: Include tree-eh.h
10285 (convert_conditional_op): New function.
10286 (maybe_resimplify_conditional_op): Likewise.
10287 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10288 (gimple_resimplify2): Likewise.
10289 (gimple_resimplify3): Likewise.
10290 (gimple_resimplify4): Likewise.
10291 (maybe_push_res_to_seq): Return null for conditional operations.
10292 (try_conditional_simplification): New function.
10293 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
10295 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10297 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10299 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10301 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10303 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10305 (hash_tree): Do not hash DECL_FCONTEXT
10306 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10307 Do not stream DECL_FCONTEXT.
10308 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10309 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10311 2018-07-12 Richard Biener <rguenther@suse.de>
10314 * dwarf2out.c (gen_block_die): Only output blocks when they have
10315 at least one !DECL_IGNORED_P variable.
10317 2018-07-12 Richard Biener <rguenther@suse.de>
10320 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10321 Remove -mieee-fp handling.
10323 2018-07-12 Richard Biener <rguenther@suse.de>
10325 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10326 left-over from last patch.
10328 2018-07-12 Jakub Jelinek <jakub@redhat.com>
10330 PR tree-optimization/86492
10331 * gimple-ssa-store-merging.c
10332 (imm_store_chain_info::coalesce_immediate_stores): Call
10333 check_no_overlap even for the merge_overlapping case. Formatting fix.
10335 2018-07-12 Richard Biener <rguenther@suse.de>
10337 PR middle-end/86479
10338 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10339 move possibly trapping operations into the conditional.
10341 2018-07-12 Richard Biener <rguenther@suse.de>
10343 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10344 (vn_lookup_simplify_result): Remove recursion limit applied
10346 (vn_nary_build_or_lookup_1): Adjust.
10347 (try_to_simplify): Likewise.
10348 * gimple-match-head.c (gimple_resimplify1): Instead apply one
10350 (gimple_resimplify2): Likewise.
10351 (gimple_resimplify3): Likewise.
10352 (gimple_resimplify4): Likewise.
10354 2018-07-11 Jakub Jelinek <jakub@redhat.com>
10356 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10357 Use __mmask64 type instead of __mmask8 for __M argument.
10358 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10359 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10361 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10362 __mmask16 for __M argument.
10363 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10364 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10365 to __mmask16 instead of __mmask8.
10366 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10367 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10368 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10369 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10370 instead of __mmask16 for __U argument.
10371 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10372 __mmask16 instead of __mmask8 for __U argument.
10373 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10375 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
10377 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
10379 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
10381 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
10383 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
10385 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
10387 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
10389 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
10391 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
10393 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
10394 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
10395 return type as well as __M argument type and all casts from __mmask8
10397 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
10398 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
10399 return type as well as __M argument type and all casts from __mmask8
10401 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
10402 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
10403 return type as well as __M argument type and all casts from __mmask8
10405 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
10406 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
10407 return type as well as __M argument type and all casts from __mmask8
10409 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
10410 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
10413 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
10415 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
10416 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
10419 2018-07-11 Paul Koning <ni1d@arrl.net>
10421 * doc/md.texi (define_subst): Document how multiple occurrences of
10422 the same argument in the replacement pattern are handled.
10424 2018-07-11 Paul Koning <ni1d@arrl.net>
10426 * doc/extend.texi (Common Variable Attributes): Move "mode" into
10427 alphabetical order.
10428 (Common Type Attributes): Add "mode" attribute.
10430 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
10432 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
10433 stream DECL_ORIGINAL_TYPE.
10434 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
10435 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
10436 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
10437 Do not walk original type.
10438 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
10440 (write_ts_decl_non_common_tree_pointers): Do not stream
10442 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
10443 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
10445 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10447 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
10448 thread twice from the same starting edge.
10450 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10452 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
10453 * gimple.c (gimple_call_nonnull_result_p): ...here...
10454 (gimple_call_nonnull_arg): ...and here.
10455 * gimple.h (gimple_call_nonnull_result_p): New.
10456 (gimple_call_nonnull_arg): New.
10458 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
10460 * config/arm/arm-cpus.in: Move information from fpu field of each
10461 cpu definition to the isa field.
10462 * config/arm/parsecpu.awk (fpu): Delete match rule.
10463 (gen_comm_data): Don't add bits from the CPU's FPU entry.
10465 2018-07-11 Richard Biener <rguenther@suse.de>
10468 * dwarf2out.c (init_sections_and_labels): Use
10469 output_asm_line_debug_info consistently.
10470 (dwarf2out_early_finish): Likewise.
10471 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
10474 2018-07-11 Richard Biener <rguenther@suse.de>
10476 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
10477 Rework father_bb setting in a way to avoid propagating constants
10478 multiple times on a loop body.
10480 2018-07-10 Mark Wielaard <mark@klomp.org>
10483 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
10485 2018-07-10 Richard Biener <rguenther@suse.de>
10487 * hash-map.h (hash_map::iterator::operator*): Return
10488 references to key and value.
10490 2018-07-10 Jakub Jelinek <jakub@redhat.com>
10493 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
10494 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
10495 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
10496 (gimplify_omp_for): For composite loops, move outer
10497 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
10498 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
10499 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
10500 TREE_LIST for both the original class iterator and the "last" helper
10501 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
10502 loop, remember has_decl_expr from outer composite loops for the
10503 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
10505 2018-07-09 Martin Sebor <msebor@redhat.com>
10507 PR middle-end/77357
10508 PR middle-end/86428
10509 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
10510 accessing implicitly initialized array elements.
10511 * expr.c (string_constant): Handle string initializers of
10512 character arrays within aggregates.
10513 * gimple-fold.c (fold_array_ctor_reference): Add argument.
10514 Store element offset. As a special case, handle zero size.
10515 (fold_nonarray_ctor_reference): Same.
10516 (fold_ctor_reference): Add argument. Store subobject offset.
10517 * gimple-fold.h (fold_ctor_reference): Add argument.
10519 2018-07-09 Paul Koning <ni1d@arrl.net>
10521 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
10522 (pdp11_insn_cost): New function.
10523 (pdp11_md_asm_adjust): New function.
10524 (TARGET_INVALID_WITHIN_DOLOOP): Define.
10525 (pdp11_rtx_costs): Update to match machine better.
10526 (output_addr_const_pdp11): Correct format mismatch warnings.
10527 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
10528 * config/pdp11/pdp11.md: General change to add base_cost and/or
10529 length attributes for use by new pdp11_insn_cost function.
10530 (MIN_BRANCH): Correct definition.
10532 (doloop_end): Use standard pattern name for looping pattern.
10533 (doloop_end_nocc): New.
10534 (movsf): Add another constraint alternative.
10535 (zero_extendqihi2): Add constraint alternatives for not in place
10537 (zero_extendhisi2): Remove.
10538 (shift patterns): Add CC handling variants.
10542 (define_peephole2): New peephole to recognize mov that sets CC for
10545 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10547 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
10548 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
10551 2018-07-09 Jakub Jelinek <jakub@redhat.com>
10554 * real.c (real_nextafter): Return true if result is denormal.
10556 2018-07-09 Martin Liska <mliska@suse.cz>
10558 * common.opt: Add back wrongly removed attribute.
10560 2018-07-09 Richard Biener <rguenther@suse.de>
10563 * dwarf2out.c (gen_block_die): For an early generated DIE
10564 always output high/low PC attributes.
10566 2018-07-09 Tom de Vries <tdevries@suse.de>
10568 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
10569 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
10570 onto VAR_DECL with abstract origin.
10572 2018-07-07 Jim Wilson <jimw@sifive.com>
10574 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
10576 2018-07-07 Tom de Vries <tdevries@suse.de>
10578 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
10580 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
10582 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
10584 (combine_bound): Use wide-int overflow calculation instead of
10586 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
10588 * fold-const.c (int_const_binop_2): Same.
10589 (extract_muldiv_1): Same.
10590 (fold_div_compare): Same.
10591 (fold_abs_const): Same.
10593 * poly-int.h (add): Same.
10597 * predict.c (predict_iv_comparison): Same.
10598 * profile-count.c (slow_safe_scale_64bit): Same.
10599 * simplify-rtx.c (simplify_const_binary_operation): Same.
10600 * tree-chrec.c (tree_fold_binomial): Same.
10601 * tree-data-ref.c (split_constant_offset_1): Same.
10602 * tree-if-conv.c (idx_within_array_bound): Same.
10603 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
10604 * tree-ssa-phiopt.c (minmax_replacement): Same.
10605 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
10606 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
10607 * vr-values.c (vr_values::adjust_range_with_scev): Same.
10608 * wide-int.cc (wi::add_large): Same.
10609 (wi::mul_internal): Same.
10610 (wi::sub_large): Same.
10611 (wi::divmod_internal): Same.
10612 * wide-int.h: Change overflow type to overflow_type for neg, add,
10613 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
10614 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
10615 mul_internal, divmod_internal.
10616 (overflow_type): New enum.
10617 (accumulate_overflow): New.
10619 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
10621 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
10622 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
10624 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10626 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
10627 argument is checked for zero before entering loop, avoid checking again.
10629 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10631 * gimplify.h (generic_expr_could_trap_p): Set as global function.
10632 * gimplify.h (generic_expr_could_trap_p): Likwise.
10633 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
10635 2018-07-06 Jakub Jelinek <jakub@redhat.com>
10637 PR tree-optimization/86401
10638 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
10639 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
10640 (fold_bit_and_mask): ... here. New helper function for match.pd.
10641 * fold-const.h (fold_bit_and_mask): Declare.
10642 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
10644 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
10647 * target.def (translate_mode_attribute): New hook.
10648 * targhooks.h (default_translate_mode_attribute): Declare.
10649 * targhooks.c (default_translate_mode_attribute): New function.
10650 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
10651 * doc/tm.texi: Regenerate.
10652 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
10653 (rs6000_translate_mode_attribute): New function.
10655 2018-07-06 Paul Koning <ni1d@arrl.net>
10657 * doc/md.texi (define_split): Document DONE and FAIL.
10658 (define_peephole2): Ditto.
10660 2018-07-05 Jeff Law <law@redhat.com>
10662 PR tree-optimization/86010
10663 * tree-ssa-dse.c (compute_trims): More aggressively trim at
10664 both the head and tail of mem* and str* calls.
10666 2018-07-05 Jim Wilson <jimw@sifive.com>
10668 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
10670 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
10672 * config/aarch64/aarch64-simd.md: correct flags text for
10673 MIN_EXPR replacement.
10675 2018-07-05 James Clarke <jrtc27@jrtc27.com>
10677 * configure: Regenerated.
10679 2018-07-05 Carl Love <cel@us.ibm.com>
10681 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
10682 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
10683 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
10684 VSX_BUILTIN_DOUBLEL_V4SF.
10686 2018-07-05 Martin Sebor <msebor@redhat.com>
10689 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
10690 than its domain to compute its the upper bound of a char array.
10692 2018-07-05 Nathan Sidwell <nathan@acm.org>
10694 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
10695 * doc/cpp.texi: Update comment.
10696 * doc/tm.texi: Rebuilt.
10697 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
10698 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
10699 * doc/extend.texi (Backwards Compatibility): Clarify it is system
10700 headers affected by extern "C".
10701 * system.h: Poison NO_IMPLICIT_EXTERN_C.
10702 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
10703 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
10704 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
10705 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
10706 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
10707 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
10708 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
10709 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
10710 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
10711 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
10712 config/sparc/sp64-elf.h, config/spu/spu.h,
10713 config/stormy16/stormy16.h, config/v850/v850.h,
10714 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
10715 define NO_IMPLICIT_EXTERN_C.
10716 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
10718 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10721 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10722 instead of GET_MODE_SIZE when comparing Units.
10724 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10727 * rtlanal.c (set_noop_p): Constrain on mode change,
10728 include hard-reg-set.h
10730 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10732 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
10734 2018-07-05 Jakub Jelinek <jakub@redhat.com>
10737 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10740 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10742 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10744 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10747 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10749 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10751 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
10753 PR middle-end/86380
10754 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
10756 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
10758 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
10759 neg_*_op* variables.
10761 2018-07-04 Martin Liska <mliska@suse.cz>
10763 * tree-switch-conversion.c: Define
10764 max_ratio_for_speed and max_ratio_for_size constants.
10766 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
10767 Martin Liska <mliska@suse.cz>
10769 PR middle-end/66240
10772 * common.opt: Rename align options with 'str_' prefix.
10773 * common/config/i386/i386-common.c (set_malign_value): New
10775 (ix86_handle_option): Use it to set -falign-* options/
10776 * config/aarch64/aarch64-protos.h (struct tune_params): Change
10777 type from int to string.
10778 * config/aarch64/aarch64.c: Update default values from int
10780 * config/alpha/alpha.c (alpha_override_options_after_change):
10782 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
10783 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10784 max skip conditionally.
10785 * config/i386/freebsd.h (SUBALIGN_LOG): New.
10786 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10787 max skip conditionally.
10788 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10789 max skip conditionally.
10790 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
10791 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10792 max skip conditionally.
10793 * config/i386/i386.c (struct ptt): Change type from int to
10795 (ix86_default_align): Set default values.
10796 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
10797 max skip conditionally.
10798 * config/i386/iamcu.h (SUBALIGN_LOG): New.
10799 (ASM_OUTPUT_MAX_SKIP_ALIGN):
10800 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
10801 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10802 max skip conditionally.
10803 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
10804 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
10805 * config/i386/x86-64.h (SUBALIGN_LOG): New.
10806 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10807 max skip conditionally.
10808 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10809 * config/ia64/ia64.c (ia64_option_override): Set default values
10810 for alignment options.
10811 * config/m68k/m68k.c: Handle new str_align_* options.
10812 * config/mips/mips.c (mips_set_compression_mode): Change
10814 (mips_option_override): Set default values for options.
10815 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
10817 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10819 * config/rx/rx.c (rx_option_override): Likewise.
10820 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
10821 (LABEL_ALIGN): Use align_labels_log.
10822 (LOOP_ALIGN): Use align_loops_align.
10823 * config/s390/s390.c (s390_asm_output_function_label): Use new
10825 * config/sh/sh.c (sh_override_options_after_change):
10826 Change type of constants.
10827 * config/spu/spu.c (spu_sched_init): Likewise.
10828 * config/sparc/sparc.c (sparc_option_override): Set default
10829 values for options.
10830 * config/visium/visium.c (visium_option_override): Likewise.
10831 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
10832 emit p2align format with last argument if it's not needed.
10833 * doc/invoke.texi: Document extended format of -falign-*.
10834 * final.c: Use align_labels alignment.
10835 * flags.h (struct target_flag_state): Change type to use
10837 (struct align_flags_tuple): New.
10838 (struct align_flags): Likewise.
10839 (align_loops_log): Redefine macro to use new types.
10840 (align_loops_max_skip): Redefine macro to use new types.
10841 (align_jumps_log): Redefine macro to use new types.
10842 (align_jumps_max_skip): Redefine macro to use new types.
10843 (align_labels_log): Redefine macro to use new types.
10844 (align_labels_max_skip): Redefine macro to use new types.
10845 (align_functions_log): Redefine macro to use new types.
10846 (align_loops): Redefine macro to use new types.
10847 (align_jumps): Redefine macro to use new types.
10848 (align_labels): Redefine macro to use new types.
10849 (align_functions): Redefine macro to use new types.
10850 (align_functions_max_skip): Redefine macro to use new types.
10851 (align_loops_value): New macro.
10852 (align_jumps_value): New macro.
10853 (align_labels_value): New macro.
10854 (align_functions_value): New macro.
10855 * function.c (invoke_set_current_function_hook): Propagate
10856 alignment values from flags to global variables default in
10858 * ipa-icf.c (sem_function::equals_wpa): Use
10859 cl_optimization_option_eq instead of memcmp.
10860 * lto-streamer.h (cl_optimization_stream_out): Support streaming
10862 (cl_optimization_stream_in): Likewise.
10863 * optc-save-gen.awk: Support strings in cl_optimization.
10864 * opth-gen.awk: Likewise.
10865 * opts.c (finish_options): Remove error checking of invalid
10867 (MAX_CODE_ALIGN): Remove.
10868 (MAX_CODE_ALIGN_VALUE): Likewise.
10869 (parse_and_check_align_values): New function.
10870 (check_alignment_argument): Likewise.
10871 (common_handle_option): Use check_alignment_argument.
10872 * opts.h (parse_and_check_align_values): Declare.
10873 * toplev.c (init_alignments): Remove.
10874 (read_log_maxskip): New.
10875 (parse_N_M): Likewise.
10876 (parse_alignment_opts): Likewise.
10877 (backend_init_target): Remove usage of init_alignments.
10878 * toplev.h (parse_alignment_opts): Declare.
10879 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
10881 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
10882 * tree.c (cl_option_hasher::equal): New.
10883 * varasm.c: Use new global macros.
10885 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
10887 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
10888 Use a simpler align directive also if MAXSKIP = ALIGN-1.
10889 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10890 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10891 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10892 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10893 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
10894 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
10895 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
10896 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10897 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10898 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10899 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10901 2018-07-04 Martin Liska <mliska@suse.cz>
10902 Jonathan Wakely <jwakely@redhat.com>
10904 * coverage.c: Use correct type.
10905 * doc/invoke.texi: Language correction.
10907 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
10910 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
10911 ENDBRANCH for non-tail call which may return via indirect branch.
10912 * doc/extend.texi: Document indirect_return attribute.
10914 2018-07-03 Martin Sebor <msebor@redhat.com>
10916 PR tree-optimization/86274
10917 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
10919 (format_floating): Correct handling of infinities and NaNs.
10921 2018-07-03 Martin Sebor <msebor@redhat.com>
10923 * print-tree.c (print_real_cst): New function.
10924 (print_node_brief): Call it.
10925 (print_node): Ditto.
10927 2018-07-03 Jeff Law <law@redhat.com>
10929 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
10930 into a single pattern.
10932 * config/h8300/h8300.md (ors code_iterator): New.
10933 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
10934 a single pattern and single splitter.
10935 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
10936 (iorqi3_1, xorqi3_1): Likewise.
10937 (iorqi3, xorqi3 expanders): Similarly.
10939 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
10940 (movmd_internal) into a single pattern using the P mode iterator.
10941 (movmd splitters): Similarly.
10942 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
10943 (movsd splitters): Similarly.
10945 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
10946 ADDB, ADDW and ADDL into a single ADD attribute which selects the
10947 right table based on the size of the operand.
10948 * config/h8300/h8300.md (length_table): Corresponding changes. All
10949 references to "addb", "addw" and "addl" changed to "add".
10950 (btst patterns): Merge two variants into a single pattern.
10951 (tstqi, tsthi): Likewise.
10952 (addhi3_incdec, addsi3_incdec): Likewise.
10953 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
10954 (mulhi3, mulsi3): Likewise.
10955 (udivhi3, udivsi3): Likewise.
10956 (divhi3, divsi3): Likewise.
10957 (andorqi3, andorhi3, andorsi3): Likewise.
10959 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
10962 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
10963 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
10965 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10967 PR tree-optimization/85694
10968 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
10969 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
10971 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
10972 (<u>avg<mode>3_ceil): New patterns.
10974 2018-07-03 David Malcolm <dmalcolm@redhat.com>
10976 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
10977 scan-tree-dump directive.
10978 * gcc.dg/vect/slp-perm-2.c: Likewise.
10979 * gcc.dg/vect/slp-perm-3.c: Likewise.
10980 * gcc.dg/vect/slp-perm-5.c: Likewise.
10981 * gcc.dg/vect/slp-perm-6.c: Likewise.
10982 * gcc.dg/vect/slp-perm-7.c: Likewise.
10983 * gcc.dg/vect/slp-perm-8.c: Likewise.
10985 2018-07-03 Marek Polacek <polacek@redhat.com>
10987 PR middle-end/86202
10988 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
10990 2018-07-03 Richard Biener <rguenther@suse.de>
10993 * tree-ssa-structalias.c (find_func_clobbers): Properly
10994 handle indirect calls.
10996 2018-07-03 Jeff Law <law@redhat.com>
10998 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
10999 (shifts): New code iterator.
11000 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
11001 expander. Fix HImode handling on H8/SX.
11002 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
11003 (subqi3, subhi3, subsi3 expanders): Likewise.
11004 (andqi3, andhi3, andsi3 expanders): Likewise.
11005 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
11006 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
11007 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
11008 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
11009 (zero_extendqihi2, zero_extendqisi2): Likewise.
11010 (extendqihi2, extendqisi2): Likewise.
11011 (rotlqi3, rotlhi3, rotlsi3): Likewise.
11012 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
11013 (rotlqi3_1, rotlhi3_1): Likewise.
11014 (logicalhi3_sn, logicalsi3_sn): Likewise.
11015 (logicalhi3, logicalsi3): Likewise.
11017 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11019 * tree-vect-patterns.c (vect_recog_rotate_pattern)
11020 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11021 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
11022 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
11023 type to append_pattern_def_seq instead of creating a stmt_vec_info
11025 (build_mask_conversion): Likewise. Remove vinfo argument.
11026 (vect_add_conversion_to_patterm): Likewise, renaming to...
11027 (vect_add_conversion_to_pattern): ...this.
11028 (vect_recog_mask_conversion_pattern): Update call to
11029 build_mask_conversion. Pass the vector type to
11030 append_pattern_def_seq here too.
11031 (vect_recog_gather_scatter_pattern): Update call to
11032 vect_add_conversion_to_pattern.
11034 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11036 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
11037 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11038 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
11039 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
11040 STMT_VINFO_PATTERN_DEF_SEQ to null here.
11041 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
11042 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
11043 append_pattern_def_seq instead of new_pattern_def_seq.
11044 (vect_recog_divmod_pattern): Do both of the above.
11045 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
11048 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11050 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
11051 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
11052 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
11053 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
11054 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
11055 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11056 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
11057 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11058 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11059 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
11060 parameter with a single stmt_vec_info.
11061 (vect_recog_func_ptr): Likewise.
11062 (vect_recog_gather_scatter_pattern): Likewise, folding in...
11063 (vect_try_gather_scatter_pattern): ...this.
11064 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
11065 the stmt_vec_info of the statement to be matched. Don't clear
11066 STMT_VINFO_RELATED_STMT.
11067 (vect_pattern_recog): Update call accordingly.
11069 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11071 PR tree-optimization/85694
11072 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
11073 (uavgM3_ceil): Document new optabs.
11074 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
11075 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
11077 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
11078 (savg_ceil_optab): New optabs.
11079 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
11080 (vect_vect_recog_func_ptrs): Add it.
11081 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
11082 constant directly from the associated lhs.
11084 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11086 * tree-vect-patterns.c (vect_split_statement): New function.
11087 (vect_convert_input): Use it to try to split an existing cast.
11089 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11091 * poly-int.h (print_hex): New function.
11092 * dumpfile.h (dump_dec, dump_hex): Declare.
11093 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
11094 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
11095 min_input_precision, operation_precision and operation_sign.
11096 * tree-vect-patterns.c (vect_get_range_info): New function.
11097 (vect_same_loop_or_bb_p, vect_single_imm_use)
11098 (vect_operation_fits_smaller_type): Delete.
11099 (vect_look_through_possible_promotion): Add an optional
11100 single_use_p parameter.
11101 (vect_recog_over_widening_pattern): Rewrite to use new
11102 stmt_vec_info infomration. Handle one operation at a time.
11103 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
11104 (vect_truncatable_operation_p, vect_set_operation_type)
11105 (vect_set_min_input_precision): New functions.
11106 (vect_determine_min_output_precision_1): Likewise.
11107 (vect_determine_min_output_precision): Likewise.
11108 (vect_determine_precisions_from_range): Likewise.
11109 (vect_determine_precisions_from_users): Likewise.
11110 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
11111 (vect_vect_recog_func_ptrs): Put over_widening first.
11113 (vect_pattern_recog): Call vect_determine_precisions.
11115 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11117 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
11118 statements that have been replaced by further pattern statements.
11119 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
11121 2018-07-03 Richard Biener <rguenther@suse.de>
11123 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
11124 always set *dt. Dump vectype in vectype overload.
11125 * dumpfile.h (dump_gimple_expr): New function.
11126 (dump_gimple_expr_loc): Likewise.
11127 * dumpfile.c (dump_gimple_expr): New function.
11128 (dump_gimple_expr_loc): Likewise.
11130 2018-07-02 Jeff Law <law@redhat.com>
11132 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
11133 the H8/300, H8/300H and H8/S variants into a single pattern.
11134 (movhi_h8300, movqi_h8300hs): Similarly.
11135 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
11136 (QHI mode iterator): New.
11138 * config/h8300/h8300.md: Remove trailing whitespace.
11140 2018-07-02 Jim Wilson <jimw@sifive.com>
11142 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
11143 instead of emit_insn for interrupt returns.
11144 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
11145 (riscv_sret, riscv_uret): Likewise.
11147 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11149 * pretty-print.c (selftest::test_pp_format): Move save and restore
11150 of quotes to class auto_fix_quotes, and add an instance.
11151 * selftest.c: Include "intl.h".
11152 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
11153 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
11154 * selftest.h (selftest::auto_fix_quotes): New class.
11156 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
11158 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
11159 (aarch64_sve_prepare_conditional_op): Remove.
11160 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
11161 Allow aarch64_simd_reg_or_zero as select operand; remove
11162 the aarch64_sve_prepare_conditional_op call.
11163 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
11164 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11165 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
11166 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
11167 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
11168 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
11169 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
11170 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
11171 and a splitters to match all of the *_any patterns.
11172 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
11174 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
11175 (SVE_COND_FP_BINARY_REV): Remove.
11176 (sve_int_op_rev, sve_fp_op_rev): New.
11177 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
11178 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
11179 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
11180 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
11181 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
11182 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
11183 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
11184 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
11185 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
11187 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
11188 Remove match_dup 1 from the inner unspec.
11189 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11191 * config/aarch64/aarch64.md (movprfx): New attr.
11192 (length): Default movprfx to 8.
11193 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
11194 (*madd<SVE_I>, *msub<SVE_I): Likewise.
11195 (*<su>mul<SVE_I>3_highpart): Likewise.
11196 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
11197 (*v<ASHIFT><SVE_I>3): Likewise.
11198 (*<su><MAXMIN><SVE_I>3): Likewise.
11199 (*<su><MAXMIN><SVE_F>3): Likewise.
11200 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
11201 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
11202 (*div<SVE_F>4): Likewise.
11204 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
11206 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
11209 2018-07-02 Richard Biener <rguenther@suse.de>
11211 PR tree-optimization/86363
11212 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
11213 memset argument refers to a non-variable address.
11215 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11217 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
11218 {PLUS,MINUS}_EXPR code to...
11219 (adjust_symbolic_bound): ...here,
11220 (combine_bound): ...here,
11221 (set_value_range_with_overflow): ...and here.
11223 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11225 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
11227 (extract_range_from_abs_expr): ...here.
11229 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
11231 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
11232 -fno-omit-frame-pointer when not optimizing.
11234 2018-07-02 Martin Liska <mliska@suse.cz>
11237 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
11238 (propagate_nothrow): Likewise.
11240 2018-07-02 Martin Liska <mliska@suse.cz>
11243 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
11245 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11247 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
11248 function in r262149, changing "loc" param from source_location to
11249 const dump_location_t &.
11250 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
11251 declaration, as above.
11253 2018-07-01 Paul Koning <ni1d@arrl.net>
11255 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11256 -munit-asm, -mgnu-asm, -mdec-asm.
11257 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11258 (pdp11_output_labelref): New.
11259 (pdp11_output_def): New.
11260 (pdp11_output_addr_vec_elt): New.
11261 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
11262 %# and %@ format codes.
11263 (pdp11_option_override): New.
11264 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11265 (pdp11_output_ident): New.
11266 (pdp11_asm_named_section): New.
11267 (pdp11_asm_init_sections): New.
11268 (pdp11_file_start): New.
11269 (pdp11_file_end): New.
11270 (output_ascii): Use .ascii/.asciz for -mdec-asm.
11271 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
11272 %o, like %c but octal.
11273 (pdp11_option_override): New.
11274 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11276 (DATA_SECTION_ASM_OP): Ditto.
11277 (READONLY_DATA_SECTION_ASM_OP): New.
11278 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11279 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11280 (ASM_OUTPUT_LABELREF): Ditto.
11281 (ASM_OUTPUT_DEF): Ditto.
11282 (ASM_OUTPUT_EXTERNAL): New.
11283 (ASM_OUTPUT_SOURCE_FILENAME): New.
11284 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11285 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11286 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
11287 %# and %@ format codes.
11288 * config/pdp11/pdp11.opt (mgnu-asm): New.
11289 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11290 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11291 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11293 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
11295 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11296 dereferencing path[] beyond its length.
11298 (debug_all_paths): New.
11299 (rewire_first_differing_edge): New.
11300 (adjust_paths_after_duplication): New.
11301 (duplicate_thread_path): Call adjust_paths_after_duplication.
11303 (thread_through_all_blocks): Add new argument to
11304 duplicate_thread_path.
11306 2018-06-30 Jim Wilson <jimw@sifive.com>
11308 * config/riscv/predicates.md (p2m1_shift_operand): New.
11309 (high_mask_shift_operand): New.
11310 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11311 pattern using p2m1_shift_operand.
11312 (lshsi3_zero_extend_3+2): New combiner pattern using
11313 high_mask_shift_operand.
11315 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11317 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11319 (vect_recog_rotate_pattern): ...here.
11320 (vect_convert_input): Try to insert casts of invariants in the
11322 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11323 preheader to be empty.
11325 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11327 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11328 vector type. If given, install it in the new statement's
11329 STMT_VINFO_VECTYPE.
11330 (vect_element_precision): New function.
11331 (vect_unpromoted_value): New struct.
11332 (vect_unpromoted_value::vect_unpromoted_value): New function.
11333 (vect_unpromoted_value::set_op): Likewise.
11334 (vect_look_through_possible_promotion): Likewise.
11335 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11336 (vect_widened_op_tree, vect_convert_input): Likewise.
11337 (vect_convert_inputs, vect_convert_output): Likewise.
11338 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11339 to handle the optional cast of the multiplication result and
11340 vect_widened_op_tree to detect the widened multiplication itself.
11341 Do not require the input and output of promotion casts to have
11342 the same sign, but base the signedness of the operation on the
11343 input rather than the result. If the pattern includes two
11344 promotions, check that those promotions have the same sign.
11345 Do not restrict the MULT_EXPR handling to a double-width result;
11346 handle quadruple-width results and wider. Use vect_convert_inputs
11347 to convert the inputs to the common type.
11348 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
11349 to handle the optional cast of the ABS result. Also allow a sign
11350 change or a sign extension between the ABS and MINUS.
11351 Use vect_widened_op_tree to detect the widened subtraction and use
11352 vect_convert_inputs to convert the inputs to the common type.
11353 (vect_handle_widen_op_by_const): Delete.
11354 (vect_recog_widen_op_pattern): New function.
11355 (vect_recog_widen_mult_pattern): Use it.
11356 (vect_recog_widen_shift_pattern): Likewise.
11357 (vect_recog_widen_sum_pattern): Use
11358 vect_look_through_possible_promotion to handle the promoted
11361 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11363 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11364 the containing gimple_seq *.
11365 * gimple-iterator.h (gsi_for_stmt): Declare it.
11366 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11367 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11368 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11369 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11370 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11372 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11374 (vect_mark_pattern_stmts): ...here. Handle cases in which the
11375 statement being replaced is part of an existing pattern
11376 definition sequence, inserting the new pattern statements before
11378 (vect_pattern_recog_1): Don't return a bool. If the statement
11379 is already part of a pattern, instead apply pattern matching
11380 to the pattern definition statements. Don't clear the
11381 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
11382 (vect_pattern_recog): Don't break after the first match;
11383 continue processing the pattern definition statements instead.
11384 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
11386 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11388 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
11389 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11390 (vect_recog_widen_sum_pattern): Use it.
11392 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11394 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11395 phi is not a pattern statement and has not been replaced by
11396 a pattern statement.
11397 * tree-vect-patterns.c (type_conversion_p): Don't check
11398 STMT_VINFO_IN_PATTERN_P.
11399 (vect_recog_vector_vector_shift_pattern): Likewise.
11400 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
11401 the pattern statement rather than the original statement; check
11402 directly for a WIDEN_MULT_EXPR here.
11403 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
11404 vect_is_simple_use to return the pattern statement rather
11405 than the original statement; use is_pattern_stmt_p to check
11406 for such a pattern statement.
11407 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
11408 to return the pattern statement rather than the original statement;
11409 don't do the same transformation here.
11410 (vect_is_simple_use): If the defining statement has been replaced
11411 by a pattern statement, return the pattern statement instead.
11412 Remove the corresponding (local) transformation from the vectype
11415 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11417 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
11418 end and default to null.
11419 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11420 (vectorizable_reduction): Update calls accordingly, dropping the
11421 gimple ** argument if the passed-back statement isn't needed.
11422 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
11423 (vect_recog_rotate_pattern): Likewise.
11424 (vect_recog_mask_conversion_pattern): Likewise.
11425 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11426 (vect_mask_constant_operand_p): Likewise.
11427 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
11428 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
11429 (get_group_load_store_type, get_load_store_type): Likewise.
11430 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
11431 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
11432 (vectorizable_conversion, vectorizable_assignment): Likewise.
11433 (vectorizable_shift, vectorizable_operation): Likewise.
11434 (vectorizable_store, vect_is_simple_cond): Likewise.
11435 (vectorizable_condition, vectorizable_comparison): Likewise.
11436 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
11437 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
11438 and move it to the end. Cope with null def_stmt_outs.
11440 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11442 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
11444 2018-06-29 Jeff Law <law@redhat.com>
11446 * config/v850/v850.c (v850_legitimate_address_p): Handle large
11447 displacements for TARGET_V850E2V3 and newer.
11448 (TARGET_LRA_P): Remove. Defaults to LRA now.
11449 * config/v850/v850.md (sign23byte_load): Remove.
11450 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
11451 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
11453 2018-06-29 Martin Liska <mliska@suse.cz>
11456 * coverage.c (coverage_init): Mangle full path name.
11457 * doc/invoke.texi: Document the change.
11458 * gcov-io.c (mangle_path): New.
11459 * gcov-io.h (mangle_path): Likewise.
11460 * gcov.c (mangle_name): Use mangle_path for path mangling.
11462 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11464 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
11465 if starting source register is not even.
11467 2018-06-29 Martin Liska <mliska@suse.cz>
11469 PR tree-optimization/86263
11470 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
11471 Make edge redirection.
11473 2018-06-29 David Malcolm <dmalcolm@redhat.com>
11475 * dumpfile.c (dump_loc): Add indentation based on scope depth.
11476 (dump_scope_depth): New variable.
11477 (get_dump_scope_depth): New function.
11478 (dump_begin_scope): New function.
11479 (dump_end_scope): New function.
11480 * dumpfile.h (get_dump_scope_depth): New declaration.
11481 (dump_begin_scope): New declaration.
11482 (dump_end_scope): New declaration.
11483 (class auto_dump_scope): New class.
11484 (AUTO_DUMP_SCOPE): New macro.
11485 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
11488 2018-06-29 Richard Biener <rguenther@suse.de>
11490 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
11491 compute_all_dependences succeeds.
11492 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
11493 exceed --param loop-max-datarefs-for-datadeps.
11495 2018-06-29 Jakub Jelinek <jakub@redhat.com>
11497 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
11499 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
11502 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
11503 alternative 0 in preferred_for_speed attribute.
11505 2018-06-28 Paul Koning <ni1d@arrl.net>
11507 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
11508 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
11509 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
11510 * config/pdp11/pdp11.md: Correct "length" attribute calculation
11511 for shift insn patterns.
11513 2018-06-28 David Malcolm <dmalcolm@redhat.com>
11515 * cgraph.c (cgraph_node::get_body): Replace assignments to
11516 "dump_file" with calls to set_dump_file.
11517 * dumpfile.c (alt_dump_file): Make static, and group with...
11518 (alt_flags): ...this definition.
11519 (dumps_are_enabled): New variable.
11520 (refresh_dumps_are_enabled): New function.
11521 (set_dump_file): New function.
11522 (set_alt_dump_file): New function.
11523 (gcc::dump_manager::dump_start): Replace assignments to
11524 "dump_file" and "alt_dump_file" with calls to set_dump_file and
11526 (gcc::dump_manager::dump_finish): Likewise.
11527 * dumpfile.h (alt_dump_file): Delete decl.
11528 (dumps_are_enabled): New variable decl.
11529 (set_dump_file): New function decl.
11530 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
11532 * tree-nested.c (lower_nested_functions): Replace assignments to
11533 "dump_file" with calls to set_dump_file.
11535 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11537 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
11538 goto_locus of each outgoing edge of each basic block.
11540 2018-06-28 Richard Biener <rguenther@suse.de>
11542 * dwarf2out.c (decl_scope_table): Remove.
11543 (push_decl_scope): Likewise.
11544 (pop_decl_scope): Likewise.
11545 (gen_type_die_for_member): Do not call push/pop_decl_scope.
11546 (gen_struct_or_union_type_die): Likewise.
11547 (gen_tagged_type_die): Likewise.
11548 (dwarf2out_init): Do not initialize decl_scope_table.
11549 (dwarf2out_c_finalize): Do not free it.
11551 2018-06-28 Richard Biener <rguenther@suse.de>
11553 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
11554 deciding whether to not re-use a DIE.
11556 2018-06-28 Richard Biener <rguenther@suse.de>
11558 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
11559 DW_AT_abstract_origin attribute.
11561 2018-06-28 Martin Liska <mliska@suse.cz>
11563 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11564 Use newly introduced constants.
11565 * tree-switch-conversion.h (struct jump_table_cluster):
11566 Define max_ratio_for_size and max_ratio_for_speed.
11568 2018-06-28 Martin Liska <mliska@suse.cz>
11570 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11571 Add new checking assert to catch invalid state.
11572 (jump_table_cluster::can_be_handled): Handle single case
11574 (jump_table_cluster::is_beneficial): Bail out for such case.
11575 (bit_test_cluster::find_bit_tests):
11576 Add new checking assert to catch invalid state.
11577 (bit_test_cluster::can_be_handled): Handle single case
11579 (bit_test_cluster::is_beneficial): Bail out for such case.
11580 (switch_decision_tree::analyze_switch_statement):
11583 2018-06-28 Martin Liska <mliska@suse.cz>
11585 * common.opt: Introduce -completion option.
11586 * gcc.c (driver_handle_option): Handle it.
11587 (driver::main): Print completions if completion
11589 * opt-suggestions.c (option_proposer::get_completions):
11591 (option_proposer::suggest_completion): Likewise.
11592 (option_proposer::find_param_completions): Likewise.
11593 (verify_autocompletions): Likewise.
11594 (test_completion_valid_options): Likewise.
11595 (test_completion_valid_params): Likewise.
11596 (in_completion_p): Likewise.
11597 (empty_completion_p): Likewise.
11598 (test_completion_partial_match): Likewise.
11599 (test_completion_garbage): Likewise.
11600 (opt_proposer_c_tests): Likewise.
11601 * opt-suggestions.h: Declare new functions.
11602 * opts.c (common_handle_option): Handle OPT__completion_.
11603 * selftest-run-tests.c (selftest::run_tests): Add
11604 opt_proposer_c_tests.
11605 * selftest.c (assert_str_startswith): New.
11606 * selftest.h (assert_str_startswith): Likewise.
11607 (opt_proposer_c_tests): New.
11608 (ASSERT_STR_STARTSWITH): Likewise.
11610 2018-06-28 Martin Liska <mliska@suse.cz>
11612 * Makefile.in: Add opt-suggestions.o.
11613 * gcc-main.c: Include opt-suggestions.h.
11614 * gcc.c (driver::driver): Likewise.
11615 (driver::~driver): Remove m_option_suggestions.
11616 (driver::build_option_suggestions): Moved to option_proposer.
11617 (driver::suggest_option): Likewise.
11618 (driver::handle_unrecognized_options): Use option_proposer.
11619 * gcc.h (class driver): Add new memver m_option_proposer.
11620 * opt-suggestions.c: New file.
11621 * opt-suggestions.h: New file.
11623 2018-06-28 Martin Liska <mliska@suse.cz>
11625 * vec.h (class auto_string_vec): New (moved from auto_argvec).
11626 (auto_string_vec::~auto_string_vec): Likewise.
11628 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11630 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
11631 prevent_decl_creation_for_types fields up and add reset_location field.
11632 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
11633 statement if id->reset_location is true.
11634 (copy_edges_for_bb): Do not set goto_locus on the new edges if
11635 id->reset_location is true.
11636 (copy_phis_for_bb): Force input_location on the arguments if
11637 id->reset_location is true.
11638 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
11639 is set on the function to be inlined.
11641 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
11643 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
11645 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
11647 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
11648 registers for Pmode.
11649 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
11650 hard registers for the clobbered pseudo.
11652 2018-06-27 Paul Koning <ni1d@arrl.net>
11654 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11655 mutually exclusive options.
11656 * config/pdp11/constraints.md (h): New constraint.
11657 (O): Update definition to match shift code generation.
11658 (D): New constraint.
11659 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
11661 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
11663 (output_jump): Change arguments.
11664 (pdp11_fixed_cc_regs): New function.
11665 (pdp11_cc_mode): Ditto.
11666 (pdp11_expand_shift): Ditto.
11667 (pdp11_assemble_shift): Ditto.
11668 (pdp11_small_shift): Ditto.
11669 (pdp11_branch_cost): Remove.
11670 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
11672 (pdp11_register_move_cost): Update for CC registers.
11673 (pdp11_rtx_costs): Add case for LSHIFTRT.
11674 (pdp11_output_jump): Add CCNZ mode conditional branches.
11675 (notice_update_cc_on_set): Remove.
11676 (pdp11_cc_mode): New function.
11677 (simple_memory_operand): Correct pre/post decrement case.
11678 (no_side_effect_operand): New function.
11679 (pdp11_regno_reg_class): Add CC_REGS class.
11680 (pdp11_fixed_cc_regs): New function.
11681 (pdp11_small_shift): New function.
11682 (pdp11_expand_shift): New function to expand shift insns.
11683 (pdp11_assemble_shift): New function to output shifts.
11684 (pdp11_branch_cost): Remove.
11685 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
11686 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
11687 (WCHAR_TYPE): Ditto.
11688 (PTRDIFF_TYPE): Ditto.
11689 (ADJUST_INSN_LENGTH): New macro.
11690 (FIXED_REGISTERS): Add CC registers.
11691 (CALL_USED_REGISTERS): Ditto.
11692 (reg_class): Ditto.
11693 (REG_CLASS_NAMES): Ditto.
11694 (REG_CLASS_CONTENTS): Ditto.
11695 (SELECT_CC_MODE): Use new function.
11696 (TARGET_FLAGS_REGNUM): New macro.
11697 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
11698 (cc0_reg_rtx): Remove.
11699 (CC_STATUS_MDEP): Remove.
11700 (CC_STATUS_MDEFP_INIT): Remove.
11701 (CC_IN_FPU): Remove.
11702 (NOTICE_UPDATE_CC): Remove.
11703 (REGISTER_NAMES): Add CC registers.
11704 (BRANCH_COST): Change to constant 1.
11705 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
11707 * config/pdp11/pdp11.opt (mbcopy): Remove.
11708 (mbcopy-builtin): Remove.
11709 (mbranch-cheap): Remove.
11710 (mbranch-expensive): Remove.
11711 * config/pdp11/predicates.md (expand_shift_operand): Update to
11712 match shift code generation.
11713 (ccnz_operator): New predicate.
11714 * doc/invoke.texi (PDP-11 Options): Remove deleted options
11715 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
11716 Remove non-existent option -mabshi, -mno-abshi. Document mutually
11718 * doc/md.texi (PDP-11): Document new D and h constraints. Update
11719 description of O constraint.
11721 2018-06-27 Jeff Law <law@redhat.com>
11722 Austin Law <austinklaw@gmail.com>
11724 * config/v850/v850.md (addsi3_set_flags): New pattern.
11725 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
11726 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
11727 (zero_extendhisi2_v850_set_flags): Likewise.
11728 (zero_extendqisi2_v850_set_flags): Likewise.
11729 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
11730 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
11731 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
11733 * config/v850/v850-protos.h (notice_update_cc): Remove.
11734 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
11735 (v850_print_operand): Handle 'D' and "d".
11736 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
11737 Add handling of arithmetic/logical operations compared against zero.
11738 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
11739 Do not look at v850_compare_op, instead get mode from last argument.
11740 (v850_gen_compare): Remove
11741 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
11742 after reload for prologue insns.
11743 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
11745 (construct_save_jarl): Likewise.
11746 (TARGET_FLAGS_REGNUM): Define.
11747 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
11748 (NOTICE_UPDATE_CC): Remove.
11749 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
11750 than cc0. Conditionalize on reload_completed.
11751 (cmpsi_insn, setfcc_insn): Likewise.
11752 (tst1 splitter): Turn into define_and_split which sets the flags
11754 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
11755 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
11756 (cstoresf4, cstoredf4): Clobber the flags.
11757 (cmpsi, cmpsf, cmpdf): Remove expanders.
11758 (setf_insn): Remove pattern.
11759 (addsi3): Turn into define_and_split which clobbers the flags after
11760 reload and a suitable pattern (addsi3_clobber_flags) for use after
11762 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
11763 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
11764 (ashrsi3, ashrsi3_v850e2): Likewise.
11765 (bins): Clobber the flags.
11766 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
11767 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
11768 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
11769 (call_value_internal_short, call_value_internal_long): Likewise.
11770 (callt_save_interrupt, callt_return_interrupt): Likewise.
11771 (save_interrupt, return_interrupt): Likewise.
11772 (callt_save_all_interrupt, save_all_interrupt): Likewise.
11773 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
11774 (restore_all_interrupt, _restore_all_interrupt): Likewise.
11775 (All FP comparisons): Only allow after reload has completed.
11777 (divh, divhu): Tweak output template.
11778 (branch_z_normal, branch_z_invert): Remove
11779 (branch_nz_normal, branch_nz_invert): Likewise.
11780 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
11782 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
11783 * config/v850/v850.c (notice_update_cc): Remove.
11784 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
11785 (CC_NO_CARRY): Likewise.
11786 (NOTICE_UPDATE_CC): Define to nothing.
11787 * config/v850/v850.md: Remove block comment on cc0 handling
11788 Remove "cc" attribute from all patterns. Remove cc_status handling
11789 from all patterns. Minor formatting fixes.
11791 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11793 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
11794 (cortex-a76.cortex-a55): Likewise.
11795 * config/aarch64/aarch64-tune.md: Regenerate.
11796 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
11797 cortex-a76.cortex-a55.
11799 2018-06-27 Jeff Law <law@redhat.com>
11801 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
11802 (MULTILIB_DIRNAMES): Similarly.
11804 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
11806 * gimple.h (gimple_return_retbnd): Delete.
11807 (gimple_return_set_retbnd): Likewise.
11808 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
11809 gimple_return_set_retbnd.
11810 * gimple-pretty-print.c (dump_gimple_return): Remove call to
11811 gimple_return_retbnd and adjust.
11812 * tree-inline.h (struct copy_body_data): Remove retbnd field.
11813 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
11814 Explicitly return NULL in a couple more cases. Move assertion
11815 on debug statements and remove unreachable code.
11816 (reset_debug_binding): Do not test id->retbnd.
11817 (expand_call_inline): Do not set it.
11819 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
11821 * configure.ac: Add --disable-gcov option.
11822 * configure: Regenerate.
11823 * Makefile.in: Honour @enable_gcov@.
11824 * doc/install.texi: Document --disable-gcov.
11826 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11828 * config/arm/arm-cpus.in (cortex-a76): New entry.
11829 (cortex-a76.cortex-a55): Likewise.
11830 * config/arm/arm-tables.opt: Regenerate.
11831 * config/arm/arm-tune.md: Likewise.
11832 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
11833 * doc/invoke.texi (ARM Options): Document cortex-a76 and
11834 cortex-a76.cortex-a55.
11836 2018-06-27 Tamar Christina <tamar.christina@arm.com>
11839 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
11841 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
11843 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
11845 (EPILOGUE_USES): Likewise.
11847 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
11849 * tree-inline.c (remap_location): New function extracted from...
11850 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
11851 (copy_phis_for_bb): ...here. Call remap_location.
11852 (copy_cfg_body): Adjust call to copy_edges_for_bb.
11854 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
11856 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
11857 unaligned vsx for 16B memset.
11859 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
11862 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
11863 ieee128_float_type_node to long_double_type_node unless
11864 TARGET_LONG_DOUBLE_128 is set.
11866 2018-06-26 David Malcolm <dmalcolm@redhat.com>
11868 * cfgloop.c (get_loop_location): Convert return type from
11869 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
11870 by implicit construction from rtx_insn *, and using
11871 dump_user_location_t::from_function_decl for the fallback case.
11872 * cfgloop.h (get_loop_location): Convert return type from
11873 location_t to dump_user_location_t.
11874 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
11875 dump_printf_loc to pass in a dump_location_t rather than a
11876 location_t, via the gimple stmt.
11877 * coverage.c (get_coverage_counts): Update calls to
11878 dump_printf_loc to pass in dump_location_t rather than a
11880 * doc/optinfo.texi (Dump types): Convert example of
11881 dump_printf_loc from taking "locus" to taking "insn". Update
11882 description of the "_loc" calls to cover dump_location_t.
11883 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
11885 (dump_user_location_t::dump_user_location_t): New constructors,
11886 from gimple *stmt and rtx_insn *.
11887 (dump_user_location_t::from_function_decl): New function.
11888 (dump_loc): Make static.
11889 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
11890 const dump_location_t &.
11891 (dump_generic_expr_loc): Delete.
11892 (dump_printf_loc): Convert param "loc" from location_t to
11893 const dump_location_t &.
11894 (selftest::test_impl_location): New function.
11895 (selftest::dumpfile_c_tests): New function.
11896 * dumpfile.h: Include "profile-count.h".
11897 (class dump_user_location_t): New class.
11898 (struct dump_impl_location_t): New struct.
11899 (class dump_location_t): New class.
11900 (dump_printf_loc): Convert 2nd param from source_location to
11901 const dump_location_t &.
11902 (dump_generic_expr_loc): Delete.
11903 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
11904 const dump_location_t &.
11905 * gimple-fold.c (fold_gimple_assign): Update call to
11906 dump_printf_loc to pass in a dump_location_t rather than a
11907 location_t, via the gimple stmt.
11908 (gimple_fold_call): Likewise.
11909 * gimple-loop-interchange.cc
11910 (loop_cand::analyze_iloop_reduction_var): Update for change to
11911 check_reduction_path.
11912 (tree_loop_interchange::interchange): Update for change to
11913 find_loop_location.
11914 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
11915 change in return-type of find_loop_location.
11916 (graphite_regenerate_ast_isl): Likewise.
11917 * graphite-optimize-isl.c (optimize_isl): Likewise.
11918 * graphite.c (graphite_transform_loops): Likewise.
11919 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
11920 pass in a dump_location_t rather than a location_t, via the
11922 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11923 * ipa.c (walk_polymorphic_call_targets): Likewise.
11924 * loop-unroll.c (report_unroll): Convert "locus" param from
11925 location_t to dump_location_t.
11926 (decide_unrolling): Update for change to get_loop_location's
11928 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
11929 location_t to dump_user_location_t.
11930 (grid_find_single_omp_among_assignments_1): Updates calls to
11931 dump_printf_loc to pass in a dump_location_t rather than a
11932 location_t, via the gimple stmt.
11933 (grid_parallel_clauses_gridifiable): Convert "tloc" from
11934 location_t to dump_location_t. Updates calls to dump_printf_loc
11935 to pass in a dump_location_t rather than a location_t, via the
11937 (grid_inner_loop_gridifiable_p): Likewise.
11938 (grid_dist_follows_simple_pattern): Likewise.
11939 (grid_gfor_follows_tiling_pattern): Likewise.
11940 (grid_target_follows_gridifiable_pattern): Likewise.
11941 (grid_attempt_target_gridification): Convert initialization
11942 of local "grid" from memset to zero-initialization; FIXME: does
11943 this require C++11? Update call to dump_printf_loc to pass in a
11944 optinfo_location rather than a location_t, via the gimple stmt.
11945 * profile.c (read_profile_edge_counts): Updates call to
11946 dump_printf_loc to pass in a dump_location_t rather than a
11948 (compute_branch_probabilities): Likewise.
11949 * selftest-run-tests.c (selftest::run_tests): Call
11951 * selftest.h (dumpfile_c_tests): New decl.
11952 * tree-loop-distribution.c (pass_loop_distribution::execute):
11953 Update for change in return type of find_loop_location.
11954 * tree-parloops.c (parallelize_loops): Likewise.
11955 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
11956 "locus" from location_t to dump_user_location_t.
11957 (canonicalize_loop_induction_variables): Likewise.
11958 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
11959 for change in return type of find_loop_location.
11960 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
11961 to dump_printf_loc to pass in a dump_location_t rather than a
11962 location_t, via the stmt.
11963 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
11965 * tree-vect-loop-manip.c (find_loop_location): Convert return
11966 type from source_location to dump_user_location_t.
11967 (vect_do_peeling): Update for above change.
11968 (vect_loop_versioning): Update for change in type of
11970 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
11971 from location_t to dump_user_location_t.
11972 (vect_estimate_min_profitable_iters): Update for change in type
11974 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
11975 location_t to dump_location_t.
11976 (vect_slp_bb): Update for change in type of vect_location.
11977 * tree-vectorizer.c (vect_location): Convert from source_location
11978 to dump_user_location_t.
11979 (try_vectorize_loop_1): Update for change in vect_location's type.
11980 (vectorize_loops): Likewise.
11981 (increase_alignment): Likewise.
11982 * tree-vectorizer.h (vect_location): Convert from source_location
11983 to dump_user_location_t.
11984 (find_loop_location): Convert return type from source_location to
11985 dump_user_location_t.
11986 (check_reduction_path): Convert 1st param from location_t to
11987 dump_user_location_t.
11988 * value-prof.c (check_counter): Update call to dump_printf_loc to
11989 pass in a dump_user_location_t rather than a location_t; update
11990 call to error_at for change in type of "locus".
11991 (check_ic_target): Update call to dump_printf_loc to
11992 pass in a dump_user_location_t rather than a location_t, via the
11995 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
11997 * config/s390/s390.h (enum processor_flags): Do not use
11998 default tune parameter when -march was specified.
12000 2018-06-26 Jakub Jelinek <jakub@redhat.com>
12003 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
12004 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
12007 2018-06-26 Richard Biener <rguenther@suse.de>
12009 PR tree-optimization/86287
12011 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
12012 (vect_analyze_loop): Initialize n_stmts.
12014 2018-06-26 Richard Biener <rguenther@suse.de>
12016 PR middle-end/86271
12017 * fold-const.c (fold_convertible_p): Pointer extension
12020 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
12023 * dwarf2out.c (loc_list_has_views): Adjust comments.
12024 (dw_loc_list): Split single cross-partition range with
12027 2018-06-25 Jeff Law <law@redhat.com>
12029 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
12030 on -mbig-switch by default.
12032 * config/v850/predicates.md (const_float_1_operand): Fix match_code
12034 (const_float_0_operand): Remove unused predicate.
12035 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
12036 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
12037 (recipsf2): New expander. Original pattern now called
12039 (recipdf2, recipdf2_insn): Similarly.
12040 (rsqrtsf2, rsqrtsf2_insn): Similarly
12041 (rsqrtdf2, rsqrtdf2_insn): Similarly
12043 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
12045 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
12046 Simplify logic for FreeBSD (twice).
12048 2018-06-25 Martin Sebor <msebor@redhat.com>
12050 PR tree-optimization/86204
12051 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
12052 a strnlen result if it's less than the length of the string.
12054 2018-06-25 Martin Sebor <msebor@redhat.com>
12056 PR tree-optimization/85700
12057 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
12058 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
12059 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
12061 2018-06-25 Martin Sebor <msebor@redhat.com>
12063 * doc/extend.texi (Zero-length arrays): Update and clarify.
12065 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
12067 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
12068 added IEEE/IBM long double multilib support on PowerPC little
12069 endian Linux systems.
12070 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
12071 (MULTILIB_DEFAULTS): Likewise.
12072 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12074 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
12075 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
12076 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
12078 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
12080 PR middle-end/86311
12081 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
12082 (REORDER_45): Likewise.
12084 2018-06-25 Jeff Law <law@redhat.com>
12086 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
12087 dividend to 32 bits. Adjust length.
12088 (udivmodhi4): Cleanup output template. Fix length.
12090 2018-06-25 Carl Love <cel@us.ibm.com>
12092 * config/rs6000/vsx.md: Change word selector to prefered location.
12094 2018-06-25 Richard Biener <rguenther@suse.de>
12096 PR tree-optimization/86304
12097 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
12098 epilogue-if-converted loops as well.
12100 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
12102 * lto-section-out.c (lto_begin_section): Do not print section
12103 name for noaddr and unnumbered dumps.
12105 2018-06-25 Richard Biener <rguenther@suse.de>
12107 * tree-vectorizer.h (struct vec_info_shared): New structure
12108 with parts split out from struct vec_info and loop_nest from
12109 struct _loop_vec_info.
12110 (struct vec_info): Adjust accordingly.
12111 (struct _loop_vec_info): Likewise.
12112 (LOOP_VINFO_LOOP_NEST): Adjust.
12113 (LOOP_VINFO_DATAREFS): Likewise.
12114 (LOOP_VINFO_DDRS): Likewise.
12115 (struct _bb_vec_info): Likewise.
12116 (BB_VINFO_DATAREFS): Likewise.
12117 (BB_VINFO_DDRS): Likewise.
12118 (struct _stmt_vec_info): Add dr_aux member.
12119 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
12120 (DR_MISALIGNMENT_UNINITIALIZED): New.
12121 (set_dr_misalignment): Adjust.
12122 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
12123 (vect_analyze_loop): Adjust prototype.
12124 (vect_analyze_loop_form): Likewise.
12125 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12126 Compute dependences lazily.
12127 (vect_record_base_alignments): Use shared datarefs/ddrs.
12128 (vect_verify_datarefs_alignment): Likewise.
12129 (vect_analyze_data_refs_alignment): Likewise.
12130 (vect_analyze_data_ref_accesses): Likewise.
12131 (vect_analyze_data_refs): Likewise.
12132 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
12133 constructor parameter for shared part.
12134 (vect_analyze_loop_form): Pass in shared part and adjust.
12135 (vect_analyze_loop_2): Pass in storage for the number of
12136 stmts. Move loop nest finding to the caller. Compute
12138 (vect_analyze_loop): Pass in shared part.
12139 (vect_transform_loop): Verify shared datarefs are unchanged.
12140 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
12141 constructor parameter for shared part.
12142 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
12143 (vect_slp_bb): Verify shared datarefs are unchanged before
12145 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
12147 (new_stmt_vec_info): Initialize DR_AUX misalignment to
12148 DR_MISALIGNMENT_UNINITIALIZED.
12149 * tree-vectorizer.c (vec_info::vec_info): Add constructor
12150 parameter for shared part.
12151 (vec_info::~vec_info): Adjust.
12152 (vec_info_shared::vec_info_shared): New.
12153 (vec_info_shared::~vec_info_shared): Likewise.
12154 (vec_info_shared::save_datarefs): Likewise.
12155 (vec_info_shared::check_datarefs): Likewise.
12156 (try_vectorize_loop_1): Construct shared part live for analyses
12157 of a single loop for multiple vector sizes.
12158 * tree-parloops.c (gather_scalar_reductions): Adjust.
12160 2018-06-25 Richard Biener <rguenther@suse.de>
12162 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
12163 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
12164 (vect_analyze_data_refs): Remove similar code from here and
12165 simplify accordingly.
12167 2018-06-25 Richard Biener <rguenther@suse.de>
12169 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
12170 for reverse storage order accesses rather than asserting
12171 they cannot happen here.
12173 2018-06-25 Tom de Vries <tdevries@suse.de>
12176 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
12177 Use data16 instead of .byte for insn prefix.
12179 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
12182 * parser.c (make_char_string_pack): Pass this literal chars
12183 through cpp_interpret_string.
12184 (cp_parser_userdef_numeric_literal): Check the result of
12185 make_char_string_pack.
12187 2018-06-24 Maya Rashish <coypu@sdf.org>
12189 * ginclude/stddef.h: Simplify conditions around avoiding
12190 re-definition of __size_t.
12192 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12194 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
12195 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
12197 2018-06-22 Maya Rashish <coypu@sdf.org>
12199 * doc/invoke.texi (mno-fancy-math-387): Update for changes
12200 made to OpenBSD and NetBSD through the years.
12202 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12204 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12205 behavior of vec_pack (vector double, vector double) to match
12206 behavior of vec_float2 (vector double, vector double).
12208 2018-06-22 Olivier Hainque <hainque@adacore.com>
12210 * gimplify.c (gimplify_function_tree): Prevent creation
12211 of a trampoline for the address of the current function
12212 passed to entry/exit instrumentation hooks.
12214 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
12217 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
12220 2018-06-22 Martin Liska <mliska@suse.cz>
12222 PR tree-optimization/86263
12223 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12224 Bail out if is_enabled is false.
12225 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
12227 (jump_table_cluster::is_enabled): New function.
12229 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12231 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12232 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
12233 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
12234 (lto_input_ts_binfo_tree_pointers): Likewise.
12235 * tree-streamer-out.c (streamer_write_tree_bitfields,
12236 write_ts_binfo_tree_pointers): Likewise.
12237 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
12239 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12241 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
12243 2018-06-22 Martin Liska <mliska@suse.cz>
12245 * symbol-summary.h (get): Make it pure and inline move
12246 functionality from ::get function.
12247 (get): Remove and inline into ::get and ::get_create.
12248 (get_create): Move code from ::get function.
12250 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12253 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
12254 -x assembler-with-cpp.
12256 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12258 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12259 _FILE_OFFSET_BITS=64 for C++.
12261 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
12263 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12264 conversion insn that shows up when pr85657-3.c is compiled using
12265 IEEE 128-bit long double.
12266 (neg<mode>2_internal): Use the correct mode to check whether the
12267 mode is IBM extended.
12268 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12269 multiply and divide external functions from being created more
12272 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12274 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12276 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
12277 the edge can be forwarded.
12278 (cfg_layout_merge_blocks): Likewise.
12280 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12282 * except.c (finish_eh_generation): Commit edge insertions only after
12283 the EH edges have been redirected from post-landing to landing pads.
12285 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12287 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12288 create_tmp_var_for to create the FRAME decl.
12289 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12291 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12293 * tree-inline.c (copy_edges_for_bb): Minor tweak.
12294 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12295 debug statement when resetting its value.
12296 (expand_call_inline): Copy the locus of the call onto the assignment
12297 of the return value, if any. Use local variable in more cases.
12299 2018-06-21 Martin Liska <mliska@suse.cz>
12301 * ipa-pure-const.c (propagate_nothrow): Use
12302 funct_state_summaries->get.
12303 (dump_malloc_lattice): Likewise.
12304 (propagate_malloc): Likewise.
12306 2018-06-21 Richard Biener <rguenther@suse.de>
12308 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12309 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12310 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12312 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12313 BLOCK_ABSTRACT_ORIGIN unconditionally.
12315 2018-06-21 David Malcolm <dmalcolm@redhat.com>
12317 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12319 * ipa-reference.c (ipa_reference_c_finalize): Delete
12320 ipa_ref_opt_sum_summaries and set it to NULL.
12322 2018-06-21 Tom de Vries <tdevries@suse.de>
12324 PR tree-optimization/85859
12325 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12326 test with comment from bb_no_side_effects_p.
12328 2018-06-21 Richard Biener <rguenther@suse.de>
12330 PR tree-optimization/86232
12331 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12332 max for constant niter.
12334 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12336 * config/aarch64/aarch64-simd.md
12337 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12339 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12341 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12342 Make opernads of the unspec commutative.
12344 2018-06-21 Richard Biener <rguenther@suse.de>
12346 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12347 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12348 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12349 (vect_analyze_data_ref_dependence): Re-order checks to deal with
12351 (vect_record_base_alignments): Do not record base alignment
12352 for gathers or scatters.
12353 (vect_compute_data_ref_alignment): Drop return value that is always
12354 true. Bail out early for gathers or scatters.
12355 (vect_enhance_data_refs_alignment): Bail out early for gathers
12357 (vect_find_same_alignment_drs): Likewise.
12358 (vect_analyze_data_refs_alignment): Remove dead code.
12359 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12360 (vect_analyze_data_refs): For possible gathers or scatters do
12361 not create an alternate DR, just check their possible validity
12362 and mark them. Adjust DECL_NONALIASED handling to not rely
12363 on DR_BASE_ADDRESS.
12364 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12365 update inits of gathers or scatters.
12366 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12367 Also copy gather/scatter flag to pattern vinfo.
12369 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
12371 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12372 behavior of vec_packsu (vector unsigned long long, vector unsigned
12373 long long) to match behavior of vec_packs with same signature.
12375 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
12376 Thomas Schwinge <thomas@codesourcery.com>
12377 Cesar Philippidis <cesar@codesourcery.com>
12379 * gimplify.c (gimplify_scan_omp_clauses): Add support for
12380 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12381 (gimplify_adjust_omp_clauses): Likewise.
12382 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
12383 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
12384 (gimplify_omp_target_update): Update handling of acc update and
12386 * omp-low.c (install_var_field): Remove unused parameter
12387 base_pointers_restrict.
12388 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
12389 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
12391 (omp_target_base_pointers_restrict_p): Delete.
12392 (scan_omp_target): Update call to scan_sharing_clauses.
12393 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
12395 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
12396 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12397 (convert_local_omp_clauses): Likewise.
12398 * tree-pretty-print.c (dump_omp_clause): Likewise.
12399 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
12401 (omp_clause_code_name): Likewise.
12403 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12406 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
12409 PR tree-optimization/86231
12410 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
12411 anti-range don't overwrite *vr0min before using it to compute *vr0max.
12413 2018-06-20 Tom de Vries <tdevries@suse.de>
12415 PR tree-optimization/86097
12416 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
12417 iv type if signedness of iv type is not the same as that of *nit.
12419 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12421 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
12422 EDGE_EH edges, verify they are all EDGE_EH.
12424 2018-06-20 Maya Rashish <coypu@sdf.org>
12426 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
12428 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12430 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
12431 * config/aarch64/aarch64.c (xgene1_tunings): Add
12432 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
12433 (aarch64_mode_valid_for_sched_fusion_p):
12434 Allow 16-byte modes.
12435 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
12436 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
12438 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
12440 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
12441 * config/aarch64/iterators.md (VQ2): New mode iterator.
12443 2018-06-20 Martin Liska <mliska@suse.cz>
12445 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12446 Change default ratio from 10 to 8.
12448 2018-06-20 Martin Liska <mliska@suse.cz>
12450 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12452 (bit_test_cluster::find_bit_tests): Likewise.
12453 (switch_decision_tree::analyze_switch_statement): Find clusters.
12454 * tree-switch-conversion.h (struct jump_table_cluster): Document
12457 2018-06-20 Martin Liska <mliska@suse.cz>
12459 * tree-switch-conversion.c (switch_conversion::collect):
12460 Record m_uniq property.
12461 (switch_conversion::expand): Bail out for special conditions.
12462 (group_cluster::~group_cluster): New.
12463 (group_cluster::group_cluster): Likewise.
12464 (group_cluster::dump): Likewise.
12465 (jump_table_cluster::emit): New.
12466 (switch_decision_tree::fix_phi_operands_for_edges): New.
12467 (struct case_node): Remove struct.
12468 (jump_table_cluster::can_be_handled): New.
12469 (case_values_threshold): Moved to header.
12470 (reset_out_edges_aux): Likewise.
12471 (jump_table_cluster::is_beneficial): New.
12472 (bit_test_cluster::can_be_handled): Likewise.
12473 (add_case_node): Remove.
12474 (bit_test_cluster::is_beneficial): New.
12475 (case_bit_test::cmp): New.
12476 (bit_test_cluster::emit): New.
12477 (expand_switch_as_decision_tree_p): Remove.
12478 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
12479 (fix_phi_operands_for_edge): Likewise.
12480 (switch_decision_tree::analyze_switch_statement): New.
12481 (compute_cases_per_edge): Move ...
12482 (switch_decision_tree::compute_cases_per_edge): ... here.
12483 (try_switch_expansion): Likewise.
12484 (switch_decision_tree::try_switch_expansion): Likewise.
12485 (record_phi_operand_mapping): Likewise.
12486 (switch_decision_tree::record_phi_operand_mapping): Likewise.
12487 (emit_case_decision_tree): Likewise.
12488 (switch_decision_tree::emit): Likewise.
12489 (balance_case_nodes): Likewise.
12490 (switch_decision_tree::balance_case_nodes): Likewise.
12491 (dump_case_nodes): Likewise.
12492 (switch_decision_tree::dump_case_nodes): Likewise.
12493 (emit_jump): Likewise.
12494 (switch_decision_tree::emit_jump): Likewise.
12495 (emit_cmp_and_jump_insns): Likewise.
12496 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
12497 (emit_case_nodes): Likewise.
12498 (switch_decision_tree::emit_case_nodes): Likewise.
12499 (conditional_probability): Remove.
12500 * tree-switch-conversion.h (enum cluster_type): New.
12502 (struct cluster): Likewise.
12503 (cluster::cluster): Likewise.
12504 (struct simple_cluster): Likewise.
12505 (simple_cluster::simple_cluster): Likewise.
12506 (struct group_cluster): Likewise.
12507 (struct jump_table_cluster): Likewise.
12508 (struct bit_test_cluster): Likewise.
12509 (struct min_cluster_item): Likewise.
12510 (struct case_tree_node): Likewise.
12511 (case_tree_node::case_tree_node): Likewise.
12512 (jump_table_cluster::case_values_threshold): Likewise.
12513 (struct case_bit_test): Likewise.
12514 (struct switch_decision_tree): Likewise.
12515 (struct switch_conversion): Likewise.
12516 (switch_decision_tree::reset_out_edges_aux): Likewise.
12518 2018-06-20 Martin Liska <mliska@suse.cz>
12520 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
12521 (hoist_edge_and_branch_if_true): Likewise.
12522 (expand_switch_using_bit_tests_p): Likewise.
12523 (struct case_bit_test): Likewise.
12524 (case_bit_test_cmp): Likewise.
12525 (emit_case_bit_tests): Likewise.
12526 (switch_conversion::switch_conversion): New class.
12527 (struct switch_conv_info): Remove old struct.
12528 (collect_switch_conv_info): More to ...
12529 (switch_conversion::collect): ... this.
12530 (check_range): Likewise.
12531 (switch_conversion::check_range): Likewise.
12532 (check_all_empty_except_final): Likewise.
12533 (switch_conversion::check_all_empty_except_final): Likewise.
12534 (check_final_bb): Likewise.
12535 (switch_conversion::check_final_bb): Likewise.
12536 (create_temp_arrays): Likewise.
12537 (switch_conversion::create_temp_arrays): Likewise.
12538 (free_temp_arrays): Likewise.
12539 (gather_default_values): Likewise.
12540 (switch_conversion::gather_default_values): Likewise.
12541 (build_constructors): Likewise.
12542 (switch_conversion::build_constructors): Likewise.
12543 (constructor_contains_same_values_p): Likewise.
12544 (switch_conversion::contains_same_values_p): Likewise.
12545 (array_value_type): Likewise.
12546 (switch_conversion::array_value_type): Likewise.
12547 (build_one_array): Likewise.
12548 (switch_conversion::build_one_array): Likewise.
12549 (build_arrays): Likewise.
12550 (switch_conversion::build_arrays): Likewise.
12551 (gen_def_assigns): Likewise.
12552 (switch_conversion::gen_def_assigns): Likewise.
12553 (prune_bbs): Likewise.
12554 (switch_conversion::prune_bbs): Likewise.
12555 (fix_phi_nodes): Likewise.
12556 (switch_conversion::fix_phi_nodes): Likewise.
12557 (gen_inbound_check): Likewise.
12558 (switch_conversion::gen_inbound_check): Likewise.
12559 (process_switch): Use the newly created class.
12560 (switch_conversion::expand): New.
12561 (switch_conversion::~switch_conversion): New.
12562 * tree-switch-conversion.h: New file.
12564 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12566 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
12567 tree-vect-patterns.c.
12568 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
12569 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
12570 (vect_recog_sad_pattern): Likewise.
12571 (vect_recog_widen_sum_pattern): Likewise.
12572 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
12573 (vect_recog_widen_shift_pattern): Remove the type_in argument.
12574 (vect_recog_rotate_pattern): Likewise.
12575 (vect_recog_mult_pattern): Likewise.
12576 (vect_recog_vector_vector_shift_pattern): Likewise.
12577 (vect_recog_divmod_pattern): Likewise.
12578 (vect_recog_mixed_size_cond_pattern): Likewise.
12579 (vect_recog_bool_pattern): Likewise.
12580 (vect_recog_mask_conversion_pattern): Likewise.
12581 (vect_try_gather_scatter_pattern): Likewise.
12582 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
12583 (vect_recog_over_widening_pattern): Likewise.
12584 (vect_recog_gather_scatter_pattern): Likewise.
12585 (vect_recog_func_ptr): Move from tree-vectorizer.h
12586 (vect_vect_recog_func_ptrs): Move further down the file.
12587 (vect_recog_func): Likewise. Remove the third argument.
12588 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
12589 (vect_pattern_recog_1): Expect the pattern function to do any
12590 necessary target tests. Also expect it to provide a vector type.
12591 Remove the type_in handling.
12593 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12595 * tree-vect-patterns.c (vect_pattern_detected): New function.
12596 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
12597 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
12598 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
12599 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
12600 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12601 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12602 (vect_recog_mask_conversion_pattern)
12603 (vect_try_gather_scatter_pattern): Likewise.
12605 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12607 * tree-vect-patterns.c (vect_get_internal_def): New function.
12608 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12609 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
12610 (search_type_for_mask_1): Use it.
12612 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12614 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12615 redundant WIDEN_SUM_EXPR handling.
12616 (vect_recog_sad_pattern): Likewise.
12618 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12620 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12621 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
12622 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
12623 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
12624 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
12626 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12628 * tree-vect-stmts.c (vectorizable_call): Make sure that we
12629 use the stmt_vec_info of the original bb statement for the
12630 new zero assignment, even if the call is part of a pattern.
12632 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12634 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
12635 that the sequence is attached to the original statement rather
12636 than the pattern statement.
12637 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
12638 PATTERN_DEF_SEQ from the original statement rather than
12639 the main pattern statement.
12640 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
12641 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
12642 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
12644 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12646 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
12647 definition statements before the early exit for statements that aren't
12649 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
12651 (vect_transform_loop): ...here. Process pattern definition
12652 statements without first checking whether the main pattern
12653 statement is live or relevant.
12655 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12657 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
12658 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
12660 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
12662 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
12663 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
12664 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
12665 (expand_block_compare): Change select_block_compare_mode call.
12666 (expand_strncmp_align_check): Use new functions, fix comment.
12667 (emit_final_str_compare_gpr): New function.
12668 (expand_strn_compare): Refactor and clean up code.
12669 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
12671 2018-06-19 Tony Reix <tony.reix@atos.com>
12672 Damien Bergamini <damien.bergamini@atos.com>
12673 David Edelsohn <dje.gcc@gmail.com>
12675 * collect2.c (static_obj): New variable.
12676 (static_libs): New variable.
12677 (is_in_list): Uncomment declaration.
12678 (main): Track AIX libraries linked statically.
12679 (is_in_list): Uncomment definition.
12680 (scan_prog_file): Don't add AIX shared libraries initializer
12681 to constructor list if linking statically.
12683 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
12685 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
12687 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
12689 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
12691 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
12694 2018-06-19 Martin Liska <mliska@suse.cz>
12696 * config/i386/i386.c (ix86_can_inline_p): Do not use
12697 ipa_fn_summaries::get_create.
12698 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
12700 (devirtualization_time_bonus): Likewise.
12701 (ipcp_propagate_stage): Likewise.
12702 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12703 (edge_set_predicate): Likewise.
12704 (evaluate_conditions_for_known_args): Likewise.
12705 (evaluate_properties_for_edge): Likewise.
12706 (ipa_call_summary::reset): Tranform to ...
12707 (ipa_call_summary::~ipa_call_summary): ... this.
12708 (ipa_fn_summary::reset): Transform to ...
12709 (ipa_fn_summary::~ipa_fn_summary): ... this.
12710 (ipa_fn_summary_t::remove): Rename to ...
12711 (ipa_fn_summary_t::remove_callees): ... this.
12712 (ipa_fn_summary_t::duplicate): Use placement new
12713 instead of memory copy.
12714 (ipa_call_summary_t::duplicate): Likewise.
12715 (ipa_call_summary_t::remove): Remove.
12716 (dump_ipa_call_summary): Change get_create to get.
12717 (ipa_dump_fn_summary): Dump only when summary exists.
12718 (analyze_function_body): Use symbol_summary::get instead
12720 (compute_fn_summary): Likewise.
12721 (estimate_edge_devirt_benefit): Likewise.
12722 (estimate_edge_size_and_time): Likewise.
12723 (inline_update_callee_summaries): Likewise.
12724 (remap_edge_change_prob): Likewise.
12725 (remap_edge_summaries): Likewise.
12726 (ipa_merge_fn_summary_after_inlining): Likewise.
12727 (write_ipa_call_summary): Likewise.
12728 (ipa_fn_summary_write): Likewise.
12729 (ipa_free_fn_summary): Likewise.
12730 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
12731 (struct ipa_call_summary): Likewise.
12732 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
12734 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
12735 (estimate_size_after_inlining): Likewise.
12736 (estimate_growth): Likewise.
12737 (growth_likely_positive): Likewise.
12738 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12739 (inline_call): Likewise.
12740 * ipa-inline.c (caller_growth_limits): Likewise.
12741 (can_inline_edge_p): Likewise.
12742 (can_inline_edge_by_limits_p): Likewise.
12743 (compute_uninlined_call_time): Likewise.
12744 (compute_inlined_call_time): Likewise.
12745 (want_inline_small_function_p): Likewise.
12746 (edge_badness): Likewise.
12747 (update_caller_keys): Likewise.
12748 (update_callee_keys): Likewise.
12749 (inline_small_functions): Likewise.
12750 (inline_to_all_callers_1): Likewise.
12751 (dump_overall_stats): Likewise.
12752 (early_inline_small_functions): Likewise.
12753 (early_inliner): Likewise.
12754 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12755 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12756 * ipa-pure-const.c (malloc_candidate_p): Likewise.
12757 * ipa-split.c (execute_split_functions): Likewise.
12758 * symbol-summary.h: Likewise.
12759 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12761 2018-06-19 Richard Biener <rguenther@suse.de>
12763 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
12764 (vectorize_loops): ... here. Fix dbgcnt handling.
12765 (try_vectorize_loop): Wrap try_vectorize_loop_1.
12767 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
12770 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
12771 ieee128 argument takes up only one (vector) register, not two (floating
12774 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12776 * gimplify.c (gimplify_init_constructor): Really never clear for an
12777 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
12779 2018-06-19 Richard Biener <rguenther@suse.de>
12781 PR tree-optimization/86179
12782 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
12783 after failed recognition.
12785 2018-06-18 Martin Sebor <msebor@redhat.com>
12787 PR middle-end/85602
12788 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
12789 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
12790 Handle integer subtraction.
12791 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
12792 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
12794 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12796 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
12797 param from rtx to rtx_insn *.
12798 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
12800 (frv_ifcvt_modify_insn): Likwise.
12801 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
12802 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
12803 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
12804 as_a <rtx_insn *> cast to local "unprotected_region" once
12805 it's been established that it's not NULL or pc_rtx.
12806 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
12807 param "sethi" from rtx to rtx_insn *.
12808 (nds32_group_float_insns): Likewise for param "insn".
12809 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
12811 (vax_output_int_subtract): Likewise.
12812 * config/vax/vax.c (vax_output_int_add): Likewise for param
12814 (vax_output_int_subtract): Likewise.
12815 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
12816 (emit_pattern_after): Likewise for param "after".
12817 (emit_insn_after): Likewise.
12818 (emit_jump_insn_after): Likewise.
12819 (emit_call_insn_after): Likewise.
12820 (emit_debug_insn_after): Likewise.
12821 (emit_pattern_before): Likewise for param "before".
12822 (emit_insn_before): Likewise.
12823 (emit_jump_insn_before): Likewise.
12824 * final.c (get_insn_template): Likewise for param "insn", removing
12826 * output.h (get_insn_template): Likewise for 2nd param.
12827 * rtl.h (emit_insn_before): Likewise.
12828 (emit_jump_insn_before): Likewise.
12829 (emit_debug_insn_before_noloc): Likewise.
12830 (emit_insn_after): Likewise.
12831 (emit_jump_insn_after): Likewise.
12832 (emit_call_insn_after): Likewise.
12833 (emit_debug_insn_after): Likewise.
12834 (set_insn_deleted): Likewise for param.
12836 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
12839 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
12840 floating point modes, so that IFmode is numerically greater than
12841 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
12842 to declare the ordering. This prevents IFmode from being
12843 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
12844 machine. Include rs6000-modes.h to share the fractional values
12845 between genmodes* and the rest of the compiler.
12846 (IFmode): Likewise.
12847 (KFmode): Likewise.
12848 (TFmode): Likewise.
12849 * config/rs6000/rs6000-modes.h: New file.
12850 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
12851 meaning of rs6000_long_double_size so that 126..128 selects an
12852 appropriate 128-bit floating point type.
12853 (rs6000_option_override_internal): Likewise.
12854 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
12855 (TARGET_LONG_DOUBLE_128): Change the meaning of
12856 rs6000_long_double_size so that 126..128 selects an appropriate
12857 128-bit floating point type.
12858 (LONG_DOUBLE_TYPE_SIZE): Update comment.
12859 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
12860 source and destination to match the standard usage.
12861 (truncifkf2): Likewise.
12862 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
12863 ISA 2.07 to use an explicit clobber, instead of passing in a
12865 (copysign<mode>3_soft): Likewise.
12867 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12869 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12870 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
12871 (vect_slp_analyze_instance_dependence): Likewise.
12872 (vect_enhance_data_refs_alignment): Likewise.
12873 (vect_analyze_data_refs_alignment): Likewise.
12874 (vect_slp_analyze_and_verify_instance_alignment
12875 (vect_analyze_data_ref_accesses): Likewise.
12876 (vect_prune_runtime_alias_test_list): Likewise.
12877 (vect_analyze_data_refs): Likewise.
12878 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
12879 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12880 (vect_analyze_scalar_cycles_1): Likewise.
12881 (vect_get_loop_niters): Likewise.
12882 (vect_analyze_loop_form_1): Likewise.
12883 (vect_update_vf_for_slp): Likewise.
12884 (vect_analyze_loop_operations): Likewise.
12885 (vect_analyze_loop): Likewise.
12886 (vectorizable_induction): Likewise.
12887 (vect_transform_loop): Likewise.
12888 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
12889 * tree-vect-slp.c (vect_analyze_slp): Likewise.
12890 (vect_make_slp_decision): Likewise.
12891 (vect_detect_hybrid_slp): Likewise.
12892 (vect_slp_analyze_operations): Likewise.
12893 (vect_slp_bb): Likewise.
12894 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
12895 (vectorizable_bswap): Likewise.
12896 (vectorizable_call): Likewise.
12897 (vectorizable_simd_clone_call): Likewise.
12898 (vectorizable_conversion): Likewise.
12899 (vectorizable_assignment): Likewise.
12900 (vectorizable_shift): Likewise.
12901 (vectorizable_operation): Likewise.
12902 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
12904 2018-06-18 Martin Sebor <msebor@redhat.com>
12906 PR tree-optimization/81384
12907 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
12908 * builtins.c (expand_builtin_strnlen): New function.
12909 (expand_builtin): Call it.
12910 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
12911 * builtins.def (BUILT_IN_STRNLEN): New.
12912 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
12913 Warn for bounds in excess of maximum object size.
12914 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
12915 single-value ranges. Handle strnlen.
12916 (handle_builtin_strlen): Handle strnlen.
12917 (strlen_check_and_optimize_stmt): Same.
12918 * doc/extend.texi (Other Builtins): Document strnlen.
12920 2018-06-18 Maya Rashish <coypu@sdf.org>
12922 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
12923 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
12924 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
12926 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
12928 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
12930 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12932 * tree.c (escaped_string::escape): Replace cast to char * by
12933 const_cast<char *> (unescaped).
12935 2018-06-18 Nick Clifton <nickc@redhat.com>
12938 * tree.c (escaped_string): New class. Converts an unescaped
12939 string into its escaped equivalent.
12940 (warn_deprecated_use): Use the new class to convert the
12941 deprecation message, if present.
12942 (test_escaped_strings): New self test.
12943 (test_c_tests): Add test_escaped_strings.
12944 * doc/extend.texi (deprecated): Add a note that the
12945 deprecation message is affected by the -fmessage-length
12946 option, and that control characters will be escaped.
12947 (#pragma GCC error): Document this pragma.
12948 (#pragma GCC warning): Likewise.
12949 * doc/invoke.texi (-fmessage-length): Document this option's
12950 effect on the #warning and #error preprocessor directives and
12951 the deprecated attribute.
12953 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
12955 * tree.c (decl_value_expr_lookup): Revert latest change.
12956 (decl_value_expr_insert): Likewise.
12958 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
12960 * gimplify.c (nonlocal_vlas): Delete.
12961 (nonlocal_vla_vars): Likewise.
12962 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
12964 (gimplify_body): Do not create and destroy nonlocal_vlas.
12965 * tree-nested.c: Include diagnostic.h.
12966 (use_pointer_in_frame): Tweak.
12967 (lookup_field_for_decl): Add assertion and declare the transformation.
12968 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
12969 internal error when the reference is in a wrong context. Do not
12970 create a debug decl by default.
12971 (note_nonlocal_block_vlas): Delete.
12972 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
12973 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
12974 create a debug decl by default.
12975 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
12976 call is in a wrong context.
12977 (fixup_vla_decls): New function.
12978 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
12979 debug variables were created.
12980 * tree.c (decl_value_expr_lookup): Add checking assertion.
12981 (decl_value_expr_insert): Likewise.
12983 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
12985 PR middle-end/82479
12986 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
12987 * tree-scalar-evolution.c (interpret_expr): Likewise.
12988 (expression_expensive_p): Likewise.
12989 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
12990 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
12991 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
12992 (ssa_defined_by_minus_one_stmt_p): New.
12994 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
12996 PR middle-end/64946
12997 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
12998 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
12999 * dojump.c (do_jump): Likewise.
13000 * expr.c (expand_expr_real_2): Check operand type's sign.
13001 * fold-const.c (const_unop): Handle ABSU_EXPR.
13002 (fold_abs_const): Likewise.
13003 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
13004 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
13005 (strip_sign_op_1): Likesise.
13006 * match.pd: Add new pattern to generate ABSU_EXPR.
13007 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
13008 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13009 * tree-eh.c (operation_could_trap_helper_p): Likewise.
13010 * tree-inline.c (estimate_operator_cost): Likewise.
13011 * tree-pretty-print.c (dump_generic_node): Likewise.
13012 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
13013 * tree.def (ABSU_EXPR): New.
13015 2018-06-16 Jakub Jelinek <jakub@redhat.com>
13017 PR middle-end/86095
13018 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
13019 documented as preserved for backward compatibility only.
13020 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
13022 PR rtl-optimization/86108
13023 * bb-reorder.c (create_forwarder_block): Renamed to ...
13024 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
13025 jump from new landing pad to the second part.
13026 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
13029 2018-06-15 Jakub Jelinek <jakub@redhat.com>
13031 PR middle-end/85878
13032 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
13033 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
13034 Only call store_expr for halves if the mode is the same.
13036 PR middle-end/86123
13037 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
13038 Fix up comment formatting.
13040 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
13042 * typed-splay-tree.h (typed_splay_tree::remove): New function.
13043 (typed_splay_tree::closure,
13044 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
13045 (typed_splay_tree::typed_splay_tree,
13046 typed_splay_tree::operator =): Declared private.
13047 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
13048 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
13049 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
13050 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
13051 typed_splay_tree::splay_tree_splay,
13052 typed_splay_tree::splay_tree_foreach_helper,
13053 typed_splay_tree::splay_tree_insert,
13054 typed_splay_tree::splay_tree_remove,
13055 typed_splay_tree::splay_tree_lookup,
13056 typed_splay_tree::splay_tree_predecessor,
13057 typed_splay_tree::splay_tree_successor,
13058 typed_splay_tree::splay_tree_min,
13059 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
13060 (typed_splay_tree::root, typed_splay_tree::comp,
13061 typed_splay_tree::delete_key,
13062 typed_splay_tree::delete_value): New data members.
13063 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
13064 typed_splay_tree::remove.
13066 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
13068 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
13069 -mginv and -mno-ginv to the assembler.
13070 * config/mips/mips.opt (-mcrc): New option.
13071 (-mginv): Likewise.
13072 * doc/invoke.text (-mcrc): Document.
13073 (-mginv): Likewise.
13075 2018-06-15 Nick Clifton <nickc@redhat.com>
13078 * tree.c (escaped_string): New class. Converts an unescaped
13079 string into its escaped equivalent.
13080 (warn_deprecated_use): Use the new class to convert the
13081 deprecation message, if present.
13082 (test_escaped_strings): New self test.
13083 (test_c_tests): Add test_escaped_strings.
13084 * doc/extend.texi (deprecated): Add a note that the
13085 deprecation message is affected by the -fmessage-length
13086 option, and that control characters will be escaped.
13087 (#pragma GCC error): Document this pragma.
13088 (#pragma GCC warning): Likewise.
13089 * doc/invoke.texi (-fmessage-length): Document this option's
13090 effect on the #warning and #error preprocessor directives and
13091 the deprecated attribute.
13093 2018-06-15 Richard Biener <rguenther@suse.de>
13095 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
13096 here, also noting vector size used.
13097 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
13098 size used in MSG_OPTIMIZED_LOCATIONS dump.
13099 (pass_slp_vectorize::execute): Adjust.
13101 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
13104 * config/arc/arc.c (arc_return_address_register): Fix
13107 2018-06-15 Richard Biener <rguenther@suse.de>
13109 PR middle-end/86159
13110 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
13111 leave useless conversion stripping to force_gimple_operand_gsi.
13112 (gimplify_build2): Likewise.
13113 (gimplify_build1): Likewise.
13115 2018-06-15 Richard Biener <rguenther@suse.de>
13117 PR middle-end/86076
13118 * tree-cfg.c (move_stmt_op): unshare invariant addresses
13119 before adjusting their block.
13121 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
13123 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
13124 multilibs for *-*-rtems*.
13125 * config/riscv/t-rtems: New file.
13127 2018-06-14 Jakub Jelinek <jakub@redhat.com>
13129 PR middle-end/86122
13130 * match.pd ((A +- CST1) +- CST2): Punt if last resort
13131 unsigned_type_for returns NULL.
13134 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
13135 subregs of multi-word pseudos unless the float mode has word size.
13137 2018-06-14 Richard Biener <rguenther@suse.de>
13139 PR middle-end/86139
13140 * tree-vect-generic.c (build_word_mode_vector_type): Remove
13141 duplicate and harmful type_hash_canon.
13142 * tree.c (type_hash_canon): Assert we didn't find ourselves.
13144 2018-06-14 Richard Biener <rguenther@suse.de>
13147 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
13150 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
13152 * config/rtems.h (STDINT_LONG32): Define.
13154 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
13155 Prachi Godbole <prachi.godbole@imgtec.com>
13157 * config/mips/mips-cpus.def: Define P6600.
13158 * config/mips/mips-tables.opt: Regenerate.
13159 * config/mips/mips.c (mips_ucbranch_type): New enum.
13160 (mips_rtx_cost_data): Add support for P6600.
13161 (mips_issue_rate): Likewise.
13162 (mips_multipass_dfa_lookahead): Likewise.
13163 (mips_avoid_hazard): Likewise.
13164 (mips_reorg_process_insns): Likewise.
13165 (mips_classify_branch_p6600): New function.
13166 * config/mips/mips.h (TUNE_P6600): New define.
13167 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
13168 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
13169 * config/mips/mips.md: Include p6600.md.
13170 (processor): Add p6600.
13171 * config/mips/p6600.md: New file.
13172 * doc/invoke.texi: Add p6600 to supported architectures.
13174 2018-06-13 Martin Sebor <msebor@redhat.com>
13176 PR tree-optimization/86114
13177 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
13179 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
13181 2018-06-13 Richard Biener <rguenther@suse.de>
13183 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
13184 Properly set vector type of the intermediate stmt.
13185 * tree-vect-stmts.c (vectorizable_operation): The destination
13186 var always has vectype_out type.
13188 2018-06-13 Jeff Law <law@redhat.com>
13190 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
13191 integer 0 for argument to print_rtl_with_bb.
13192 (rl78_reorg): Likewise.
13194 2018-06-13 David Malcolm <dmalcolm@redhat.com>
13196 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
13197 from rtx to rtx_insn *.
13198 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
13200 (add_sched_insns_for_speculation): Likewise for local "target",
13201 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13202 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
13203 from rtx_insn ** to rtx_code_label **.
13204 (reorg_emit_nops): Likewise.
13205 (c6x_reorg): Likewise for local "call_labels".
13206 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
13208 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
13209 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
13210 the loops over LABEL_REFS.
13211 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
13213 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13214 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
13215 (split_branches): Strengthen local "olabel" from rtx to
13216 rtx_insn *, adding a safe_as_a cast.
13217 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
13219 (add_insn_after): Likewise for first two params.
13220 (add_insn_before): Likewise.
13221 (remove_insn): Likewise for param.
13222 (emit_pattern_before_noloc): Likewise for second and third params.
13223 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
13224 (emit_call_insn_before_noloc): Likewise.
13225 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
13227 (emit_barrier_before): Likewise.
13228 (emit_label_before): Strengthen "label" param from "rtx" to
13229 "rtx_code_label *". Strengthen "before" param from "rtx" to
13231 (emit_insn_after_1): Strengthen "after" param from "rtx" to
13233 (emit_pattern_after_noloc): Likewise.
13234 (emit_insn_after_noloc): Likewise.
13235 (emit_jump_insn_after_noloc): Likewise.
13236 (emit_call_insn_after_noloc): Likewise.
13237 (emit_debug_insn_after_noloc): Likewise.
13238 (emit_barrier_after): Likewise.
13239 (emit_label_after): Likewise for both params.
13240 (emit_pattern_after_setloc): Likewise for "after" param. Convert
13241 "loc" param from "int" to "location_t".
13242 (emit_insn_after_setloc): Likewise.
13243 (emit_jump_insn_after_setloc): Likewise.
13244 (emit_call_insn_after_setloc): Likewise.
13245 (emit_debug_insn_after_setloc): Likewise.
13246 (emit_pattern_before_setloc): Likewise for "before" param. Convert
13247 "loc" param from "int" to "location_t".
13248 (emit_pattern_before): Convert NULL_RTX to NULL.
13249 (emit_insn_before_setloc): Convert "loc" param from "int" to
13251 (emit_jump_insn_before_setloc): Likewise.
13252 (emit_call_insn_before_setloc): Likewise.
13253 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
13254 rtx_insn *. Convert "loc" param from "int" to "location_t".
13255 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13256 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13257 Convert 3rd param from "int" to "location_t".
13258 (emit_barrier_before, emit_barrier_after, next_real_insn):
13259 Strengthen param from rtx to rtx_insn *.
13260 (emit_label_before): Strengthen 1st param from "rtx" to
13261 "rtx_code_label *". Strengthen 2nd param from "rtx" to
13263 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13264 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13265 Strengthen 2nd param from "rtx" to "rtx_insn *".
13266 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13267 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13268 Likewise. Convert 3rd param from "int" to "location_t".
13269 (emit_label_after): Strengthen 1st param from "rtx" to
13270 "rtx_code_label *".
13271 (next_real_insn, remove_insn): Strengthen param from "rtx" to
13273 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13274 from "rtx" to "rtx_insn *".
13276 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
13278 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13279 bodies streamed in with -Q.
13280 * dumpfile.c (dump_files): Add lto-stream-out dump file.
13281 * dumpfile.h (tree_dump_index): Add lto_stream_out.
13282 * gimple-streamer-out.c: Include gimple-pretty-print.h
13283 (output_bb): Dump stmts streamed.
13284 * lto-section-out.c: Include print-tree.h
13285 (lto_begin_section): Dump sections created.
13286 (lto_output_decl_index): Dump decl encoded.
13287 * lto-streamer-out.c: Include print-tree.h
13288 (create_output_block): Dump output block created.
13289 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13290 (output_function): Dump function output.
13291 (output_constructor): Dump constructor streamed.
13292 (write_global_stream): Output indexes encoded.
13293 (produce_asm_for_decls): Dump streams encoded.
13294 * lto-streamer.c (streamer_dump_file): New global var.
13295 * lto-streamer.h (streamer_dump_file): Declare.
13296 * passes.c (ipa_write_summaries): Initialize streamer dump.
13297 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13300 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
13303 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13304 offsets for register save directives. Emit a second batch of save
13305 directives, if need be, when the function accesses prior frames.
13307 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13309 * config/arc/fpu.md (fmasf4): Force operand to register.
13310 (fnmasf4): Likewise.
13312 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13314 * config/arc/arc-protos.h (arc_pad_return): Remove.
13315 * config/arc/arc.c (machine_function): Remove force_short_suffix
13317 (arc_print_operand): Adjust printing of '&'.
13318 (arc_verify_short): Remove conditional printing of short suffix.
13319 (arc_final_prescan_insn): Remove reference to size_reason.
13320 (pad_return): New function.
13321 (arc_reorg): Call pad_return.
13322 (arc_pad_return): Remove.
13323 (arc_init_machine_status): Remove reference to force_short_suffix.
13324 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13325 (attr length): When attribute iscompact is true force to 2
13326 regardless; in the case of maybe check if we want to force the
13327 instruction to have 4 bytes length.
13328 (nopv): Change it to generate 4 byte long nop as well.
13329 (blockage): New pattern.
13330 (simple_return): Remove call to arc_pad_return.
13331 (p_return_i): Likewise.
13333 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13335 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13337 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13339 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13342 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13344 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13345 for ARC700 and ARCv2.
13347 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
13350 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13351 operands[2] instead of operands[1].
13354 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13356 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13357 case, check whether the outer register overlaps an unallocatable
13358 register, not just whether it fits the required class.
13360 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13362 * poly-int.h (can_div_trunc_p): Add new overload in which all values
13364 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13365 (memrefs_conflict_p): Likewise.
13366 (init_alias_analysis): Likewise.
13367 * cfgexpand.c (expand_debug_expr): Likewise.
13368 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13369 * cse.c (fold_rtx): Likewise.
13370 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13371 * expr.c (emit_block_move_hints): Likewise.
13372 (clear_storage_hints, push_block, emit_push_insn): Likewise.
13373 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13374 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13375 (emit_group_store): Likewise.
13376 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
13377 to read the PRE/POST_MODIFY increment.
13378 * calls.c (store_one_arg): Use strip_offset.
13379 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
13381 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
13383 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
13384 (simplify_binary_operation_1): Extend CONST_INT handling to
13386 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
13387 than a HOST_WIDE_INT.
13388 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
13390 (adjust_mems, add_stores): Update accodingly.
13391 (vt_canonicalize_addr): Track polynomial offsets.
13392 (emit_note_insn_var_location): Likewise.
13393 (vt_add_function_parameter): Likewise.
13394 (vt_initialize): Likewise.
13396 2018-06-12 Jeff Law <law@redhat.com>
13398 * config.gcc (alpha*-*-freebsd*): Remove.
13399 * config/alpha/freebsd.h: Remove.
13401 2018-06-12 David Malcolm <dmalcolm@redhat.com>
13404 * spellcheck-tree.c (levenshtein_distance): Rename to...
13405 (get_edit_distance): ...this, and update for underlying renaming.
13406 * spellcheck-tree.h (levenshtein_distance): Rename to...
13407 (get_edit_distance): ...this.
13408 * spellcheck.c (levenshtein_distance): Rename to...
13409 (get_edit_distance): ...this. Convert from Levenshtein distance
13410 to Damerau-Levenshtein distance by supporting transpositions of
13411 adjacent characters. Rename "v1" to "v_next" and "v0" to
13413 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
13414 (selftest::test_edit_distance_unit_test_oneway): ...this, and
13415 update for underlying renaming.
13416 (selftest::levenshtein_distance_unit_test): Rename to...
13417 (selftest::test_get_edit_distance_unit): ...this, and update for
13418 underlying renaming.
13419 (selftest::test_find_closest_string): Add example from PR 69968
13420 where transposition helps
13421 (selftest::test_metric_conditions): Update for renaming.
13422 (selftest::test_metric_conditions): Likewise.
13423 (selftest::spellcheck_c_tests): Likewise.
13424 * spellcheck.h (levenshtein_distance): Rename both overloads to...
13425 (get_edit_distance): ...this.
13426 (best_match::consider): Update for renaming.
13428 2018-06-12 Martin Sebor <msebor@redhat.com>
13430 PR tree-optimization/85259
13431 * builtins.c (compute_objsize): Handle constant offsets.
13432 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
13433 true iff a warning has been issued.
13434 * gimple.h (gimple_nonartificial_location): New function.
13435 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
13436 gimple_nonartificial_location and handle -Wno-system-headers.
13437 (handle_builtin_stxncpy): Same.
13439 2018-06-12 Martin Sebor <msebor@redhat.com>
13442 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
13444 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
13446 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
13447 BUILTIN_VEC_XST entries for pointer to double and long long.
13449 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
13452 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13454 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13457 2018-06-12 Martin Liska <mliska@suse.cz>
13459 * doc/options.texi: Document IntegerRange.
13461 2018-06-12 Martin Liska <mliska@suse.cz>
13463 * config/i386/i386.opt: Make MPX-related options as Deprecated.
13464 * opt-functions.awk: Handle Deprecated flag.
13465 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
13467 (read_cmdline_option): Report warning for a deprecated option.
13468 * opts.h (struct cl_option): Add new field cl_deprecated.
13469 (CL_ERR_DEPRECATED): New.
13471 2018-06-12 Martin Liska <mliska@suse.cz>
13473 * doc/options.texi: Document Deprecated option flag.
13475 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13477 * config/arc/arc-arch.h (arc_extras): New enum.
13478 (arc_cpu_t):Add field extra.
13479 (arc_cpu_types): Consider the extras.
13480 * config/arc/arc-cpus.def: Add extras info.
13481 * config/arc/arc-opts.h (processor_type): Consider extra field.
13482 * config/arc/arc.c (arc_override_options): Handle extra field.
13484 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13486 * config/arc/arc-arch.h: Update ARC_OPTX macro.
13487 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
13489 * config/arc/arc.c (arc_init): Update pic warning.
13490 (irq_range): Update irq range parsing warnings.
13491 (arc_override_options): Update various warning messages.
13492 (arc_handle_aux_attribute): Likewise.
13494 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
13496 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
13498 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13500 * doc/sourcebuild.texi: Document usage of line number 0 in verify
13501 compiler messages directives.
13503 2018-06-12 Matthew Fortune <mfortune@gmail.com>
13505 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
13506 * config/mips/mips-tables.opt: Regenerate.
13507 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
13509 * doc/invoke.texi: Document -march=i6500.
13511 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
13513 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
13514 (i6400_gpmul): Add cpu_unit.
13515 (i6400_gpdiv): Likewise.
13516 (i6400_msa_add_d): Update reservations.
13517 (i6400_msa_int_add) Likewise.
13518 (i6400_msa_short_logic3) Likewise.
13519 (i6400_msa_short_logic2) Likewise.
13520 (i6400_msa_short_logic) Likewise.
13521 (i6400_msa_move) Likewise.
13522 (i6400_msa_cmp) Likewise.
13523 (i6400_msa_short_float2) Likewise.
13524 (i6400_msa_div_d) Likewise.
13525 (i6400_msa_long_logic1) Likewise.
13526 (i6400_msa_long_logic2) Likewise.
13527 (i6400_msa_mult) Likewise.
13528 (i6400_msa_long_float2) Likewise.
13529 (i6400_msa_long_float4) Likewise.
13530 (i6400_msa_long_float5) Likewise.
13531 (i6400_msa_long_float8) Likewise.
13532 (i6400_fpu_fadd): Include frint type.
13533 (i6400_fpu_store): New define_insn_reservation.
13534 (i6400_fpu_load): Likewise.
13535 (i6400_fpu_move): Likewise.
13536 (i6400_fpu_fcmp): Likewise.
13537 (i6400_fpu_fmadd): Likewise.
13538 (i6400_int_mult): Include imul3nc type and update reservation.
13539 (i6400_int_div): Include idiv3 type and update reservation.
13540 (i6400_int_load): Update to check type not move_type.
13541 (i6400_int_store): Likewise.
13542 (i6400_int_prefetch): Set zero latency.
13544 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
13546 * gcc.c: Document new %@{...} sequence.
13547 (LINK_COMMAND_SPEC): Use it for the -L switches.
13548 (cpp_unique_options): Use it for the -I switches.
13549 (at_file_argbuf): New global variable.
13550 (in_at_file): Likewise.
13551 (alloc_args): Create at_file_argbuf.
13552 (clear_args): Truncate at_file_argbuf.
13553 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
13554 (open_at_file): New function.
13555 (close_at_file): Likewise.
13556 (create_at_file): Delete.
13557 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
13560 (validate_switches_from_spec): Deal with %@{...} sequence.
13561 (validate_switches): Likewise.
13562 (driver::finalize): Call clear_args.
13564 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
13566 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
13568 2018-06-11 Martin Sebor <msebor@redhat.com>
13570 * doc/invoke.texi (-Wall): List -Wc++17-compat.
13571 (Wno-class-memaccess): Add @opindex.
13572 (Wno-templates, Wno-multiple-inheritance): Same.
13573 (Wno-virtual-inheritance, Wno-namespaces): Same.
13574 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
13575 (Wno-format-overflow, Wno-format-truncation): Same.
13576 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
13577 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
13578 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
13579 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
13580 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
13581 (Wno-misspelled-isr): Same.
13583 2018-06-11 Martin Sebor <msebor@redhat.com>
13585 * PR tree-optimization/86083
13586 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
13588 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
13590 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
13592 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
13595 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
13596 on the correct operand.
13597 (*movdi_internal64): Ditto.
13599 2018-06-11 Martin Liska <mliska@suse.cz>
13601 PR tree-optimization/86089
13602 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
13604 2018-06-11 Julia Koval <julia.koval@intel.com>
13606 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
13607 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
13608 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
13610 2018-06-11 Olivier Hainque <hainque@adacore.com>
13612 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
13613 for Ada with strict dwarf2.
13615 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
13618 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
13621 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
13623 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
13625 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
13627 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
13630 2018-06-08 Martin Liska <mliska@suse.cz>
13632 * tree-cfg.h (debug_function): Fix argument type to match
13635 2018-06-08 Martin Liska <mliska@suse.cz>
13637 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
13638 Remove usage of MPX-related (and removed) fields.
13639 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
13641 2018-06-08 David Malcolm <dmalcolm@redhat.com>
13643 * cfg.c (debug): Use TDF_NONE rather than 0.
13644 * cfghooks.c (debug): Likewise.
13645 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
13646 (struct dump_option_value_info): Convert to...
13647 (struct kv_pair): ...this template type.
13648 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
13650 (optinfo_verbosity_options): Likewise.
13651 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
13653 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
13654 than int for "optgroup_flags" param.
13655 (dump_generic_expr_loc): Use dump_flags_t rather than int for
13657 (dump_dec): Likewise.
13658 (dump_finish): Use TDF_NONE rather than 0.
13659 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
13660 rather than int for "optgroup_flags" param. Use TDF_NONE rather
13661 than 0. Update for change to option_ptr.
13662 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
13663 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
13664 0. Update for changes to optinfo_verbosity_options and
13666 (opt_info_switch_p): Convert optgroup_flags from int to
13668 (dump_basic_block): Use dump_flags_t rather than int
13669 for "dump_kind" param.
13670 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
13671 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
13672 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
13673 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
13674 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
13675 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
13676 TDF_NONE): Convert from macros to...
13677 (enum dump_flag): ...this new enum.
13678 (dump_flags_t): Update to use enum.
13679 (operator|, operator&, operator~, operator|=, operator&=):
13680 Implement for dump_flags_t.
13681 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
13682 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
13683 Convert from macros to...
13684 (enum optgroup_flag): ...this new enum.
13685 (optgroup_flags_t): New typedef.
13686 (operator|, operator|=): Implement for optgroup_flags_t.
13687 (struct dump_file_info): Convert field "alt_flags" to
13688 dump_flags_t. Convert field "optgroup_flags" to
13690 (dump_basic_block): Use dump_flags_t rather than int for param.
13691 (dump_generic_expr_loc): Likewise.
13692 (dump_dec): Likewise.
13693 (dump_register): Convert param "optgroup_flags" to
13695 (opt_info_enable_passes): Likewise.
13696 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
13698 * gimple-pretty-print.c (debug): Likewise.
13699 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
13700 (merged_store_group::apply_stores): Likewise.
13701 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
13702 * gimple.c (verify_gimple_pp): Likewise.
13703 * graphite-poly.c (print_pbb_body): Likewise.
13704 * passes.c (pass_manager::register_one_dump_file): Convert
13705 local "optgroup_flags" to optgroup_flags_t.
13706 * print-tree.c (print_node): Use TDF_NONE rather than 0.
13708 (debug_body): Likewise.
13709 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
13710 to optgroup_flags_t.
13711 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
13713 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
13714 (convert_mult_to_fma): Likewise.
13715 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
13716 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
13717 * tree-vect-data-refs.c (dump_lower_bound): Convert param
13718 "dump_kind" to dump_flags_t.
13720 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13722 * config/rs6000/rs6000.c (min, max): Delete.
13724 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13726 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
13727 -mabi=spe and -mabi=no-spe.
13729 2018-06-08 Martin Liska <mliska@suse.cz>
13731 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
13732 where we expect an existing summary.
13734 2018-06-08 Martin Liska <mliska@suse.cz>
13736 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
13737 * ipa-inline.h (estimate_edge_growth): Likewise.
13739 2018-06-08 Martin Liska <mliska@suse.cz>
13741 * cgraph.c (function_version_hasher::hash): Use
13742 cgraph_node::get_uid ().
13743 (function_version_hasher::equal):
13744 * cgraph.h (cgraph_node::get_uid): New method.
13745 * ipa-inline.c (update_caller_keys): Use
13746 cgraph_node::get_uid ().
13747 (update_callee_keys): Likewise.
13748 * ipa-utils.c (searchc): Likewise.
13749 (ipa_reduced_postorder): Likewise.
13750 * lto-cgraph.c (input_node): Likewise.
13751 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
13752 * symbol-summary.h (symtab_insertion): Likewise.
13753 (symtab_removal): Likewise.
13754 (symtab_duplication): Likewise.
13755 * tree-pretty-print.c (dump_function_header): Likewise.
13756 * tree-sra.c (convert_callers_for_node): Likewise.
13758 2018-06-08 Martin Liska <mliska@suse.cz>
13760 * cgraph.c (symbol_table::create_edge): Always assign a new
13762 (symbol_table::free_edge): Do not recycle numbers.
13763 * cgraph.h (cgraph_edge::get): New method.
13764 * symbol-summary.h (symtab_removal): Use it.
13765 (symtab_duplication): Likewise.
13766 (call_summary::hashable_uid): Remove.
13768 2018-06-08 Martin Liska <mliska@suse.cz>
13770 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
13771 (initialize_growth_caches): Remove.
13772 (free_growth_caches): Likewise.
13773 (do_estimate_edge_time): Use edge_growth_cache.
13774 (do_estimate_edge_size): Likewise.
13775 (do_estimate_edge_hints): Likewise.
13776 * ipa-inline.c (reset_edge_caches): Likewise.
13777 (recursive_inlining): Likewise.
13778 (inline_small_functions): Likewise.
13779 * ipa-inline.h (initialize_growth_caches): Remove.
13780 (estimate_edge_size): Likewise.
13781 (estimate_edge_time): Likewise.
13782 (estimate_edge_hints): Likewise.
13783 (reset_edge_growth_cache): Likewise.
13784 * symbol-summary.h (call_summary::remove): New method.
13786 2018-06-08 Martin Liska <mliska@suse.cz>
13788 * ipa-cp.c (class edge_clone_summary): New summary.
13789 (grow_edge_clone_vectors): Remove.
13790 (ipcp_edge_duplication_hook): Remove.
13791 (class edge_clone_summary_t): New call_summary class.
13792 (ipcp_edge_removal_hook): Remove.
13793 (edge_clone_summary_t::duplicate): New function.
13794 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
13795 (create_specialized_node): Likewise.
13796 (ipcp_driver): Initialize edge_clone_summaries and do not
13799 2018-06-08 Martin Liska <mliska@suse.cz>
13801 * symbol-summary.h (get): New function.
13802 (call_summary::m_initialize_when_cloning): New class member.
13804 2018-06-08 Martin Liska <mliska@suse.cz>
13806 * cgraph.c (cgraph_node::remove): Do not recycle uid.
13807 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
13808 (symbol_table::allocate_cgraph_symbol): Do not set uid.
13809 * passes.c (uid_hash_t): Record removed_nodes by their uids.
13810 (remove_cgraph_node_from_order): Use the removed_nodes set.
13811 (do_per_function_toporder): Likwise.
13812 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
13813 instead of summary_uid.
13814 (symtab_removal): Likewise.
13815 (symtab_duplication): Likewise.
13817 2018-06-08 Martin Liska <mliska@suse.cz>
13819 * ipa-cp.c (ipcp_store_bits_results): Use
13820 ipcp_transformation_sum.
13821 (ipcp_store_vr_results): Likewise.
13822 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
13824 (ipcp_transformation_initialize): ... this.
13825 (ipa_set_node_agg_value_chain):
13826 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
13827 (write_ipcp_transformation_info): Likewise.
13828 (read_ipcp_transformation_info): Likewise.
13829 (ipcp_update_bits): Likewise.
13830 (ipcp_update_vr): Likewise.
13831 (ipcp_transform_function): Likewise.
13832 * ipa-prop.h: Rename ipcp_transformation_summary to
13833 ipcp_transformation.
13834 (class ipcp_transformation_t): New function summary.
13835 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
13836 (ipa_get_agg_replacements_for_node): Likewise.
13838 2018-06-08 Martin Liska <mliska@suse.cz>
13840 * ipa-pure-const.c (struct funct_state_d): Do it class instead
13842 (class funct_state_summary_t): New function_summary class.
13843 (has_function_state): Remove.
13844 (get_function_state): Likewise.
13845 (set_function_state): Likewise.
13846 (add_new_function): Likewise.
13847 (funct_state_summary_t::insert): New function.
13848 (duplicate_node_data): Remove.
13849 (remove_node_data): Remove.
13850 (funct_state_summary_t::duplicate): New function.
13851 (register_hooks): Create new funct_state_summaries.
13852 (pure_const_generate_summary): Use it.
13853 (pure_const_write_summary): Likewise.
13854 (pure_const_read_summary): Likewise.
13855 (propagate_pure_const): Likewise.
13856 (propagate_nothrow): Likewise.
13857 (dump_malloc_lattice): Likewise.
13858 (propagate_malloc): Likewise.
13859 (execute): Do not register hooks, just remove summary
13861 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
13864 2018-06-08 Martin Liska <mliska@suse.cz>
13866 * ipa-reference.c (remove_node_data): Remove.
13867 (duplicate_node_data): Likewise.
13868 (class ipa_ref_var_info_summary_t): New class.
13869 (class ipa_ref_opt_summary_t): Likewise.
13870 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
13871 (get_reference_optimization_summary): Use
13872 ipa_ref_opt_sum_summaries.
13873 (set_reference_vars_info): Remove.
13874 (set_reference_optimization_summary): Likewise.
13875 (ipa_init): Create summaries.
13876 (init_function_info): Use function summary.
13877 (ipa_ref_opt_summary_t::duplicate): New function.
13878 (ipa_ref_opt_summary_t::remove): New function.
13879 (get_read_write_all_from_node): Fix GNU coding style.
13880 (propagate): Use function summary.
13881 (write_node_summary_p): Fix GNU coding style.
13882 (stream_out_bitmap): Likewise.
13883 (ipa_reference_read_optimization_summary): Use function summary.
13884 (ipa_reference_c_finalize): Do not release hooks.
13886 2018-06-08 Martin Liska <mliska@suse.cz>
13888 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
13889 (analyze_function_body): Extract multiple calls of get_create.
13890 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13891 * ipa-inline.c (recursive_inlining): Use ::get method.
13892 * ipa-inline.h (estimate_edge_growth): Likewise.
13894 2018-06-08 Martin Liska <mliska@suse.cz>
13896 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
13898 (hsa_function_summary::hsa_function_summary): Use the new enum
13900 (hsa_gpu_implementation_p): Use hsa_summaries::get.
13901 * hsa-gen.c (hsa_get_host_function): Likewise.
13902 (get_brig_function_name): Likewise.
13903 * ipa-hsa.c (process_hsa_functions): Likewise.
13904 (ipa_hsa_write_summary): Likewise.
13905 * symbol-summary.h (symtab_duplication): Use ::get function/
13906 (get): New function.
13908 2018-06-08 Martin Liska <mliska@suse.cz>
13910 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
13912 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
13913 (hsa_register_kernel): Likewise.
13914 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
13915 * hsa-gen.c (hsa_get_host_function): Likewise.
13916 (get_brig_function_name): Likewise.
13917 (generate_hsa): Likewise.
13918 (pass_gen_hsail::execute): Likewise.
13919 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
13920 (devirtualization_time_bonus): Likewise.
13921 (ipcp_propagate_stage): Likewise.
13922 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13923 (edge_set_predicate): Likewise.
13924 (evaluate_conditions_for_known_args): Likewise.
13925 (evaluate_properties_for_edge): Likewise.
13926 (ipa_fn_summary::reset): Likewise.
13927 (ipa_fn_summary_t::duplicate): Likewise.
13928 (dump_ipa_call_summary): Likewise.
13929 (ipa_dump_fn_summary): Likewise.
13930 (analyze_function_body): Likewise.
13931 (compute_fn_summary): Likewise.
13932 (estimate_edge_devirt_benefit): Likewise.
13933 (estimate_edge_size_and_time): Likewise.
13934 (estimate_calls_size_and_time): Likewise.
13935 (estimate_node_size_and_time): Likewise.
13936 (inline_update_callee_summaries): Likewise.
13937 (remap_edge_change_prob): Likewise.
13938 (remap_edge_summaries): Likewise.
13939 (ipa_merge_fn_summary_after_inlining): Likewise.
13940 (ipa_update_overall_fn_summary): Likewise.
13941 (read_ipa_call_summary): Likewise.
13942 (inline_read_section): Likewise.
13943 (write_ipa_call_summary): Likewise.
13944 (ipa_fn_summary_write): Likewise.
13945 (ipa_free_fn_summary): Likewise.
13946 * ipa-hsa.c (process_hsa_functions): Likewise.
13947 (ipa_hsa_write_summary): Likewise.
13948 (ipa_hsa_read_section): Likewise.
13949 * ipa-icf.c (sem_function::merge): Likewise.
13950 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13951 (do_estimate_edge_time): Likewise.
13952 (estimate_size_after_inlining): Likewise.
13953 (estimate_growth): Likewise.
13954 (growth_likely_positive): Likewise.
13955 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13956 (inline_call): Likewise.
13957 * ipa-inline.c (caller_growth_limits): Likewise.
13958 (can_inline_edge_p): Likewise.
13959 (can_inline_edge_by_limits_p): Likewise.
13960 (compute_uninlined_call_time): Likewise.
13961 (compute_inlined_call_time): Likewise.
13962 (want_inline_small_function_p): Likewise.
13963 (edge_badness): Likewise.
13964 (update_caller_keys): Likewise.
13965 (update_callee_keys): Likewise.
13966 (recursive_inlining): Likewise.
13967 (inline_small_functions): Likewise.
13968 (inline_to_all_callers_1): Likewise.
13969 (dump_overall_stats): Likewise.
13970 (early_inline_small_functions): Likewise.
13971 (early_inliner): Likewise.
13972 * ipa-inline.h (estimate_edge_growth): Likewise.
13973 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13974 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13975 * ipa-prop.h (IPA_NODE_REF): Likewise.
13976 (IPA_EDGE_REF): Likewise.
13977 * ipa-pure-const.c (malloc_candidate_p): Likewise.
13978 (propagate_malloc): Likewise.
13979 * ipa-split.c (execute_split_functions): Likewise.
13980 * symbol-summary.h: Rename get to get_create.
13982 (get_create): Likewise.
13983 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13985 2018-06-08 Martin Liska <mliska@suse.cz>
13987 * symbol-summary.h (release): Move definition out of class
13989 (symtab_removal): Likewise.
13990 (symtab_duplication): Likewise.
13992 2018-06-08 Martin Liska <mliska@suse.cz>
13994 * symbol-summary.h (function_summary): Move constructor
13995 implementation out of class declaration.
13996 (release): Likewise.
13997 (symtab_insertion): Likewise.
13998 (symtab_removal): Likewise.
13999 (symtab_duplication): Likewise.
14002 2018-06-08 Martin Liska <mliska@suse.cz>
14004 * Makefile.in: Remove support for MPX (macros, related functions,
14005 fields in cgraph_node, ...).
14006 * builtin-types.def (BT_BND): Likewise.
14007 (BT_FN_BND_CONST_PTR): Likewise.
14008 (BT_FN_CONST_PTR_BND): Likewise.
14009 (BT_FN_VOID_PTR_BND): Likewise.
14010 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
14011 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
14012 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
14013 (expand_builtin_mempcpy_with_bounds): Likewise.
14014 (expand_builtin_memset_with_bounds): Likewise.
14015 (expand_builtin_memset_args): Likewise.
14016 (std_expand_builtin_va_start): Likewise.
14017 (expand_builtin): Likewise.
14018 (expand_builtin_with_bounds): Likewise.
14019 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
14020 (DEF_LIB_BUILTIN_CHKP): Likewise.
14021 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
14022 (DEF_CHKP_BUILTIN): Likewise.
14023 (BUILT_IN_MEMCPY): Likewise.
14024 (BUILT_IN_MEMMOVE): Likewise.
14025 (BUILT_IN_MEMPCPY): Likewise.
14026 (BUILT_IN_MEMSET): Likewise.
14027 (BUILT_IN_STPCPY): Likewise.
14028 (BUILT_IN_STRCAT): Likewise.
14029 (BUILT_IN_STRCHR): Likewise.
14030 (BUILT_IN_STRCPY): Likewise.
14031 (BUILT_IN_STRLEN): Likewise.
14032 (BUILT_IN_MEMCPY_CHK): Likewise.
14033 (BUILT_IN_MEMMOVE_CHK): Likewise.
14034 (BUILT_IN_MEMPCPY_CHK): Likewise.
14035 (BUILT_IN_MEMSET_CHK): Likewise.
14036 (BUILT_IN_STPCPY_CHK): Likewise.
14037 (BUILT_IN_STRCAT_CHK): Likewise.
14038 (BUILT_IN_STRCPY_CHK): Likewise.
14039 * calls.c (store_bounds): Likewise.
14040 (emit_call_1): Likewise.
14041 (special_function_p): Likewise.
14042 (maybe_warn_nonstring_arg): Likewise.
14043 (initialize_argument_information): Likewise.
14044 (finalize_must_preallocate): Likewise.
14045 (compute_argument_addresses): Likewise.
14046 (expand_call): Likewise.
14047 * cfgexpand.c (expand_call_stmt): Likewise.
14048 (expand_return): Likewise.
14049 (expand_gimple_stmt_1): Likewise.
14050 (pass_expand::execute): Likewise.
14051 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
14052 (cgraph_node::remove): Likewise.
14053 (cgraph_node::dump): Likewise.
14054 (cgraph_node::verify_node): Likewise.
14055 * cgraph.h (chkp_function_instrumented_p): Likewise.
14056 (symtab_node::get_alias_target): Likewise.
14057 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
14058 (cgraph_local_p): Likewise.
14059 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
14060 (cgraph_edge::rebuild_references): Likewise.
14061 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
14062 (walk_polymorphic_call_targets): Likewise.
14063 (cgraph_node::expand_thunk): Likewise.
14064 (symbol_table::output_weakrefs): Likewise.
14065 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
14066 (ix86_handle_option): Likewise.
14067 * config/i386/constraints.md: Likewise.
14068 * config/i386/i386-builtin-types.def (BND): Likewise.
14072 * config/i386/i386-builtin.def (BDESC_END): Likewise.
14073 (BDESC_FIRST): Likewise.
14075 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
14076 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
14077 * config/i386/i386.c (enum reg_class): Likewise.
14078 (ix86_target_string): Likewise.
14079 (ix86_option_override_internal): Likewise.
14080 (ix86_conditional_register_usage): Likewise.
14081 (ix86_valid_target_attribute_inner_p): Likewise.
14082 (ix86_set_indirect_branch_type): Likewise.
14083 (ix86_set_current_function): Likewise.
14084 (ix86_function_arg_regno_p): Likewise.
14085 (init_cumulative_args): Likewise.
14086 (ix86_function_arg_advance): Likewise.
14087 (ix86_function_arg): Likewise.
14088 (ix86_pass_by_reference): Likewise.
14089 (ix86_function_value_regno_p): Likewise.
14090 (ix86_function_value_1): Likewise.
14091 (ix86_function_value_bounds): Likewise.
14092 (ix86_return_in_memory): Likewise.
14093 (ix86_setup_incoming_vararg_bounds): Likewise.
14094 (ix86_va_start): Likewise.
14095 (indirect_thunk_need_prefix): Likewise.
14096 (print_reg): Likewise.
14097 (ix86_print_operand): Likewise.
14098 (ix86_expand_call): Likewise.
14099 (ix86_output_function_return): Likewise.
14100 (reg_encoded_number): Likewise.
14101 (BDESC_VERIFYS): Likewise.
14102 (ix86_init_mpx_builtins): Likewise.
14103 (ix86_init_builtins): Likewise.
14104 (ix86_emit_cmove): Likewise.
14105 (ix86_emit_move_max): Likewise.
14106 (ix86_expand_builtin): Likewise.
14107 (ix86_builtin_mpx_function): Likewise.
14108 (ix86_get_arg_address_for_bt): Likewise.
14109 (ix86_load_bounds): Likewise.
14110 (ix86_store_bounds): Likewise.
14111 (ix86_load_returned_bounds): Likewise.
14112 (ix86_store_returned_bounds): Likewise.
14113 (ix86_class_likely_spilled_p): Likewise.
14114 (ix86_hard_regno_mode_ok): Likewise.
14115 (x86_order_regs_for_local_alloc): Likewise.
14116 (ix86_mitigate_rop): Likewise.
14117 (ix86_bnd_prefixed_insn_p): Likewise.
14118 (ix86_mpx_bound_mode): Likewise.
14119 (ix86_make_bounds_constant): Likewise.
14120 (ix86_initialize_bounds): Likewise.
14121 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
14122 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
14123 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
14124 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
14125 (TARGET_CHKP_BOUND_MODE): Likewise.
14126 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
14127 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
14128 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
14129 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
14130 * config/i386/i386.h (TARGET_MPX): Likewise.
14131 (TARGET_MPX_P): Likewise.
14132 (VALID_BND_REG_MODE): Likewise.
14133 (FIRST_BND_REG): Likewise.
14134 (LAST_BND_REG): Likewise.
14135 (enum reg_class): Likewise.
14136 (BND_REG_P): Likewise.
14137 (BND_REGNO_P): Likewise.
14138 (BNDmode): Likewise.
14139 (ADJUST_INSN_LENGTH): Likewise.
14140 * config/i386/i386.md: Likewise.
14141 * config/i386/i386.opt: Likewise.
14142 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
14143 (defined): Likewise.
14144 (LINK_MPX): Likewise.
14145 (MPX_SPEC): Likewise.
14146 (LIBMPX_SPEC): Likewise.
14147 (LIBMPXWRAPPERS_SPEC): Likewise.
14148 (CHKP_SPEC): Likewise.
14149 * config/i386/predicates.md: Likewise.
14150 * dbxout.c (dbxout_type): Likewise.
14151 * doc/extend.texi: Likewise.
14152 * doc/invoke.texi: Likewise.
14153 * doc/md.texi: Likewise.
14154 * doc/tm.texi: Likewise.
14155 * doc/tm.texi.in: Likewise.
14156 * dwarf2out.c (is_base_type): Likewise.
14157 (gen_formal_types_die): Likewise.
14158 (gen_subprogram_die): Likewise.
14159 (gen_type_die_with_usage): Likewise.
14160 (gen_decl_die): Likewise.
14161 (dwarf2out_late_global_decl): Likewise.
14162 * expr.c (expand_assignment): Likewise.
14163 (emit_storent_insn): Likewise.
14164 (store_expr_with_bounds): Likewise.
14165 (store_expr): Likewise.
14166 (expand_expr_real_1): Likewise.
14167 * expr.h (store_expr_with_bounds): Likewise.
14168 * function.c (use_register_for_decl): Likewise.
14169 (struct bounds_parm_data): Likewise.
14170 (assign_parms_augmented_arg_list): Likewise.
14171 (assign_parm_find_entry_rtl): Likewise.
14172 (assign_parm_is_stack_parm): Likewise.
14173 (assign_parm_load_bounds): Likewise.
14174 (assign_bounds): Likewise.
14175 (assign_parms): Likewise.
14176 (expand_function_start): Likewise.
14177 * gcc.c (CHKP_SPEC): Likewise.
14178 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
14179 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
14180 (wrestrict_dom_walker::check_call): Likewise.
14181 * gimple.c (gimple_build_call_from_tree): Likewise.
14182 * gimple.h (enum gf_mask): Likewise.
14183 (gimple_call_with_bounds_p): Likewise.
14184 (gimple_call_set_with_bounds): Likewise.
14185 * gimplify.c (gimplify_init_constructor): Likewise.
14186 * ipa-cp.c (initialize_node_lattices): Likewise.
14187 (propagate_constants_across_call): Likewise.
14188 (find_more_scalar_values_for_callers_subset): Likewise.
14189 * ipa-hsa.c (process_hsa_functions): Likewise.
14190 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
14191 * ipa-icf.c (sem_function::merge): Likewise.
14192 * ipa-inline.c (early_inliner): Likewise.
14193 * ipa-pure-const.c (warn_function_noreturn): Likewise.
14194 (warn_function_cold): Likewise.
14195 (propagate_pure_const): Likewise.
14196 * ipa-ref.h (enum GTY): Likewise.
14197 * ipa-split.c (find_retbnd): Likewise.
14198 (consider_split): Likewise.
14199 (split_function): Likewise.
14200 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
14201 * ipa.c (walk_polymorphic_call_targets): Likewise.
14202 (symbol_table::remove_unreachable_nodes): Likewise.
14203 (process_references): Likewise.
14204 (cgraph_build_static_cdtor_1): Likewise.
14205 * lto-cgraph.c (lto_output_node): Likewise.
14206 (output_refs): Likewise.
14207 (compute_ltrans_boundary): Likewise.
14208 (input_overwrite_node): Likewise.
14209 (input_node): Likewise.
14210 (input_cgraph_1): Likewise.
14211 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
14212 * passes.c (pass_manager::execute_early_local_passes): Likewise.
14213 (class pass_chkp_instrumentation_passes): Likewise.
14214 (make_pass_chkp_instrumentation_passes): Likewise.
14215 * passes.def: Likewise.
14216 * rtl.h (struct GTY): Likewise.
14217 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
14218 * stor-layout.c (layout_type): Likewise.
14219 * symtab.c: Likewise.
14220 * target.def: Likewise.
14221 * targhooks.c (default_chkp_bound_type): Likewise.
14222 (default_chkp_bound_mode): Likewise.
14223 (default_builtin_chkp_function): Likewise.
14224 (default_chkp_function_value_bounds): Likewise.
14225 (default_chkp_make_bounds_constant): Likewise.
14226 (default_chkp_initialize_bounds): Likewise.
14227 * targhooks.h (default_chkp_bound_type): Likewise.
14228 (default_chkp_bound_mode): Likewise.
14229 (default_builtin_chkp_function): Likewise.
14230 (default_chkp_function_value_bounds): Likewise.
14231 (default_chkp_make_bounds_constant): Likewise.
14232 (default_chkp_initialize_bounds): Likewise.
14233 * toplev.c (compile_file): Likewise.
14234 (process_options): Likewise.
14235 * tree-core.h (DEF_BUILTIN): Likewise.
14236 (DEF_BUILTIN_CHKP): Likewise.
14237 * tree-inline.c (declare_return_variable): Likewise.
14238 (remap_gimple_stmt): Likewise.
14239 (copy_bb): Likewise.
14240 (initialize_inlined_parameters): Likewise.
14241 (expand_call_inline): Likewise.
14242 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
14243 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
14244 (make_pass_ipa_chkp_produce_thunks): Likewise.
14245 (make_pass_chkp): Likewise.
14246 (make_pass_chkp_opt): Likewise.
14247 (make_pass_chkp_instrumentation_passes): Likewise.
14248 * tree-pretty-print.c (dump_generic_node): Likewise.
14249 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
14250 * tree-ssa-dce.c (propagate_necessity): Likewise.
14251 (eliminate_unnecessary_stmts): Likewise.
14252 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
14253 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
14254 * tree-ssa-sccvn.h: Likewise.
14255 * tree-ssa-strlen.c (get_string_length): Likewise.
14256 (valid_builtin_call): Likewise.
14257 (adjust_last_stmt): Likewise.
14258 (handle_builtin_strchr): Likewise.
14259 (handle_builtin_strcpy): Likewise.
14260 (handle_builtin_stxncpy): Likewise.
14261 (handle_builtin_memcpy): Likewise.
14262 (handle_builtin_strcat): Likewise.
14263 (strlen_check_and_optimize_stmt): Likewise.
14264 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14265 * tree-streamer-in.c: Likewise.
14266 * tree-streamer.c (record_common_node): Likewise.
14267 * tree.c (tree_code_size): Likewise.
14268 (wide_int_to_tree_1): Likewise.
14269 (type_contains_placeholder_1): Likewise.
14270 (build_common_tree_nodes): Likewise.
14271 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14272 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14273 (POINTER_BOUNDS_P): Likewise.
14274 (BOUNDED_TYPE_P): Likewise.
14275 (BOUNDED_P): Likewise.
14276 (CALL_WITH_BOUNDS_P): Likewise.
14277 (pointer_bounds_type_node): Likewise.
14278 * value-prof.c (gimple_ic): Likewise.
14279 * var-tracking.c (vt_add_function_parameters): Likewise.
14280 * varasm.c (make_decl_rtl): Likewise.
14281 (assemble_start_function): Likewise.
14282 (output_constant): Likewise.
14283 (maybe_assemble_visibility): Likewise.
14284 * varpool.c (ctor_for_folding): Likewise.
14285 * chkp-builtins.def: Remove.
14286 * ipa-chkp.c: Remove.
14287 * ipa-chkp.h: Remove.
14288 * rtl-chkp.c: Remove.
14289 * rtl-chkp.h: Remove.
14290 * tree-chkp-opt.c: Remove.
14291 * tree-chkp.c: Remove.
14292 * tree-chkp.h: Remove.
14294 2018-06-07 Carl Love <cel@us.ibm.com>
14296 * config/rs6000/vsx.md (vextract_fp_from_shorth,
14297 vextract_fp_from_shortl): Add BE support.
14299 2018-06-07 Paul Koning <ni1d@arrl.net>
14301 * compare-elim.c (try_merge_compare): Don't merge compare if
14302 address contains a side effect.
14303 (try_eliminate_compare): Likewise.
14305 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
14307 * config.gcc: Support "tremont".
14308 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14309 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14311 * config/i386/i386.c (m_TREMONT): Define.
14312 (processor_target_table): Add "tremont".
14313 (PTA_TREMONT): Define.
14314 (ix86_lea_outperforms): Add TARGET_TREMONT.
14315 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14316 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14317 and M_INTEL_GOLDMONT_PLUS.
14318 (fold_builtin_cpu): Add "tremont".
14319 (ix86_add_stmt_cost): Add TARGET_TREMONT.
14320 (ix86_option_override_internal): Add "tremont".
14321 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14322 (processor_type): Add PROCESSOR_TREMONT.
14323 * config/i386/x86-tune.def: Add m_TREMONT.
14324 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14326 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14328 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14329 symbol defined for msp430i* devices to be lower case.
14331 2018-06-07 Richard Biener <rguenther@suse.de>
14333 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14334 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
14335 Properly wrap signed arithmetic if overflow wraps.
14337 2018-06-07 Jakub Jelinek <jakub@redhat.com>
14339 PR tree-optimization/69615
14340 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14341 of a cast from a same precision integral SSA_NAME in a bb dominated
14342 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
14343 cast to utype if rhs2 has already a compatible type.
14345 2018-06-07 Richard Biener <rguenther@suse.de>
14347 PR tree-optimization/85935
14348 * graphite-scop-detection.c (find_params_in_bb): Analyze
14349 condition operands with respect to the correct loop. Assert
14350 the analysis doesn't fail.
14352 2018-06-04 Carl Love <cel@us.ibm.com>
14354 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14355 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
14356 as it is slightly cheaper.
14357 (first_match_or_eos_index_<mode>):
14358 Calculate index using natural element order.
14359 (first_match_index_<mode>):
14360 Calculate index using natural element order.
14361 (first_match_or_eos_index_<mode>):
14362 Calculate index using natural order.
14363 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14364 for BE and LE modes.
14365 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14366 P9V_BUILTIN_VCLZLSBB_V16QI.
14367 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14370 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14372 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14373 indentation and line wrap for many prototypes. Add missing
14374 @smallexample directives around block of prototypes for vec_xl and
14377 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
14379 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
14380 track if we pass or return IEEE 128-bit floating point.
14381 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
14382 C++ mangling that is compatible with GCC 8.1.
14383 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
14384 (init_cumulative_args): Note if we pass or return IEEE 128-bit
14385 floating point types.
14386 (rs6000_function_arg_advance_1): Likewise.
14387 (rs6000_mangle_type): Optionally generate mangled names that match
14388 what GCC 8.1 generated for IEEE 128-bit floating point types.
14389 (rs6000_globalize_decl_name): If we have an external function that
14390 passes or returns IEEE 128-bit types, generate a weak reference
14391 from the mangled name used in GCC 8.1 to the current mangled
14393 (rs6000_init_builtins): Make __ibm128 use the long double type if
14394 long double is IBM extended double. Make __float128 use the long
14395 double type if long double is IEEE 128-bit.
14398 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
14399 macro for __ibm128 built-in functions.
14400 (PACK_IF): Add __ibm128 pack/unpack functions.
14401 (UNPACK_IF): Likewise.
14402 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
14403 enable long double built-in functions if long double is IEEE
14404 128-bit floating point.
14405 (rs6000_invalid_builtin): Update long double built-in function
14407 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
14408 functions, adjust the built-in function to use the long double
14409 built-in function if __ibm128 and long double are the same type.
14410 * doc/extend.texi (PowerPC builtins): Update documention for
14411 __builtin_{,un}pack_longdouble. Add documentation for
14412 __builtin_{,un}pack_ibm128.
14414 2018-06-06 Jim Wilson <jimw@sifive.com>
14416 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
14417 (struct machine_function): New field interrupt_mode.
14418 (riscv_handle_type_attribute): New function. Add forward declaration.
14419 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
14420 (riscv_expand_epilogue): Check interrupt_mode field.
14421 (riscv_set_current_function): Check interrupt attribute args and
14422 set interrupt_mode field.
14423 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
14424 (riscv_sret, riscv_uret): New.
14425 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
14426 new arguments to interrupt attribute.
14428 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
14431 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
14432 Don't handle -mcpu=power8 if -mpower9-vector is also used.
14434 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14436 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
14437 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
14438 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14439 several redundant entries.
14441 2018-06-06 David Malcolm <dmalcolm@redhat.com>
14443 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
14444 type from "rtx" to "rtx_insn *".
14445 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
14446 for local "call_insn", removing cast.
14447 (ix86_expand_call): Likewise, introducing a "call_insn" local.
14449 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
14451 PR tree-optimization/86066
14452 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
14453 for BIT_INSERT_EXPR stores.
14455 2018-06-06 Richard Biener <rguenther@suse.de>
14457 PR tree-optimization/86062
14458 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14459 component refs ontop
14460 of to be offsetted base.
14462 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14464 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
14465 to be static and remove check on interrupt attribute name.
14467 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
14469 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14470 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
14472 2018-06-05 Steve Ellcey <sellcey@cavium.com>
14475 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
14477 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
14478 Remove second argument, change how error is called.
14479 (aarch64_layout_arg): Remove second argument from
14480 aarch64_err_no_fpadvsimd call.
14481 (aarch64_init_cumulative_args): Ditto.
14482 (aarch64_gimplify_va_arg_expr): Ditto.
14483 * config/aarch64/aarch64.md (mov<mode>): Ditto.
14485 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
14487 * config/i386/i386.md (simple_return_indirect_internal): New expander.
14488 (*simple_return_indirect_internal<mode>): Rename from
14489 simple_return_indirect_internal. Use W mode iterator.
14490 (rstorssp): New expander.
14491 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
14492 (clrssbsy): New expander.
14493 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
14495 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
14497 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
14499 (cmse_check_pointed_object): Likewise.
14501 2018-06-05 Martin Liska <mliska@suse.cz>
14503 PR gcov-profile/47618
14504 * doc/invoke.texi: Document how -fprofile-dir format
14507 2018-06-05 Richard Biener <rguenther@suse.de>
14509 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
14510 removal pretend DOM info isn't available so we do not update
14511 it and only remove edges, not dominated blocks. Actually free
14512 DOM info in case we removed something. Remove unreachable blocks.
14513 (mfb_keep_latches): Work with either DOM info or marked backedges.
14514 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
14515 first. Mark backedges if DOM info isn't available.
14516 (Re-)compute DOM info after cleanup_control_flow_pre.
14518 2018-06-05 Richard Biener <rguenther@suse.de>
14520 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
14521 (locus_discrim_hasher::hash): Adjust.
14522 (locus_discrim_hasher::equal): Likewise.
14523 (next_discriminator_for_locus): Work on line directly.
14524 (same_line_p): Pass in expanded locus1 as well.
14525 (assign_discriminators): Avoid redundant location expansions.
14527 2018-06-05 Richard Biener <rguenther@suse.de>
14529 PR tree-optimization/86046
14530 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
14531 if required after clearing TREE_ADDRESSABLE.
14533 2018-06-05 Richard Biener <rguenther@suse.de>
14535 PR tree-optimization/86047
14536 * tree-ssa-loop.c (for_each_index): Glob handling of all
14537 decls and constants and really handle all of them.
14539 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14542 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
14543 qualifier_void_pointer and qualifier_const_void_pointer.
14544 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
14545 (arm_init_builtins): Handle the above.
14546 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
14547 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
14548 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
14551 2018-06-05 Martin Liska <mliska@suse.cz>
14553 * auto-profile.c (read_autofdo_file): Do not use
14554 gcov_ctr_summary struct.
14555 (afdo_callsite_hot_enough_for_early_inline): Likewise.
14556 * coverage.c (struct counts_entry): Likewise.
14557 (read_counts_file): Read just single summary entry.
14558 (get_coverage_counts): Use gcov_summary struct.
14559 * coverage.h (get_coverage_counts): Likewise.
14560 * gcov-dump.c (dump_working_sets): Likewise.
14561 (tag_summary): Dump just single summary.
14562 * gcov-io.c (gcov_write_summary): Write just histogram
14564 (gcov_read_summary): Read just single summary.
14565 (compute_working_sets): Use gcov_summary struct.
14566 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
14567 of GCOV_COUNTERS_SUMMABLE.
14568 (GCOV_COUNTERS_SUMMABLE): Remove.
14569 (GCOV_FIRST_VALUE_COUNTER): Replace with
14570 GCOV_COUNTER_V_INTERVAL.
14571 (struct gcov_ctr_summary): Remove.
14572 (struct gcov_summary): Directly use fields of former
14574 (compute_working_sets): Use gcov_summary struct.
14575 * gcov.c (read_count_file): Do not use ctrs fields.
14576 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
14578 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
14580 * profile.c: Likewise.
14581 * profile.h: Likewise.
14583 2018-06-05 Martin Liska <mliska@suse.cz>
14585 PR gcov-profile/84846
14586 * gcov.c (output_lines): Print working directory only
14587 in intermediate format.
14589 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
14591 * config/s390/s390-builtin-types.def: Add void function type.
14592 * config/s390/s390-builtins.def: Use the function type for the
14595 2018-06-04 Jim Wilson <jimw@sifive.com>
14597 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
14599 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
14600 and maybe_eh_return. Change regno to unsigned int. Use new args to
14601 handle EH_RETURN_DATA_REGNO registers properly.
14602 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
14603 (riscv_expand_epilogue): Update comment. Change argument name and
14604 type. Update code to use new name and type. Pass new args to
14605 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
14607 * config/riscv/riscv.md (NORMAL_RETURN): New.
14608 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
14609 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
14610 (eh_return): Call gen_eh_return_internal and emit barrier.
14611 (eh_return_internal): Call riscv_expand_epilogue.
14613 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
14615 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
14616 bit_insertion field and declare can_be_merged_into method.
14617 (merged_store_group::can_be_merged_into): New method.
14618 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
14619 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
14620 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
14622 2018-06-04 Richard Biener <rguenther@suse.de>
14624 PR tree-optimization/85955
14625 * builtins.c (fold_builtin_sincos): Convert pointers to
14626 destination to appropriate type before dereferencing.
14628 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
14630 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
14632 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
14634 * expr.c (expand_expr_real_1): Force the operand into memory if
14635 its TYPE_MODE is BLKmode and if there is no integer mode for
14636 the number of bits being extracted.
14638 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14642 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14643 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
14645 2018-06-04 Richard Biener <rguenther@suse.de>
14647 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
14648 (cleanup_tree_cfg_noloop): ... single caller. Do
14649 start_recording_case_labels later.
14651 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
14653 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
14654 to _IMMINTRIN_H_INCLUDED.
14655 * config/i386/pconfigintrin.h: Ditto.
14656 * config/i386/waitpkgintrin.h: Ditto.
14657 * config/i386/immintrin.h: Add includes for sgxintrin.h,
14658 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
14659 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
14660 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
14661 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
14662 waitpkgintrin.h and cldemoteintrin.h.
14664 2018-06-04 Richard Biener <rguenther@suse.de>
14666 PR tree-optimization/86038
14667 * tracer.c (find_best_successor): Check probability for
14668 being initialized, bail out if not.
14670 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
14673 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
14674 of bits to ignore when comparing architectures.
14676 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14678 PR tree-optimization/69615
14679 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
14680 maximum or minimum of the type, try to merge it also as if
14681 range1 is + [-, x - 1] or + [x + 1, -].
14684 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
14686 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
14688 PR tree-optimization/86034
14689 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
14690 the unsigned bitfield type in a bit insertion sequence if it does not
14691 have a larger precision than the bitfield size.
14692 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
14694 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
14696 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
14698 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14700 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
14701 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
14702 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
14703 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
14705 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14707 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
14708 Disable -fdelete-null-pointer-checks for ELF toolchain.
14710 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14711 Kito Cheng <kito.cheng@gmail.com>
14713 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
14714 (nds32le-*-*, nds32be-*-*): Integrate checking process.
14715 (nds32*-*-*): Add glibc and uclibc conditions.
14716 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
14717 (TARGET_EXCEPT_UNWIND_INFO): Define.
14718 * config/nds32/elf.h: New file.
14719 * config/nds32/linux.h: New file.
14720 * config/nds32/nds32-elf.opt: New file.
14721 * config/nds32/nds32-linux.opt: New file.
14722 * config/nds32/nds32-fp-as-gp.c
14723 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
14724 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
14726 (nds32_asm_file_end): Ditto.
14727 (nds32_print_operand): Ditto.
14728 (nds32_insert_attributes): Ditto.
14729 (nds32_init_libfuncs): New function.
14730 (TARGET_HAVE_TLS): Define.
14731 (TARGET_INIT_LIBFUNCS): Define.
14732 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
14734 (TARGET_ELF): Apply different mcmodel setting.
14735 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
14736 been migrated into elf.h and linux.h files.
14737 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
14738 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
14739 (mcmodel): The content has been migrated into nds32-elf.opt and
14740 nds32-linux.opt files.
14741 * config/nds32/t-elf: New file.
14742 * config/nds32/t-linux: New file.
14744 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14745 Shiva Chen <shiva0217@gmail.com>
14747 * config/nds32/constants.md (unspec_volatile_element): Add
14748 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
14749 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
14751 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
14752 (make_pass_nds32_fp_as_gp): Declare.
14753 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
14755 (nds32_asm_function_end_prologue): Remove unused asm output.
14756 (nds32_asm_function_begin_epilogue): Remove unused asm output.
14757 (nds32_asm_file_start): Output necessary fp_as_gp information.
14758 (nds32_option_override): Adjust register usage.
14759 (nds32_expand_prologue): Consider fp_as_gp situation.
14760 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
14761 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
14764 (simple_return): Ditto.
14765 (omit_fp_begin): Output special directive for fp_as_gp.
14766 (omit_fp_end): Output special directive for fp_as_gp.
14767 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
14768 mforbid-fp-as-gp): New options.
14770 2018-06-01 Mark Wielaard <mark@klomp.org>
14772 * dwarf2out.c (dwarf2out_finish): Remove generation of
14773 DW_AT_loclists_base.
14775 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
14777 * gimple-ssa-store-merging.c: Include gimple-fold.h.
14778 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
14779 (struct merged_store_group): Add bit_insertion field.
14780 (dump_char_array): Use standard hexadecimal format.
14781 (merged_store_group::merged_store_group): Set bit_insertion to false.
14782 (merged_store_group::apply_stores): Use optimal buffer size. Deal
14783 with BIT_INSERT_EXPR stores. Move up code updating the mask and
14784 also print the mask in the dump file.
14785 (pass_store_merging::gate): Minor tweak.
14786 (imm_store_chain_info::coalesce_immediate): Fix wrong association
14787 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
14788 stores with INTEGER_CST stores.
14789 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
14790 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
14791 and use it throughout. Generate bit insertion sequences if need be.
14792 (pass_store_merging::process_store): Remove redundant condition.
14793 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
14795 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
14797 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
14798 the 128-bit floating point types. Fix function comment.
14800 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14802 * config/aarch64/aarch64-simd.md
14803 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
14805 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
14808 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14810 PR tree-optimization/85989
14811 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
14813 (backprop::intersect_uses): Check it when deciding whether this
14814 is a backedge reference.
14815 (backprop::process_block): Add each phi to m_visited_phis
14816 after visiting it, then clear it at the end.
14818 2018-06-01 Richard Biener <rguenther@suse.de>
14820 * tree-vectorizer.h (vect_dr_stmt): New function.
14821 (vect_get_load_cost): Adjust.
14822 (vect_get_store_cost): Likewise.
14823 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
14824 Use vect_dr_stmt instead of DR_SMTT.
14825 (vect_record_base_alignments): Likewise.
14826 (vect_calculate_target_alignment): Likewise.
14827 (vect_compute_data_ref_alignment): Likewise and make static.
14828 (vect_update_misalignment_for_peel): Likewise.
14829 (vect_verify_datarefs_alignment): Likewise.
14830 (vector_alignment_reachable_p): Likewise.
14831 (vect_get_data_access_cost): Likewise. Pass down
14832 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
14833 (vect_get_peeling_costs_all_drs): Likewise.
14834 (vect_peeling_hash_get_lowest_cost): Likewise.
14835 (vect_enhance_data_refs_alignment): Likewise.
14836 (vect_find_same_alignment_drs): Likewise.
14837 (vect_analyze_data_refs_alignment): Likewise.
14838 (vect_analyze_group_access_1): Likewise.
14839 (vect_analyze_group_access): Likewise.
14840 (vect_analyze_data_ref_access): Likewise.
14841 (vect_analyze_data_ref_accesses): Likewise.
14842 (vect_vfa_segment_size): Likewise.
14843 (vect_small_gap_p): Likewise.
14844 (vectorizable_with_step_bound_p): Likewise.
14845 (vect_prune_runtime_alias_test_list): Likewise.
14846 (vect_analyze_data_refs): Likewise.
14847 (vect_supportable_dr_alignment): Likewise.
14848 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14849 (vect_gen_prolog_loop_niters): Likewise.
14850 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14851 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
14853 (vect_recog_mask_conversion_pattern): Likewise.
14854 (vect_try_gather_scatter_pattern): Likewise.
14855 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
14856 to vect_get_store_cost.
14857 (vect_get_store_cost): Get stmt_info instead of DR.
14858 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
14859 (vect_get_load_cost): Get stmt_info instead of DR.
14861 2018-06-01 Richard Biener <rguenther@suse.de>
14863 PR middle-end/86017
14864 * gimple-fold.c (var_decl_component_p): Also allow offsetted
14865 vars wrapped in MEM_REFs.
14867 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14869 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14870 Fix subreg tests so that we only return a choice between
14871 GENERAL_REGS and FP_REGS if the original classes included both.
14873 2018-06-01 Richard Biener <rguenther@suse.de>
14876 * tree-ssa-structalias.c (get_function_part_constraint):
14877 Handle NULL fi->decl.
14878 (find_func_aliases_for_call): Properly handle indirect
14879 fi from direct call.
14880 (find_func_clobbers): Likewise.
14881 (ipa_pta_execute): Likewise.
14882 (create_variable_info_for): For functions that are ifunc_resolver
14883 resolve to a varinfo that contains the result of the resolver call.
14884 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
14887 2018-05-31 Michael Collison <michael.collison@arm.com>
14889 * config/aarch64/aarch64.md:
14890 (*fix_to_zero_extenddfdi2): New pattern.
14891 * gcc.target/aarch64/fix_extend1.c: New testcase.
14893 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
14895 PR middle-end/78809
14896 PR middle-end/83026
14897 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
14898 and BUILT_IN_STRNCMP_EQ.
14899 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
14900 BUILT_IN_STRNCMP_EQ.
14901 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
14902 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14903 (gimple_fold_builtin): Likewise.
14904 * tree-ssa-strlen.c (compute_string_length): New function.
14905 (determine_min_obsize): New function.
14906 (handle_builtin_string_cmp): New function to handle calls to
14907 string compare functions.
14908 (strlen_optimize_stmt): Add handling to builtin string compare
14910 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
14911 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14912 * tree.c (build_common_builtin_nodes): Add new defines of
14913 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
14915 2018-05-31 Jakub Jelinek <jakub@redhat.com>
14918 * bb-reorder.c (pass_partition_blocks::gate): Return false for
14919 functions with naked attribute.
14921 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
14923 * config/i386/sse.md (avx_vec_concat<mode>):
14924 Substitute concat_tg_mode mode attribute with xtg_mode.
14925 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
14926 (concat_tg_mode): Remove mode attribute.
14928 2018-05-31 Martin Sebor <msebor@redhat.com>
14931 * calls.c (alloc_max_size): Correct a logic error/typo.
14932 Treat excessive arguments as infinite. Warn for invalid arguments.
14933 * doc/invoke.texi (-Walloc-size-larger-than): Update.
14935 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
14938 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
14939 and movx for Haswell.
14941 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
14942 Cesar Philippidis <cesar@codesourcery.com>
14944 PR middle-end/85879
14945 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
14946 when emitting error on private/firstprivate reductions.
14947 * omp-low.c (lower_omp_target): Avoid reference-type processing
14948 on pointers for firstprivate clause.
14950 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
14952 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
14955 * config/aarch64/aarch64-simd.md
14956 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
14957 (aarch64_ld1_x3_<mode>): Likewise
14958 (aarch64_st1x2<VALLDIF:mode>): Likewise
14959 (aarch64_st1_x2_<mode>): Likewise
14960 (aarch64_st1x3<VALLDIF:mode>): Likewise
14961 (aarch64_st1_x3_<mode>): Likewise
14962 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
14963 (vld1_s8_x3): Likewise.
14964 (vld1_u16_x3): Likewise.
14965 (vld1_s16_x3): Likewise.
14966 (vld1_u32_x3): Likewise.
14967 (vld1_s32_x3): Likewise.
14968 (vld1_u64_x3): Likewise.
14969 (vld1_s64_x3): Likewise.
14970 (vld1_f16_x3): Likewise.
14971 (vld1_f32_x3): Likewise.
14972 (vld1_f64_x3): Likewise.
14973 (vld1_p8_x3): Likewise.
14974 (vld1_p16_x3): Likewise.
14975 (vld1_p64_x3): Likewise.
14976 (vld1q_u8_x3): Likewise.
14977 (vld1q_s8_x3): Likewise.
14978 (vld1q_u16_x3): Likewise.
14979 (vld1q_s16_x3): Likewise.
14980 (vld1q_u32_x3): Likewise.
14981 (vld1q_s32_x3): Likewise.
14982 (vld1q_u64_x3): Likewise.
14983 (vld1q_s64_x3): Likewise.
14984 (vld1q_f16_x3): Likewise.
14985 (vld1q_f32_x3): Likewise.
14986 (vld1q_f64_x3): Likewise.
14987 (vld1q_p8_x3): Likewise.
14988 (vld1q_p16_x3): Likewise.
14989 (vld1q_p64_x3): Likewise.
14990 (vst1_s64_x2): Likewise.
14991 (vst1_u64_x2): Likewise.
14992 (vst1_f64_x2): Likewise.
14993 (vst1_s8_x2): Likewise.
14994 (vst1_p8_x2): Likewise.
14995 (vst1_s16_x2): Likewise.
14996 (vst1_p16_x2): Likewise.
14997 (vst1_s32_x2): Likewise.
14998 (vst1_u8_x2): Likewise.
14999 (vst1_u16_x2): Likewise.
15000 (vst1_u32_x2): Likewise.
15001 (vst1_f16_x2): Likewise.
15002 (vst1_f32_x2): Likewise.
15003 (vst1_p64_x2): Likewise.
15004 (vst1q_s8_x2): Likewise.
15005 (vst1q_p8_x2): Likewise.
15006 (vst1q_s16_x2): Likewise.
15007 (vst1q_p16_x2): Likewise.
15008 (vst1q_s32_x2): Likewise.
15009 (vst1q_s64_x2): Likewise.
15010 (vst1q_u8_x2): Likewise.
15011 (vst1q_u16_x2): Likewise.
15012 (vst1q_u32_x2): Likewise.
15013 (vst1q_u64_x2): Likewise.
15014 (vst1q_f16_x2): Likewise.
15015 (vst1q_f32_x2): Likewise.
15016 (vst1q_f64_x2): Likewise.
15017 (vst1q_p64_x2): Likewise.
15018 (vst1_s64_x3): Likewise.
15019 (vst1_u64_x3): Likewise.
15020 (vst1_f64_x3): Likewise.
15021 (vst1_s8_x3): Likewise.
15022 (vst1_p8_x3): Likewise.
15023 (vst1_s16_x3): Likewise.
15024 (vst1_p16_x3): Likewise.
15025 (vst1_s32_x3): Likewise.
15026 (vst1_u8_x3): Likewise.
15027 (vst1_u16_x3): Likewise.
15028 (vst1_u32_x3): Likewise.
15029 (vst1_f16_x3): Likewise.
15030 (vst1_f32_x3): Likewise.
15031 (vst1_p64_x3): Likewise.
15032 (vst1q_s8_x3): Likewise.
15033 (vst1q_p8_x3): Likewise.
15034 (vst1q_s16_x3): Likewise.
15035 (vst1q_p16_x3): Likewise.
15036 (vst1q_s32_x3): Likewise.
15037 (vst1q_s64_x3): Likewise.
15038 (vst1q_u8_x3): Likewise.
15039 (vst1q_u16_x3): Likewise.
15040 (vst1q_u32_x3): Likewise.
15041 (vst1q_u64_x3): Likewise.
15042 (vst1q_f16_x3): Likewise.
15043 (vst1q_f32_x3): Likewise.
15044 (vst1q_f64_x3): Likewise.
15045 (vst1q_p64_x3): Likewise.
15047 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15049 * config/msp430/msp430.c (msp430_output_labelref): Prepend
15050 user_label_prefix to name.
15052 * tree-core.h: Update comment about the format of NAME string
15053 passed to handler in attribute_spec.
15055 * config/msp430/msp430.md: Remove erroneous subreg expression from
15056 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
15057 zero_extend{q,h}isi2.
15059 2018-05-30 Borislav Petkov <bp@suse.de>
15061 * doc/extend.texi: Document some architecture specific
15062 constraints and sort entries.
15064 2018-05-30 Martin Sebor <msebor@redhat.com>
15066 PR middle-end/85369
15067 * builtins.c (expand_builtin_stpcpy_1): New function.
15068 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
15069 only if the former succeeds.
15071 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15073 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
15076 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15078 * doc/invoke.texi (-flinker-output): Document
15080 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15082 * passes.c (ipa_write_summaries): Only modify statements if body
15084 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
15085 incrementally linking.
15086 (ipa_passes): Likewise.
15087 * lto-cgraph.c (lto_output_node): When incrementally linking do not
15088 pass down resolution info.
15089 * common.opt (flag_incremental_link): Update info.
15090 * gcc.c (plugin specs): Turn flinker-output=* to
15091 -plugin-opt=-linker-output-known
15092 * toplev.c (compile_file): Also cut compilation when doing incremental
15094 * flag-types. (enum lto_partition_model): Add
15095 LTO_LINKER_OUTPUT_NOLTOREL.
15096 (invoke.texi): Add -flinker-output docs.
15097 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
15098 link same way as WPA; do not stream in dead initializers.
15100 * dwarf2out.c (dwarf2out_die_ref_for_decl,
15101 darf2out_register_external_decl): Support incremental link.
15103 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15105 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
15107 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15109 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
15110 it down to simple_object_copy_lto_debug_sections.
15111 (run_gcc): Determine incremental LTO link time and configure
15112 lto1 into non-wpa mode, disable renaming of debug sections.
15114 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
15116 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15117 descriptions of various incorrectly documented functions.
15119 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
15122 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15123 address check not strict.
15125 2018-05-30 Richard Biener <rguenther@suse.de>
15127 PR tree-optimization/85964
15128 * tracer.c (better_p): Drop initialized count check, we only
15129 call the function with initialized counts now.
15130 (find_best_successor): Do find a best edge if one
15131 has uninitialized count.
15132 (find_best_predecessor): Likewise. Do BB frequency check only
15133 if count is initialized.
15135 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
15137 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
15138 (aarch64_ldrstr_offset_compare): New.
15139 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
15140 load/store orderings.
15141 (aarch64_gen_adjusted_ldpstp): Likewise.
15143 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
15145 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15146 Check for subset of GENERAL_REGS and FP_REGS.
15147 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
15150 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
15152 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
15153 and wi::to_poly_offset. Add the current offset and then check
15154 whether the sum fits, rather than using an unchecked addition of
15155 a checked term. Check for a shwi rather than a uhwi.
15156 * expr.c (get_bit_range): Use tree_to_poly_uint64.
15157 (store_constructor): Use poly_int_tree_p.
15158 (expand_expr_real_1): Likewise.
15159 * function.c (assign_temp): Likewise.
15160 * fold-const.c (const_binop): Use poly_int_tree_p and
15161 wi::to_poly_offset.
15162 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
15164 * ipa-icf-gimple.c (func_checker::compare_operand): Use
15165 to_poly_offset for MEM offsets.
15166 * ipa-icf.c (sem_variable::equals): Likewise.
15167 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
15168 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
15169 wi::to_poly_offset for BIT_FIELD_REF offsets.
15170 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
15171 wi::to_poly_offset.
15172 * var-tracking.c (emit_note_insn_var_location): Use
15173 tree_to_poly_uint64.
15175 2018-05-29 Jim Wilson <jimw@sifive.com>
15177 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
15179 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
15182 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
15183 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
15185 (sse4_1_round<mode>2): Use nonimmediate_operand
15186 for operand 1 predicate.
15188 2018-05-29 Martin Sebor <msebor@redhat.com>
15189 Richard Biener <rguenther@suse.de>
15192 * calls.c (get_size_range): Call determine_value_range instead
15193 of get_value_range..
15194 * tree-vrp.h (determine_value_range): Declared new function.
15195 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
15197 2018-05-29 Richard Biener <rguenther@suse.de>
15199 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
15200 sure to use non-pattern stmts for get_earlier_stmt arguments.
15201 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
15202 called on pattern stmts.
15203 (get_later_stmt): Likewise.
15205 2018-05-29 Martin Liska <mliska@suse.cz>
15207 PR gcov-profile/85759
15208 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
15211 2018-05-29 Jakub Jelinek <jakub@redhat.com>
15213 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
15215 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
15219 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15220 VEC_PACK_FLOAT_EXPR): New tree codes.
15221 * tree-pretty-print.c (op_code_prio): Handle
15222 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15223 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15224 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15225 * tree-inline.c (estimate_operator_cost): Likewise.
15226 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
15227 * fold-const.c (const_binop): Likewise.
15228 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
15229 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15230 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15231 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
15232 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15233 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15234 * expr.c (expand_expr_real_2): Likewise.
15235 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
15236 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
15237 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
15239 * optabs.c (expand_widen_pattern_expr): For
15240 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
15241 sign from result type rather than operand's type.
15242 (expand_binop_directly): For vec_packu_float_optab and
15243 vec_packs_float_optab allow result type to be different from operand's
15245 * optabs-tree.c (optab_for_tree_code): Handle
15246 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15247 VEC_PACK_FLOAT_EXPR. Formatting fixes.
15248 * tree-vect-generic.c (expand_vector_operations_1): Handle
15249 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15250 VEC_PACK_FLOAT_EXPR.
15251 * tree-vect-stmts.c (supportable_widening_operation): Handle
15253 (supportable_narrowing_operation): Handle FLOAT_EXPR.
15254 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
15255 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15256 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
15257 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15259 (vec_pack<floatprefix>_float_<mode>): New expander.
15260 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15262 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15263 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15264 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15265 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15266 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15268 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15269 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15270 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15271 VEC_PACK_FLOAT_EXPR): Document.
15273 2018-05-29 Richard Biener <rguenther@suse.de>
15275 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15277 (stmt_vec_info_vec): Make pointer.
15278 (init_stmt_vec_info_vec): Remove.
15279 (free_stmt_vec_info_vec): Likewise.
15280 (set_stmt_vec_info_vec): New function.
15281 (free_stmt_vec_infos): Likewise.
15282 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15283 (set_vinfo_for_stmt): Likewise.
15284 (get_earlier_stmt): Likewise.
15285 (get_later_stmt): Likewise.
15286 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15287 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15288 (vec_info::~vec_info): Free stmt_vec_infos.
15289 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15290 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15291 (pass_slp_vectorize::execute): Likewise.
15292 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15293 (free_stmt_vec_info_vec): Likewise.
15294 (set_stmt_vec_info_vec): New function.
15295 (free_stmt_vec_infos): Likewise.
15296 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15297 the global stmt_vec_info_vec.
15298 * tree-parloops.c (gather_scalar_reductions): Use
15299 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15302 2018-05-29 Richard Biener <rguenther@suse.de>
15304 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15306 2018-05-29 Martin Liska <mliska@suse.cz>
15307 David Malcolm <dmalcolm@redhat.com>
15309 * vec.c (test_reverse): New.
15310 (vec_c_tests): Add new test.
15311 * vec.h (vl_ptr>::reverse): New function.
15313 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
15315 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15317 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15320 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
15322 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15324 2018-05-28 Richard Biener <rguenther@suse.de>
15326 PR tree-optimization/85933
15327 * tree-vect-data-refs.c (vect_record_base_alignments): Only
15328 look at stmts marked as vectorizable.
15330 2018-05-28 Richard Biener <rguenther@suse.de>
15332 PR tree-optimization/85934
15333 * tree-vect-generic.c (expand_vector_operations_1): Hoist
15334 vector boolean check before scalar optimization.
15336 2018-05-28 Jakub Jelinek <jakub@redhat.com>
15338 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15341 2018-05-28 Mark Wielaard <mark@klomp.org>
15343 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15344 if it is an expression containing a minus sign.
15346 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
15348 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15350 2018-05-27 Paul Koning <ni1d@arrl.net>
15352 * config/pdp11/pdp11.md (truncsihi2): Remove.
15354 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
15355 Chung-Ju Wu <jasonwucj@gmail.com>
15357 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15359 (unaligned_store_dw): Ditto.
15360 * config/nds32/nds32-memory-manipulation.c
15361 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15362 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15363 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15364 (emit_setmem_word_loop): Rename to ...
15365 (emit_setmem_doubleword_loop): ... this.
15366 (nds32_gen_dup_4_byte_to_word_value): New function.
15367 (nds32_gen_dup_8_byte_to_double_word_value): New function.
15368 (nds32_expand_setmem_loop): Refine implementation.
15369 (nds32_expand_setmem_loop_v3m): Ditto.
15370 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15373 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15375 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
15377 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15379 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
15380 (nds32_init_machine_status): Initialize machine->attr_naked_p and
15381 machine->attr_no_prologue_p.
15382 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
15383 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
15384 (nds32_expand_epilogue): Consider attr_naked_p.
15385 (nds32_expand_epilogue_v3pop): Likewise.
15386 (nds32_can_use_return_insn): Likewise.
15387 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
15388 attr_no_prologue_p fields.
15389 * config/nds32/nds32.opt (mret-in-naked-func): New option.
15391 2018-05-27 Jakub Jelinek <jakub@redhat.com>
15394 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
15396 * config/i386/sse.md
15397 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
15399 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
15401 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
15403 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
15405 (*<floatsuffix>floatv2div2sf2): Rename to ...
15406 (*float<floatunssuffix>v2div2sf2): ... this.
15407 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
15408 (float<floatunssuffix>v2div2sf2_mask): ... this.
15409 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
15410 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
15411 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
15413 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
15415 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15417 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15419 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15421 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15423 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
15424 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
15425 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
15426 gen_ufix_truncv8dfv8si2.
15427 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
15428 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
15429 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
15430 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
15431 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
15432 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
15433 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
15434 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
15436 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15440 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
15442 2018-05-25 Jim Wilson <jimw@sifive.com>
15444 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
15445 * config/riscv/riscv.c (struct machine_function): Add
15446 interrupt_handler_p and attribute_checked_p fields.
15447 (riscv_attribute_table): Add interrupt.
15448 (riscv_interrupt_type_p): New.
15449 (riscv_save_reg_p): Save extra regs for interrupt handler.
15450 (riscv_use_save_libcall): Return false for interrupt handler.
15451 (riscv_first_stack_step): Add forward declaration.
15452 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
15453 for interrupt handler with large frame. Use it for saved reg list.
15454 (riscv_expand_prologue): Move flag_stack_usage_info support to
15455 eliminate duplication.
15456 (riscv_expand_epilogue): Generate mret for interrupt handler.
15457 (riscv_epilogue_uses): New.
15458 (riscv_can_use_return_insn): Return false for interrupt handler.
15459 (riscv_function_ok_for_sibcall): Likewise.
15460 (riscv_set_current_function): Add interrupt handler support.
15461 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
15462 * config/riscv/riscv.md (UNSPECV_MRET): New.
15464 (riscv_frflags, riscv_fsflags): Use tab after opcode.
15466 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
15468 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
15470 PR tree-optimization/85712
15471 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
15472 this candidate has already been replaced in-situ by a copy.
15474 2018-05-25 Jason Merrill <jason@redhat.com>
15476 PR c++/80485 - inline function non-zero address.
15477 * symtab.c (nonzero_address): Check DECL_COMDAT.
15479 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
15482 * config/alpha/alpha.md (ashlsi3): New insn pattern.
15483 (*ashlsi_se): Rename from *ashldi_se. Define as sign
15484 extension of SImode operation. Use const123_operand predicate.
15485 (*saddsi_1): Remove.
15486 (*saddl_se_1): Ditto.
15487 (*ssubsi_1): Ditto.
15488 (*ssubl_se_1): Ditto.
15489 * config/alpha/predicates.md (const123_operand): New predicate.
15490 * config/alpha/constraints.md (P): Use IN_RANGE.
15492 2018-05-25 Richard Biener <rguenther@suse.de>
15494 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
15496 (ref_maybe_used_by_stmt_p): Likewise.
15497 (stmt_may_clobber_ref_p): Likewise.
15498 (stmt_may_clobber_ref_p_1): Likewise.
15499 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
15501 (ref_maybe_used_by_stmt_p): Likewise.
15502 (stmt_may_clobber_ref_p): Likewise.
15503 (stmt_may_clobber_ref_p_1): Likewise.
15504 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
15505 the alias oracle to disambiguate DRs with stmts DR analysis
15507 (vect_analyze_data_refs): Do not give up on not analyzable
15508 DRs for BB vectorization. Remove code truncating the dataref
15511 2018-05-25 Jakub Jelinek <jakub@redhat.com>
15514 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15515 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
15516 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
15518 2018-05-25 Richard Biener <rguenther@suse.de>
15520 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
15521 function, combining stmt data ref gathering and fatal analysis
15523 (vect_analyze_data_refs): Remove now redudnant code and simplify.
15524 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
15525 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
15526 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
15527 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
15529 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15531 PR tree-optimization/85720
15532 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
15533 SCC if all partitions are builtins.
15534 (version_loop_by_alias_check): New parameter. Generate cancelable
15535 runtime alias check if all partitions are builtins.
15536 (distribute_loop): Update call to above function.
15538 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15540 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
15541 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
15542 (parm_default_def_partition_arg): Ditto.
15543 (set_parm_default_def_partition): Ditto.
15544 (get_parm_default_def_partitions): Ditto and make it static.
15545 (get_undefined_value_partitions): Ditto and make it static.
15546 (remove_ssa_form): Refactor call to init_var_map here.
15547 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
15548 computation for loop region.
15549 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
15550 (register_default_def): Delete.
15551 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
15552 (parm_default_def_partition_arg): Ditto.
15553 (set_parm_default_def_partition): Ditto.
15554 (get_parm_default_def_partitions): Ditto and make it static.
15555 (get_undefined_value_partitions): Ditto and make it static.
15556 (coalesce_with_default, coalesce_with_default): Update comment.
15557 (create_coalesce_list_for_region): New func factored out from
15558 create_outofssa_var_map.
15559 (populate_coalesce_list_for_outofssa): New func factored out from
15560 create_outofssa_var_map and coalesce_ssa_name.
15561 (create_outofssa_var_map): Delete.
15562 (coalesce_ssa_name): Refactor to support live range computation.
15563 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
15564 (get_parm_default_def_partitions): Delete.
15565 (get_undefined_value_partitions): Ditto.
15566 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
15567 computation for loop region.
15568 (new_tree_live_info, loe_visit_block): Ditto.
15569 (live_worklist, set_var_live_on_entry): Ditto.
15570 (calculate_live_on_exit, verify_live_on_entry): Ditto.
15571 * tree-ssa-live.h (struct _var_map): New fields.
15572 (init_var_map): Change decl.
15573 (region_contains_p): New.
15575 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15577 * tree-ssa-live.h (live_merge_and_clear): Delete.
15579 2018-05-25 Richard Biener <rguenther@suse.de>
15582 * tree-dump.c (dequeue_and_dump): Remove access to removed
15583 operand 2 of a SWITCH_EXPR.
15585 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15587 * doc/sourcebuild.texi (vect_double_cond_arith): Include
15588 multiplication and division.
15589 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
15590 (cond_udiv@var{m}, cond_umod@var{m}): Document.
15591 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
15592 (cond_udiv_optab, cond_umod_optab): New optabs.
15593 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
15594 (IFN_COND_RDIV): New internal functions.
15595 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
15596 TRUNC_MOD_EXPR and RDIV_EXPR.
15597 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
15598 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
15600 (SVE_INT_BINARY): Include mult.
15601 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
15602 (optab, sve_int_op): Handle mult.
15603 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
15605 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
15606 for SVE_INT_BINARY_SD.
15608 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15610 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
15611 (optab, sve_int_op): Handle div and udiv.
15612 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
15613 for SVE_INT_BINARY_SD.
15614 (*<optab><mode>3): New insn for the same.
15616 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15618 * tree-vect-patterns.c: Include predict.h.
15619 (vect_recog_divmod_pattern): Restrict check for division support
15620 to when optimizing for size.
15622 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15624 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
15625 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
15626 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
15627 (gimple_match_op::set_op): Likewise.
15628 (gimple_resimplify4): Declare.
15629 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
15630 (expr::gen_transform): Likewise.
15631 (decision_tree::gen): Generate a simplification routine for 4 operands.
15632 * gimple-match-head.c (gimple_simplify): Add an overload for
15633 4 operands. In the top-level function, handle up to 4 call
15634 arguments and call gimple_resimplify4.
15635 (gimple_resimplify4): New function.
15636 (build_call_internal): Pass a fourth operand.
15637 (maybe_push_to_seq): Likewise.
15638 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
15639 Fold VEC_COND_EXPRs of an operation and a default value into
15640 an IFN_COND_* function if possible.
15641 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
15643 (SVE_COND_FP_BINARY): Include them.
15644 (optab, sve_fp_op): Handle them.
15645 (SVE_INT_BINARY_REV): New code iterator.
15646 (SVE_COND_FP_BINARY_REV): New int iterator.
15647 (commutative): New int attribute.
15648 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
15650 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
15652 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
15653 (*cond_<optab><mode>): New patterns for reversed operands.
15655 2018-05-25 Richard Biener <rguenther@suse.de>
15657 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
15658 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
15659 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
15660 (STMT_VINFO_GROUPED_ACCESS): Adjust.
15661 * tree-vect-data-refs.c (everywhere): Adjust users.
15662 * tree-vect-loop.c (everywhere): Likewise.
15663 * tree-vect-slp.c (everywhere): Likewise.
15664 * tree-vect-stmts.c (everywhere): Likewise.
15665 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
15667 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15669 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
15671 (gcc_cv_as_section_exclude): ... this.
15672 Try Solaris as #exclude syntax.
15673 * configure: Regenerate.
15674 * config.in: Regenerate.
15675 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
15677 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
15678 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
15680 * varasm.c (default_elf_asm_named_section): Don't check if
15681 HAVE_GAS_SECTION_EXCLUDE is defined.
15683 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15685 * doc/md.texi: Update the documentation of the cond_* optabs
15686 to mention the new final operand. Fix GET_MODE_NUNITS call.
15687 Describe the scalar case too.
15688 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
15689 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
15691 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
15692 (get_conditional_internal_fn): Update comment.
15693 * tree-vect-loop.c (vectorizable_reduction): Pass the original
15694 accumulator value as a final argument to conditional functions.
15695 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
15696 a define_expand and add an "else" operand. Assert for now that
15697 the else operand is equal to operand 2. Use SVE_INT_BINARY and
15698 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
15699 (*cond_<optab><mode>): New patterns.
15700 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
15701 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15702 (UNSPEC_COND_EOR): Delete.
15703 (optab): Remove associated mappings.
15704 (SVE_INT_BINARY): New code iterator.
15705 (sve_int_op): Remove int attribute and add "minus" to the code
15707 (SVE_COND_INT_OP): Delete.
15708 (SVE_COND_FP_OP): Rename to...
15709 (SVE_COND_FP_BINARY): ...this.
15711 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15713 * optabs.c (can_reuse_operands_p): New function.
15714 (maybe_legitimize_operands): Try to reuse the results for
15717 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15719 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
15720 Add {q} suffix to insn mnemonic.
15722 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15724 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
15725 (msp430_warn_func_return): New.
15727 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
15729 * fold-const.c (tree_nonzero_bits): New function.
15730 * fold-const.h (tree_nonzero_bits): Likewise.
15731 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
15732 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
15734 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15738 * varasm.c (assemble_alias): Check ifunc_resolver only on
15741 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15744 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
15745 when memory input operand is handled.
15747 2018-05-24 Luis Machado <luis.machado@linaro.org>
15749 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
15751 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
15753 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15755 * match.pd: Delay FMA folds until after vectorization.
15757 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
15760 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15761 address check not strict.
15763 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15765 * gimple-match.h (gimple_match_op): New class.
15766 (mprts_hook): Replace parameters with a gimple_match_op *.
15767 (maybe_build_generic_op): Likewise.
15768 (gimple_simplified_result_is_gimple_val): Replace parameters with
15769 a const gimple_match_op *.
15770 (gimple_simplify): Replace code_helper * and tree * parameters with
15771 a gimple_match_op * parameter.
15772 (gimple_resimplify1): Replace code_helper *, tree and tree *
15773 parameters with a gimple_match_op * parameter.
15774 (gimple_resimplify2): Likewise.
15775 (gimple_resimplify3): Likewise.
15776 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
15777 parameters with a gimple_match_op * parameter.
15778 * gimple-match-head.c (gimple_simplify): Change prototypes of
15779 auto-generated functions to take a gimple_match_op * instead of
15780 separate code_helper * and tree * parameters. Make the same
15781 change in the top-level overload and update calls to the
15782 gimple_resimplify routines. Update calls to the auto-generated
15783 functions and to maybe_push_res_to_seq in the publicly-facing
15784 operation-specific gimple_simplify overloads.
15785 (gimple_match_op::MAX_NUM_OPS): Define.
15786 (gimple_resimplify1): Replace rcode and ops with a single res_op
15787 parameter. Update call to gimple_simplify.
15788 (gimple_resimplify2): Likewise.
15789 (gimple_resimplify3): Likewise.
15790 (mprts_hook): Replace parameters with a gimple_match_op *.
15791 (maybe_build_generic_op): Likewise.
15792 (build_call_internal): Replace type, nargs and ops with
15793 a gimple_match_op *.
15794 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
15795 with a single gimple_match_op *. Update calls to mprts_hook,
15796 build_call_internal and gimple_simplified_result_is_gimple_val.
15797 Factor out code that is common to the tree_code and combined_fn cases.
15798 * genmatch.c (expr::gen_transform): Replace tem_code and
15799 tem_ops with a gimple_match_op called tem_op. Update calls
15800 to the gimple_resimplify functions and maybe_push_res_to_seq.
15801 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
15802 res_ops. Update call to the gimple_resimplify functions.
15803 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
15804 (decision_tree::gen): Make the functions take a gimple_match_op *
15805 called res_op instead of separate res_code and res_ops parameters.
15806 Update call accordingly.
15807 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
15808 and ops with a single res_op parameter. Update calls to
15809 maybe_build_generic_op and maybe_push_res_to_seq.
15810 (fold_stmt_1): Update calls to gimple_simplify and
15811 replace_stmt_with_simplification.
15812 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
15813 and gimple_simplified_result_is_gimple_val.
15814 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
15816 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
15817 with a gimple_match_op *.
15818 (vn_nary_build_or_lookup): Likewise. Update call to
15819 vn_nary_build_or_lookup_1.
15820 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
15821 gimple_match_op *. Update calls to the gimple_resimplify routines
15822 and to gimple_simplified_result_is_gimple_val.
15823 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
15824 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
15825 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
15826 (visit_nary_op): Likewise.
15827 (visit_reference_op_load): Likewise.
15829 2018-05-23 Luis Machado <luis.machado@linaro.org>
15831 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
15832 modifier for printing the step amount.
15834 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
15837 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
15840 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
15842 * doc/sourcebuild.texi (Endianness): New subsubsection.
15844 2018-05-23 Luis Machado <luis.machado@linaro.org>
15846 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15847 <prefetch_dynamic_strides>: New const bool field.
15848 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15849 prefetch_dynamic_strides.
15850 (exynosm1_prefetch_tune): Likewise.
15851 (thunderxt88_prefetch_tune): Likewise.
15852 (thunderx_prefetch_tune): Likewise.
15853 (thunderx2t99_prefetch_tune): Likewise.
15854 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
15856 (aarch64_override_options_internal): Update to set
15857 PARAM_PREFETCH_DYNAMIC_STRIDES.
15858 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15859 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15860 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15861 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15862 prefetch-dynamic-strides setting.
15864 2018-05-23 Luis Machado <luis.machado@linaro.org>
15866 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15867 <minimum_stride>: New const int field.
15868 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15869 minimum_stride field defaulting to -1.
15870 (exynosm1_prefetch_tune): Likewise.
15871 (thunderxt88_prefetch_tune): Likewise.
15872 (thunderx_prefetch_tune): Likewise.
15873 (thunderx2t99_prefetch_tune): Likewise.
15874 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
15875 <default_opt_level>: Set to 3.
15876 (aarch64_override_options_internal): Update to set
15877 PARAM_PREFETCH_MINIMUM_STRIDE.
15878 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15879 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15880 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15881 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15882 stride is constant and is below the minimum stride threshold.
15884 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15886 * config/arm/arm-cpus.in (mode26): Delete.
15887 (armv4): Delete mode26 reference.
15888 * config/arm/arm.c (arm_configure_build_target): Delete use of
15891 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
15893 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
15895 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
15896 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
15898 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
15899 (floatunsdidf2): Ditto.
15901 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
15903 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
15904 (fixuns_trunc<mode>si2_avx512f): Ditto.
15905 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
15906 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
15907 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
15909 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
15911 PR rtl-optimization/79985
15912 * df-scan.c (df_insn_refs_collect): Remove special case for
15913 global registers and asm statements.
15915 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
15917 * extend.texi (Global Register Variables): Rewrite the bullet list.
15918 Note that the register is available for allocation. Note that access
15919 via inline asm must use constraints. Add note about async-signal
15920 handlers. Remove paragraph about automagic register selection.
15922 2018-05-23 Richard Biener <rguenther@suse.de>
15924 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
15925 of fixed offset from memset VN.
15927 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
15929 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
15930 first_interp field.
15931 (alloc_cand_and_find_basis): Initialize first_interp field.
15932 (slsr_process_mul): Modify first_interp field.
15933 (slsr_process_add): Likewise.
15934 (slsr_process_cast): Modify first_interp field for each new
15936 (slsr_process_copy): Likewise.
15937 (dump_candidate): Dump first_interp field.
15938 (replace_mult_candidate): Process all interpretations, not just
15940 (replace_rhs_if_not_dup): Likewise.
15941 (replace_one_candidate): Likewise.
15943 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
15945 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
15947 (aarch64_needs_frame_chain): New function.
15948 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
15950 2018-05-23 Sudakshina Das <sudi.das@arm.com>
15953 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
15954 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
15955 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
15956 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
15957 as true for strict-align.
15958 (aarch64_can_inline_p): Perform checks even when callee has no
15959 attributes to check for strict alignment.
15960 * doc/extend.texi (AArch64 Function Attributes): Document
15962 * doc/invoke.texi: (AArch64 Options): Likewise.
15964 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
15966 PR tree-optimization/85853
15967 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
15968 the handling of the root of the node to...
15969 (vect_slp_analyze_node_operations_1): ...this new function,
15970 and run the whole thing with the child nodes' def types
15971 set according to their SLP node's def type.
15973 2018-05-23 Richard Biener <rguenther@suse.de>
15975 PR middle-end/85874
15976 * tree-data-ref.c (create_runtime_alias_checks): Defer
15977 and ignore overflow warnings.
15979 2018-05-23 Yury Gribov <tetra2005@gmail.com>
15981 PR tree-optimization/85822
15982 * tree-vrp.c (is_masked_range_test): Fix handling of negative
15985 2018-05-23 Richard Biener <rguenther@suse.de>
15987 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15988 memset constants via native_interpret_expr.
15990 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
15993 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
15995 (cgraph_node::create_alias): Likewise.
15996 (cgraph_node::get_availability): Check ifunc_resolver instead
15997 of looking up ifunc attribute.
15998 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
15999 * varasm.c (do_assemble_alias): Likewise.
16000 (assemble_alias): Likewise.
16001 (default_binds_local_p_3): Likewise.
16002 * cgraph.h (cgraph_node): Add ifunc_resolver.
16003 (cgraph_node::only_called_directly_or_aliased_p): Return false
16004 for IFUNC resolver.
16005 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
16007 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
16008 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
16009 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
16010 instead of looking up ifunc attribute.
16012 2018-05-22 Luis Machado <luis.machado@linaro.org>
16014 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
16016 2018-05-22 Martin Sebor <msebor@redhat.com>
16018 PR middle-end/85359
16019 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
16020 only when expasion succeeds.
16021 (expand_builtin_strcmp): Same.
16022 (expand_builtin_strncmp): Same.
16024 2018-05-22 Martin Sebor <msebor@redhat.com>
16026 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
16028 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16029 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16031 * config/aarch64/aarch64-ldpstp.md: Replace uses of
16032 aarch64_mem_pair_operand with memory_operand and delete operand swapping
16034 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16035 Add check for legitimate_address.
16036 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
16037 (aarch64_swap_ldrstr_operands): New.
16038 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
16041 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16042 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16044 * config/aarch64/aarch64.md: New patterns to generate stp
16046 (store_pair_sw, store_pair_dw): New patterns to generate stp for
16047 single words and double words.
16048 (load_pair_sw, load_pair_dw): Likewise.
16049 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
16051 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
16053 * config/aarch64/aarch64-ldpstp.md: Modify peephole
16054 for different mode ldpstp and add peephole for merged zero stores.
16055 Likewise for loads.
16056 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16058 (aarch64_gen_store_pair): Rename calls to match new patterns.
16059 (aarch64_gen_load_pair): Rename calls to match new patterns.
16060 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
16061 (load_pair<DREG:mode><DREG2:mode>): ... This.
16062 (store_pair<mode>): Rename to...
16063 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
16064 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
16065 New mode iterators.
16066 (V_INT_EQUIV): Handle SImode.
16067 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
16070 2018-05-22 Martin Sebor <msebor@redhat.com>
16073 * calls.c (maybe_warn_nonstring_arg): Use string length to set
16074 or ajust the presumed bound on an operation to avoid unnecessary
16077 2018-05-22 Martin Sebor <msebor@redhat.com>
16079 PR tree-optimization/85826
16080 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
16081 assuming that a DECL necesarily has a constant size.
16083 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
16085 PR middle-end/85862
16086 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
16088 2018-05-22 Richard Biener <rguenther@suse.de>
16090 PR tree-optimization/85834
16091 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
16092 non-constant and non-zero memset arguments.
16094 2018-05-22 Martin Liska <mliska@suse.cz>
16097 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
16099 2018-05-22 Richard Biener <rguenther@suse.de>
16101 PR tree-optimization/85863
16102 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
16103 comparisons when vectype is specified.
16104 (vectorizable_condition): Do not specify vectype for
16105 vect_is_simple_cond when SLP vectorizing.
16107 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
16110 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
16111 define __ibm128 as long double.
16112 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
16113 as a distinct type when IEEE 128-bit support is enabled.
16114 (init_float128_ieee): Fix up conversions between IFmode and IEEE
16115 128-bit types to use the correct functions.
16116 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
16117 convert between 128-bit floating point types that have different
16118 modes but the same representation, instead of using gen_lowpart to
16120 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
16122 (IFKF_reg): New attributes to give the register constraints for
16124 (extend<mode>tf2_internal): New insns to mark an explicit
16125 conversion between 128-bit floating point types that have a
16126 different mode but share the same representation.
16128 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
16130 PR tree-optimization/85814
16131 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
16132 a null return from get_strinfo when unsharing the next
16133 strinfo in the chain.
16135 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16138 * varasm.c (weak_finish): Clean up weak_decls.
16140 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16142 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
16143 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
16144 UNSPEC_UADALP values.
16145 * config/aarch64/iterators.md (ABAL): New int iterator.
16148 (sur): Add mappings for the above.
16149 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
16151 (aarch64_<sur>abal<mode>_4): Likewise.
16152 (aarch64_<sur>adalp<mode>_3): Likewise.
16153 (<sur>sadv16qi): New define_expand.
16155 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
16157 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
16158 (*movdf_internal): Ditto.
16159 (*rcpsf2_sse): Ditto.
16160 (*rsqrtsf2_sse): Ditto.
16161 (*sqrt<mode>2_sse): Ditto.
16163 2018-05-21 Tamar Christina <tamar.christina@arm.com>
16165 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
16167 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
16168 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
16169 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
16170 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
16172 * config/aarch64/arm_neon.h: Likewise.
16173 * config/aarch64/iterators.md (VQ_I): New.
16175 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
16177 * config.gcc: Add arc/t-multilib-linux to tmake_file for
16179 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
16182 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16184 * config/nds32/constraints.md (S): New constraint.
16185 * config/nds32/nds32.md (call_internal): Use constraint S.
16186 (call_value_internal): Likewise.
16187 (sibcall_internal): Likewise.
16188 (sibcall_value_internal): Likewise.
16190 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16191 Chung-Ju Wu <jasonwucj@gmail.com>
16193 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
16194 into consideration.
16196 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16197 Chung-Ju Wu <jasonwucj@gmail.com>
16199 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
16200 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
16201 (nds32_rtx_costs_impl): Simplify.
16202 (nds32_address_cost_impl): Simplify.
16203 (nds32_init_rtx_costs): New function.
16204 (nds32_rtx_costs_speed_prefer): Likewise.
16205 (nds32_rtx_costs_size_prefer): Likewise.
16206 (nds32_address_cost_speed_prefer): Likewise.
16207 (nds32_address_cost_speed_fwprop): Likewise.
16208 (nds32_address_cost_size_prefer): Likewise.
16209 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
16210 * config/nds32/nds32.c (nds32_option_override): Use
16211 nds32_init_rtx_costs function.
16213 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16215 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
16216 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
16217 (TARGET_PIPELINE_N8): Likewise.
16218 (TARGET_PIPELINE_N10): Likewise.
16219 (TARGET_PIPELINE_N13): Likewise.
16220 (TARGET_PIPELINE_GRAYWOLF): Likewise.
16222 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
16224 * config/nds32/nds32-fpu.md: Update copyright year.
16226 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16228 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
16230 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16232 * config/nds32/nds32.c
16233 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
16234 * config/nds32/nds32.opt (minline-asm-r15): New option.
16236 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16238 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
16240 * config/nds32/nds32.md (abssi2): New pattern.
16242 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
16244 * config/i386/i386.md (rex64namesuffix): New mode attribute.
16245 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
16246 Merge insn pattern from sse_cvtsi2ss<round_name> and
16247 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
16248 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
16249 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
16250 using SWI48 mode iterator.
16251 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
16252 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
16253 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
16254 pattern from sse_cvttss2si<round_saeonly_name>
16255 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16256 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16257 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16258 using SWI48 mode iterator.
16259 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16260 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16261 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16262 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16263 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16264 using SWI48 mode iterator.
16265 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16266 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16267 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16268 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16269 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16270 SWI48 mode iterator.
16271 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16272 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16273 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16274 pattern from sse_cvttsd2si<round_saeonly_name>
16275 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16277 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16279 * config/nds32/nds32-md-auxiliary.c
16280 (nds32_valid_smw_lwm_base_p): Refine.
16281 (nds32_output_smw_single_word): Refine.
16282 (nds32_output_smw_double_word): New.
16283 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16285 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16287 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16288 (nds32_output_stack_pop): Refine.
16289 (nds32_expand_unaligned_load): Refine.
16290 (nds32_expand_unaligned_store): Refine.
16292 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16293 Chung-Ju Wu <jasonwucj@gmail.com>
16295 * config/nds32/constants.md: Add TP_REGNUM constant.
16296 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16297 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16299 * config/nds32/nds32-doubleword.md: Consider flag_pic.
16300 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16301 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16302 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16303 and PIC code generation.
16304 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16306 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16308 * config/nds32/nds32.md: Support TLS and PIC.
16309 * config/nds32/nds32.c: Support TLS and PIC.
16310 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16311 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16314 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16316 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16317 mode with E_ prefix.
16319 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16320 Chung-Ju Wu <jasonwucj@gmail.com>
16322 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16323 * config/nds32/nds32-md-auxiliary.c
16324 (symbolic_reference_mentioned_p): New.
16325 (nds32_legitimize_ict_address): New.
16326 (nds32_expand_ict_move): New.
16327 (nds32_indirect_call_referenced_p): New.
16328 (nds32_symbol_binds_local_p): Delete.
16329 (nds32_long_call_p): Modify.
16330 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16331 * config/nds32/nds32-protos.h
16332 (symbolic_reference_mentioned_p): Declare.
16333 (nds32_legitimize_ict_address): Declare.
16334 (nds32_expand_ict_move): Declare.
16335 (nds32_indirect_call_referenced_p): Declare.
16336 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16337 (nds32_relax_group): Use nds32_ict_const_p as condition.
16338 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16339 (nds32_asm_file_start): Output ict_model directive in asm code.
16340 (nds32_legitimate_address_p): Consider indirect call.
16341 (nds32_print_operand): Consider indirect call.
16342 (nds32_print_operand_address): Consider indirect call.
16343 (nds32_insert_attributes): Handle "indirect_call" attribute.
16344 (TARGET_LEGITIMATE_ADDRESS_P): Define.
16345 (TARGET_LEGITIMATE_CONSTANT_P): Define.
16346 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16347 (TARGET_DELEGITIMIZE_ADDRESS): Define.
16348 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16349 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16350 (TARGET_ICT_MODEL_SMALL): Define.
16351 (TARGET_ICT_MODEL_LARGE): Define.
16352 * config/nds32/nds32.md (movsi): Consider ict model.
16353 (call, call_value): Consider ict model.
16354 (sibcall, sibcall_value): Consider ict model.
16355 * config/nds32/nds32.opt (mict-model): New option.
16356 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16359 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
16360 Monk Chiang <sh.chiang04@gmail.com>
16361 Jim Wilson <jimw@sifive.com>
16363 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16364 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
16365 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16366 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16367 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
16368 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16369 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16370 compute save_libcall_adjustment properly.
16371 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16372 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16373 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16374 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16375 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16376 (ABI_SPEC): Handle mabi=ilp32e.
16377 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
16378 (RVE): Add RVE mask.
16379 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
16380 <-march>: Add rv32e as an example.
16382 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
16385 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
16386 (intra_create_variable_infos): Handle C++ constructors.
16388 2018-05-18 Martin Liska <mliska@suse.cz>
16390 * passes.def: Remove a redundant pass.
16392 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
16395 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
16397 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16399 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
16401 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
16403 (armv2, armv2a, armv3, armv3m): Delete architectures.
16404 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
16405 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
16406 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
16408 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
16409 (*mulsidi3adddi): Likewise.
16410 (mulsidi3): Likewise.
16411 (*mulsidi3_nov6): Likewise.
16412 (umulsidi3): Likewise.
16413 (umulsidi3_nov6): Likewise.
16414 (umaddsidi4): Likewise.
16415 (*umulsidi3adddi): Likewise.
16416 (smulsi3_highpart): Likewise.
16417 (*smulsi3_highpart_nov6): Likewise.
16418 (umulsi3_highpart): Likewise.
16419 (*umulsi3_highpart_nov6): Likewise.
16420 * config/arm/arm.h (arm_arch3m): Delete.
16421 * config/arm/arm.c (arm_arch3m): Delete.
16422 (arm_option_override_internal): Update armv3-related comment.
16423 (arm_configure_build_target): Delete use of isa_bit_mode32.
16424 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
16425 (arm_rtx_costs_internal): Delete check of arm_arch3m.
16426 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
16427 (mulsa3): Likewise.
16428 (mulusa3): Likewise.
16429 * config/arm/arm-protos.h (arm_arch3m): Delete.
16430 * config/arm/arm-tables.opt: Regenerate.
16431 * config/arm/arm-tune.md: Likewise.
16432 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
16433 deleted architectures.
16435 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16437 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
16438 (armv5t, armv5te): New features.
16439 (ARMv5, ARMv5e): Delete fgroups.
16440 (ARMv5t, ARMv5te): Adjust for above changes.
16441 (ARMv6m): Likewise.
16442 (armv5, armv5e): Delete arches.
16443 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
16445 (*call_reg_arm): Likewise.
16446 (*call_value_reg_armv5): Likewise.
16447 (*call_value_reg_arm): Likewise.
16448 (*call_symbol): Likewise.
16449 (*call_value_symbol): Likewise.
16450 (*sibcall_insn): Likewise.
16451 (*sibcall_value_insn): Likewise.
16452 (clzsi2): Likewise.
16453 (prefetch): Likewise.
16454 (define_split and define_peephole2 dependent on arm_arch5):
16456 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
16458 (TARGET_ARM_QBIT): Likewise.
16459 (TARGET_DSP_MULTIPLY): Likewise.
16460 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
16461 (arm_arch5, arm_arch5e): Delete.
16462 (arm_arch5t, arm_arch5te): Declare.
16463 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
16464 (arm_arch5t): Declare.
16465 (arm_option_reconfigure_globals): Update for the above.
16466 (arm_options_perform_arch_sanity_checks): Update comment, replace
16467 use of arm_arch5 with arm_arch5t.
16468 (use_return_insn): Likewise.
16469 (arm_emit_call_insn): Likewise.
16470 (output_return_instruction): Likewise.
16471 (arm_final_prescan_insn): Likewise.
16472 (arm_coproc_builtin_available): Likewise.
16473 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
16474 arm_arch5e with arm_arch5t and arm_arch5te.
16475 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
16476 (arm_arch5t, arm_arch5te): Declare.
16477 * config/arm/arm-tables.opt: Regenerate.
16478 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
16479 * config/arm/t-multilib: Likewise.
16480 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
16481 instead of arm_arch5.
16482 (*call_reg_thumb1): Likewise.
16483 (*call_value_reg_thumb1_v5): Likewise.
16484 (*call_value_reg_thumb1): Likewise.
16485 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
16487 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
16489 2018-05-18 Martin Liska <mliska@suse.cz>
16491 PR gcov-profile/84846
16492 * doc/gcov.texi: Document -t option of gcov tool.
16494 2018-05-18 Martin Liska <mliska@suse.cz>
16496 PR gcov-profile/84846
16497 * gcov.c (print_usage): Add new -t option.
16498 (process_args): Handle the option.
16499 (generate_results): Use stdout as output when requested by
16502 2018-05-18 Martin Liska <mliska@suse.cz>
16504 PR gcov-profile/84846
16505 * coverage.c (coverage_init): Write PWD to .gcno file.
16506 * doc/gcov.texi: Document how working directory is printed.
16507 * gcov-dump.c (dump_gcov_file): Print PWD.
16508 * gcov.c (output_intermediate_file): Likewise.
16509 (read_graph_file): Read PWD string.
16510 (output_lines): Print PWD.
16512 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16514 PR middle-end/85817
16515 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
16516 for retval and return false if all args to phi are zero.
16518 2018-05-18 Richard Biener <rguenther@suse.de>
16520 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
16522 (evrp_dom_walker::before_dom_children): Call it.
16524 2018-05-18 Richard Biener <rguenther@suse.de>
16526 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
16527 results when processing array refs with variable index.
16529 2018-05-18 Toon Moene <toon@moene.org>
16531 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
16532 directly after that of -floop-interchange. Indicate that both
16533 options are enabled by default when specifying -O3.
16535 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16537 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
16538 iterator. Delete separate integer-mode vec_set<mode> expander.
16539 (aarch64_simd_vec_setv2di): Delete.
16540 (vec_setv2di): Delete.
16541 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
16542 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
16543 the "w, r" alternative.
16545 2018-05-18 Martin Liska <mliska@suse.cz>
16547 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
16548 * tree-pass.h (make_pass_lower_switch_O0): New function.
16549 * tree-switch-conversion.c (node_has_low_bound): Remove.
16550 (node_has_high_bound): Likewise.
16551 (node_is_bounded): Likewise.
16552 (class pass_lower_switch): Make it a template type and create
16554 (pass_lower_switch::execute): Add template argument.
16555 (make_pass_lower_switch): New function.
16556 (make_pass_lower_switch_O0): New function.
16557 (do_jump_if_equal): Remove.
16558 (emit_case_nodes): Simplify to just handle all 3 cases and leave
16559 all the hard work to tree optimization passes.
16561 2018-05-18 Martin Liska <mliska@suse.cz>
16563 * dbgcnt.c (limit_low): Renamed from limit.
16564 (limit_high): New variable.
16565 (dbg_cnt_is_enabled): Check for upper limit.
16566 (dbg_cnt): Adjust dumping.
16567 (dbg_cnt_set_limit_by_index): Add new argument for high
16569 (dbg_cnt_set_limit_by_name): Likewise.
16570 (dbg_cnt_process_single_pair): Parse new format.
16571 (dbg_cnt_process_opt): Use strtok.
16572 (dbg_cnt_list_all_counters): Remove 'value' and add
16574 * doc/invoke.texi: Document changes.
16576 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
16578 * doc/sourcebuild.texi (scalar_all_fma): Document.
16579 * tree.def (FMA_EXPR): Delete.
16580 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
16581 * internal-fn.c (ternary_direct): New macro.
16582 (expand_ternary_optab_fn): Likewise.
16583 (direct_ternary_optab_supported_p): Likewise.
16584 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
16585 * builtins.c (fold_builtin_fma): Delete.
16586 (fold_builtin_3): Don't call it.
16587 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
16588 * expr.c (expand_expr_real_2): Likewise.
16589 * fold-const.c (operand_equal_p): Likewise.
16590 (fold_ternary_loc): Likewise.
16591 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
16592 * gimple.c (DEFTREECODE): Likewise.
16593 * gimplify.c (gimplify_expr): Likewise.
16594 * optabs-tree.c (optab_for_tree_code): Likewise.
16595 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
16596 * tree-eh.c (operation_could_trap_p): Likewise.
16597 (stmt_could_throw_1_p): Likewise.
16598 * tree-inline.c (estimate_operator_cost): Likewise.
16599 * tree-pretty-print.c (dump_generic_node): Likewise.
16600 (op_code_prio): Likewise.
16601 * tree-ssa-loop-im.c (stmt_cost): Likewise.
16602 * tree-ssa-operands.c (get_expr_operands): Likewise.
16603 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
16604 * fold-const-call.h (fold_fma): Delete.
16605 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
16606 CFN_FNMA and CFN_FNMS.
16607 (fold_fma): Delete.
16608 * genmatch.c (combined_fn): New enum.
16609 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
16610 (commutative_op): New function.
16611 (commutate): Use it. Handle more than 2 operands.
16612 (dt_operand::gen_gimple_expr): Use commutative_op.
16613 (parser::parse_expr): Allow :c to be used with non-binary
16614 operators if the commutative operand is known.
16615 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
16616 CFN_FMS, CFN_FNMA and CFN_FNMS.
16617 (backprop::process_assign_use): Remove FMA_EXPR handling.
16618 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
16619 (gen_hsa_fma): New function.
16620 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
16621 IFN_FNMA and IFN_FNMS.
16622 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
16623 * gimple-fold.h (follow_all_ssa_edges): Declare.
16624 * gimple-fold.c (follow_all_ssa_edges): New function.
16625 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
16626 gimple_build interface and use follow_all_ssa_edges to fold the result.
16627 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
16628 instead of checking for optabs directly.
16629 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
16630 rather than FMA_EXPRs.
16631 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
16632 call to IFN_FMA instead of an FMA_EXPR.
16634 2018-05-17 Jim Wilson <jimw@sifive.com>
16636 * expr.c (do_tablejump): When converting index to Pmode, if we have a
16637 sign extended promoted subreg, and the range does not have the sign bit
16638 set, then do a sign extend.
16640 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
16641 test, check for sign extended subreg and/or constant operands, and
16642 do a sign extend in that case.
16644 2018-05-17 Steve Ellcey <sellcey@cavium.com>
16646 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
16647 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
16649 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
16650 Change logics_shift_reg to logics_shift_imm.
16651 (thunderx2t99_fp_loadpair_basic): Delete.
16652 (thunderx2t99_fp_storepair_basic): Delete.
16653 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
16654 (thunderx2t99_asimd_polynomial): Delete.
16655 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
16656 and neon_fp_mul_d_scalar_q.
16657 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
16658 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
16659 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
16660 (thunderx2t99_asimd_lut): Add missing tbl types.
16661 (thunderx2t99_asimd_ext): Delete.
16662 (thunderx2t99_asimd_load1_1_mult): Delete.
16663 (thunderx2t99_asimd_load1_2_mult): Delete.
16664 (thunderx2t99_asimd_load1_ldp): New.
16665 (thunderx2t99_asimd_load1): New.
16666 (thunderx2t99_asimd_load2): Add missing *load2* types.
16667 (thunderx2t99_asimd_load3): New.
16668 (thunderx2t99_asimd_load4): New.
16669 (thunderx2t99_asimd_store1_1_mult): Delete.
16670 (thunderx2t99_asimd_store1_2_mult): Delete.
16671 (thunderx2t99_asimd_store2_mult): Delete.
16672 (thunderx2t99_asimd_store2_onelane): Delete.
16673 (thunderx2t99_asimd_store_stp): New.
16674 (thunderx2t99_asimd_store1): New.
16675 (thunderx2t99_asimd_store2): New.
16676 (thunderx2t99_asimd_store3): New.
16677 (thunderx2t99_asimd_store4): New.
16679 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
16681 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
16682 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
16684 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
16685 Segher Boessenkool <segher@kernel.crashing.org>
16688 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
16691 2018-05-17 Richard Biener <rguenther@suse.de>
16693 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
16694 for pruning loop and prune defs feeding only already visited PHIs.
16696 2018-05-17 Richard Biener <rguenther@suse.de>
16698 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
16700 2018-05-17 Bin Cheng <bin.cheng@arm.com>
16701 Richard Biener <rguenther@suse.de>
16703 PR tree-optimization/85793
16704 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
16705 for VMAT_ELEMENTWISE.
16707 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16709 * internal-fn.h (lookup_internal_fn): Declare
16710 * internal-fn.c (lookup_internal_fn): New function.
16711 * gimple.c (gimple_build_call_from_tree): Handle calls to
16712 internal functions.
16713 * gimple-pretty-print.c (dump_gimple_call): Print "." before
16714 internal function names.
16715 * tree-pretty-print.c (dump_generic_node): Likewise.
16716 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
16718 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16720 * gimple-fold.h (gimple_build): Make the function forms take
16721 combined_fn rather than built_in_function.
16722 (gimple_simplify): Likewise.
16723 * gimple-match-head.c (gimple_simplify): Likewise.
16724 * gimple-fold.c (gimple_build): Likewise.
16725 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
16726 rather than gimple_build_call_internal.
16727 (get_initial_defs_for_reduction): Likewise.
16728 (vect_create_epilog_for_reduction): Likewise.
16729 (vectorizable_live_operation): Likewise.
16731 2018-05-17 Martin Liska <mliska@suse.cz>
16733 * gimple-ssa-sprintf.c (format_directive): Do not use
16734 space in between 'G_' and '('.
16736 2018-05-17 Jakub Jelinek <jakub@redhat.com>
16739 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
16740 even if the mask is not all ones.
16743 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
16745 (ix86_gimple_fold_builtin): Likewise.
16748 * config/i386/i386.c: Include tree-vector-builder.h.
16749 (ix86_vector_shift_count): New function.
16750 (ix86_fold_builtin): Fold shift builtins by scalar count.
16751 (ix86_gimple_fold_builtin): Likewise.
16753 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
16754 _mm512_setzero): New intrinsics.
16756 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
16757 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16759 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
16760 code generation for cases where splatting a value is not useful.
16761 * simplify-rtx.c (simplify_ternary_operation): Simplify
16762 vec_merge across a vec_duplicate and a paradoxical subreg forming
16763 a vector mode to a vec_concat.
16765 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
16767 * config.gcc: Support "goldmont-plus".
16768 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16770 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16771 PROCESSOR_GOLDMONT_PLUS.
16772 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
16773 (processor_target_table): Add "goldmont-plus".
16774 (PTA_GOLDMONT_PLUS): Define.
16775 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
16776 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
16777 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
16778 (fold_builtin_cpu): Add "goldmont-plus".
16779 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
16780 (ix86_option_override_internal): Add "goldmont-plus".
16781 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
16782 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
16783 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
16784 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
16786 2018-05-17 Richard Biener <rguenther@suse.de>
16788 PR tree-optimization/85757
16789 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
16790 remove defs that only feed that PHI from further processing.
16792 2018-05-16 Jim Wilson <jimw@sifive.com>
16794 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
16796 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
16798 2018-05-16 Mark Wielaard <mark@klomp.org>
16800 * dwarf2out.c (count_index_strings): New function.
16801 (output_indirect_strings): Call count_index_strings and generate
16802 header for dwarf_version >= 5.
16804 2018-05-16 Mark Wielaard <mark@klomp.org>
16806 * dwarf2out.c (dwarf_FORM): New function.
16807 (set_indirect_string): Use dwarf_FORM.
16808 (reset_indirect_string): Likewise.
16809 (size_of_die): Likewise.
16810 (value_format): Likewise.
16811 (output_die): Likewise.
16812 (add_skeleton_AT_string): Likewise.
16813 (output_macinfo_op): Likewise.
16814 (index_string): Likewise.
16815 (output_index_string_offset): Likewise.
16816 (output_index_string): Likewise.
16817 (count_index_strings): Likewise.
16819 2018-05-16 Carl Love <cel@us.ibm.com>
16821 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16822 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
16824 2018-05-16 Martin Jambor <mjambor@suse.cz>
16826 * ipa-prop.c (ipa_free_all_edge_args): Remove.
16827 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
16829 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
16831 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
16832 (fnma<mode>4): Likewise.
16833 (fms<mode>4): Likewise.
16834 (fnms<mode>4): Likewise.
16835 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
16836 (aarch64_fnma<mode>4): Likewise.
16837 (aarch64_fms<mode>4): Likewise.
16838 (aarch64_fnms<mode>4): Likewise.
16839 (aarch64_fnmadd<mode>4): Likewise.
16841 2018-05-16 Jason Merrill <jason@redhat.com>
16843 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
16845 2018-05-16 Richard Biener <rguenther@suse.de>
16847 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
16848 (dump_stmt_cost): Declare.
16849 (add_stmt_cost): Dump cost we add.
16850 (add_stmt_costs): New function.
16851 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
16852 No longer exported.
16853 (vect_analyze_stmt): Adjust prototype.
16854 (vectorizable_condition): Likewise.
16855 (vectorizable_live_operation): Likewise.
16856 (vectorizable_reduction): Likewise.
16857 (vectorizable_induction): Likewise.
16858 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
16859 cost vector to pass to vectorizable_ and record afterwards.
16860 (vect_model_reduction_cost): Take cost vector argument and adjust.
16861 (vect_model_induction_cost): Likewise.
16862 (vectorizable_reduction): Likewise.
16863 (vectorizable_induction): Likewise.
16864 (vectorizable_live_operation): Likewise.
16865 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
16866 SLP_TREE_NUMBER_OF_VEC_STMTS.
16867 (vect_analyze_slp_cost_1): Remove.
16868 (vect_analyze_slp_cost): Likewise.
16869 (vect_slp_analyze_node_operations): Take visited args and
16870 a target cost vector. Avoid processing already visited stmt sets.
16871 (vect_slp_analyze_operations): Use a local cost vector to gather
16872 costs and register those of non-discarded instances.
16873 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
16874 (vect_schedule_slp_instance): Remove copying of
16875 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
16877 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
16878 adding cost. Record cost entry location.
16879 (vect_prologue_cost_for_slp_op): Function to compute cost of
16880 a constant or invariant generated for SLP vect in the prologue,
16881 split out from vect_analyze_slp_cost_1.
16882 (vect_model_simple_cost): Make static. Adjust for SLP costing.
16883 (vect_model_promotion_demotion_cost): Likewise.
16884 (vect_model_store_cost): Likewise, make static.
16885 (vect_model_load_cost): Likewise.
16886 (vectorizable_bswap): Add cost vector arg and adjust.
16887 (vectorizable_call): Likewise.
16888 (vectorizable_simd_clone_call): Likewise.
16889 (vectorizable_conversion): Likewise.
16890 (vectorizable_assignment): Likewise.
16891 (vectorizable_shift): Likewise.
16892 (vectorizable_operation): Likewise.
16893 (vectorizable_store): Likewise.
16894 (vectorizable_load): Likewise.
16895 (vectorizable_condition): Likewise.
16896 (vectorizable_comparison): Likewise.
16897 (can_vectorize_live_stmts): Likewise.
16898 (vect_analyze_stmt): Likewise.
16899 (vect_transform_stmt): Adjust calls to vectorizable_*.
16900 * tree-vectorizer.c: Include gimple-pretty-print.h.
16901 (dump_stmt_cost): New function.
16903 2018-05-16 Richard Biener <rguenther@suse.de>
16905 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
16906 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
16907 * tree-ssa-dse.c: Include tree-ssa-loop.h.
16908 (check_name): New callback.
16909 (dse_classify_store): Track cycles via a visited bitmap of PHI
16910 defs and simplify handling of in-loop and across loop dead stores
16911 and properly fail for loop-variant refs. Handle byte-tracking with
16912 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
16915 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
16917 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
16918 (vect_get_mask_type_for_stmt): Likewise.
16919 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
16921 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
16922 to determine the statement's vector type and the vector type that
16923 should be used for calculating nunits. Deal with cases in which
16924 the type has to be deferred.
16925 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
16926 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
16927 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
16928 (vect_determine_vf_for_stmt): New functions, split out from...
16929 (vect_determine_vectorization_factor): ...here.
16930 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
16931 (vect_get_mask_type_for_stmt): New functions, split out from
16932 vect_determine_vectorization_factor.
16934 2018-05-16 Richard Biener <rguenther@suse.de>
16936 * tree-cfg.c (verify_gimple_assign_ternary): Properly
16937 verify the [VEC_]COND_EXPR embedded comparison.
16939 2018-05-15 Martin Sebor <msebor@redhat.com>
16941 PR tree-optimization/85753
16942 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
16943 RECORD_TYPE in addition to ARRAY_TYPE.
16945 2018-05-15 Martin Sebor <msebor@redhat.com>
16947 PR middle-end/85643
16948 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
16950 2018-05-15 Richard Biener <rguenther@suse.de>
16952 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
16953 add by_clobber_p one. Change algorithm to collect all defs
16954 representing uses we need to walk and try reducing them to
16955 a single one before failing.
16956 (dse_dom_walker::dse_optimize_stmt): Adjust.
16958 2018-05-13 Mark Wielaard <mark@klomp.org>
16960 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
16961 (size_of_loc_descr): Likewise.
16962 (output_loc_operands): Likewise.
16963 (output_loc_operands_raw): Likewise.
16964 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
16965 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
16966 (hash_loc_operands): Likewise.
16967 (compare_loc_operands): Likewise.
16969 2018-05-14 Mark Wielaard <mark@klomp.org>
16971 * dwarf2out.c (count_index_addrs): New function.
16972 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
16974 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16976 PR tree-optimization/83648
16977 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
16978 return value as malloc candidate.
16980 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16983 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
16984 param as true in call to suggest_attribute.
16986 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
16988 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
16989 -mreadonly-in-sdata.
16991 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16993 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
16995 (aarch64_crypto_aesd_fused): Likewise.
16997 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
16999 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
17000 (movsi_aarch64): Likewise.
17001 (load_pairsi): Likewise.
17002 (load_pairdi): Likewise.
17003 (store_pairsi): Likewise.
17004 (store_pairdi): Likewise.
17005 (load_pairsf): Likewise.
17006 (load_pairdf): Likewise.
17007 (store_pairsf): Likewise.
17008 (store_pairdf): Likewise.
17009 (zero_extend): Likewise.
17010 (trunc): Swap alternatives.
17011 (fcvt_target): Add '?' to prefer w over r.
17013 2018-05-14 Jakub Jelinek <jakub@redhat.com>
17016 * config/i386/i386.md: Disallow non-commutative arithmetics in
17017 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
17018 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
17019 in the peephole2 before it.
17021 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
17023 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
17024 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
17025 (ix86_handle_option): Handle -mcldemote.
17026 * config.gcc: New header.
17027 * config/i386/cldemoteintrin.h: New file.
17028 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
17029 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17031 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17032 OPTION_MASK_ISA_CLDEMOTE.
17033 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
17034 (ix86_valid_target_attribute_inner_p): Ditto.
17035 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
17036 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
17037 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
17038 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
17039 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
17041 * config/i386/i386.opt: Add -mcldemote.
17042 * config/i386/x86intrin.h: New header.
17043 * doc/invoke.texi: Add -mcldemote.
17045 2018-05-14 Richard Biener <rguenther@suse.de>
17047 * doc/match-and-simplify.texi: Adjust :s documentation.
17049 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
17051 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
17052 intended memcpy size.
17053 (REORDER_45): Likewise.
17055 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
17057 * sort.cc: New file.
17058 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
17059 * vec.c (qsort_chk): Use gcc_qsort.
17060 * Makefile.in (OBJS-libcommon): Add sort.o.
17061 (build/sort.o): New target. Use it...
17062 (BUILD_RTL): ... here, and...
17063 (build/gencfn-macros): ... here, and...
17064 (build/genmatch): ... here.
17066 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17067 Chung-Ju Wu <jasonwucj@gmail.com>
17069 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
17070 * config/nds32/nds32-graywolf.md: New file.
17071 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
17072 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
17074 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
17075 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
17076 * config/nds32/nds32.md (pipeline_model): Add graywolf.
17077 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
17078 * config/nds32/pipelines.md: Include n15 settings.
17080 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17081 Chung-Ju Wu <jasonwucj@gmail.com>
17083 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
17084 * config/nds32/nds32-n13.md: New file.
17085 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
17086 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
17088 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
17089 * config/nds32/nds32.md (pipeline_model): Add n13.
17090 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
17091 * config/nds32/pipelines.md: Include n13 settings.
17093 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17094 Chung-Ju Wu <jasonwucj@gmail.com>
17096 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
17097 * config/nds32/nds32-n10.md: New file.
17098 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
17099 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
17101 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
17102 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
17103 * config/nds32/nds32.md (pipeline_model): Add n10.
17104 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
17105 * config/nds32/pipelines.md: Include n10 settings.
17107 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
17108 Kito Cheng <kito.cheng@gmail.com>
17109 Chung-Ju Wu <jasonwucj@gmail.com>
17111 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
17112 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17113 Add enum values for DSP extension instructions.
17114 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
17116 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
17117 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
17118 New code iterators.
17119 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
17120 * config/nds32/nds32-dspext.md: New file for DSP implementation.
17121 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
17122 * config/nds32/nds32-intrinsic.md: Likewise.
17123 * config/nds32/nds32_intrinsic.h: Likewise.
17124 * config/nds32/nds32-md-auxiliary.c: Likewise.
17125 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
17126 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
17127 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
17128 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
17129 * config/nds32/nds32-protos.h: New declarations for DSP extension.
17130 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
17131 TYPE_DMAC in switch statement.
17132 * config/nds32/nds32.c: New checking and implementation for DSP
17133 extension instructions.
17134 * config/nds32/nds32.h: Likewise.
17135 * config/nds32/nds32.md: Likewise.
17136 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
17137 * config/nds32/predicates.md: Implement new predicates for DSP
17140 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17142 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
17143 Reformat alternatives and attributes so it is easier to identify
17144 which constraints/attributes go with which instruction.
17145 (mov<mode>_hardfloat32, FMOVE64): Likewise.
17146 (mov<mode>_softfloat32, FMOVE64): Likewise.
17147 (mov<mode>_hardfloat64, FMOVE64): Likewise.
17148 (mov<mode>_softfloat64, FMOVE64): Likewise.
17150 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
17152 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17154 (Basic PowerPC Built-in Functions): The new name of the
17155 subsection previously known as "PowerPC Built-in Functions".
17156 (Basic PowerPC Built-in Functions Available on all Configurations):
17158 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
17159 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
17160 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
17161 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
17163 2018-05-11 Martin Jambor <mjambor@suse.cz>
17166 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
17169 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17172 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
17174 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
17176 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
17177 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
17178 (ix86_handle_option): Handle -mwaitpkg.
17179 * config.gcc: New header.
17180 * config/i386/cpuid.h (bit_WAITPKG): New bit.
17181 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
17182 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
17184 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17185 OPTION_MASK_ISA_WAITPKG.
17186 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
17187 (ix86_option_override_internal): Add PTA_WAITPKG.
17188 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
17189 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
17190 IX86_BUILTIN_TPAUSE.
17191 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
17192 __builtin_ia32_umwait and __builtin_ia32_tpause.
17193 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
17194 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
17195 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
17196 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
17197 UNSPECV_TPAUSE): New.
17198 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
17199 * config/i386/i386.opt: Add -mwaitpkg.
17200 * config/i386/waitpkgintrin.h: New file.
17201 * config/i386/x86intrin.h: New header.
17202 * doc/invoke.texi: Add -mwaitpkg.
17204 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17207 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
17209 (cortex-m0): Use armv6s-m isa.
17210 (cortex-m0plus): Likewise.
17211 (cortex-m1): Likewise.
17212 (cortex-m0.small-multiply): Likewise.
17213 (cortex-m0plus.small-multiply): Likewise.
17214 (cortex-m1.small-multiply): Likewise.
17216 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
17217 Jakub Jelinek <jakub@redhat.com>
17219 PR tree-optimization/85692
17220 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
17221 source permute as well.
17223 2018-05-11 Martin Liska <mliska@suse.cz>
17226 * doc/extend.texi: Document LLVM style format for no_sanitize
17229 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17231 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
17232 mode_supports_vsx_dform_quad to mode_supports_dq_form.
17233 (mode_supports_vsx_dform_quad): Likewise.
17234 (mode_supports_vmx_dform): Move these functions to be next to the
17235 other mode_supports functions.
17236 (mode_supports_dq_form): Likewise.
17237 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
17238 mode_supports_dq_form.
17239 (reg_offset_addressing_ok_p): Likewise.
17240 (offsettable_ok_by_alignment): Likewise.
17241 (rs6000_legitimate_offset_address_p): Likewise.
17242 (legitimate_lo_sum_address_p): Likewise.
17243 (rs6000_legitimize_address): Likewise.
17244 (rs6000_legitimize_reload_address): Likewise.
17245 (rs6000_secondary_reload_inner): Likewise.
17246 (rs6000_preferred_reload_class): Likewise.
17247 (rs6000_output_move_128bit): Likewise.
17249 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17251 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
17252 Generate SImode target register for null target.
17253 <case IX86_BUILTIN_XGETBV>: Ditto.
17254 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
17255 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17257 2018-05-10 Carl Love <cel@us.ibm.com>
17259 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17260 dcbtt and dcbtstt if operands[2] is 0.
17262 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17265 * config/i386/sse.md (usadv64qi): New expander.
17267 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
17269 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17270 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17271 -maltivec=be support.
17272 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17273 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17274 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17275 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17276 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17277 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17278 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17279 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17280 altivec_vsumsws): Adjust.
17281 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17282 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17283 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17285 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17286 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17287 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17288 (altivec_lve<VI_char>x): Delete expand.
17289 (*altivec_lve<VI_char>x_internal): Rename to...
17290 (altivec_lve<VI_char>x): ... this.
17291 (altivec_lvxl_<mode>): Delete expand.
17292 (*altivec_lvxl_<mode>_internal): Rename to ...
17293 (altivec_lvxl_<mode>): ... this.
17294 (altivec_stvxl_<mode>): Delete expand.
17295 (*altivec_stvxl_<mode>_internal): Rename to ...
17296 (altivec_stvxl_<mode>): ... this.
17297 (altivec_stve<VI_char>x): Delete expand.
17298 (*altivec_stve<VI_char>x_internal): Rename to ...
17299 (altivec_stve<VI_char>x): ... this.
17300 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17301 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17302 reduc_plus_scal_<mode>): Adjust.
17303 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17305 (rs6000_cpu_cpp_builtins): Adjust.
17306 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17307 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17308 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17309 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17310 -maltivec=be support.
17311 (rs6000_split_vec_extract_var): Adjust.
17312 (rs6000_split_v4si_init): Adjust.
17313 (swap_selector_for_mode): Delete.
17314 (altivec_expand_lvx_be, altivec_expand_stvx_be,
17315 altivec_expand_stvex_be): Delete.
17316 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17317 -maltivec=be support.
17318 (rs6000_gimple_fold_builtin): Ditto.
17319 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17321 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17322 (TARGET_DIRECT_MOVE_64BIT): Adjust.
17323 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17324 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17325 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17326 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17327 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17328 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17329 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17330 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17331 anonymous split): Adjust.
17332 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17333 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17335 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
17337 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17338 when --with-gxx-include-dir is also specified.
17339 * configure: Regenerate.
17341 2018-05-09 Jim Wilson <jimw@sifive.com>
17344 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17345 * config/riscv/t-withmultilib: New.
17346 * config/riscv/withmultilib.h: New.
17347 * doc/install.texi: Document RISC-V --with-multilib-list support.
17349 2018-05-09 Richard Biener <rguenther@suse.de>
17351 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17353 (vect_bb_vectorization_profitable_p): Adjust. Compute
17354 actual scalar cost using the cost vector and the add_stmt_cost
17357 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17359 PR rtl-optimization/85645
17360 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17361 in the REG_CFA_REGISTER note for LR, don't leave it empty.
17363 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17365 PR rtl-optimization/85645
17366 * shrink-wrap.c (spread_components): Return a boolean saying if
17367 anything was changed.
17368 (try_shrink_wrapping_separate): Iterate spread_components until
17369 nothing changes anymore.
17371 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17373 PR rtl-optimization/85645
17374 * regrename.c (build_def_use): Also kill the chains that include the
17375 destination of a REG_CFA_REGISTER note.
17377 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17379 PR rtl-optimization/85645
17380 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
17381 insn that has a REG_CFA_REGISTER note.
17383 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
17385 * cfgexpand.c (expand_clobber): New function.
17386 (expand_gimple_stmt_1): Use it.
17387 * tree-vect-stmts.c (vect_clobber_variable): New function,
17389 (vectorizable_simd_clone_call): ...here.
17390 (vectorizable_store): Emit a clobber either side of an
17391 IFN_STORE_LANES sequence.
17392 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
17394 2018-05-09 Tom de Vries <tom@codesourcery.com>
17397 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
17398 (define_insn "trap_if_false"): Add exit after trap.
17400 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
17402 PR rtl-optimization/85638
17403 * bb-reorder.c: Include common/common-target.h.
17404 (create_forwarder_block): New function extracted from...
17405 (fix_up_crossing_landing_pad): ...here. Rename into...
17406 (dw2_fix_up_crossing_landing_pad): ...this.
17407 (sjlj_fix_up_crossing_landing_pad): New function.
17408 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
17409 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
17410 from both partitions and exit the loop after one iteration.
17412 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17415 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17417 (Basic PowerPC Built-in Functions): The new name of the
17418 subsection previously known as "PowerPC Built-in Functions".
17419 (Basic PowerPC Built-in Functions Available on all Configurations):
17421 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17423 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17425 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17427 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17430 2018-05-08 Jim Wilson <jimw@sifive.com>
17432 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
17433 (LD_EMUL_SUFFIX): New.
17434 (LINK_SPEC): Use it.
17436 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17438 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17440 (Basic PowerPC Built-in Functions): The new name of the
17441 subsection previously known as "PowerPC Built-in Functions".
17442 (Basic PowerPC Built-in Functions Available on all Configurations):
17444 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17446 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17448 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17450 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17453 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17456 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
17457 after cmpelim optimization.
17459 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
17461 * config.gcc: Support "goldmont".
17462 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
17463 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17464 PROCESSOR_GOLDMONT.
17465 * config/i386/i386.c (m_GOLDMONT): Define.
17466 (processor_target_table): Add "goldmont".
17467 (PTA_GOLDMONT): Define.
17468 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
17469 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
17470 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
17471 (fold_builtin_cpu): Add "goldmont".
17472 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
17473 (ix86_option_override_internal): Add "goldmont".
17474 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
17475 (processor_type): Add PROCESSOR_GOLDMONT.
17476 * config/i386/i386.md: Add CPU "glm".
17477 * config/i386/glm.md: New file.
17478 * config/i386/x86-tune.def: Add m_GOLDMONT.
17479 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
17481 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17484 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
17486 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
17487 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
17488 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
17491 * config/i386/i386.c (ix86_fold_builtin): Handle
17492 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
17495 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
17496 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
17498 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
17501 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
17502 (check_arch): Likewise.
17503 (check_fpu): Return the result rather than printing it.
17504 (end arch): Fix operator precedence.
17505 (end cpu): Likewise.
17506 (END): Print the result from check_fpu.
17508 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17509 Alan Hayward <alan.hayward@arm.com>
17510 David Sherwood <david.sherwood@arm.com>
17512 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
17513 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
17514 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
17515 (*fcmuo<mode>_and): New patterns.
17517 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17519 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
17520 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
17521 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
17522 (cmp_op, sve_imm_con): New code attributes.
17523 (SVE_COND_INT_CMP, imm_con): Delete.
17524 (cmp_op): Remove above unspecs from int attribute.
17525 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
17527 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
17528 comparison-specific unspecs.
17529 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
17530 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
17531 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
17532 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
17533 (*vec_fcm<cmp_op><mode>): Rename to...
17534 (*fcm<cmp_op><mode>): ...this and adjust likewise.
17535 (*vec_fcmuo<mode>): Rename to...
17536 (*fcmuo<mode>): ...this and adjust likewise.
17537 (*pred_fcm<cmp_op><mode>): New pattern.
17538 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
17539 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
17541 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
17543 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
17544 (aarch64_emit_sve_predicated_cond): New function.
17545 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
17546 (aarch64_emit_unspec_cond_or): Replace with...
17547 (aarch64_emit_sve_or_conds): ...this new function. Use
17548 aarch64_emit_sve_ptrue_op for the individual comparisons and
17549 aarch64_emit_binop to OR them together.
17550 (aarch64_emit_inverted_unspec_cond): Replace with...
17551 (aarch64_emit_sve_inverted_cond): ...this new function. Use
17552 aarch64_emit_sve_ptrue_op for the comparison and
17553 aarch64_emit_unop to invert the result.
17554 (aarch64_expand_sve_vec_cmp_float): Update after the above
17555 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
17557 2018-05-07 Nathan Sidwell <nathan@acm.org>
17559 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
17560 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
17561 (Backwards Compatibility): Likewise.
17563 2018-05-07 Luis Machado <luis.machado@linaro.org>
17567 2018-05-07 Luis Machado <luis.machado@linaro.org>
17569 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17570 <prefetch_dynamic_strides>: New const bool field.
17571 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17572 prefetch_dynamic_strides.
17573 (exynosm1_prefetch_tune): Likewise.
17574 (thunderxt88_prefetch_tune): Likewise.
17575 (thunderx_prefetch_tune): Likewise.
17576 (thunderx2t99_prefetch_tune): Likewise.
17577 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17579 (aarch64_override_options_internal): Update to set
17580 PARAM_PREFETCH_DYNAMIC_STRIDES.
17581 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17582 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17583 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17584 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17585 prefetch-dynamic-strides setting.
17587 2018-05-07 Luis Machado <luis.machado@linaro.org>
17589 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17590 <minimum_stride>: New const int field.
17591 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17592 minimum_stride field.
17593 (exynosm1_prefetch_tune): Likewise.
17594 (thunderxt88_prefetch_tune): Likewise.
17595 (thunderx_prefetch_tune): Likewise.
17596 (thunderx2t99_prefetch_tune): Likewise.
17597 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17598 (aarch64_override_options_internal): Update to set
17599 PARAM_PREFETCH_MINIMUM_STRIDE.
17600 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17601 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17602 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17603 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17604 stride is constant and is below the minimum stride threshold.
17606 2018-05-07 Luis Machado <luis.machado@linaro.org>
17608 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
17611 2018-05-07 Luis Machado <luis.machado@linaro.org>
17613 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17614 <prefetch_dynamic_strides>: New const bool field.
17615 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17616 prefetch_dynamic_strides.
17617 (exynosm1_prefetch_tune): Likewise.
17618 (thunderxt88_prefetch_tune): Likewise.
17619 (thunderx_prefetch_tune): Likewise.
17620 (thunderx2t99_prefetch_tune): Likewise.
17621 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17623 (aarch64_override_options_internal): Update to set
17624 PARAM_PREFETCH_DYNAMIC_STRIDES.
17625 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17626 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17627 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17628 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17629 prefetch-dynamic-strides setting.
17631 2018-05-07 Luis Machado <luis.machado@linaro.org>
17633 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17634 <minimum_stride>: New const int field.
17635 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17636 minimum_stride field.
17637 (exynosm1_prefetch_tune): Likewise.
17638 (thunderxt88_prefetch_tune): Likewise.
17639 (thunderx_prefetch_tune): Likewise.
17640 (thunderx2t99_prefetch_tune): Likewise.
17641 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17642 (aarch64_override_options_internal): Update to set
17643 PARAM_PREFETCH_MINIMUM_STRIDE.
17644 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17645 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17646 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17647 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17648 stride is constant and is below the minimum stride threshold.
17650 2018-05-06 Jakub Jelinek <jakub@redhat.com>
17653 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
17654 the type is addressable. Don't force op into register if it has
17657 2018-05-05 Roland McGrath <mcgrathr@google.com>
17660 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
17661 any section for which we don't know a specific type it should have,
17662 regardless of name. Previously this was done only for the exact
17663 names ".init_array", ".fini_array", and ".preinit_array".
17664 (default_elf_asm_named_section): Add comment about
17665 relationship with default_section_type_flags and SECTION_NOTYPE.
17666 (get_section): Don't consider it a type conflict if one side has
17667 SECTION_NOTYPE and the other doesn't, as long as neither has the
17668 SECTION_BSS et al used in the default_section_type_flags logic.
17670 2018-05-05 Tom de Vries <tom@codesourcery.com>
17673 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
17674 (workaround_barsyncs): New function.
17675 (nvptx_reorg): Use workaround_barsyncs.
17676 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17677 (define_expand "nvptx_membar_cta"): New define_expand.
17678 (define_insn "*nvptx_membar_cta"): New insn.
17680 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
17682 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
17683 To improve optimization opportunities.
17684 * builtin-types.def: The new needed builtin types for the above.
17686 2018-05-04 Richard Biener <rguenther@suse.de>
17688 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
17689 * gimple-ssa-store-merging.c
17690 (imm_store_chain_info::output_merged_store): Remove redundant create,
17691 release split_store vector contents on failure.
17692 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
17693 scalar stmt vector on cache hit.
17695 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
17697 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
17699 * config.gcc (powerpc-xilinx-eabi*): Remove.
17700 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
17702 (fusion_addis_mem_combo_load): Ditto.
17703 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
17705 (rs6000_cpu_cpp_builtins): Ditto.
17706 * config/rs6000/rs6000-linux.c
17707 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
17708 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
17709 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
17711 (rs6000_setup_reg_addr_masks): Ditto.
17712 (rs6000_init_hard_regno_mode_ok): Ditto.
17713 (rs6000_option_override_internal): Ditto.
17714 (legitimate_lo_sum_address_p): Ditto.
17715 (rs6000_legitimize_address): Ditto.
17716 (rs6000_legitimize_reload_address): Ditto.
17717 (rs6000_legitimate_address_p): Ditto.
17718 (abi_v4_pass_in_fpr): Ditto.
17719 (setup_incoming_varargs): Ditto.
17720 (rs6000_gimplify_va_arg): Ditto.
17721 (rs6000_split_multireg_move): Ditto.
17722 (rs6000_savres_strategy): Ditto.
17723 (rs6000_emit_prologue_components): Ditto.
17724 (rs6000_emit_epilogue_components): Ditto.
17725 (rs6000_emit_prologue): Ditto.
17726 (rs6000_emit_epilogue): Ditto.
17727 (rs6000_elf_file_end): Ditto.
17728 (rs6000_function_value): Ditto.
17729 (rs6000_libcall_value): Ditto.
17730 * config/rs6000/rs6000.h: Ditto.
17731 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
17732 (TARGET_MINMAX): ... this. New.
17733 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
17734 * config/rs6000/rs6000.md: Remove Xilinx FP support.
17735 (*movsi_internal1_single): Delete.
17736 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
17737 mfpu=, mxilinx-fpu): Delete.
17738 * config/rs6000/singlefp.h: Delete.
17739 * config/rs6000/sysv4.h: Remove Xilinx FP support.
17740 * config/rs6000/t-rs6000: Ditto.
17741 * config/rs6000/t-xilinx: Delete.
17742 * config/rs6000/titan.md: Adjust for fp_type removal.
17743 * config/rs6000/vsx.md: Remove Xilinx FP support.
17744 (VStype_simple): Delete.
17745 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
17746 * config/rs6000/xfpu.h: Delete.
17747 * config/rs6000/xfpu.md: Delete.
17748 * config/rs6000/xilinx.h: Delete.
17749 * config/rs6000/xilinx.opt: Delete.
17750 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
17751 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
17753 2018-05-04 Tom de Vries <tom@codesourcery.com>
17756 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
17759 2018-05-04 Richard Biener <rguenther@suse.de>
17761 PR middle-end/85627
17762 * tree-complex.c (update_complex_assignment): We are always in SSA form.
17763 (expand_complex_div_wide): Likewise.
17764 (expand_complex_operations_1): Likewise.
17765 (expand_complex_libcall): Preserve EH info of the original stmt.
17766 (tree_lower_complex): Handle removed blocks.
17767 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
17768 on complex multiplication and division libcall builtins.
17770 2018-05-04 Richard Biener <rguenther@suse.de>
17772 PR middle-end/85574
17773 * fold-const.c (negate_expr_p): Restrict negation of operand
17774 zero of a division to when we know that can happen without
17776 (fold_negate_expr_1): Likewise.
17778 2018-05-04 Jakub Jelinek <jakub@redhat.com>
17781 * real.h (real_nextafter): Declare.
17782 * real.c (real_nextafter): New function.
17783 * fold-const-call.c (fold_const_nextafter): New function.
17784 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
17785 CASE_CFN_NEXTTOWARD.
17786 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
17787 even when arg1_mode is different from arg0_mode.
17789 2018-05-03 Nathan Sidwell <nathan@acm.org>
17791 * doc/extend.texi (Deprecated Features): Remove
17792 -ffriend-injection.
17793 (Backwards Compatibility): Likewise.
17794 * doc/invoke.texi (C++ Language Options): Likewise.
17795 (C++ Dialect Options): Likewise.
17797 2018-05-03 Jakub Jelinek <jakub@redhat.com>
17800 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
17801 _mm512_mask_mullox_epi64): New intrinsics.
17803 2018-05-03 Tom de Vries <tom@codesourcery.com>
17806 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17807 dump files): Add offload-tree.
17809 2018-05-03 Richard Biener <rguenther@suse.de>
17811 PR tree-optimization/85615
17812 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
17813 to loops not nested in BBs loop father to avoid creating multi-entry
17816 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17818 PR tree-optimization/70291
17819 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
17820 arguments. Change return type to tree. Emit libcall as a new
17821 statement rather than replacing existing one when inplace_p is true.
17822 (expand_complex_multiplication_components): New function.
17823 (expand_complex_multiplication): Expand floating-point complex
17824 multiplication using the above.
17825 (expand_complex_division): Rename inner_type parameter to type.
17826 Update expand_complex_libcall call-site.
17827 (expand_complex_operations_1): Update expand_complex_multiplication
17828 and expand_complex_division call-sites.
17830 2018-05-02 Jakub Jelinek <jakub@redhat.com>
17833 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17834 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17835 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
17836 the highest significant bit of the shift count mask is clear. In
17837 check whether and[sq]i3 is needed verify that all significant bits
17838 of the shift count other than the highest are set.
17840 2018-05-02 Tom de Vries <tom@codesourcery.com>
17843 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
17844 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
17845 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
17846 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
17847 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
17848 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
17849 __builtin_goacc_parlevel_size.
17851 2018-05-02 Richard Biener <rguenther@suse.de>
17853 PR tree-optimization/85597
17854 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
17855 do not use split vect_get_vec_defs call but call vect_get_slp_defs
17858 2018-05-02 Tom de Vries <tom@codesourcery.com>
17861 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17862 dump files): Add ltrans-tree.
17864 2018-05-02 Tom de Vries <tom@codesourcery.com>
17867 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17868 dump files): Add wpa-ipa.
17870 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
17872 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
17873 powerpc*-*-linux*paired* target.
17874 * config/rs6000/750cl.h: Delete.
17875 * config/rs6000/paired.h: Delete.
17876 * config/rs6000/paired.md: Delete.
17877 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
17879 * config/rs6000/rs6000-builtin.def: Remove paired float support.
17880 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
17881 comment. Remove paired float support.
17882 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
17883 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
17885 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
17886 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
17888 * config/rs6000/rs6000.c: Remove paired float support.
17889 (paired_expand_vector_init, paired_expand_vector_move,
17890 paired_emit_vector_compare, paired_emit_vector_cond_expr,
17891 (paired_expand_lv_builtin, paired_expand_stv_builtin,
17892 paired_expand_builtin, paired_expand_predicate_builtin,
17893 paired_init_builtins): Delete.
17894 * config/rs6000/rs6000.h: Remove paired float support.
17895 * config/rs6000/rs6000.md: Remove paired float support.
17896 (move_from_CR_ov_bit): Delete.
17897 * config/rs6000/rs6000.opt (mpaired): Delete.
17898 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
17899 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
17901 2018-05-02 Richard Biener <rguenther@suse.de>
17903 PR middle-end/85567
17904 * gimplify.c (gimplify_save_expr): When in SSA form allow
17905 SAVE_EXPRs to compute to SSA vars.
17907 2018-05-02 Jakub Jelinek <jakub@redhat.com>
17910 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17911 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17912 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
17913 clobber operands[2], instead use a new pseudo. Formatting fixes.
17915 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
17917 PR tree-optimization/85586
17918 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
17919 exit early for statements in the same group if the accesses are
17922 2018-05-02 Tom de Vries <tom@codesourcery.com>
17925 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
17928 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
17930 PR tree-optimization/85143
17931 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
17933 2018-05-01 Tom de Vries <tom@codesourcery.com>
17936 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
17937 not found" error message.
17939 2018-05-01 Tom de Vries <tom@codesourcery.com>
17942 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
17943 * vec.c (test_ordered_remove_if): New function.
17944 (vec_c_tests): Call test_ordered_remove_if.
17945 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
17946 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
17947 * tree-vect-patterns.c (vect_pattern_recog_1): Use
17948 VEC_ORDERED_REMOVE_IF.
17950 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17952 PR tree-optimization/82665
17953 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
17954 pointer subtraction where arguments come from a memchr call.
17956 2018-05-01 Jakub Jelinek <jakub@redhat.com>
17958 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
17959 --push-state --as-needed and --pop-state instead of --as-needed and
17960 --no-as-needed if ld supports it.
17961 * configure: Regenerated.
17964 * doc/install.texi2html: Replace _002d with - and _002a with * in
17965 generated html files using sed.
17967 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17970 * gcc-rich-location.c (blank_line_before_p): New function.
17971 (use_new_line): New function.
17972 (gcc_rich_location::add_fixit_insert_formatted): New function.
17973 * gcc-rich-location.h
17974 (gcc_rich_location::add_fixit_insert_formatted): New function.
17976 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17978 * selftest.c (assert_streq): Rename "expected" and "actual" to
17979 "val1" and "val2". Extend NULL-handling to cover both inputs
17980 symmetrically, while still requiring both to be non-NULL for a pass.
17981 * selftest.h (assert_streq): Rename "expected" and "actual" to
17983 (ASSERT_EQ): Likewise.
17984 (ASSERT_EQ_AT): Likewise.
17985 (ASSERT_KNOWN_EQ): Likewise.
17986 (ASSERT_KNOWN_EQ_AT): Likewise.
17987 (ASSERT_NE): Likewise.
17988 (ASSERT_MAYBE_NE): Likewise.
17989 (ASSERT_MAYBE_NE_AT): Likewise.
17990 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
17991 the assertion to pass.
17992 (ASSERT_STREQ_AT): Likewise.
17994 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
17996 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
17997 interaction with -pie.
17999 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18001 * selftest.h: Fix alphabetization of per-source-file selftest
18004 2018-04-30 Jason Merrill <jason@redhat.com>
18006 PR c++/61982 - dead stores to destroyed objects.
18007 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
18010 2018-04-30 Jason Merrill <jason@redhat.com>
18012 * tree.c (build_clobber): New.
18013 * tree.h: Declare it.
18014 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
18016 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18018 * diagnostic-show-locus.c (layout::layout): Update for
18019 location_get_source_line returning a char_span.
18020 (struct char_span): Move to input.h.
18021 (struct correction): Update for fields in char_span becoming
18023 (struct source_line): Update for location_get_source_line
18024 returning a char_span.
18025 (layout::print_line): Likewise.
18026 * edit-context.c (edited_file::print_content): Likewise.
18027 (edited_file::print_diff_hunk): Likewise.
18028 (edited_file::print_run_of_changed_lines): Likewise.
18029 (edited_file::get_num_lines): Likewise.
18030 (edited_line::edited_line): Likewise.
18031 * final.c (asm_show_source): Likewise.
18032 * input.c (location_get_source_line): Convert return type
18033 from const char * to char_span, losing the final "line_len"
18035 (dump_location_info): Update for the above.
18036 (get_substring_ranges_for_loc): Likewise. Use a char_span
18037 when handling the literal within the line.
18038 (test_reading_source_line): Update for location_get_source_line
18039 returning a char_span.
18040 * input.h (class char_span): Move here from
18041 diagnostic-show-locus.c, converting from a struct to a class.
18042 Make data members private.
18043 (char_span::operator bool): New.
18044 (char_span::length): New.
18045 (char_span::get_buffer): New.
18046 (char_span::operator[]): New.
18047 (char_span::subspan): Make const.
18048 (char_span::xstrdup): New.
18049 (location_get_source_line): Convert return type from const char *
18050 to char_span, losing the final "line_size" param.
18052 2018-04-30 Jan Hubicka <jh@suse.cz>
18054 * lto-wrapper.c (ltrans_priorities): New static var.
18055 (cmp_priority): New.
18056 (run_gcc): Read priorities and if doing parallel build order
18057 the Makefile by them.
18059 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18061 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
18063 2018-04-30 Richard Biener <rguenther@suse.de>
18065 * tree-cfg.c (verify_address): Remove base argument, add
18066 flag whether to check TREE_ADDRESSABLE and do that.
18067 (verify_expr): Remove.
18068 (verify_types_in_gimple_reference): Add pieces from verify_expr.
18069 (verify_gimple_assign_single): Likewise.
18070 (verify_gimple_switch): Likewise.
18071 (verify_expr_location_1): Dereference tp once. Add (disabled)
18072 piece from verify_expr.
18073 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
18075 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18077 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
18079 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18081 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
18082 (small_data_pattern): Likewise.
18083 (arc_rewrite_small_data): Likewise.
18084 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
18085 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
18086 (get_symbol_alignment): New function.
18087 (legitimate_small_data_address_p): Likewise.
18088 (legitimate_scaled_address): Update, call
18089 legitimate_small_data_address_p.
18090 (output_sdata): New static variable.
18091 (arc_print_operand): Update how we handle small data operands.
18092 (arc_print_operand_address): Likewise.
18093 (arc_legitimate_address_p): Update, use
18094 legitimate_small_data_address_p.
18095 (arc_rewrite_small_data_p): Remove.
18096 (arc_rewrite_small_data_1): Likewise.
18097 (arc_rewrite_small_data): Likewise.
18098 (small_data_pattern): Likewise.
18099 (compact_sda_memory_operand): Update to use
18100 legitimate_small_data_address_p and get_symbol_alignment.
18101 (prepare_move_operands): Don't rewite sdata pattern.
18102 (prepare_extend_operands): Remove.
18103 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
18105 (zero_extendqisi2): Likewise.
18106 (zero_extendhisi2): Likewise.
18107 (extendqihi2): Likewise.
18108 (extendqisi2): Likewise.
18109 (extendhisi2): Likewise.
18110 (addsi3): Likewise.
18111 (subsi3): Likewise.
18112 (andsi3): Likewise.
18113 * config/arc/constraints.md (Usd): Change it to memory constraint.
18115 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18117 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
18118 as source of std instructions.
18119 * config/arc/arc.md (movsi_insn): Update pattern predicate to
18120 allow 6-bit constants as source for store instructions.
18121 (movdi_insn): Update instruction pattern to allow 6-bit constants
18122 as source for store instructions.
18124 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18126 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
18128 2018-04-30 Nathan Sidwell <nathan@acm.org>
18129 Sandra Loosemore <sandra@codesourcery.com>
18131 * dumpfile.c (dump_open): Allow '-' for stdout.
18132 * doc/invoke.texi (Developer Options): Document dump filename
18133 determination early. Document stdin/stdout selection.
18135 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
18137 Microblaze Target: PIC data text relative
18139 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
18140 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
18142 * config/microblaze/microblaze.h (microblaze_constant_address_p):
18143 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
18144 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
18145 New addressing mode for data-text relative position indepenedent code.
18146 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
18147 'ADDRESS_SYMBOLIC_TXT_REL'.
18148 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
18149 (microblaze_legitimate_pic_operand): Exclude function calls from
18150 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
18151 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
18153 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18154 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18155 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
18156 for 'address + offset'.
18157 (microblaze_expand_prologue): Add new function prologue call for
18159 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
18160 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
18161 table in case of TARGET_PIC_DATA_TEXT_REL.
18162 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
18163 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
18164 Add new macros 'UNSPEC_TEXT',
18165 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
18166 + exclude function calls from 'UNSPEC_PLT' in case of data text
18168 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18169 new target hook for generating address diff vector tables in case of
18171 * doc/tm.texi : Regenerate.
18172 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
18173 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
18174 of addr diff vector generation.
18175 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18176 target hook definition.
18177 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
18178 Add default function for generate_pic_addr_diff_vec -> flag_pic.
18179 * doc/invoke.texi (Add new pic option): Add new microblaze pic
18180 option for data text relative.
18182 2018-04-30 Richard Biener <rguenther@suse.de>
18184 * tree-chrec.h (evolution_function_is_constant_p): Remove
18186 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
18188 2018-04-30 Richard Biener <rguenther@suse.de>
18191 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
18193 2018-04-30 Richard Biener <rguenther@suse.de>
18195 PR tree-optimization/28364
18196 PR tree-optimization/85275
18197 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
18198 copying first exit test.
18200 2018-04-28 Mark Wielaard <mark@klomp.org>
18202 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
18203 dwarf_version >= 5.
18204 (dwarf_AT): Handle DW_AT_addr_base.
18205 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
18207 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
18210 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
18211 (*ashl<dwi>3_doubleword_mask_1): Ditto.
18212 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
18213 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
18215 2018-04-28 Richard Biener <rguenther@suse.de>
18217 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
18218 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
18219 to reflect use. Only add interesting stmts.
18221 2018-04-27 Martin Jambor <mjambor@suse.cz>
18224 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
18225 the jump function allows for passing through aggregate values.
18227 2018-04-27 David Malcolm <dmalcolm@redhat.com>
18229 * input.h (in_system_header_at): Convert from macro to inline
18231 (from_macro_expansion_at): Likewise.
18232 (from_macro_definition_at): Likewise.
18234 2018-04-27 Jeff Law <law@redhat.com>
18236 * config.gcc: Mark tile* targets as deprecated/obsolete.
18238 2018-04-27 Richard Biener <rguenther@suse.de>
18240 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
18243 2018-04-27 Richard Biener <rguenther@suse.de>
18245 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
18247 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
18249 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
18250 with Yd constraint. Set "preferred_for_speed" attribute from
18251 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
18252 with Yd constraint.
18253 (*movdi_internal): Ditto.
18254 (movti_interunit splitters): Remove
18255 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18256 (movdi_interunit splitters): Ditto.
18257 * config/i386/constraints.md (Ye): Remove.
18258 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18260 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18263 * config/aarch64/constraints.md (Usg): Limit to 31.
18264 (Usj): Limit to 63.
18266 2018-04-27 Jakub Jelinek <jakub@redhat.com>
18268 PR tree-optimization/85529
18269 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18270 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18271 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18272 zero extension or masking of the MSB bit.
18273 (optimize_range_tests): Add FIRST_BB argument, pass it through
18274 to optimize_range_tests_var_bound.
18275 (maybe_optimize_range_tests, reassociate_bb): Adjust
18276 optimize_range_tests callers.
18278 2018-04-26 Richard Biener <rguenther@suse.de>
18279 Jakub Jelinek <jakub@redhat.com>
18281 * cgraph.h (symbol_table): Just declare debug method here.
18282 * symtab.c (symbol_table::debug): Define.
18284 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
18286 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18288 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
18290 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18291 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18292 (*movdi_internal): Substitute Yi and Yj constraint with x
18293 and Ym and Yn constraint with y constraint. Update "isa"
18294 attribute and set "preferred_for_speed" attribute from
18295 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18296 (*movsi_internal): Ditto.
18297 (*movdf_internal): Ditto.
18298 (*movsf_internal): Ditto.
18299 (*zero_extendsidi2): Ditto.
18300 * config/i386/sse.md (vec_set<mode>_0): Ditto.
18301 (sse2_loadld): Ditto.
18302 (*vec_extract<ssevecmodelower>_0): Ditto.
18303 (*vec_extractv4si_0_zext_sse4): Ditto.
18304 (vec_concatv2di): Ditto.
18305 (*vec_dup<mode>): Ditto.
18306 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18307 * config/i386/constraints.md (Yi): Remove.
18312 2018-04-26 Nathan Sidwell <nathan@acm.org>
18314 * dumpfile.c (dump_open): New.
18315 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18316 (dump_finish): Detect stdio/stderr by value not name.
18318 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
18320 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18322 2018-04-26 Tom de Vries <tom@codesourcery.com>
18325 * config/nvptx/nvptx.c (verify_neutering_jumps)
18326 (verify_neutering_labels): New function
18327 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18329 2018-04-26 Tom de Vries <tom@codesourcery.com>
18332 * config/nvptx/nvptx.c (needs_neutering_p): New function.
18333 (nvptx_single): Use needs_neutering_p to skip over insns that do not
18336 2018-04-26 Richard Biener <rguenther@suse.de>
18337 Tom de Vries <tom@codesourcery.com>
18340 * lto-streamer-out.c (output_function): Fixup loops if required to match
18341 discovery done in the reader.
18343 2018-04-26 Richard Biener <rguenther@suse.de>
18345 PR tree-optimization/85116
18346 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18347 have a loop exit from the single latch predecessor. Remove
18348 case of header with just condition.
18349 (ch_base::copy_headers): Exclude infinite loops from any
18351 (pass_ch::execute): Record exits.
18353 2018-04-26 Richard Biener <rguenther@suse.de>
18355 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18356 prologue cost vector and pass it to vect_get_load_cost.
18357 (vect_get_peeling_costs_all_drs): Likewise.
18358 (vect_peeling_hash_get_lowest_cost): Likewise.
18359 (vect_enhance_data_refs_alignment): Likewise.
18361 2018-04-26 Richard Biener <rguenther@suse.de>
18363 PR middle-end/85450
18364 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18365 checking of integer<->pointer conversions.
18366 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18367 sign-/zero-extending pointer types.
18368 (expand_omp_for_static_chunk): Likewise.
18370 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
18371 Jean Lee <xiaoyur347@gmail.com>
18373 * config/mips/mips.c (mips_asan_shadow_offset): New function.
18374 (TARGET_ASAN_SHADOW_OFFSET): Define.
18375 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18376 true for -fsanitize=address.
18378 2018-04-25 Mark Wielaard <mark@klomp.org>
18380 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
18383 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18385 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
18386 than "alu", remove explicit "memory" and "imm_disp" attributes.
18387 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
18389 PR middle-end/85414
18390 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
18391 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
18392 gen_lowpart_no_emit.
18394 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
18397 * config/i386/i386.c (ix86_expand_builtin): Change memory
18398 operand to XI, extend p0 to Pmode.
18399 * config/i386/i386.md: Change unspec volatile and operand
18400 1 mode to XI, change operand 0 mode to P.
18402 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18404 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
18405 GET_MODE_MASK before any checking.
18406 (nds32_can_use_bset_p): Likewise.
18407 (nds32_can_use_btgl_p): Likewise.
18409 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18411 * config/nds32/nds32-doubleword.md: New define_split pattern for
18412 illegal register number.
18414 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18416 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
18418 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18420 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
18422 2018-04-25 Richard Biener <rguenther@suse.de>
18424 * lto-streamer.h (LTO_major_version): Bump to 8.
18426 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18428 * BASE-VER: Set to 9.0.0.
18430 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
18432 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
18433 in __abskf2 and __powikf2.
18435 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18438 * config/aarch64/constraints.md (Usg, Usj): New constraints.
18439 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
18440 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
18441 Use the above on operand 2. Reindent.
18442 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
18444 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18447 * common/config/i386/i386-common.c (ix86_handle_option): Don't
18449 * config/i386/i386.opt (mcet): Removed.
18450 * doc/install.texi: Remove -mcet documentation.
18451 * doc/invoke.texi: Likewise.
18453 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18456 * doc/install.texi: Remove -mcet from bootstrap-cet.
18458 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18461 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
18462 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
18466 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
18467 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
18468 containing a CONST_VECTOR.
18470 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
18472 * doc/install.texi: Update newlib dependency for nvptx.
18474 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18477 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
18478 instead of INTVAL when shifting x left.
18480 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
18482 PR tree-optimization/85478
18483 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
18484 vect_grouped_store_supported for single element vectors.
18486 2018-04-24 Richard Biener <rguenther@suse.de>
18489 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
18490 load cost increase to the case of non-constant step.
18492 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18495 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
18496 destination if any_malformed_asm.
18498 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
18500 PR middle-end/85496
18501 * expr.c (store_field): In the bitfield case, if the value comes from
18502 a function call and is returned in registers by means of a PARALLEL,
18503 do not change the mode of the temporary unless BLKmode and VOIDmode.
18505 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
18507 PR rtl-optimization/85423
18508 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
18509 dependencies to debug insns when the previous insn is non-debug.
18511 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18513 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
18514 enums into a single definition.
18515 (fls): Fix predicates and printing.
18518 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18520 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
18521 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
18522 and short u6 immediate.
18523 (check_if_valid_sleep_operand): Remove.
18524 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
18526 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18528 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
18529 flag_always_save_lp condition.
18530 * config/nds32/nds32.opt (malways-save-lp): New option.
18532 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18534 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
18535 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
18536 * config/nds32/nds32.h
18537 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
18538 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
18540 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18542 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
18543 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
18545 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18546 Chung-Ju Wu <jasonwucj@gmail.com>
18548 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
18550 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
18551 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
18553 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18555 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
18557 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18559 * config/nds32/nds32-protos.h (nds32_data_alignment,
18560 nds32_local_alignment): Declare.
18561 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
18562 nds32_local_alignment): New functions.
18563 (TARGET_CONSTANT_ALIGNMENT): Define.
18564 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
18566 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18568 * config/nds32/nds32.c
18569 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
18570 (TARGET_MODES_TIEABLE_P): Likewise.
18572 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18574 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
18575 level Ofast and Og.
18577 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
18578 Chung-Ju Wu <jasonwucj@gmail.com>
18580 * config/nds32/constants.md (unspec_volatile_element): Add enum values
18581 for unaligned access.
18582 * config/nds32/nds32-intrinsic.c: Implementation of expanding
18584 * config/nds32/nds32-intrinsic.md: Likewise.
18585 * config/nds32/nds32_intrinsic.h: Likewise.
18586 * config/nds32/nds32.h (nds32_builtins): Likewise.
18587 * config/nds32/nds32.opt (munaligned-access): New option.
18588 * config/nds32/nds32.c (nds32_asm_file_start): Display
18589 flag_unaligned_access status.
18591 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18593 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
18594 -mno-relax is present.
18595 * config/riscv/linux.h (LINK_SPEC): Ditto.
18597 2018-04-20 Martin Sebor <msebor@redhat.com>
18600 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
18602 (gimple_fold_builtin_stxcpy_chk): Same.
18603 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
18605 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
18608 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
18609 __powikf2 when long double is IEEE 128-bit.
18611 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18613 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
18614 step to make sure stack always aligned.
18616 2018-04-20 Carl Love <cel@us.ibm.com>
18619 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
18620 size check for arg0.
18622 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
18623 Tom de Vries <tom@codesourcery.com>
18626 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
18627 Emit insns for calls too.
18628 (nvptx_find_par): Always look for worker-level predecessor insn.
18629 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
18631 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
18632 (nvptx_process_pars): Propagate frames for calls.
18634 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
18637 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
18639 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
18640 (ix86_handle_option): Don't handle OPT_mibt.
18641 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
18643 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
18645 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
18646 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
18647 (ix86_target_macros): Define __CET__ with flag_cf_protection
18648 for -fcf-protection.
18649 * config/i386/i386.c (isa2_opts): Remove -mibt.
18650 * config/i386/i386.h (TARGET_IBT): Removed.
18651 (TARGET_IBT_P): Likewise.
18652 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
18653 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
18654 * config/i386/i386.opt (mcet): Update help message.
18655 (mshstk): Likewise.
18657 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
18658 -mcet as an alias for -mshstk.
18660 2018-04-20 Richard Biener <rguenther@suse.de>
18662 PR middle-end/85475
18663 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
18664 complexity by forcing a single use of the multiply operand.
18666 2018-04-20 Martin Jambor <mjambor@suse.cz>
18669 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
18670 recursion dependency to only apply to non-clones.
18672 2018-04-20 Martin Jambor <mjambor@suse.cz>
18675 * ipa-cp.c (create_specialized_node): Check that clones of
18676 self-recursive edges exist during IPA-CP.
18678 2018-04-19 Toon Moene <toon@moene.org>
18680 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
18683 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18685 PR tree-optimization/85467
18686 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
18687 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
18688 VECTOR_CST element to type.
18690 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18693 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
18694 * config/i386/i386.md (builtin_setjmp_setup): Removed.
18695 (builtin_longjmp): Likewise.
18696 (save_stack_nonlocal): New pattern.
18697 (restore_stack_nonlocal): Likewise.
18699 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18702 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18703 Replace ASM_OUTPUT_LABEL with fprintf.
18705 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18708 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18709 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
18710 * config/i386/i386-c.c (ix86_target_macros_internal): Also
18711 define __IBT__ and __SHSTK__ for -fcf-protection.
18712 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
18714 (ix86_trampoline_init): Likewise.
18715 (x86_output_mi_thunk): Likewise.
18716 (ix86_notrack_prefixed_insn_p): Likewise.
18717 (ix86_option_override_internal): Don't disallow -fcf-protection.
18718 * config/i386/i386.md (rdssp<mode>): Also enable for
18720 (incssp<mode>): Likewise.
18721 (nop_endbr): Likewise.
18722 * config/i386/i386.opt (mcet): Change help message to built-in
18725 (mshstk): Likewise.
18726 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
18727 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
18728 enable CET built-in functions.
18730 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
18732 * common/config/i386/i386-common.c
18733 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
18734 OPTION_MASK_ISA_MOVDIRI_UNSET,
18735 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
18736 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
18737 * config.gcc (movdirintrin.h): New header.
18738 * config/i386/cpuid.h (bit_MOVDIRI,
18739 bit_MOVDIR64B): New bits.
18740 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
18742 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
18743 (VOID, PVOID, PCVOID)): New function types.
18744 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
18745 __builtin_ia32_directstoreu_u64,
18746 __builtin_ia32_movdir64b): New builtins.
18747 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
18748 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
18750 (ix86_valid_target_attribute_inner_p): Ditto.
18751 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
18752 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
18753 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
18754 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
18755 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
18756 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
18757 (movdiri<mode>, movdir64b_<mode>): New.
18758 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
18759 * config/i386/immintrin.h: Include movdirintrin.h.
18760 * config/i386/movdirintrin.h: New file.
18761 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
18763 2018-04-19 Richard Biener <rguenther@suse.de>
18765 PR middle-end/85455
18766 * cfg.c (clear_bb_flags): When loop state says we have
18767 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
18769 2018-04-19 Richard Biener <rguenther@suse.de>
18771 PR tree-optimization/84737
18772 * tree-vect-data-refs.c (vect_copy_ref_info): New function
18773 copying restrict info.
18774 (vect_setup_realignment): Use it.
18775 * tree-vectorizer.h (vect_copy_ref_info): Declare.
18776 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
18777 the first DR to all generated stores.
18778 (vectorizable_load): Likewise for loads.
18780 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18782 PR tree-optimization/85446
18783 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
18784 the integral and pointer types to have the same precision.
18786 * doc/install.texi: Document --disable-cet being the default and
18789 2018-04-18 Martin Liska <mliska@suse.cz>
18791 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
18794 2018-04-18 Martin Liska <mliska@suse.cz>
18797 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
18800 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18801 arguments if they are comparable.
18803 2018-04-18 Martin Liska <mliska@suse.cz>
18806 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
18809 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
18812 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
18815 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
18816 ENDBR after calling __morestack.
18818 2018-04-18 David Malcolm <dmalcolm@redhat.com>
18821 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
18822 by using gcc_base_ver to generate a gcc_driver_version, and use
18823 it when generating GCC_DRIVER_NAME.
18824 * configure: Regenerate.
18826 2018-04-18 Jakub Jelinek <jakub@redhat.com>
18829 * config.gcc: Obsolete powerpc*-*-*spe*.
18831 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18834 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
18835 (stabstr_D): Change type of unum from unsigned int to
18836 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
18839 2018-04-17 Jim Wilson <jimw@sifive.com>
18842 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
18843 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
18844 Set arg_pointer_offset after using pretend_args_size.
18846 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18848 PR rtl-optimization/85431
18849 * dse.c (record_store): Ignore zero width stores.
18852 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
18853 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
18854 __builtin_stack_restore rather than after it.
18855 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
18856 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
18857 argument instead of virtual_dynamic_stack_rtx.
18859 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
18861 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
18863 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
18864 Add note to error message to explain internal mapping of overloaded
18865 built-in function name to non-overloaded built-in function name.
18866 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
18869 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
18872 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
18873 where the inputs overlap with the output.
18875 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18877 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
18878 (=v, v) alternative and explicit "memory" attribute.
18879 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
18880 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18882 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
18883 "sselog1" type instead of "sselog".
18884 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
18885 "sselog". Remove explicit "memory" attribute.
18886 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
18887 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18889 (vec_extract_hi_v32hi): Merge all alternatives into one, use
18890 "sselog1" type instead of "sselog". Remove explicit "memory"
18892 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
18893 use "sselog1" type instead of "sselog". Remove explicit "memory"
18895 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
18896 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18898 (vec_extract_hi_v64qi): Merge all alternatives into one, use
18899 "sselog1" type instead of "sselog". Remove explicit "memory"
18901 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
18902 use "sselog1" type instead of "sselog". Remove explicit "memory"
18906 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
18908 PR middle-end/85414
18909 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
18912 2018-04-17 Martin Jambor <mjambor@suse.cz>
18915 * ipa-cp.c (create_specialized_node): Call
18916 expand_all_artificial_thunks if necessary.
18918 2018-04-17 Martin Liska <mliska@suse.cz>
18921 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
18922 in message, remote space in between '_G' and '('.
18924 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18927 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
18928 avx512f_vmcmp<mode>3<round_saeonly_name>,
18929 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
18930 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
18931 avx512f_rndscale<mode><round_saeonly_name>,
18932 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
18933 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
18934 Use %<iptr>2 instead of %2 for -masm=intel.
18935 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
18936 avx512f_vcvttss2usi<round_saeonly_name>,
18937 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
18939 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
18940 avx512f_vcvttsd2usi<round_saeonly_name>,
18941 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
18942 Use %q1 instead of %1 for -masm=intel.
18943 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
18944 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
18945 of %3 for -masm=intel.
18946 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
18948 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
18950 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
18952 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
18953 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
18955 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
18957 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
18958 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
18959 %g1 and one with %0 and %1.
18960 (avx512er_vmrcp28<mode><round_saeonly_name>,
18961 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
18962 %1 for -masm=intel.
18963 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
18964 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
18965 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
18966 of %0 and %{%4%} for -masm=intel.
18967 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
18968 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
18969 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
18970 order of %0 and %{%5%}%{z%} for -masm=intel.
18972 2018-04-17 Jan Hubicka <jh@suse.cz>
18975 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
18977 2018-04-17 Martin Liska <mliska@suse.cz>
18980 * multiple_target.c (create_dispatcher_calls): Set apostrophes
18981 for target_clone error message. Make default implementation
18982 clone to be a local declaration.
18983 (separate_attrs): Add new argument and check for an empty
18985 (expand_target_clones): Handle it.
18986 (ipa_target_clone): Make redirection just for target_clones
18989 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
18990 Tom de Vries <tom@codesourcery.com>
18992 PR middle-end/84955
18993 * omp-expand.c (expand_oacc_for): Add dummy false branch for
18994 tiled basic blocks without omp continue statements.
18996 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
18999 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
19000 vec_extract expression as having side effects to make sure it gets
19003 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
19006 * config/i386/i386.c (get_builtin_code_for_version): Check
19009 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
19012 * config.gcc: Support "skylake".
19013 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19015 * config/i386/i386.c (m_SKYLAKE): Define.
19016 (processor_target_table): Add "skylake".
19017 (ix86_option_override_internal): Add "skylake".
19018 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
19019 PROCESSOR_CANNONLAKE.
19020 (get_builtin_code_for_version): Fix priority for
19021 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
19022 PROCESSOR_SKYLAKE-AVX512.
19023 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
19024 (processor_type): Add PROCESSOR_SKYLAKE.
19026 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
19027 Jason Merrill <jason@redhat.com>
19030 * convert.c (convert_to_integer_1): Use direct recursion for
19031 enumeral types and types with a precision less than the number
19032 of bits in their mode.
19034 2018-04-16 Julia Koval <julia.koval@intel.com>
19037 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
19038 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
19040 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
19043 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
19044 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
19045 and -mno-direct-move.
19047 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
19050 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
19051 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
19052 Ensure negative shifts result in {0}.
19054 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
19056 PR rtl-optimization/79916
19057 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
19058 regs (if any) to define how to gnerate SD moves when LRA is in
19061 2018-04-13 Jakub Jelinek <jakub@redhat.com>
19063 PR rtl-optimization/85393
19064 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
19065 * except.c (expand_dw2_landing_pad_for_region): Make static.
19066 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
19067 a label and unconditional jump to old_bb, rather than
19068 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
19071 PR rtl-optimization/85376
19072 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
19073 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
19074 instead of a specific value.
19076 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19077 Bin Cheng <bin.cheng@arm.com>
19079 PR tree-optimization/82965
19080 PR tree-optimization/83991
19081 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
19082 by_profile_only parameter.
19083 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
19084 information if the loop was predicted to iterate too many times.
19085 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
19087 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19090 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
19093 2018-04-13 Martin Liska <mliska@suse.cz>
19094 Jakub Jelinek <jakub@redhat.com>
19096 PR middle-end/81657
19097 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
19098 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
19099 * builtins.c (expand_builtin_memory_copy_args): Use
19100 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
19101 handle dest_addr == pc_rtx.
19103 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
19106 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
19107 asked to not generate direct moves.
19108 (fix_trunc<mode>si2_stfiwx): Similar.
19109 (fix_trunc<mode>si2_internal): Similar.
19111 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19114 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
19115 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
19116 lookup if dest in some wider mode is known to be const0_rtx and
19117 if so, record permanent equivalence for it to be ZERO_EXTEND of
19118 the narrower mode destination.
19120 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19122 * lto-streamer-out.c (output_function): Revert 259346.
19123 * omp-expand.c (expand_oacc_for): Likewise.
19125 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
19127 PR rtl-optimization/85354
19128 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
19129 * sel-sched.c (sel_global_init): ... here.
19131 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
19134 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
19135 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
19136 mode for PE-COFF targets.
19137 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
19138 (i386_pe_asm_lto_end): Likewise.
19139 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
19140 (TARGET_ASM_LTO_END): Likewise.
19141 * config/i386/winnt.c (saved_debug_info_level): New static variable.
19142 (i386_pe_asm_lto_start): New function.
19143 (i386_pe_asm_lto_end): Likewise.
19145 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19146 Richard Biener <rguenther@suse.de>
19148 PR middle-end/84955
19149 * lto-streamer-out.c (output_function): Fix CFG loop state before
19151 * omp-expand.c (expand_oacc_for): Handle calls to internal
19152 functions like regular functions.
19154 2018-04-12 Richard Biener <rguenther@suse.de>
19157 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
19158 for the early LTO debug to properly generate references to it
19159 during DIE emission. Do not re-use that for the skeleton for
19161 (dwarf2out_early_finish): Likewise.
19163 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19166 * config/i386/sse.md
19167 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
19168 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
19169 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
19170 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
19171 and output is a reg, avoid creating invalid lowpart subreg, but
19172 instead split into a 512-bit move. Don't split if not AVX512VL,
19173 input is xmm16+ reg and output is a mem.
19174 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
19175 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
19176 xmm16+ reg and output is a mem.
19178 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19180 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
19181 also for flag_dwarf2_cfi_asm.
19183 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19185 PR rtl-optimization/85342
19186 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
19187 a bool scalar var inside of the loop instead. Don't try to update
19188 recog_data.operand after failed apply_change_group.
19190 2018-04-12 Tom de Vries <tom@codesourcery.com>
19193 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
19194 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
19195 array with flexible array member as array without given dimension.
19196 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
19197 argument for undefined param to true.
19199 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
19202 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19203 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
19204 from PowerPC section.
19205 * config/rs6000/sysv4.opt (mcall-): Improve help text.
19206 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
19207 help text that is too long.
19208 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
19209 help text that is too long.
19210 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
19211 help text that is too long.
19213 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
19215 * config/alpha/alpha.md (stack_probe_internal): Rename
19216 from "probe_stack". Update all callers.
19218 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19220 PR rtl-optimization/84566
19221 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
19222 sched_macro_fuse_insns.
19224 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19227 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
19228 (compute_block_dependences): ... from here.
19230 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19232 PR tree-optimization/85331
19233 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
19234 from int to HOST_WIDE_INT.
19236 2018-04-11 Martin Jambor <mjambor@suse.cz>
19239 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
19240 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
19241 not the same as the source val.
19242 (cgraph_edge_brings_value_p): New parameter.
19243 (gather_edges_for_value): Pass destination value to
19244 cgraph_edge_brings_value_p.
19245 (perhaps_add_new_callers): Likewise.
19246 (get_info_about_necessary_edges): Likewise and exclude values brought
19247 only by self-recursive edges.
19248 (create_specialized_node): Redirect only clones of self-calling edges.
19249 (+self_recursive_pass_through_p): New function.
19250 (find_more_scalar_values_for_callers_subset): Use it.
19251 (find_aggregate_values_for_callers_subset): Likewise.
19252 (known_aggs_to_agg_replacement_list): Removed.
19253 (decide_whether_version_node): Re-calculate known constants for all
19254 remaining context clones.
19256 2018-04-11 Richard Biener <rguenther@suse.de>
19259 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19260 from early DWARF output.
19261 (dwarf2out_early_finish): Output line info unconditionally into
19262 early DWARF and add reference to it.
19264 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19267 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19268 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19269 other than V2DFmode using iptr mode attribute.
19270 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19272 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19274 PR rtl-optimization/84659
19275 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19277 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19280 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19282 (output_loc_list): Pass address of a dummy size variable even in the
19283 locview handling loop.
19284 (index_location_lists): Add comment on why skip_loc_list_entry can't
19287 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
19290 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19293 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
19296 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19297 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19298 and -mstring-compare-inline-limit.
19300 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19303 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19304 for stack clash protection in a register whenever we need it to be in
19307 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19309 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19310 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19312 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19315 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19317 (mlong-double-): Ditto.
19318 * config/rs6000/sysv4.opt (msdata=): Ditto.
19319 (mtls-size=): Ditto.
19321 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19323 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19324 erroneous entries for
19325 "vector int vec_ldl (int, long int *)", and
19326 "vector unsigned int vec_ldl (int, unsigned long int *)".
19327 Add comments and entries for
19328 "vector bool char vec_ldl (int, bool char *)",
19329 "vector bool short vec_ldl (int, bool short *)",
19330 "vector bool int vec_ldl (int, bool int *)",
19331 "vector bool long long vec_ldl (int, bool long long *)",
19332 "vector pixel vec_ldl (int, pixel *)",
19333 "vector long long vec_ldl (int, long long *)",
19334 "vector unsigned long long vec_ldl (int, unsigned long long *)".
19335 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19336 type tree bool_long_long_type_node and correct definition of
19337 bool_V2DI_type_node to make reference to this new type tree.
19338 (rs6000_mangle_type): Replace erroneous reference to
19339 bool_long_type_node with bool_long_long_type_node.
19340 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19341 comments to emphasize sign distinctions for char and int types and
19342 replace RS6000_BTI_bool_long constant with
19343 RS6000_BTI_bool_long_long constant. Also add comment to restrict
19344 use of RS6000_BTI_pixel.
19345 (bool_long_type_node): Remove this macro definition.
19346 (bool_long_long_type_node): New macro definition
19348 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19350 PR rtl-optimization/85300
19351 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19352 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19353 simplify_unary_operation fails.
19355 2018-04-10 Martin Liska <mliska@suse.cz>
19357 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19358 cgraph_edge and ipa_ref.
19360 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19364 * config/i386/sse.md
19365 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19366 computation of the VEC_MERGE selector from mask.
19367 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19368 Fix decoding of the VEC_MERGE selector into mask.
19370 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19372 PR tree-optimization/85286
19373 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19375 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19377 * final.c (final_1): Set insn_last_address as well as
19378 insn_current_address.
19380 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19383 * explow.c (emit_stack_probe): Call validize_mem on memory location
19384 before passing it to gen_probe_stack. Create address operand and
19385 legitimize it for the probe_stack_address case.
19387 2018-04-09 Jan Hubicka <jh@suse.cz>
19390 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
19391 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
19392 * tree.c (free_lang_data_in_type): Fix handling of binfos;
19394 (free_lang_data): Rebuild type inheritance graph.
19396 2018-04-09 Martin Sebor <msebor@redhat.com>
19398 * invoke.texi (-finline-small-functions): Mention other optimization
19400 (-findirect-inlining, -fpartial-inlining): Same.
19401 (-finline-functions-called-once): Same.
19402 (-freorder-blocks-and-partition): Same.
19404 2018-04-09 Jan Hubicka <jh@suse.cz>
19407 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
19408 jumps; choose last target that matches the criteria (i.e.
19409 no partition changes for non-crossing jumps).
19410 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
19411 support for redirecting crossing jumps to non-crossing.
19413 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
19415 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
19416 also for naked functions.
19418 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
19420 * config/arc/arc.md (add_shift): New pattern.
19421 (add_shift2): Likewise.
19422 (sub_shift): Likewise.
19423 (sub_shift_cmp0_noout): Likewise.
19424 (compare_si_ashiftsi): Likewise.
19425 (xbfu_cmp0_noout): New combine pattern.
19426 (xbfu_cmp0"): Likewise.
19427 (movsi_set_cc_insn): Place the predicable variant first.
19428 (commutative_binary_cmp0_noout): Remove clobber.
19429 (commutative_binary_cmp0): New pattern.
19430 (noncommutative_binary_cmp0): Likewise.
19431 (noncommutative_binary_cmp0_noout): Likewise.
19432 (noncommutative_binary_comparison_result_used): Removed.
19433 (rsub_cmp0): New pattern.
19434 (rsub_cmp0_noout): Likewise.
19435 (extzvsi): Changed, keep only meaningful variants.
19436 (SQH, SEZ): New iterators.
19437 (SQH_postfix): New mode attribute.
19438 (SEZ_prefix): New code attribute.
19439 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
19440 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
19441 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
19442 of numerical value.
19443 (noncommutative_operator): Check the availability of barrel
19446 2018-04-09 Richard Biener <rguenther@suse.de>
19448 PR tree-optimization/85284
19449 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
19450 Only use the niter constraining form of simple_iv when the exit
19451 is always executed.
19453 2018-04-09 Tom de Vries <tom@codesourcery.com>
19456 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19457 (define_expand "*memory_barrier"): New define_expand.
19458 (define_insn "memory_barrier"): New insn.
19460 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19462 PR rtl-optimization/80463
19463 PR rtl-optimization/83972
19464 PR rtl-optimization/83480
19466 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
19467 correct producer for the insn.
19468 (tidy_control_flow): Fixup seqnos in case of debug insns.
19470 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19472 PR rtl-optimization/83913
19474 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
19475 different sched-times when merging exprs.
19477 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19479 PR rtl-optimization/83962
19481 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
19482 tidy_fallthru_edge and tidy_control_flow.
19484 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19486 PR rtl-optimization/83530
19488 * sel-sched.c (force_next_insn): New global variable.
19489 (remove_insn_for_debug): When force_next_insn is true, also leave only
19490 next insn in the ready list.
19491 (sel_sched_region): When the region wasn't scheduled, make another pass
19492 over it with force_next_insn set to 1.
19494 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19496 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
19498 * config/nds32/constants.md (unspec_volatile_element): Add enum values
19499 for interrupt control.
19500 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19501 functions for interrupt control.
19502 * config/nds32/nds32-intrinsic.md: Likewise.
19503 * config/nds32/nds32_intrinsic.h: Likewise.
19504 * config/nds32/nds32.h (nds32_builtins): Likewise.
19506 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19508 * config/nds32/nds32.c (nds32_init_machine_status,
19509 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
19510 strict_aligned_p field.
19511 (nds32_expand_to_rtl_hook): New function.
19512 (TARGET_EXPAND_TO_RTL_HOOK): Define.
19513 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
19515 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19516 Chung-Ju Wu <jasonwucj@gmail.com>
19518 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
19519 * config/nds32/nds32-n7.md: New file.
19520 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
19521 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
19523 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
19524 * config/nds32/nds32.md (pipeline_model): Add n7.
19525 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
19526 * config/nds32/pipelines.md: Include n7 settings.
19528 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19529 Chung-Ju Wu <jasonwucj@gmail.com>
19531 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
19532 * config/nds32/nds32-e8.md: New file.
19533 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
19534 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
19536 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
19537 * config/nds32/nds32.md (pipeline_model): Add e8.
19538 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
19539 * config/nds32/pipelines.md: Include e8 settings.
19541 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19542 Chung-Ju Wu <jasonwucj@gmail.com>
19544 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
19545 * config/nds32/nds32-n8.md: New file.
19546 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
19547 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
19549 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
19550 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
19551 * config/nds32/nds32.md (pipeline_model): Add n8.
19552 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
19553 * config/nds32/pipelines.md: Include n8 settings.
19555 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19556 Chung-Ju Wu <jasonwucj@gmail.com>
19558 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
19559 * config/nds32/nds32-n9-2r1w.md: New file.
19560 * config/nds32/nds32-n9-3r2w.md: New file.
19561 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
19562 nds32_register_ports): New or modify for cpu n9.
19563 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
19565 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
19566 * config/nds32/nds32-utils.c: New file.
19567 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
19568 TARGET_MUL_SLOW): Define.
19569 * config/nds32/nds32.md (pipeline_model): New attribute.
19570 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
19571 New options that support cpu n9.
19572 * config/nds32/pipelines.md: Include n9 settings.
19573 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
19575 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19577 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
19578 information if necessary.
19579 (output_cond_branch_compare_zero): Likewise.
19580 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
19581 (nds32_target_alignment): Refine for alignment.
19582 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
19583 (FUNCTION_BOUNDARY): Modify.
19584 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
19586 * config/nds32/nds32.opt (malways-align, malign-functions): New.
19588 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19590 * config/nds32/constants.md (unspec_volatile_element): Add values for
19591 TLB operation and data prefetch.
19592 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19593 functions for TLB operation and data prefetch.
19594 * config/nds32/nds32-intrinsic.md: Likewise.
19595 * config/nds32/nds32_intrinsic.h: Likewise.
19596 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
19597 (nds32_print_operand): Likewise.
19598 * config/nds32/nds32.h (nds32_builtins): Likewise.
19600 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
19601 Andrew Pinski <pinsika@gcc.gnu.org>
19603 PR middle-end/82976
19604 * match.pd: Use constant_boolean_node of correct type instead of
19605 boolean_true_node or boolean_false_node for simplifying
19606 pointer comparisons to zero.
19608 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19610 PR tree-optimization/80021
19611 * tree.c (verify_type_variant): Make error call in verify_variant_match
19612 translatable and remove final full stop.
19614 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19616 * config/nds32/constants.md (unspec_volatile_element): Add
19617 UNSPEC_VOLATILE_EH_RETURN.
19618 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
19619 nds32_output_stack_pop): Support dwarf exception handling process.
19620 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
19621 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
19622 exception handling process.
19623 (nds32_compute_stack_frame): Likewise.
19624 (nds32_return_addr_rtx): Likewise.
19625 (nds32_initial_elimination_offset): Likewise.
19626 (nds32_expand_prologue): Likewise.
19627 (nds32_expand_epilogue): Likewise.
19628 (nds32_dynamic_chain_address): New function.
19629 * config/nds32/nds32.h (machine_function): Add fields for dwarf
19630 exception handling.
19631 (DYNAMIC_CHAIN_ADDRESS): Define.
19632 (EH_RETURN_DATA_REGNO): Define.
19633 (EH_RETURN_STACKADJ_RTX): Define.
19634 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
19635 patterns for dwarf exception handling.
19637 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19639 * config/nds32/nds32.h: Clean up obsolete macros.
19641 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19643 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19644 Add enum values for particular instructions.
19645 * config/nds32/nds32-intrinsic.c: Implementation of expanding
19646 particular intrinsic functions.
19647 * config/nds32/nds32-intrinsic.md: Likewise.
19648 * config/nds32/nds32_intrinsic.h: Likewise.
19649 * config/nds32/nds32.h (nds32_builtins): Likewise.
19650 * config/nds32/nds32.md (type): Add pbsad and pbsada.
19651 (btst, ave): New patterns for particular instructions.
19653 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19655 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19656 Add enum values for atomic load/store and memory sync.
19657 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
19659 * config/nds32/nds32-intrinsic.md: Likewise.
19660 * config/nds32/nds32_intrinsic.h: Likewise.
19661 * config/nds32/nds32.h (nds32_builtins): Likewise.
19663 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19665 PR tree-optimization/85257
19666 * fold-const.c (native_encode_vector): If not all elts could fit
19667 and off is -1, return 0 rather than offset.
19668 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
19669 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
19670 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
19671 adjust buffer in native_interpret_expr call.
19673 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19675 * config/nds32/constants.md (unspec_volatile_element): Add cache
19676 control enum values.
19677 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
19678 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
19679 * config/nds32/nds32.c (nds32_cctl_names): New.
19680 (nds32_print_operand): Handle cache control register names.
19681 * config/nds32/nds32.h (nds32_builtins): New enum values.
19682 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
19684 * config/nds32/nds32.md (type): Add mmu.
19685 * config/nds32/pipelines.md (simple_insn): Add mmu.
19687 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19689 * config/nds32/nds32.md (type): Remove call.
19690 * config/nds32/pipelines.md (simple_insn): Likewise.
19692 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19694 * config/nds32/constants.md (unspec_volatile_element): Add
19695 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
19696 UNSPEC_VOLATILE_FMFCFG.
19697 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
19698 description for fmfcfg and fmfcsr.
19699 (bdesc_1arg): Add fmtcsr.
19700 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
19701 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
19702 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
19703 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
19704 unspec_fmfcfg): New patterns.
19705 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
19706 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
19707 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
19708 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
19709 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
19710 __nds32__fmfcfg): Define.
19712 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19714 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
19715 intrinsic register names.
19716 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
19717 intrinsic register enum values and macros.
19719 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19721 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
19722 for load/store addressing form.
19723 (nds32_print_operand_address): Likewise.
19725 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
19728 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
19729 based on LABEL_REF. Remove useless assertion.
19730 (pic_address_needs_scratch): Fix formatting.
19731 (sparc_legitimize_pic_address): Minor tweaks.
19732 (sparc_delegitimize_address): Adjust assertion accordingly.
19733 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
19734 into symbolic_operand.
19735 (movsi_high_pic_label_ref): Likewise.
19736 (movsi_lo_sum_pic_label_ref): Likewise.
19737 (movdi_pic_label_ref): Likewise.
19738 (movdi_high_pic_label_ref): Likewise.
19739 (movdi_lo_sum_pic_label_ref): Likewise.
19741 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
19743 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
19744 custom LIB_SPEC setup.
19746 2018-04-06 Ruslan Bukin <br@bsdpad.com>
19747 Kito Cheng <kito.cheng@gmail.com>
19749 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
19750 * config/riscv/freebsd.h: New.
19752 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19754 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
19755 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
19758 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19759 Kito Cheng <kito.cheng@gmail.com>
19761 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
19762 nds32_output_call, nds32_symbol_binds_local_p): New functions.
19763 * config/nds32/nds32-protos.h (nds32_output_call,
19764 nds32_output_return): Declare.
19765 * config/nds32/nds32.md: Refine all the call and return patterns.
19767 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19770 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
19771 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
19773 PR rtl-optimization/84872
19774 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
19775 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
19776 EDGE_CROSSING edge.
19778 2018-04-06 Tamar Christina <tamar.christina@arm.com>
19780 * expr.c (copy_blkmode_to_reg): Revert 254862.
19781 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
19783 2018-04-06 Richard Biener <rguenther@suse.de>
19785 PR middle-end/85244
19786 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
19787 after seeing a component reference with an adjacent field. Treat
19788 refs to arrays at struct end of external decls similar to
19789 refs to unconstrained commons.
19791 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19794 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
19795 look through SAVE_EXPRs with non-side-effects argument. Adjust
19797 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
19800 2018-04-06 Richard Biener <rguenther@suse.de>
19802 PR middle-end/85180
19803 * alias.c (find_base_term): New wrapper around find_base_term
19804 unwinding CSELIB_VAL_PTR changes.
19805 (find_base_term): Do not restore CSELIB_VAL_PTR during the
19808 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19810 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
19812 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
19813 constant definitions.
19814 ("nop"): lr 0,0 -> nopr r0
19815 ("nop_lr0", "nop_lr1"): New insn definitions.
19817 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19819 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
19820 NDS32_V3PUSH_AVAILABLE_P macro.
19822 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
19823 Chung-Ju Wu <jasonwucj@gmail.com>
19825 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
19826 (nds32*-*-*): Add float and fpu_config into supported_defaults.
19827 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
19828 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
19829 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
19830 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
19831 * config/nds32/constraints.md: New constraints and checking for hard
19832 float configuration.
19833 * config/nds32/iterators.md: New mode iterator and attribute for hard
19834 float configuration.
19835 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
19837 * config/nds32/nds32-fpu.md: New file.
19838 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
19839 deal with hard float code generation.
19840 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
19842 (abi_type, float_reg_number): New enum type.
19843 * config/nds32/nds32-predicates.c: New predicates for hard float.
19844 * config/nds32/nds32-protos.h: Declare functions for hard float.
19845 * config/nds32/nds32.c: Implementation for hard float configuration.
19846 * config/nds32/nds32.h: Definitions for hard float configuration.
19847 * config/nds32/nds32.md: Include hard float machine description and
19848 modify patterns for hard float configuration.
19849 * config/nds32/nds32.opt: New options for hard float configuration.
19850 * config/nds32/predicates.md: New predicates for hard float
19853 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19855 * common/config/nds32/nds32-common.c
19856 (nds32_option_optimization_table): Enable -mreleax-hint by default.
19858 2018-04-05 Jakub Jelinek <jakub@redhat.com>
19860 PR middle-end/85195
19861 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
19862 CONSTRUCTOR_ELT (ctor, ...)->value.
19864 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
19867 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
19869 2018-04-05 Tom de Vries <tom@codesourcery.com>
19872 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
19875 2018-04-05 Shiva Chen <shiva0217@gmail.com>
19876 Kito Cheng <kito.cheng@gmail.com>
19878 * config/nds32/constraints.md (U33): Fine-tune checking condition.
19879 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
19880 * config/nds32/nds32.h (nds32_16bit_address_type): Add
19881 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
19883 2018-04-05 Shiva Chen <shiva0217@gmail.com>
19884 Kito Cheng <kito.cheng@gmail.com>
19886 * config/nds32/constraints.md (Ufe): New memory constraint.
19887 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
19888 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
19889 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
19891 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
19892 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
19894 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19896 * config/nds32/nds32.md: Use optimize_size in the condition for
19897 alu-shift instructions.
19899 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19901 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
19903 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19905 * config/nds32/nds32.md (negsi2): Refine pattern.
19907 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
19908 Chung-Ju Wu <jasonwucj@gmail.com>
19910 * config/nds32/iterators.md (shift_rotate): New code iterator.
19911 (shift): New code attribute.
19912 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
19913 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
19914 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
19915 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
19916 bit-wise operations.
19917 (andsi3, *andsi3): Ditto.
19918 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
19919 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
19920 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
19921 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
19922 nds32_ior_operand, nds32_xor_operand): New predicates.
19924 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19926 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
19927 (addsi3, subsi3): ... this.
19929 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19931 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
19933 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19935 * config/nds32/nds32.md: Adjust indention.
19937 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
19939 * config/nds32/nds32.md (feature): New attribute.
19941 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19943 * config/nds32/nds32.md (subtype): New attribute.
19945 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
19948 * config/arm/arm-builtins.c (arm_expand_builtin): Change
19949 expansion to perform a bitwise AND of the argument followed by a
19950 boolean negation of the result.
19952 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
19954 PR rtl-optimization/84878
19955 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
19956 the basic block. Assert the use reference is not artificial and that
19957 it has an associated insn.
19959 2018-04-04 Michael Matz <matz@suse.de>
19961 * builtins.c (compute_objsize): Pass correct operand
19962 to array_at_struct_end_p.
19964 2018-04-04 Richard Biener <rguenther@suse.de>
19967 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
19968 from contexts for DINFO_LEVEL_TERSE and below.
19970 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
19972 * config/nds32/nds32-doubleword.md (move_<mode>): Require
19973 resiter_operand condition.
19974 * config/nds32/nds32.md (*move<mode>): Ditto.
19976 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
19977 Monk Chiang <sh.chiang04@gmail.com>
19979 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
19981 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19983 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
19985 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19986 Kito Cheng <kito.cheng@gmail.com>
19988 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
19989 nds32_cond_code_str, output_cond_branch,
19990 output_cond_branch_compare_zero, nds32_expand_cbranch,
19991 nds32_expand_cstore, nds32_expand_movcc,
19992 nds32_output_cbranchsi4_equality_zero,
19993 nds32_output_cbranchsi4_equality_reg,
19994 nds32_output_cbranchsi4_equality_reg_or_const_int,
19995 nds32_output_cbranchsi4_greater_less_zero: New functions.
19996 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
19997 nds32_expand_cstore, nds32_expand_movcc,
19998 nds32_output_cbranchsi4_equality_zero,
19999 nds32_output_cbranchsi4_equality_reg,
20000 nds32_output_cbranchsi4_equality_reg_or_const_int,
20001 nds32_output_cbranchsi4_greater_less_zero): Declare.
20002 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
20003 nds32_rimm11s_operand): New predicates.
20004 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
20005 * config/nds32/nds32.md: Rewrite all the branch and conditional move
20008 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20010 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
20011 * config/nds32/nds32.md: Ditto.
20012 * config/nds32/pipelines.md: Ditto.
20014 2018-04-04 Richard Biener <rguenther@suse.de>
20016 PR tree-optimization/85168
20017 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
20018 propagating abnormals.
20020 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20022 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
20024 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20025 Kito Cheng <kito.cheng@gmail.com>
20027 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
20028 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
20029 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
20030 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
20031 * config/nds32/nds32.md (sibcall_internal): New.
20032 (sibcall_register): Remove.
20033 (sibcall_immediate): Remove.
20034 (sibcall_value_internal): New.
20035 (sibcall_value_register): Remove.
20036 (sibcall_value_immediate): Remove.
20037 * config/nds32/predicates.md (nds32_general_register_operand): New.
20038 (nds32_call_address_operand): New.
20040 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20042 PR rtl-optimization/85167
20043 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
20044 bb_defs if *split_p, instead preinitialize it to NULL.
20046 PR tree-optimization/85156
20047 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
20048 evaluating the argument multiple times.
20050 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
20052 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
20054 (_mm_cvtpd_ps): Likewise.
20055 (_mm_cvttpd_epi32): Likewise.
20056 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
20057 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
20058 vector, pixel, and bool following altivec.h include.
20060 2018-04-03 Martin Sebor <msebor@redhat.com>
20062 * doc/extend.texi (Common Function Attributes): Clarify.
20063 (const attribute): Likewise.
20064 (pure attribute): Likewise.
20066 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20069 * config/i386/i386.c (ix86_expand_vector_set): Use
20070 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
20072 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
20074 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
20075 instructions when changing rounding bits to preserve precision bits
20076 in the x87 control word.
20078 2018-04-03 Martin Liska <mliska@suse.cz>
20080 PR tree-optimization/82491
20081 * rtl.h (strip_offset_and_add): Replace += suboffset with
20082 poly_uint64 () + suboffset.
20084 2018-03-29 Martin Liska <mliska@suse.cz>
20085 Martin Jambor <mjambor@suse.cz>
20088 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
20089 param_type is not an integral or pointer type.
20091 2018-04-03 Richard Biener <rguenther@suse.de>
20093 * sese.h (recompute_all_dominators): Remove.
20095 2018-04-02 Martin Sebor <msebor@redhat.com>
20097 * doc/invoke.texi (-Wrestrict): Fix typos.
20099 2018-04-02 Jim Wilson <jimw@sifive.com>
20101 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
20102 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
20103 (<optab>di3, <optab>si3_extend): Likewise.
20104 (<optab>si3_mask, <optab>si3_mask_1): New.
20105 (<optab>di3_mask, <optab>di3_mask_1): New.
20106 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
20107 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
20108 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
20110 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
20112 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
20115 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
20117 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
20118 (nds32_canonicalize_comparison): New function.
20120 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20121 Kito Cheng <kito.cheng@gmail.com>
20122 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20124 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
20125 * config/nds32/constants.md (unspec_volatile_element): Add
20126 UNSPEC_VOLATILE_RELAX_GROUP.
20127 * config/nds32/nds32-relax-opt.c: New file.
20128 * config/nds32/nds32-predicates.c
20129 (nds32_symbol_load_store_p): New function.
20130 * config/nds32/nds32-protos.h
20131 (nds32_symbol_load_store_p): Declare function.
20132 (make_pass_nds32_relax_opt): Declare new rtl pass function.
20133 * config/nds32/nds32.c
20134 (nds32_register_pass): New function to register pass.
20135 (nds32_register_passes): New function to register passes.
20136 * config/nds32/nds32.md (relax_group): New pattern.
20137 * config/nds32/nds32.opt (mrelax-hint): New option.
20138 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
20140 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
20142 * config/nds32/t-nds32: Modify files dependency.
20144 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20146 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
20147 (PROFILE_HOOK): Define its implementation.
20149 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20151 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
20152 type and 32-bit size.
20154 2018-04-01 Jakub Jelinek <jakub@redhat.com>
20156 PR middle-end/85090
20157 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
20158 (V_128_256): New mode iterator.
20159 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
20160 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
20161 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
20163 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
20164 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
20166 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
20169 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
20170 NaN inputs correctly.
20172 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
20175 * config/rs6000/vsx.md (??r): New mode attribute.
20176 (*vsx_mov<mode>_64bit): Use it.
20177 (*vsx_mov<mode>_32bit): Likewise.
20179 2018-03-30 Martin Sebor <msebor@redhat.com>
20181 PR tree-optimization/84818
20182 * builtins.c (check_access): Use warning_n.
20184 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20187 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
20189 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
20192 2018-03-30 Julia Koval <julia.koval@intel.com>
20195 * x86-tune.def (movx, partial_reg_dependency): Enable for
20198 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
20200 PR inline-asm/84985
20201 * lra-constraints.c (process_alt_operands): Move setting
20202 this_alternative_matches below.
20204 2018-03-29 Martin Liska <mliska@suse.cz>
20207 * doc/invoke.texi: Document how LTO works with debug info.
20208 Describe auto-load support of binutils. Mention 'x86-64'
20209 as valid option value of -march option.
20211 2018-03-29 Jakub Jelinek <jakub@redhat.com>
20213 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
20216 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
20217 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
20218 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
20221 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20224 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
20225 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
20226 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
20227 for RS6000_BTM_POWERPC64.
20228 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
20229 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
20230 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
20233 (DIVDEU): Likewise.
20235 2018-03-28 Carl Love <cel@us.ibm.com>
20238 2017-09-27 Carl Love <cel@us.ibm.com>
20240 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
20241 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
20242 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
20245 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20247 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
20248 instead of __vector bool.
20249 (_mm_max_pu8): Likewise.
20250 (_mm_min_pi16): Likewise.
20252 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20255 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20256 (DIVWEUO): Likewise.
20257 (DIVDEO): Likewise.
20258 (DIVDEUO): Likewise.
20259 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20260 DIVWEUO and DIVDEUO.
20261 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20262 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20263 (div_extend): Likewise.
20264 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20266 (__builtin_divweuo): Likewise.
20267 (__builtin_divdeo): Likewise.
20268 (__builtin_divdeuo): Likewise.
20270 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20273 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20274 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20276 PR tree-optimization/82004
20277 * gimple-match-head.c (optimize_pow_to_exp): New function.
20278 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20279 Don't fold to exp if optimize_pow_to_exp is false.
20281 2018-03-28 Martin Liska <mliska@suse.cz>
20284 * calls.c (initialize_argument_information): Fix trailing space.
20285 * common.opt: Fix typo and provide better explanation for
20286 -fsanitize-coverage option.
20287 * config/i386/i386.opt: Fix typo.
20289 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20290 Martin Liska <mliska@suse.cz>
20293 * gimplify.c (asan_poison_variable): Don't do the check for
20294 gimplify_omp_ctxp here.
20295 (gimplify_decl_expr): Do it here.
20296 (gimplify_target_expr): Likewise.
20298 2018-03-28 Martin Liska <mliska@suse.cz>
20301 * config/i386/i386.c (ix86_function_arg_advance): Do not call
20302 chkp_type_bounds_count if MPX is not enabled.
20304 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
20306 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20308 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
20311 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20312 function to create the function decl for complex long double
20313 multiply and divide for -mabi=ieeelongdouble.
20314 (init_float128_ieee): Call it.
20316 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
20319 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20320 -fcf-protection=branch -mibt.
20321 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20323 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20326 * config/arm/arm.c (arm_valid_symbolic_address): Handle
20327 arm_word_relocations.
20329 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
20332 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20333 extern array declarations.
20335 2018-03-27 Richard Biener <rguenther@suse.de>
20337 PR middle-end/84067
20338 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20339 explicit single_use checks.
20341 2018-03-27 Richard Biener <rguenther@suse.de>
20343 PR tree-optimization/85082
20344 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20347 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20349 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20350 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20351 Turn on fasynchronous-unwind-tables and funwind-tables.
20353 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
20356 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20357 (*bmi_blsr_<mode>_ccz): Ditto.
20359 2018-03-26 Tom de Vries <tom@codesourcery.com>
20361 PR tree-optimization/85063
20362 * omp-general.c (offloading_function_p): New function. Factor out
20364 * omp-offload.c (pass_omp_target_link::gate): ... here.
20365 * omp-general.h (offloading_function_p): Declare.
20366 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20367 with attribute omp declare target for offloading functions.
20369 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
20371 PR tree-optimization/84005
20372 * tree-data-ref.h (get_base_for_alignment): Declare.
20373 * tree-data-ref.c (get_base_for_alignment_1): New function.
20374 (get_base_for_alignment): Likewise.
20375 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20376 get_base_for_alignment to find a suitable base object, instead
20377 of always using drb->base_address.
20379 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20381 PR inline-asm/85022
20382 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
20383 known size by default.
20385 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
20387 PR inline-asm/85030
20388 * lra-constraints.c (process_alt_operands): Don't match BLKmode
20389 and non BLKmode operands.
20391 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20394 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
20395 Clean up attributes.
20397 2018-03-23 Richard Biener <rguenther@suse.de>
20400 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
20401 we are going to emit early debug for LTO.
20403 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20405 PR inline-asm/85034
20406 * function.c (match_asm_constraints_1): Don't optimize if input
20407 doesn't satisfy general_operand predicate for output's mode.
20409 PR inline-asm/85022
20410 * alias.c (write_dependence_p): Don't require for x_canonicalized
20411 non-VOIDmode if x has VOIDmode.
20414 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
20415 just don't try to optimize it rather than assert it never happens.
20417 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20419 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
20420 macro expansions for definition of ST_INTERNAL_<mode> and
20421 LD_INTERNAL_<mode> builtins.
20422 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
20424 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
20426 (altivec_expand_st_builtin): Likewise.
20427 (altivec_expand_builtin): Remove calls to deleted functions.
20428 (rs6000_address_for_altivec): Delete this function.
20429 * config/rs6000/vector.md: Remove expands for
20430 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
20432 2018-03-22 Sudakshina Das <sudi.das@arm.com>
20435 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
20436 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
20437 re-computing once computed.
20438 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
20439 (arm_init_machine_status): Initialize
20440 machine->static_chain_stack_bytes.
20442 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20445 * doc/extend.texi: Add four new prototypes for vec_ld.
20446 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
20447 definitions for more logical presentation.
20448 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
20449 entries for V1TI variants of __builtin_altivec_ld builtin.
20450 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
20451 handling of V1TI variant of LVX icode pattern.
20452 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
20453 (rs6000_gimple_fold_builtin): Likewise.
20454 (altivec_init_builtins): Add code to define
20455 __builtin_altivec_lvx_v1ti function.
20457 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20459 PR inline-asm/84941
20460 * function.c (match_asm_constraints_1): Don't do the optimization
20461 if input isn't a REG, SUBREG, MEM or constant.
20463 2018-03-22 Tom de Vries <tom@codesourcery.com>
20465 PR tree-optimization/84956
20466 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
20467 bb_has_abnormal_pred.
20469 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20472 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
20473 DECL_INITIAL (decl) to decl at the end.
20474 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
20475 adjust the comment.
20477 2018-03-21 Joseph Myers <joseph@codesourcery.com>
20479 * doc/extend.texi (__builtin_tgmath): Document when complex
20480 integer types are treated as _Complex _Float64.
20482 2018-03-21 Tom de Vries <tom@codesourcery.com>
20484 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
20486 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20488 PR tree-optimization/84960
20489 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
20490 if it is ENTRY block, move them into single succ of ENTRY in that case.
20492 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
20494 PR tree-optimization/84811
20495 * poly-int.h (poly_span_traits): Remove the T3 parameter and
20496 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
20497 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
20498 (known_subrange_p): Update accordingly. Cast each value involved
20499 in the size comparison, rather than casting the result of the
20502 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20504 PR tree-optimization/84982
20505 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
20506 by flipping the least significant bit rather than all bits from
20507 bitpos to bitpos + bitsize - 1.
20509 2018-03-21 Nathan Sidwell <nathan@acm.org>
20511 * doc/extend.texi (Deprecated Features): Remove mention of
20512 long-deleted deprecations.
20514 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20517 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
20518 * configure: Regenerate.
20520 2018-03-21 Tom de Vries <tom@codesourcery.com>
20522 PR tree-optimization/83126
20523 * tree-parloops.c (num_phis): New function.
20524 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
20526 2018-03-21 Nathan Sidwell <nathan@acm.org>
20528 * doc/extend.texi (Deprecated Features): Update deprecated flags,
20529 mention anon-struct/union members and trailing attributes.
20531 2018-03-21 Bin Cheng <bin.cheng@arm.com>
20533 PR tree-optimization/84969
20534 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
20535 builtin memset partitions if they set different rhs values.
20537 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20539 PR rtl-optimization/84989
20540 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
20541 VEC_DUPLICATE with scalar result mode.
20543 2018-03-21 Martin Liska <mliska@suse.cz>
20546 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
20547 not intended return statement.
20549 2018-03-21 Martin Liska <mliska@suse.cz>
20552 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
20553 (chkp_find_bound_slots_1): Limit number of iterations.
20555 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
20558 * Minor grammar fixes for x86 options.
20560 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20563 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
20564 holding REG_CFA_RESTORE notes, instead turn them into a USE.
20566 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
20569 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
20570 (altivec_lvx_<mode>_1op): Likewise.
20571 (altivec_stvx_<mode>_2op): Likewise.
20572 (altivec_stvx_<mode>_1op): Likewise.
20573 (altivec_lvx_<VM2:mode>): New define_expand.
20574 (altivec_stvx_<VM2:mode>): Likewise.
20575 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
20576 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20577 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
20578 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20579 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
20580 (rs6000_gen_lvx): Likewise.
20581 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
20582 (altivec_expand_stv_builtin): Likewise.
20583 (altivec_expand_builtin): Likewise.
20584 * config/rs6000/vector.md: Likewise.
20586 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20589 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
20592 2018-03-20 Richard Biener <rguenther@suse.de>
20595 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
20596 sign-conversions as zero, fall back to standard scalar_stmt
20599 2018-03-20 Martin Liska <mliska@suse.cz>
20602 * predict.c (rebuild_frequencies): Handle case when we have
20603 PROFILE_ABSENT, but flag_guess_branch_prob is false.
20605 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20608 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
20609 flag_section_anchors.
20610 * varasm.c (use_blocks_for_decl_p): Remove hack for
20611 dw2_force_const_mem.
20614 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
20616 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
20617 be created, use lowpart_subreg of operands[0] rather than operands[0]
20619 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
20620 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
20621 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
20622 and n constraint instead of aarch64_shift_imm_di and Usd.
20623 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
20624 (*aarch64_<optab>_reg_minus<mode>3): ... this.
20626 2018-03-20 Sudakshina Das <sudi.das@arm.com>
20629 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
20630 to favor GPR over NEON registers.
20631 (<shift>di3_neon): Likewise.
20633 2018-03-20 Tom de Vries <tom@codesourcery.com>
20636 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
20637 (nvptx_process_pars): Emit bar.sync asap and alap.
20639 2018-03-20 Tom de Vries <tom@codesourcery.com>
20642 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
20643 seen_label if seen_label is already set.
20645 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20648 * config/i386/i386.c (fold_builtin_cpu): For features above 31
20649 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
20650 Use 1U instead of 1. Formatting fixes.
20653 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
20654 instead of TREE_TYPE (s1) for the return value.
20656 2018-03-19 Jakub Jelinek <jakub@redhat.com>
20658 PR tree-optimization/84946
20659 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
20660 bitsize + bitsize in poly_uint64 rather than poly_int64.
20663 * dwarf2asm.c: Include fold-const.c.
20664 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
20665 of decl rather than decl itself.
20667 PR rtl-optimization/84643
20668 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
20670 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
20673 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
20674 calling assemble_variable.
20676 2018-03-19 Sudakshina Das <sudi.das@arm.com>
20679 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
20680 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
20682 2018-03-19 Jim Wilson <jimw@sifive.com>
20685 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
20686 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
20687 (riscv_first_stack_step): Likewise.
20688 (riscv_option_override): Use STACK_BOUNDARY instead of
20689 MIN_STACK_BOUNDARY.
20690 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
20691 MIN_STACK_BOUNDARY.
20692 (BIGGEST_ALIGNMENT): Set to 128.
20693 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
20694 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
20697 2018-03-19 Richard Biener <rguenther@suse.de>
20699 PR tree-optimization/84933
20700 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
20701 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
20703 2018-03-19 Richard Biener <rguenther@suse.de>
20705 PR tree-optimization/84859
20706 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
20707 (cond_if_else_store_replacement): Perform sinking operation on
20708 single-store BBs regardless of MAX_STORES_TO_SINK setting.
20709 Generalize what a BB with a single eligible store is.
20711 2018-03-19 Richard Biener <rguenther@suse.de>
20713 PR tree-optimization/84929
20714 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
20715 chrec_is_positive against non-chrec arg.
20717 2018-03-19 Tamar Christina <tamar.christina@arm.com>
20720 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
20722 2018-03-18 Martin Liska <mliska@suse.cz>
20724 PR rtl-optimization/84635
20725 * regrename.c (build_def_use): Use matches_mode only when
20728 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
20730 PR tree-optimization/84913
20731 * tree-vect-loop.c (vectorizable_reduction): Don't try to
20732 vectorize chains of COND_EXPRs.
20734 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20736 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
20738 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20740 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
20742 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20744 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
20746 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20747 Kito Cheng <kito.cheng@gmail.com>
20749 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
20750 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
20751 (nds32_adjust_reg_alloc_order): New function.
20752 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
20754 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
20756 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
20757 nds32_print_operand, nds32_print_operand_address): Use
20758 HOST_WIDE_INT_PRINT_DEC instead.
20760 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20762 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
20764 2018-03-17 Jakub Jelinek <jakub@redhat.com>
20767 * config/i386/i386.c (initial_ix86_tune_features,
20768 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
20769 unsigned long long.
20770 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
20771 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
20772 rather than 1u << ix86_tune. Formatting fix.
20773 (ix86_option_override_internal): Change ix86_arch_mask from
20774 unsigned int to unsigned HOST_WIDE_INT, initialize to
20775 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
20776 (ix86_function_specific_restore): Likewise.
20778 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20781 * postreload.c (reload_combine_recognize_pattern): Perform
20782 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
20783 truncate_int_for_mode the result for the destination's mode.
20786 * hsa-gen.c (mem_type_for_type): Fix comment typo.
20787 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
20789 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
20792 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
20795 * lra-assigns.c (lra_split_hard_reg_for): Don't use
20796 regno_allocno_class_array and sorted_pseudos.
20797 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
20798 insns where regno is used.
20800 2018-03-16 Martin Liska <mliska@suse.cz>
20803 * multiple_target.c (create_dispatcher_calls): Redirect
20804 reference in the symbol table.
20806 2018-03-16 Martin Liska <mliska@suse.cz>
20809 * multiple_target.c (create_dispatcher_calls): Redirect also
20812 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20816 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
20817 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
20818 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
20820 2018-03-16 Julia Koval <julia.koval@intel.com>
20822 * doc/invoke.texi (Skylake Server): Add CLWB.
20823 Cannonlake): Remove CLWB.
20825 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20827 PR tree-optimization/84841
20828 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
20830 (FLOAT_ONE_CONST_TYPE): Define.
20831 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
20832 (sort_by_operand_rank): Put entries with higher constant_type last
20833 rather than first to match comments.
20835 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
20837 * config/nios2/nios2.md (movsi_internal): Fix thinko in
20840 2018-03-15 Jakub Jelinek <jakub@redhat.com>
20843 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
20844 check and use address of target always.
20846 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
20849 * config/i386/i386.c (indirect_thunk_needed): Update comments.
20850 (indirect_thunk_bnd_needed): Likewise.
20851 (indirect_thunks_used): Likewise.
20852 (indirect_thunks_bnd_used): Likewise.
20853 (indirect_return_needed): New.
20854 (indirect_return_bnd_needed): Likewise.
20855 (output_indirect_thunk_function): Add a bool argument for
20857 (output_indirect_thunk_function): Don't generate alias for
20858 function return thunk.
20859 (ix86_code_end): Call output_indirect_thunk_function to generate
20860 function return thunks.
20861 (ix86_output_function_return): Set indirect_return_bnd_needed
20862 and indirect_return_needed instead of indirect_thunk_bnd_needed
20863 and indirect_thunk_needed.
20865 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
20867 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
20868 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
20869 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
20871 2018-03-15 David Malcolm <dmalcolm@redhat.com>
20872 Paul Hua <paul.hua.gm@gmail.com>
20875 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
20877 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
20879 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
20880 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
20881 resp. SFmode cases.
20883 2018-03-15 Tamar Christina <tamar.christina@arm.com>
20886 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
20887 instead of GET_MODE_SIZE when comparing Units.
20889 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
20892 * varasm.c (hash_section): Return an unchangeble hash value
20893 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
20894 Return !aarch64_can_use_per_function_literal_pools_p ().
20896 2018-03-15 Jakub Jelinek <jakub@redhat.com>
20899 * optabs.c (emit_conditional_move): Pass address of cmode's copy
20900 rather than address of cmode as last argument to prepare_cmp_insn.
20902 2018-03-15 Julia Koval <julia.koval@intel.com>
20904 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
20905 F_AVX512VNNI, F_AVX512BITALG): New.
20907 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
20910 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
20911 insn for floating-point loads and stores.
20913 2018-03-14 Carl Love <cel@us.ibm.com>
20915 * config/rs6000/rs6000-c.c: Add macro definitions for
20916 ALTIVEC_BUILTIN_VEC_PERMXOR.
20917 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
20918 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
20919 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
20920 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
20922 * config/doc/extend.texi: Add prototypes for vec_permxor.
20924 2018-03-14 David Malcolm <dmalcolm@redhat.com>
20927 * diagnostic-show-locus.c (class layout_point): Convert m_line
20928 from int to linenum_type.
20929 (line_span::comparator): Use linenum "compare" function when
20930 comparing line numbers.
20931 (test_line_span): New function.
20932 (layout_range::contains_point): Convert param "row" from int to
20934 (layout_range::intersects_line_p): Likewise.
20935 (layout::will_show_line_p): Likewise.
20936 (layout::print_source_line): Likewise.
20937 (layout::should_print_annotation_line_p): Likewise.
20938 (layout::print_annotation_line): Likewise.
20939 (layout::print_leading_fixits): Likewise.
20940 (layout::annotation_line_showed_range_p): Likewise.
20941 (struct line_corrections): Likewise for field m_row.
20942 (line_corrections::line_corrections): Likewise for param "row".
20943 (layout::print_trailing_fixits): Likewise.
20944 (layout::get_state_at_point): Likewise.
20945 (layout::get_x_bound_for_row): Likewise.
20946 (layout::print_line): Likewise.
20947 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
20948 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
20949 * input.c (selftest::test_linenum_comparisons): New function.
20950 (selftest::input_c_tests): Call it.
20951 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
20952 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
20953 * selftest.h (ASSERT_GT): New macro.
20954 (ASSERT_GT_AT): New macro.
20955 (ASSERT_LT): New macro.
20956 (ASSERT_LT_AT): New macro.
20958 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
20960 PR rtl-optimization/84780
20961 * combine.c (distribute_links): Don't make a link based on pc_rtx.
20963 2018-03-14 Martin Liska <mliska@suse.cz>
20965 * tree.c (record_node_allocation_statistics): Use
20966 get_stats_node_kind.
20967 (get_stats_node_kind): New function extracted from
20968 record_node_allocation_statistics.
20969 (free_node): Use get_stats_node_kind.
20971 2018-03-14 Richard Biener <rguenther@suse.de>
20973 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
20974 that the value-set of ANTIC_IN doesn't grow.
20977 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20979 (BB_VISITED_WITH_VISITED_SUCCS): New define.
20980 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20982 2018-03-14 Julia Koval <julia.koval@intel.com>
20984 * config.gcc (icelake-client, icelake-server): New.
20986 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
20987 (initial_ix86_arch_features): Ditto.
20988 (PTA_SKYLAKE): Add SGX.
20989 (PTA_ICELAKE): Remove.
20990 (PTA_ICELAKE_CLIENT): New.
20991 (PTA_ICELAKE_SERVER): New.
20992 (ix86_option_override_internal): Split up icelake on icelake client and
20994 (get_builtin_code_for_version): Ditto.
20995 (fold_builtin_cpu): Ditto.
20996 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
20997 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
20998 * config/i386/i386.h (processor_type): Ditto.
20999 * doc/invoke.texi: Ditto.
21001 2018-03-14 Jakub Jelinek <jakub@redhat.com>
21004 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
21005 INTEGER_CST offset, add it together with bitpos / 8 and
21006 sign extend based on POINTER_SIZE.
21010 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
21013 * config/i386/constraints.md (Yc): New register constraint.
21014 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
21015 Use Yc constraint for alternative 2 of operand 0. Remove
21016 preferred_for_speed attribute.
21018 2018-03-14 Richard Biener <rguenther@suse.de>
21020 PR tree-optimization/84830
21021 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
21022 with the old one to avoid oscillations.
21024 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
21027 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
21029 (assign_by_spills): Return a flag of reload assignment failure.
21030 Do not process the reload assignment failures. Do not spill other
21031 reload pseudos if they has the same reg class. Update n if
21033 (lra_assign): Add a return arg. Set up from the result of
21034 assign_by_spills call.
21035 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21036 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21037 usage_insns if it is not NULL.
21038 (spill_hard_reg_in_range): New function.
21039 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21040 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21041 function prototypes.
21042 (lra_assign): Change prototype.
21043 * lra.c (lra): Add code to deal with fails by splitting hard reg
21046 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
21048 * config/riscv/riscv.opt (mrelax): New option.
21049 * config/riscv/riscv.c (riscv_file_start): Emit ".option
21050 "norelax" when riscv_mrelax is disabled.
21051 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
21053 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21056 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
21057 reassociation for int modes.
21059 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21061 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
21062 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
21064 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
21065 * config/aarch64/aarch64-sve.md
21066 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
21067 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
21068 (*extend<mode><Vwide>2): Rename to...
21069 (aarch64_sve_extend<mode><Vwide>2): ...this.
21070 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
21071 renaming the old pattern to...
21072 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
21074 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
21075 define_expand, renaming the old pattern to...
21076 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
21077 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
21078 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
21079 account when deciding which SVE instruction the optab should use.
21080 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
21082 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21084 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
21085 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
21086 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
21087 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
21088 (tlsdesc_small_<mode>): Turn a define_expand and use
21089 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
21090 (tlsdesc_small_advsimd_<mode>): ...this.
21091 (tlsdesc_small_sve_<mode>): New pattern.
21093 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21095 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
21096 (UNSPEC_UMUL_HIGHPART): New constants.
21097 (MUL_HIGHPART): New int iteraor.
21098 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
21099 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
21101 (*<su>mul<mode>3_highpart): New define_insn.
21103 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21106 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21109 2018-03-13 Martin Liska <mliska@suse.cz>
21112 * (sem_item_optimizer::sem_item_optimizer): Initialize new
21114 (sem_item_optimizer::~sem_item_optimizer): Release it.
21115 (sem_item_optimizer::merge_classes): Register variable aliases.
21116 (sem_item_optimizer::fixup_pt_set): New function.
21117 (sem_item_optimizer::fixup_points_to_sets): Likewise.
21118 * ipa-icf.h: Declare new variables and functions.
21120 2018-03-13 Jakub Jelinek <jakub@redhat.com>
21122 PR middle-end/84834
21123 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
21124 integer_pow2p@2 and test integer_pow2p in condition.
21125 (A < 0 ? C : 0): Similarly for @1.
21127 PR middle-end/84831
21128 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
21129 characters starting at p contain '\0' character, don't look beyond
21133 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
21134 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
21137 * reg-stack.c (change_stack): Change update_end var from int to
21138 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
21139 also call set_block_for_insn on the newly added insns and rescan.
21142 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
21143 on the last operand.
21146 * tree.c (stabilize_reference_1): Return save_expr (e) for
21147 STATEMENT_LIST even if it doesn't have side-effects.
21149 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
21151 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
21153 2018-03-12 Renlin Li <renlin.li@arm.com>
21155 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
21156 aarch64_output_scalar_simd_mov_immediate.
21158 2018-03-12 Martin Sebor <msebor@redhat.com>
21160 PR tree-optimization/83456
21161 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
21162 for perfectly overlapping calls to memcpy.
21163 (gimple_fold_builtin_memory_chk): Same.
21164 (gimple_fold_builtin_strcpy): Handle no-warning.
21165 (gimple_fold_builtin_stxcpy_chk): Same.
21166 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
21168 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21170 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
21171 parameter. Use it for SFmode.
21172 (rs6000_function_arg_advance_1): Adjust.
21173 (rs6000_function_arg): Adjust.
21174 (rs6000_gimplify_va_arg): Pass false for that new parameter.
21176 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21178 PR rtl-optimization/84169
21179 PR rtl-optimization/84780
21180 * combine.c (can_combine_p): Check for a 2-insn combination whether
21181 the destination register is used between the two insns, too.
21183 2018-03-12 Richard Biener <rguenther@suse.de>
21185 PR tree-optimization/84803
21186 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
21187 for refs DR analysis didn't process.
21189 2018-03-12 Richard Biener <rguenther@suse.de>
21191 PR tree-optimization/84777
21192 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
21193 force-vectorize loops ignore whether we are optimizing for size.
21195 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
21197 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
21198 (TARGET_MD_ASM_ADJUST): Define.
21200 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
21201 Kito Cheng <kito.cheng@gmail.com>
21202 Chung-Ju Wu <jasonwucj@gmail.com>
21204 * config/nds32/nds32.c (nds32_compute_stack_frame,
21205 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
21206 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
21207 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
21208 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
21209 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
21210 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
21211 * config/nds32/nds32.md (prologue, epilogue): Use macro
21212 NDS32_V3PUSH_AVAILABLE_P to do checking.
21214 2018-03-11 Jakub Jelinek <jakub@redhat.com>
21217 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
21218 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
21219 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
21220 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
21221 addition of most attributes on !orig_type_die or the attribute not
21222 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
21224 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21225 Chung-Ju Wu <jasonwucj@gmail.com>
21227 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
21228 __NDS32_VH__ macro.
21229 * config/nds32/nds32.opt (mvh): New option.
21231 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21232 Chung-Ju Wu <jasonwucj@gmail.com>
21234 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
21236 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
21237 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
21240 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21241 Chung-Ju Wu <jasonwucj@gmail.com>
21243 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
21245 * config/nds32/nds32-multiple.md (strlensi): New pattern.
21246 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
21248 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
21249 Kito Cheng <kito.cheng@gmail.com>
21250 Chung-Ju Wu <jasonwucj@gmail.com>
21252 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
21253 UNSPEC_FFMISM and UNSPEC_FLMISM.
21254 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
21255 for ffb, ffmism and flmism.
21256 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21257 (unspec_ffmism): Ditto.
21258 (unspec_flmism): Ditto.
21259 (nds32_expand_builtin_impl): Check if string extension is available.
21260 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21261 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21263 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
21266 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21269 * lra-assigns.c (assign_by_spills): Return a flag of reload
21270 assignment failure. Do not process the reload assignment
21271 failures. Do not spill other reload pseudos if they has the same
21273 (lra_assign): Add a return arg. Set up from the result of
21274 assign_by_spills call.
21275 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21276 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21277 usage_insns if it is not NULL.
21278 (spill_hard_reg_in_range): New function.
21279 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21280 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21281 function prototypes.
21282 (lra_assign): Change prototype.
21283 * lra.c (lra): Add code to deal with fails by splitting hard reg
21286 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
21289 * config/i386/i386.opt: Replace Enforcment with Enforcement.
21291 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
21294 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21295 (dw_val_node): Add val_symbolic_view.
21296 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21297 (symview_upper_bound): New.
21298 (new_line_info_table): Initialize symviews_since_reset.
21299 (dwarf2out_source_line): Count symviews_since_reset and set
21300 symview_upper_bound.
21301 (dw_val_equal_p): Handle symview.
21302 (add_AT_symview): New.
21303 (print_dw_val): Handle symview.
21304 (attr_checksum, attr_checksum_ordered): Likewise.
21305 (same_dw_val_p, size_of_die): Likewise.
21306 (value_format, output_die): Likewise.
21307 (add_high_low_attributes): Use add_AT_symview for entry_view.
21308 (dwarf2out_finish): Reset symview_upper_bound, clear
21311 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
21314 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21315 Add strict argument and use it.
21316 (rs6000_split_multireg_move): Update for new strict argument.
21317 (mem_operand_gpr): Disallow all non-offsettable addresses.
21318 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21320 2018-03-09 Jakub Jelinek <jakub@redhat.com>
21323 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21324 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21325 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21328 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21329 decl, use remap_type if we want to use the type.
21331 2018-03-09 Martin Sebor <msebor@redhat.com>
21333 PR tree-optimization/84526
21334 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21336 (builtin_access::generic_overlap): Be prepared to handle non-array
21339 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
21341 PR rtl-optimization/84682
21342 * lra-constraints.c (process_address_1): Check is_address flag
21343 for address constraints.
21344 (process_alt_operands): Likewise.
21345 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21346 preprocess_constraints.
21347 * recog.h (preprocess_constraints): Add oploc parameter.
21349 * recog.c (preprocess_constraints): Test address_operand for
21350 CT_ADDRESS constraints.
21352 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21355 * lra-assigns.c (assign_by_spills): Return a flag of reload
21356 assignment failure. Do not process the reload assignment
21357 failures. Do not spill other reload pseudos if they has the same
21359 (lra_assign): Add a return arg. Set up from the result of
21360 assign_by_spills call.
21361 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21362 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21363 usage_insns if it is not NULL.
21364 (spill_hard_reg_in_range): New function.
21365 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21366 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21367 function prototypes.
21368 (lra_assign): Change prototype.
21369 * lra.c (lra): Add code to deal with fails by splitting hard reg
21372 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21375 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21376 Accept complain bool parameter. Only emit errors if it is true.
21377 (arm_parse_cpu_option_name): Likewise.
21378 (arm_target_thumb_only): Adjust callers of the above.
21379 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
21380 prototype to take a default true bool parameter.
21381 (arm_parse_arch_option_name): Likewise.
21383 2018-03-09 David Malcolm <dmalcolm@redhat.com>
21384 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
21388 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
21389 * configure: Regenerate.
21390 * configure.ac ("linker --version-script option"): New.
21391 ("linker soname option"): New.
21393 2018-03-09 Richard Biener <rguenther@suse.de>
21395 PR tree-optimization/84775
21396 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
21397 immediate uses of predicate stmts and mark them modified.
21400 PR tree-optimization/84178
21401 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21403 (version_loop_for_if_conversion): Delay update_ssa call.
21404 (tree_if_conversion): Delay update_ssa until after predicate
21407 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
21410 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
21411 when the function accesses prior frames.
21413 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21416 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
21417 gen_llsym, otherwise call maybe_gen_llsym.
21419 PR inline-asm/84742
21420 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
21421 has ',' character inside of it.
21423 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21426 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
21427 as clobbering CC_REGNUM.
21429 2018-03-08 Richard Biener <rguenther@suse.de>
21431 PR middle-end/84552
21432 * tree-scalar-evolution.c: Include tree-into-ssa.h.
21433 (follow_copies_to_constant): Do not follow SSA names registered
21436 2018-03-08 Richard Biener <rguenther@suse.de>
21438 PR tree-optimization/84178
21439 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21441 (version_loop_for_if_conversion): Delay update_ssa call.
21442 (tree_if_conversion): Delay update_ssa until after predicate
21445 2018-03-08 David Malcolm <dmalcolm@redhat.com>
21447 PR tree-optimization/84178
21448 * tree-if-conv.c (release_bb_predicate): Remove the
21449 the assertion that the stmts have NULL use_ops.
21450 Discard the statements, asserting that they haven't
21451 yet been added to a BB.
21453 2018-03-08 Richard Biener <rguenther@suse.de>
21455 PR tree-optimization/84746
21456 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
21457 (phi_translate): Pass in destination ANTIC_OUT set.
21458 (phi_translate_1): Likewise. For a simplified result lookup
21459 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
21460 (phi_translate_set): Adjust.
21461 (do_pre_regular_insertion): Likewise.
21462 (do_pre_partial_partial_insertion): Likewise.
21464 2018-03-08 Martin Liska <mliska@suse.cz>
21466 PR gcov-profile/84735
21467 * doc/gcov.texi: Document usage of profile files.
21468 * gcov-io.h: Document changes in the format.
21470 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
21474 * dwarf2out.c (struct dw_line_info_table): Update comments for
21476 (FORCE_RESET_NEXT_VIEW): New.
21477 (FORCE_RESETTING_VIEW_P): New.
21478 (RESETTING_VIEW_P): Check for -1 too.
21479 (ZERO_VIEW_P): Likewise.
21480 (new_line_info_table): Force-reset next view.
21481 (dwarf2out_begin_function): Likewise.
21482 (dwarf2out_source_line): Simplify zero_view_p initialization.
21483 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
21484 view directly. Omit view when omitting .loc at line 0.
21486 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21488 PR tree-optimization/84740
21489 * tree-switch-conversion.c (process_switch): Call build_constructors
21490 only if info.phi_count is non-zero.
21492 PR tree-optimization/84739
21493 * tree-tailcall.c (find_tail_calls): Check call arguments against
21494 DECL_ARGUMENTS (current_function_decl) rather than
21495 DECL_ARGUMENTS (func) when checking for tail recursion.
21497 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21499 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
21500 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
21501 Volker Reichelt's entry and add entries for people that perform
21502 GCC fuzzy testing and report numerous bugs.
21504 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
21507 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
21508 readonly data in sdata, if that is disabled.
21509 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
21510 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
21511 -mreadonly-in-sdata option.
21513 2018-03-07 Martin Sebor <msebor@redhat.com>
21515 PR tree-optimization/84468
21516 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
21517 basic block when looking for nul assignment.
21519 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
21522 * except.h (output_function_exception_table): Adjust prototype.
21523 * except.c (output_function_exception_table): Remove FNNAME parameter
21524 and add SECTION parameter. Ouput one part of the table at a time.
21525 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
21526 the first part of the exception table and emit unwind directives.
21527 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
21528 (i386_pe_seh_cold_init): Likewise.
21529 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
21530 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
21531 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
21532 (ix86_output_call_insn): Emit a nop in one more case for SEH.
21533 * config/i386/winnt.c: Include except.h.
21534 (struct seh_frame_state): Add reg_offset, after_prologue and
21535 in_cold_section fields.
21536 (i386_pe_seh_end_prologue): Set seh->after_prologue.
21537 (i386_pe_seh_cold_init): New function.
21538 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
21539 to seh->in_cold_section.
21540 (seh_emit_push): Record the offset of the push.
21541 (seh_emit_save): Record the offet of the save.
21542 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
21543 Test seh->after_prologue to disregard the epilogue.
21544 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
21545 (i386_pe_end_cold_function): New function.
21547 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21550 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
21551 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
21554 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
21556 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
21557 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
21559 PR middle-end/84723
21560 * multiple_target.c: Include tree-inline.h and intl.h.
21561 (expand_target_clones): Diagnose and fail if node->definition and
21562 !tree_versionable_function_p (node->decl).
21564 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
21566 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
21568 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
21569 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
21570 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
21572 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21575 * combine.c (try_combine): Use reg_or_subregno instead of handling
21576 just paradoxical SUBREGs and REGs.
21578 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
21580 * config/arc/arc.c (arc_finalize_pic): Remove function.
21581 (arc_must_save_register): We use single base PIC register, remove
21582 checks to save/restore the PIC register.
21583 (arc_expand_prologue): Likewise.
21584 * config/arc/arc-protos.h (arc_set_default_type_attributes):
21586 (arc_verify_short): Likewise.
21587 (arc_attr_type): Likewise.
21588 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
21589 (walk_stores): Likewise.
21590 (arc_address_cost): Make it static.
21591 (arc_verify_short): Likewise.
21592 (branch_dest): Likewise.
21593 (arc_attr_type): Likewise.
21594 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
21595 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
21596 (arc_final_prescan_insn): Remove inserting the nops due to
21597 hardware hazards. It is done in reorg step.
21598 (insn_length_variant_t): Remove.
21599 (insn_length_parameters_t): Likewise.
21600 (arc_insn_length_parameters): Likewise.
21601 (arc_get_insn_variants): Likewise.
21602 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
21604 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21606 PR inline-asm/84683
21607 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
21610 PR tree-optimization/84687
21611 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
21613 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
21615 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21617 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
21618 Rename to ppc_speculation_barrier.
21619 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
21620 __builtin_ppc_speculation_barrier.
21622 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21625 * combine.c (combine_simplify_rtx): Don't try to simplify if
21626 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
21629 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
21631 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
21632 to 32 bytes when compiling for POWER9.
21634 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21637 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
21638 regparm >= 3 with no arg reg available also for calls with
21639 flag_force_indirect_call. Pass decl to ix86_function_regparm.
21642 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
21644 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
21646 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
21649 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
21651 2018-03-05 Richard Biener <rguenther@suse.de>
21653 PR tree-optimization/84486
21654 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
21655 When inserting a __builtin_assume_aligned call set the LHS
21656 SSA name alignment info accordingly.
21658 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
21660 PR tree-optimization/84114
21661 * config/aarch64/aarch64.c (aarch64_reassociation_width)
21662 Avoid reassociation of FLOAT_MODE addition.
21664 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
21666 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
21667 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
21668 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
21669 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
21670 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
21671 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
21672 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
21674 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
21675 __builtin_ia32_wbinvd): New builtins.
21676 (SPECIAL_ARGS2): New.
21677 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
21678 (SPECIAL_ARGS2): New.
21679 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
21680 (ix86_valid_target_attribute_inner_p): Ditto.
21681 (ix86_init_mmx_sse_builtins): Add special_args2.
21682 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
21683 TARGET_WBNOINVD_P): New.
21684 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
21685 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
21686 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
21687 * config/i386/immintrin.h (_wbinvd): New intrinsic.
21688 * config/i386/pconfigintrin.h: New file.
21689 * config/i386/wbnoinvdintrin.h: Ditto.
21690 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
21692 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
21694 2018-03-05 Richard Biener <rguenther@suse.de>
21696 PR tree-optimization/84670
21697 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21699 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21700 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21701 (compute_antic_aux): Only assert the number of values in ANTIC_IN
21702 doesn't grow if all successors (recursively) were visited at least
21705 2018-03-05 Richard Biener <rguenther@suse.de>
21707 PR tree-optimization/84650
21708 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
21709 if executed in the loop pipeline.
21711 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
21713 * doc/configfiles.texi (Configuration Files): Move info about
21714 conditionalizing $target-protos.h to...
21715 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
21716 differs from $target-protos.h.
21718 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
21719 Chung-Ju Wu <jasonwucj@gmail.com>
21721 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
21722 * config/nds32/nds32-multiple.md (setmemsi): Define.
21723 * config/nds32/nds32-memory-manipulation.c
21724 (nds32_gen_dup_4_byte_to_word_value): New.
21725 (emit_setmem_word_loop): New.
21726 (emit_setmem_byte_loop): New.
21727 (nds32_expand_setmem_loop): New.
21728 (nds32_expand_setmem_loop_v3m): New.
21729 (nds32_expand_setmem_unroll): New.
21730 (nds32_expand_setmem): New.
21732 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21733 Chung-Ju Wu <jasonwucj@gmail.com>
21735 * config/nds32/nds32-memory-manipulation.c
21736 (nds32_emit_load_store): New.
21737 (nds32_emit_post_inc_load_store): New.
21738 (nds32_emit_mem_move): New.
21739 (nds32_emit_mem_move_block): New.
21740 (nds32_expand_movmemsi_loop_unknown_size): New.
21741 (nds32_expand_movmemsi_loop_known_size): New.
21742 (nds32_expand_movmemsi_loop): New.
21743 (nds32_expand_movmemsi_unroll): New.
21744 (nds32_expand_movmemqi): Rename ...
21745 (nds32_expand_movmemsi): ... to this.
21746 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
21747 (movmemsi): ... to this.
21748 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
21749 (nds32_expand_movmemsi): ... to this.
21751 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21752 Monk Chiang <sh.chiang04@gmail.com>
21753 Chung-Ju Wu <jasonwucj@gmail.com>
21755 * config/nds32/nds32-protos.h
21756 (nds32_expand_load_multiple): New arguments.
21757 (nds32_expand_store_multiple): Ditto.
21758 (nds32_valid_multiple_load_store): Rename ...
21759 (nds32_valid_multiple_load_store_p): ... to this.
21760 * config/nds32/nds32-memory-manipulation.c
21761 (nds32_expand_load_multiple): Refine implementation.
21762 (nds32_expand_store_multiple): Ditto.
21763 * config/nds32/nds32-multiple.md
21764 (load_multiple): Update nds32_expand_load_multiple interface.
21765 (store_multiple): Update nds32_expand_store_multiple interface.
21766 * config/nds32/nds32-predicates.c
21767 (nds32_valid_multiple_load_store): Rename ...
21768 (nds32_valid_multiple_load_store_p): ... to this and refine
21770 * config/nds32/predicates.md
21771 (nds32_load_multiple_and_update_address_operation): New predicate.
21772 (nds32_store_multiple_and_update_address_operation): New predicate.
21774 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21775 Chung-Ju Wu <jasonwucj@gmail.com>
21777 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
21778 (combo): New attribute.
21779 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
21781 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
21783 * config/nds32/nds32.opt: Change -mcmodel= default value.
21785 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
21786 Monk Chiang <sh.chiang04@gmail.com>
21787 Chung-Ju Wu <jasonwucj@gmail.com>
21789 * config/nds32/constants.md (unspec_element): New enum.
21790 * config/nds32/constraints.md (Umw): New constraint.
21791 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
21792 * config/nds32/nds32-intrinsic.md: Likewise.
21793 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
21794 (nds32_valid_smw_lwm_base_p): New.
21795 (nds32_output_smw_single_word): New.
21796 (nds32_output_lmw_single_word): New.
21797 (nds32_expand_unaligned_load): New.
21798 (nds32_expand_unaligned_store): New.
21799 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
21800 (nds32_output_smw_single_word): Declare.
21801 (nds32_output_lmw_single_word): Declare.
21802 (nds32_expand_unaligned_load): Declare.
21803 (nds32_expand_unaligned_store): Declare.
21804 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
21805 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
21806 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
21807 NDS32_BUILTIN_UASTORE_DW.
21808 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
21811 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
21812 Kito Cheng <kito.cheng@gmail.com>
21813 Chung-Ju Wu <jasonwucj@gmail.com>
21815 * config/nds32/nds32-intrinsic.c
21816 (nds32_expand_builtin_null_ftype_reg): Delete.
21817 (nds32_expand_builtin_reg_ftype_imm): Ditto.
21818 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
21819 (nds32_read_argument): New.
21820 (nds32_legitimize_target): Ditto.
21821 (nds32_legitimize_argument): Ditto.
21822 (nds32_check_constant_argument): Ditto.
21823 (nds32_expand_unop_builtin): Ditto.
21824 (nds32_expand_unopimm_builtin): Ditto.
21825 (nds32_expand_binop_builtin): Ditto.
21826 (nds32_builtin_decl_impl): Ditto.
21827 (builtin_description): Ditto.
21828 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
21829 (nds32_init_builtins_impl): Ditto.
21830 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
21831 (nds32_builtin_decl): New.
21832 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
21833 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
21835 2018-03-02 Jeff Law <law@redhat.com>
21837 * reorg.c (stop_search_p): Handle DEBUG_INSN.
21838 (redundant_insn, fill_simple_delay_slots): Likewise.
21839 (fill_slots_from_thread): Likewise.
21840 * resource.c (mark_referenced_resources): Likewise.
21841 (mark_set_resources, find_dead_or_set_registers): Likewise.
21843 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21845 * substring-locations.h (format_warning_va): Formatting fix for
21846 ATTRIBUTE_GCC_DIAG.
21847 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
21849 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
21850 * substring-locations.c: Include intl.h.
21851 (format_warning_va): Turned into small wrapper around
21852 format_warning_n_va, renamed to ...
21853 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
21854 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
21856 (format_warning_at_substring_n): New function.
21857 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
21858 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
21859 format_warning_at_substring with just a shorter name instead of
21860 const function pointer.
21861 (fmtwarn_n): New function.
21862 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
21863 appropriate, get rid of all the fmtstr temporaries, move conditionals
21864 with G_() wrapped string literals directly into fmtwarn arguments,
21865 cast dir.len to (int), formatting fixes.
21867 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
21869 * doc/invoke.texi: Remove "Cilk Plus" references.
21871 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21872 Richard Biener <rguenther@suse.de>
21875 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
21876 for error or warning attributes if CALL_FROM_THUNK_P is set.
21879 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21882 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
21883 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
21886 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
21887 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
21889 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
21890 instead of -1U in last predictors element's probability member.
21892 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
21895 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21896 arguments if they are comparable.
21898 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
21900 PR tree-optimization/84634
21901 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
21902 masks and masked_loop_p with a single loop_masks, making sure it's
21903 null for bb vectorization.
21905 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
21907 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
21908 (vect_analyze_data_ref_access): Use loop->safe_len rather than
21909 loop->force_vectorize to check whether there is no alias.
21911 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21914 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
21916 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
21918 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
21919 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
21920 instead of a loop around prev_real_insn.
21921 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
21924 PR inline-asm/84625
21925 * config/i386/i386.c (ix86_print_operand): Use conditional
21926 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
21929 2018-03-02 Richard Biener <rguenther@suse.de>
21931 PR tree-optimization/84427
21932 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
21933 (bitmap_set_subtract_values): Rewrite to handle multiple
21936 (prune_clobbered_mems): Likewise.
21937 (phi_translate): Take edge instead of pred/phiblock.
21938 (phi_translate_1): Likewise.
21939 (phi_translate_set): Likewise. Insert all translated
21940 exprs for a value into the set, keeping possibly multiple
21941 expressions per value.
21942 (compute_antic_aux): Adjust for phi_translate changes.
21943 When intersecting union the expressions and prune those
21944 not in the final value set, keeping possibly multiple
21945 expressions per value. Do not use value-insertion
21946 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
21947 all expressions. Add verification that the value-sets
21948 only shrink during iteration.
21949 (compute_partial_antic_aux): Adjust for the phi_translate changes.
21950 (do_pre_regular_insertion): Likewise.
21951 (do_pre_partial_partial_insertion): Likewise.
21953 2018-03-02 Richard Biener <rguenther@suse.de>
21956 * config/darwin.c (saved_debug_info_level): New static global.
21957 (darwin_asm_lto_start): Disable debug info generation for LTO out.
21958 (darwin_asm_lto_end): Restore debug info generation settings.
21960 2018-03-01 Martin Liska <mliska@suse.cz>
21963 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
21964 volatile arguments.
21966 2018-03-01 Richard Biener <rguenther@suse.de>
21969 * dwarf2out.c (gen_variable_die): Properly handle late VLA
21970 type annotation with LTO when debug was disabled at compile-time.
21972 2018-03-01 Matthew Fortune <mfortune@gmail.com>
21974 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
21976 (mips_final_postscan_insn): Likewise.
21978 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
21980 PR rtl-optimization/84528
21981 * alias.c (init_alias_target): Add commentary.
21982 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
21983 a unique base value if the frame pointer is not eliminated
21984 to the stack pointer.
21986 2018-03-01 Tom de Vries <tom@codesourcery.com>
21988 PR rtl-optimization/83327
21989 * lra-int.h (hard_regs_spilled_into): Declare.
21990 * lra.c (hard_regs_spilled_into): Define.
21991 (init_reg_info): Init hard_regs_spilled_into.
21992 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
21993 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
21994 (process_bb_lives): Handle hard_regs_spilled_into.
21995 (lra_create_live_ranges_1): Before doing liveness propagation, clear
21996 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
21998 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
22000 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
22001 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
22002 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
22003 * config/rs6000/aix72.h: New file.
22005 2018-02-28 Jakub Jelinek <jakub@redhat.com>
22007 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
22008 instead of warning_at with conditional singular and plural messages
22012 * stor-layout.c (update_alignment_for_field): For
22013 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
22014 && !DECL_PACKED (field), do the alignment update, just use
22015 only desired_align instead of MAX (type_align, desired_align)
22017 (place_field): Don't do known_align < desired_align handling
22018 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
22019 is non-NULL, instead do it after rli->prev_field handling and
22020 only if not within a bitfield word. For DECL_PACKED (field)
22021 use type_align of BITS_PER_UNIT.
22023 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
22025 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
22026 superfluous parentheses and trailing spaces.
22028 2018-02-28 Richard Biener <rguenther@suse.de>
22030 PR tree-optimization/84584
22031 * graphite-scop-detection.c (scop_detection::add_scop): Discard
22032 SCoPs with fake exit edge.
22034 2018-02-28 Martin Liska <mliska@suse.cz>
22037 * timevar.c (timer::print): Fix format to properly print 100%
22040 2018-02-28 Richard Biener <rguenther@suse.de>
22042 PR middle-end/84607
22043 * genmatch.c (capture_info::walk_match): Do not mark
22044 captured expressions without operands as expr_p given
22045 they act more like predicates and should be subject to
22046 "lost tail" side-effect preserving.
22048 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
22050 PR rtl-optimization/81611
22051 * auto-inc-dec.c (attempt_change): Move dead note from
22052 mem_insn if it's the next use of regno
22053 (find_address): Take address use of reg holding
22054 non-incremented value. Add parm to limit search to the named
22056 (merge_in_block): Attempt to use a mem insn that is the next
22057 use of the original regno.
22059 2018-02-27 Martin Sebor <msebor@redhat.com>
22062 * doc/invoke.texi (-Wmissing-attributes): New option.
22063 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
22065 2018-02-27 Martin Sebor <msebor@redhat.com>
22067 PR translation/84207
22068 * diagnostic-core.h (warning_n, error_n, inform_n): Change
22069 n argument to unsigned HOST_WIDE_INT.
22070 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
22071 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
22072 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
22073 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
22075 2018-02-27 Richard Biener <rguenther@suse.de>
22077 PR tree-optimization/84512
22078 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
22079 Do not use the estimate returned from record_stmt_cost for
22080 the scalar iteration cost but sum properly using add_stmt_cost.
22082 2018-02-27 Richard Biener <rguenther@suse.de>
22084 PR tree-optimization/84466
22085 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22086 Adjust last change to less strictly validate use operands.
22088 2018-02-27 Martin Liska <mliska@suse.cz>
22090 PR gcov-profile/84548
22091 * gcov.c (process_file): Allow partial overlap and consider it
22092 also as group functions.
22093 (output_lines): Properly calculate range of lines for a group.
22095 2018-02-27 Martin Liska <mliska@suse.cz>
22097 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
22098 'ggc' suffixes. Change first column width.
22099 (timer::print): Fix formatting of the column.
22101 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
22103 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
22104 preserve inline entry blocks for the sake of debug inline
22105 entry point markers alone.
22106 (remove_unused_locals): Suggest in comments a better place to
22107 force the preservation of inline entry blocks that are
22108 otherwise unused, but do not preserve them.
22110 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22112 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
22114 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22117 * config/i386/constraints.md (Bs): Replace
22118 ix86_indirect_branch_register with
22119 TARGET_INDIRECT_BRANCH_REGISTER.
22121 * config/i386/i386.md (indirect_jump): Likewise.
22122 (tablejump): Likewise.
22123 (*sibcall_memory): Likewise.
22124 (*sibcall_value_memory): Likewise.
22125 Peepholes of indirect call and jump via memory: Likewise.
22126 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
22127 (*sibcall_value_GOT_32): Likewise.
22128 * config/i386/predicates.md (indirect_branch_operand): Likewise.
22129 (GOT_memory_operand): Likewise.
22130 (call_insn_operand): Likewise.
22131 (sibcall_insn_operand): Likewise.
22132 (GOT32_symbol_operand): Likewise.
22133 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
22135 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22137 PR rtl-optimization/83496
22138 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
22139 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
22140 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
22141 redundant insn, if any.
22142 (relax_delay_slots): Likewise.
22143 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
22145 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
22147 PR tree-optimization/83965
22148 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
22149 that grouped statements are part of a reduction chain. Return
22150 true if the statement is not marked as a reduction itself but
22151 is part of a group.
22152 (vect_recog_dot_prod_pattern): Don't check whether the statement
22153 is part of a group here.
22154 (vect_recog_sad_pattern): Likewise.
22155 (vect_recog_widen_sum_pattern): Likewise.
22157 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22160 * final.c (rest_of_clean_state): Also look for calls inside sequences.
22162 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22165 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
22167 (ix86_output_indirect_function_return): New prototype.
22168 (ix86_split_simple_return_pop_internal): Likewise.
22169 * config/i386/i386.c (indirect_return_via_cx): New.
22170 (indirect_return_via_cx_bnd): Likewise.
22171 (indirect_thunk_name): Handle return va CX_REG.
22172 (output_indirect_thunk_function): Create alias for
22173 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
22174 (ix86_output_indirect_jmp): Remove the bool argument.
22175 (ix86_output_indirect_function_return): New function.
22176 (ix86_split_simple_return_pop_internal): Likewise.
22177 * config/i386/i386.md (*indirect_jump): Don't pass false
22178 to ix86_output_indirect_jmp.
22179 (*tablejump_1): Likewise.
22180 (simple_return_pop_internal): Change it to define_insn_and_split.
22181 Call ix86_split_simple_return_pop_internal to split it for
22182 -mfunction-return=.
22183 (simple_return_indirect_internal): Call
22184 ix86_output_indirect_function_return instead of
22185 ix86_output_indirect_jmp.
22187 2018-02-26 Jakub Jelinek <jakub@redhat.com>
22190 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
22191 memset and value initialization afterwards.
22193 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
22195 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
22197 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22200 * common/config/aarch64/aarch64-common.c
22201 (aarch_option_optimization_table[]): Switch
22202 off fomit-frame-pointer
22204 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22205 Chung-Ju Wu <jasonwucj@gmail.com>
22207 * config/nds32/nds32-multiple.md (load_multiple): Disallow
22209 (store_multiple): Ditto.
22211 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22213 * config.gcc: Add --with-cpu support for nds32 target.
22214 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
22215 * config/nds32/nds32.opt: Add -mcpu= option.
22217 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
22219 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
22220 isel=yes): Warn for these deprecated options.
22222 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
22224 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
22225 ISA_2_5_MASKS_EMBEDDED.
22227 2018-02-23 Jakub Jelinek <jakub@redhat.com>
22229 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
22230 p->max as pointers rather than using iterative_hash_expr.
22232 2018-02-23 Carl Love <cel@us.ibm.com>
22234 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
22235 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
22237 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
22238 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
22239 P8V_BUILTIN_VEC_VUNSIGNED2.
22241 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
22244 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
22245 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
22247 * lra-constraints.c (curr_insn_transform): Set up
22248 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
22250 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
22251 * lra-eliminations.c (spill_pseudos): Ditto.
22252 (process_insn_for_elimination): Ditto.
22253 * lra-lives.c (reg_early_clobber_p): Use the new macros.
22254 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
22255 LRA_NON_CLOBBERED_ALT.
22257 2018-02-22 Martin Sebor <msebor@redhat.com>
22259 PR tree-optimization/84480
22260 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22261 to maybe_diag_stxncpy_trunc. Call it.
22262 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22263 from gimple_fold_builtin_strcpy. Print inlining stack.
22264 (handle_builtin_stxncpy): Print inlining stack.
22265 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22267 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
22270 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22271 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22272 and -fcheck-pointer-bounds are used together.
22273 (indirect_thunk_prefix): New enum.
22274 (indirect_thunk_need_prefix): New function.
22275 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
22276 "_nt" instead of "_bnd" for NOTRACK prefix.
22277 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22278 (output_indirect_thunk_function): Likewise.
22280 (ix86_code_end): Update output_indirect_thunk_function calls.
22281 (ix86_output_indirect_branch_via_reg): Replace
22282 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22283 (ix86_output_indirect_branch_via_push): Likewise.
22284 (ix86_output_function_return): Likewise.
22285 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22286 incompatible with -fcf-protection=branch and
22287 -fcheck-pointer-bounds.
22289 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22292 * config/aarch64/aarch64.c (aarch64_print_address_internal):
22293 Change gcc_assert call to output_operand_lossage.
22295 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22297 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22299 2018-02-22 DJ Delorie <dj@redhat.com>
22300 Sebastian Perta <sebastian.perta@renesas.com>
22301 Oleg Endo <olegendo@gcc.gnu.org>
22303 * config/rx/rx.c (rx_rtx_costs): New function.
22304 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22306 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
22308 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22310 2018-02-22 Martin Liska <mliska@suse.cz>
22313 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22314 Add "native" as a possible value.
22316 2018-02-22 Martin Liska <mliska@suse.cz>
22319 * config/i386/i386.c (ix86_option_override_internal):
22320 Add "native" as a possible value for -march and -mtune.
22322 2018-02-22 Jakub Jelinek <jakub@redhat.com>
22325 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22326 to all type variants.
22328 PR tree-optimization/84503
22329 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22330 width as info->bitpos + info->bitsize - start.
22331 (merged_store_group::merge_overlapping): Simplify width computation.
22332 (check_no_overlap): New function.
22333 (imm_store_chain_info::try_coalesce_bswap): Compute expected
22334 start + width and last_order of the group, fail if check_no_overlap
22336 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22337 to group if check_no_overlap fails.
22339 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22341 * config/rs6000/altivec.md: Delete contraint arguments to
22342 define_expand, define_split, and define_peephole2, and in
22343 define_insn_and_split if always unused.
22344 * config/rs6000/darwin.md: Ditto.
22345 * config/rs6000/dfp.md: Ditto.
22346 * config/rs6000/rs6000.md: Ditto.
22347 * config/rs6000/sync.md: Ditto.
22348 * config/rs6000/vector.md: Ditto.
22349 * config/rs6000/vsx.md: Ditto.
22351 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22353 * config/rs6000/altivec.md: Write output control strings as braced
22354 blocks instead of double-quoted strings.
22355 * config/rs6000/darwin.md: Ditto.
22356 * config/rs6000/rs6000.md: Ditto.
22357 * config/rs6000/vector.md: Ditto.
22358 * config/rs6000/vsx.md: Ditto.
22360 2018-02-21 Jason Merrill <jason@redhat.com>
22362 PR c++/84314 - ICE with templates and fastcall attribute.
22363 * attribs.c (build_type_attribute_qual_variant): Remove assert.
22365 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22367 * ipa-cp.c (determine_versionability): Fix comment typos.
22369 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22372 * ipa-cp.c (determine_versionability): Do not version functions caling
22375 2018-02-21 Martin Liska <mliska@suse.cz>
22378 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
22379 Add "native" as a possible value.
22380 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
22381 the macro when native cpu detection is available.
22383 2018-02-21 Martin Liska <mliska@suse.cz>
22386 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
22387 Add "native" as a possible value.
22388 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
22389 when native cpu detection is available.
22391 2018-02-21 Jakub Jelinek <jakub@redhat.com>
22392 Martin Sebor <msebor@redhat.com>
22394 PR tree-optimization/84478
22395 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
22397 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
22398 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
22399 support which is conservatively correct, for 2 only stay conservative
22400 for maxlen. Formatting and comment capitalization fixes. Add STRICT
22401 argument to the 2 argument get_range_strlen, adjust 6 arg
22402 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
22404 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
22405 (gimple_fold_builtin_strlen): Pass true as last argument to
22408 2018-02-20 Martin Sebor <msebor@redhat.com>
22410 PR middle-end/84095
22411 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
22412 (builtin_memref::set_base_and_offset): Same. Handle inner references.
22413 (builtin_memref::builtin_memref): Factor out parts into
22414 set_base_and_offset and call it.
22416 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22418 PR middle-end/84406
22419 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
22420 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
22421 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
22422 search at the associated MODE_INT.
22424 2018-02-20 Jeff Law <law@redhat.com>
22426 PR middle-end/82123
22427 PR tree-optimization/81592
22428 PR middle-end/79257
22429 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
22430 for range data rather than using global data.
22431 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
22432 range data rather than using global data.
22433 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
22434 pass it to children as needed.
22435 (struct directive::fmtresult): Similarly.
22436 (struct directive::set_width): Similarly.
22437 (struct directive::set_precision): Similarly.
22438 (format_integer, format_directive, parse_directive): Similarly.
22439 (format_none): Accept unnamed vr_values parameter.
22440 (format_percent, format_floating, format_character): Similarly.
22441 (format_string, format_plain): Similarly.
22442 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
22443 the EVRP range analyzer for range data rather than using global data.
22444 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
22445 gimple-ssa-evrp-analyze.h
22446 (class sprintf_dom_walker): Add after_dom_children member function.
22447 Add evrp_range_analyzer member.
22448 (sprintf_dom_walker::before_dom_children): Call into the EVRP
22449 range analyzer as needed.
22450 (sprintf_dom_walker::after_dom_children): New member function.
22451 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
22453 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
22454 (evrp_range_analyzer::pop_to_marker): Likewise.
22456 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22458 PR tree-optimization/84419
22459 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
22460 with the required type if its current type is compatible but
22463 2018-02-20 Jakub Jelinek <jakub@redhat.com>
22465 PR middle-end/82004
22466 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
22467 after vectorization.
22469 2018-02-20 Martin Liska <mliska@suse.cz>
22472 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
22473 possible values if we don't have a hint.
22475 2018-02-20 Martin Liska <mliska@suse.cz>
22479 * final.c (shorten_branches): Build align_tab array with one
22481 * opts.c (finish_options): Add alignment option limit check.
22482 (MAX_CODE_ALIGN): Likewise.
22483 (MAX_CODE_ALIGN_VALUE): Likewise.
22484 * doc/invoke.texi: Document maximum allowed option value for
22485 all -falign-* options.
22487 2018-02-19 Jakub Jelinek <jakub@redhat.com>
22490 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
22491 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
22492 * var-tracking.c (emit_note_insn_var_location): Remove all references
22493 to NOTE_INSN_CALL_ARG_LOCATION.
22494 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
22495 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
22496 Use copy_rtx_if_shared.
22497 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
22498 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
22499 (dwarf2out_var_location): Remove handling of
22500 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
22502 * final.c (final_scan_insn): Remove all references to
22503 NOTE_INSN_CALL_ARG_LOCATION.
22504 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
22505 before dumping final insns.
22506 * except.c (emit_note_eh_region_end): Remove all references to
22507 NOTE_INSN_CALL_ARG_LOCATION.
22508 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
22509 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
22510 * config/arc/arc.c (hwloop_optimize): Likewise.
22511 * config/arm/arm.c (create_fix_barrier): Likewise.
22512 * config/s390/s390.c (s390_chunkify_start): Likewise.
22513 * config/sh/sh.c (find_barrier): Likewise.
22514 * config/i386/i386.c (rest_of_insert_endbranch,
22515 ix86_seh_fixup_eh_fallthru): Likewise.
22516 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
22517 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
22518 * config/frv/frv.c (frv_function_prologue): Likewise.
22519 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
22521 (note_outside_basic_block_p): Remove all references to
22522 NOTE_INSN_CALL_ARG_LOCATION.
22523 * gengtype.c (adjust_field_rtx_def): Likewise.
22524 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
22526 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
22527 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
22530 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
22533 PR tree-optimization/84452
22534 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
22535 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
22538 2018-02-19 Martin Liska <mliska@suse.cz>
22541 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
22543 2018-02-19 Martin Liska <mliska@suse.cz>
22544 Richard Sandiford <richard.sandiford@linaro.org>
22546 PR tree-optimization/82491
22547 * gimple-fold.c (get_base_constructor): Make earlier bail out
22550 2018-02-19 Carl Love <cel@us.ibm.com>
22552 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
22553 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
22555 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
22556 P8V_BUILTIN_VEC_NEG.
22558 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
22560 * config/rl78/rl78.md (movdf): New define expand.
22562 2018-02-19 Martin Liska <mliska@suse.cz>
22565 * doc/invoke.texi: Fix typo.
22566 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
22568 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
22570 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
22571 handle rs6000_single_float and rs6000_double_float specially for
22574 2018-02-16 Jeff Law <law@redhat.com>
22576 * config/rx/rx.c (add_pop_cfi_notes): New function.;
22577 (pop_regs): Use it.
22579 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22582 * ipa-inline.c (inline_small_functions): Fix a typo.
22584 2018-02-16 Nathan Sidwell <nathan@acm.org>
22586 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
22588 2018-02-16 Carl Love <cel@us.ibm.com>
22590 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
22591 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
22592 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
22593 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
22594 expansion to P8V_BUILTIN_VEC_FLOAT2.
22596 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
22598 PR rtl-optimization/70023
22599 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
22600 src_regno into account.
22602 2018-02-16 Carl Love <cel@us.ibm.com>
22604 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
22605 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
22606 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
22607 * config/rs6000/rs6000.c: Remove case statements for
22608 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
22609 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
22610 and P9V_BUILTIN_VEC_VINSERT4B.
22611 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
22612 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
22613 * config/rs6000/vsx.md:
22614 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
22617 2018-02-16 Carl Love <cel@us.ibm.com>
22619 * config/rs6000/altivec.h: Add builtin names vec_extract4b
22621 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
22623 * config/rs6000/rs6000-c.c: Add the definitions for
22624 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
22625 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
22626 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
22627 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
22628 definition for insert4b and define insn *insert3b_internal.
22629 * doc/extend.texi: Add documentation for vec_extract4b.
22631 2018-02-16 Nathan Sidwell <nathan@acm.org>
22633 * doc/extend.texi (Backwards Compatibility): Mention friend
22634 injection. Note for-scope is deprecated.
22635 * doc/invoke.texi (-ffriend-injection): Deprecate.
22637 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
22639 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
22640 that moved to I2, also allow destinations that are a paradoxical
22641 subreg (instead of a normal reg).
22643 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
22646 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
22649 2018-02-16 Richard Biener <rguenther@suse.de>
22651 PR tree-optimization/84037
22652 PR tree-optimization/84016
22654 * config/i386/i386.c (ix86_builtin_vectorization_cost):
22655 Adjust vec_construct for the fact we need additional higher latency
22656 128bit inserts for AVX256 and AVX512 vector builds.
22657 (ix86_add_stmt_cost): Scale vector construction cost for
22660 2018-02-16 Richard Biener <rguenther@suse.de>
22662 PR tree-optimization/84417
22663 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
22664 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
22665 (non_rewritable_lvalue_p): Likewise, use poly-ints.
22667 2018-02-16 Martin Liska <mliska@suse.cz>
22670 * internal-fn.def (ASAN_CHECK): Set proper flags.
22671 (ASAN_MARK): Likewise.
22673 2018-02-16 Julia Koval <julia.koval@intel.com>
22675 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
22676 from PTA_CANNONLAKE.
22678 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22681 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
22682 Use ++iter rather than iter++ for std::list iterators.
22683 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
22684 defer deleting them until all nodes in the forest are processed. Do
22685 free even leaf nodes. Change to_process into auto_vec.
22688 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
22689 * vec.h (vec_default_construct): Use memset instead of placement new
22690 if BROKEN_VALUE_INITIALIZATION is defined.
22691 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
22692 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
22695 PR rtl-optimization/83723
22696 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
22697 * lra.c (lra_substitute_pseudo): Likewise. If true, use
22698 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
22700 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
22702 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
22704 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
22706 PR rtl-optimization/81443
22707 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
22708 from inner REGs to paradoxical SUBREGs.
22710 2018-02-16 Richard Biener <rguenther@suse.de>
22712 PR tree-optimization/84399
22713 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22714 For operands we can analyze at their definition make sure we can
22715 analyze them at each use as well.
22717 2018-02-16 Richard Biener <rguenther@suse.de>
22719 PR tree-optimization/84190
22720 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
22721 volatile accesses if the decl isn't volatile.
22723 2018-02-15 Jason Merrill <jason@redhat.com>
22725 PR c++/84314 - ICE with templates and fastcall attribute.
22726 * attribs.c (build_type_attribute_qual_variant): Don't clobber
22727 TYPE_CANONICAL on an existing type.
22729 2018-02-15 Jakub Jelinek <jakub@redhat.com>
22731 PR tree-optimization/84383
22732 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
22733 dstoff nor call operand_equal_p if dstbase is NULL.
22735 PR tree-optimization/84334
22736 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
22737 also a CONSTANT_CLASS_P, punt.
22739 2018-02-14 Jim Wilson <jimw@sifive.com>
22741 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
22742 first SMALL_OPERAND check. New local min_second_step. Move assert
22743 to where locals are set. Add TARGET_RVC support.
22744 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
22746 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
22748 * doc/invoke.texi: Correct -Wformat-overflow code sample.
22750 2018-02-14 Martin Sebor <msebor@redhat.com>
22752 PR tree-optimization/83698
22753 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
22754 arrays constrain the offset range to their bounds.
22755 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
22756 (builtin_access::overlap): Avoid setting the size of overlap if it's
22758 (maybe_diag_overlap): Also consider arrays when deciding what values
22759 of offsets to include in diagnostics.
22761 2018-02-14 Martin Sebor <msebor@redhat.com>
22764 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
22765 that correspond to the kind of a declaration.
22767 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
22770 * config/pa/pa.md: Load address of PIC label using the linkage table
22771 if the label is nonlocal.
22773 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
22775 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
22776 warning message if user requests -maltivec=be.
22777 * doc/invoke.texi: Document deprecation of -maltivec=be.
22779 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
22782 * config/rs6000/rs6000-c.c: Update definitions for
22783 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
22784 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
22786 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22789 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
22790 add _get_ssp intrinsics. Remove argument from
22791 __builtin_ia32_rdssp[d|q].
22792 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
22793 * config/i386/i386-builtin.def: Remove argument from
22794 __builtin_ia32_rdssp[d|q].
22795 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
22796 ix86_expand_special_args_builtin for _rdssp[d|q].
22797 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
22798 Clear register before usage.
22799 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
22800 Add documentation for new _get_ssp and _inc_ssp intrinsics.
22802 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
22804 PR tree-optimization/84357
22805 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
22806 operand 1 of an ARRAY_REF too.
22808 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
22811 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
22812 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22814 (set_of_reg): New struct.
22815 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
22816 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
22817 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22819 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
22820 Split into bitclr, bitset, bitinvert patterns if appropriate.
22821 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
22822 use rx_fuse_in_memory_bitop.
22823 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
22824 to named insn, correct maximum insn length.
22826 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
22829 * machmode.def: Define a complex mode for PARTIAL_INT.
22830 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
22832 * doc/rtl.texi: Document CSPImode.
22833 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
22835 (msp430_hard_regno_nregs_with_padding): Likewise.
22837 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
22840 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
22842 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
22844 PR rtl-optimization/84169
22845 * combine.c (try_combine): New variable split_i2i3. Set it to true if
22846 we generated a parallel as new i3 and we split that to new i2 and i3
22847 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
22848 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
22849 those to i2, not i1. Partially rewrite this scan code.
22851 2018-02-13 Jakub Jelinek <jakub@redhat.com>
22854 * stor-layout.c (place_field): For variable length fields, adjust
22855 offset_align afterwards not just based on the field's alignment,
22856 but also on the size.
22858 PR middle-end/84309
22859 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
22860 of exps and logs in the use_exp2 case.
22862 2018-02-13 Jeff Law <law@redhat.com>
22864 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
22865 entry for "vector".
22867 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
22870 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
22874 * common.opt (gas-loc-support, gas-locview-support): New.
22875 (ginline-points, ginternal-reset-location-views): New.
22876 * doc/invoke.texi: Document them. Use @itemx where intended.
22877 (gvariable-location-views): Adjust.
22878 * target.def (reset_location_view): New.
22879 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
22880 (TARGET_RESET_LOCATION_VIEW): New.
22881 * doc/tm.texi: Rebuilt.
22882 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
22883 (dwarf2out_default_as_locview_support): New.
22884 (output_asm_line_debug_info): Use option variables.
22885 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
22886 (output_loc_list): Likewise.
22887 (add_high_low_attributes): Check option variables.
22888 Don't output entry view attribute in strict mode.
22889 (gen_inlined_subroutine_die): Check option variables.
22890 (dwarf2out_inline_entry): Likewise.
22891 (init_sections_and_labels): Likewise.
22892 (dwarf2out_early_finish): Likewise.
22893 (maybe_reset_location_view): New, from...
22894 (dwarf2out_var_location): ... here. Call it.
22895 * debug.h (dwarf2out_default_as_loc_support): Declare.
22896 (dwarf2out_default_as_locview_support): Declare.
22897 * hooks.c (hook_int_rtx_insn_0): New.
22898 * hooks.h (hook_int_rtx_insn_0): Declare.
22899 * toplev.c (process_options): Take -gas-loc-support and
22900 -gas-locview-support from dwarf2out. Enable
22901 -gvariable-location-views by default only with locview
22902 assembler support. Enable -ginternal-reset-location-views by
22903 default only if the target defines the corresponding hook.
22904 Enable -ginline-points by default if location views are
22905 enabled; force it disabled if statement frontiers are
22907 * tree-inline.c (expand_call_inline): Check option variables.
22908 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
22910 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
22912 PR tree-optimization/84321
22913 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
22914 handling. Also check whether the anti-range contains any values
22915 that satisfy the mask; switch to a VR_RANGE if not.
22917 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
22920 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
22922 2018-02-13 Martin Jambor <mjambor@suse.cz>
22925 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
22926 of call statements, also set location of a load to a temporary.
22928 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
22930 * config/rl78/rl78.c (add_vector_labels): New function.
22931 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
22932 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
22933 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
22934 which checks that no arguments are passed.
22935 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
22936 * doc/extend.texi: Documentation for the new attribute.
22938 2018-02-13 Andreas Schwab <schwab@suse.de>
22940 * config/riscv/linux.h (CPP_SPEC): Define.
22942 2018-02-13 Jakub Jelinek <jakub@redhat.com>
22945 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
22946 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
22947 OPTION_MASK_ISA_AES as first argument to def_builtin_const
22948 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
22949 instead of OPTION_MASK_ISA_PCLMUL as first argument to
22950 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
22951 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
22952 temporarily for AES and PCLMUL builtins.
22954 PR tree-optimization/84339
22955 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
22956 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
22959 PR middle-end/84309
22960 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
22961 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
22962 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
22964 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
22966 * omp-simd-clone.h: New file.
22967 * omp-simd-clone.c: Include omp-simd-clone.h.
22968 (expand_simd_clones): No longer static.
22969 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
22970 cgraph.h and omp-simd-clone.h.
22971 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
22972 (vect_recog_widen_shift_pattern): Formatting fix.
22973 (vect_pattern_recog_1): Don't check optab for calls.
22976 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
22977 operands[2] into a REG before using gen_lowpart on it.
22979 2018-02-12 Jeff Law <law@redhat.com>
22982 * config/sh/sh.c (find_barrier): Consider a sibling call
22985 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
22986 successfully back substituting a reg.
22988 2018-02-12 Richard Biener <rguenther@suse.de>
22990 PR tree-optimization/84037
22991 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
22992 parameter, move visited init to caller.
22993 (vect_slp_analyze_operations): Separate cost from validity
22994 check, initialize visited once for all instances.
22995 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
22997 * tree-vect-stmts.c (vect_model_simple_cost): Make early
22999 (vect_model_promotion_demotion_cost): Likewise.
23000 (vectorizable_bswap): Guard cost modeling with !slp_node
23001 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
23003 (vectorizable_call): Likewise.
23004 (vectorizable_conversion): Likewise.
23005 (vectorizable_assignment): Likewise.
23006 (vectorizable_shift): Likewise.
23007 (vectorizable_operation): Likewise.
23008 (vectorizable_store): Likewise.
23009 (vectorizable_load): Likewise.
23010 (vectorizable_condition): Likewise.
23011 (vectorizable_comparison): Likewise.
23013 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
23016 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
23017 (ASAN_MARK): Fix fnspec to account for return value, change pointer
23018 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
23020 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23022 PR middle-end/83665
23023 * params.def (inline-min-speedup): Increase from 8 to 15.
23024 (max-inline-insns-auto): Decrease from 40 to 30.
23025 * ipa-split.c (consider_split): Add some buffer for function to
23026 be considered inlining candidate.
23027 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
23030 2018-02-12 Richard Biener <rguenther@suse.de>
23032 PR tree-optimization/84037
23033 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
23034 matched stmts if we cannot swap the non-matched ones.
23036 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23038 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
23039 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
23040 _mm_maskz_scalef_round_ss): New intrinsics.
23041 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
23042 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
23043 __builtin_ia32_scalefss_round): Remove.
23044 (__builtin_ia32_scalefsd_mask_round,
23045 __builtin_ia32_scalefss_mask_round): New intrinsics.
23046 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
23047 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
23048 ((match_operand:VF_128 2 "<round_nimm_predicate>"
23049 "<round_constraint>")): Changed to ...
23050 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
23051 "<round_scalar_constraint>")): ... this.
23052 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
23053 %0, %1, %2<round_op3>}"): Changed to ...
23054 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
23055 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
23056 %2<round_scalar_mask_op3>}"): ... this.
23057 * config/i386/subst.md (round_scalar_nimm_predicate): New.
23059 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23061 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
23062 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
23063 (_mm_maskz_sqrt_round_ss): New intrinsics.
23064 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
23065 (__builtin_ia32_sqrtsd_mask_round)
23066 (__builtin_ia32_sqrtss_mask_round): New builtins.
23067 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
23068 (__builtin_ia32_sqrtss_round): Remove.
23069 (__builtin_ia32_sqrtsd_mask_round)
23070 (__builtin_ia32_sqrtss_mask_round): New builtins.
23071 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
23072 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
23073 ((match_operand:VF_128 1 "vector_operand"
23074 "xBm,<round_constraint>")): Changed to ...
23075 ((match_operand:VF_128 1 "vector_operand"
23076 "xBm,<round_scalar_constraint>")): ... this.
23077 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
23078 %0, %2, %<iptr>1<round_op3>}): Changed to ...
23079 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
23080 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
23081 %<iptr>1<round_scalar_mask_op3>}): ... this.
23082 ((set_attr "prefix" "<round_prefix>")): Changed to ...
23083 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
23085 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
23088 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
23089 Cast vec_cmpeq result to correct type.
23090 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
23091 Cast vec_cmpgt result to correct type.
23093 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
23095 * final.c (final_scan_insn_1): Renamed from...
23096 (final_scan_insn): ... this. New wrapper, to recover
23097 seen from the outermost call in recursive ones.
23098 * config/sparc/sparc.c (output_return): Drop seen from call.
23099 (output_sibcall): Likewise.
23100 * config/visium/visium.c (output_branch): Likewise.
23102 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
23104 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
23107 2018-02-10 Alan Modra <amodra@gmail.com>
23110 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
23111 Specify LR as an input.
23113 2018-02-10 Jakub Jelinek <jakub@redhat.com>
23116 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
23117 remove_member_access_dummy_vars): New functions.
23118 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
23119 lower_omp_1, execute_lower_omp): Use them.
23121 PR rtl-optimization/84308
23122 * shrink-wrap.c (spread_components): Release todo vector.
23124 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
23126 PR rtl-optimization/57193
23127 * ira-color.c (struct allocno_color_data): Add member
23128 conflict_allocno_hard_prefs.
23129 (update_conflict_allocno_hard_prefs): New.
23130 (bucket_allocno_compare_func): Add a preference based on
23131 conflict_allocno_hard_prefs.
23132 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
23133 (color_allocnos): Remove a dead code. Initiate
23134 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
23136 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23139 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
23140 constraint from =wa to wa. Avoid a subreg on the output operand,
23141 instead use a pseudo and subreg it in a move.
23142 (p9_xxbrd_<mode>): Changed to ...
23143 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
23144 (p9_xxbrd_v2df): New expander.
23145 (p9_xxbrw_<mode>): Changed to ...
23146 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
23147 (p9_xxbrw_v4sf): New expander.
23149 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23151 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
23153 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
23156 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
23157 multiply in 32-bit mode.
23158 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
23159 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
23162 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23164 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
23165 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
23166 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
23167 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
23169 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
23172 * dwarf2out.c (is_trivial_indirect_ref): New function.
23173 (dwarf2out_late_global_decl): Do not generate a location
23174 attribute for variables that have a non-trivial DECL_VALUE_EXPR
23175 and that are not defined in the current unit.
23177 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23179 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
23180 instead of a libcall for UNORDERED.
23182 2018-02-09 Tamar Christina <tamar.christina@arm.com>
23185 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
23186 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
23188 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23191 * config/s390/s390.c (s390_set_current_function): Invoke
23192 s390_indirect_branch_settings also if fndecl didn't change.
23194 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23196 * config/rs6000/rs6000.md (blockage): Set length to zero.
23198 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23200 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
23202 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23205 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
23206 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
23210 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
23211 PARALLEL incoming that failed vt_get_decl_and_offset check.
23213 PR middle-end/84237
23214 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
23215 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
23217 (get_variable_section): For decls in named .bss* sections pass true as
23218 second argument to bss_initializer_p.
23220 2018-02-09 Marek Polacek <polacek@redhat.com>
23221 Jakub Jelinek <jakub@redhat.com>
23224 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
23225 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
23226 Sync some changes from cxx_fold_indirect_ref.
23228 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23230 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
23232 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
23233 (BLOCK_INLINE_ENTRY_LABEL): New.
23234 (dwarf2out_var_location): Disregard inline entry markers.
23235 (inline_entry_data): New struct.
23236 (inline_entry_data_hasher): New hashtable type.
23237 (inline_entry_data_hasher::hash): New.
23238 (inline_entry_data_hasher::equal): New.
23239 (inline_entry_data_table): New variable.
23240 (add_high_low_attributes): Add DW_AT_entry_pc and
23241 DW_AT_GNU_entry_view attributes if a pending entry is found
23242 in inline_entry_data_table. Add old entry_pc attribute only
23243 if debug nonbinding markers are disabled.
23244 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
23245 markers are enabled.
23246 (block_within_block_p, dwarf2out_inline_entry): New.
23247 (dwarf2out_finish): Check that no entries remained in
23248 inline_entry_data_table.
23249 * final.c (reemit_insn_block_notes): Handle inline entry notes.
23250 (final_scan_insn, notice_source_line): Likewise.
23251 (rest_of_clean_state): Skip inline entry markers.
23252 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
23254 * gimple.c (gimple_build_debug_inline_entry): New.
23255 * gimple.h (enum gimple_debug_subcode): Add
23256 GIMPLE_DEBUG_INLINE_ENTRY.
23257 (gimple_build_debug_inline_entry): Declare.
23258 (gimple_debug_inline_entry_p): New.
23259 (gimple_debug_nonbind_marker_p): Adjust.
23260 * insn-notes.def (INLINE_ENTRY): New.
23261 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23262 inline entry marker notes.
23263 (print_insn): Likewise.
23264 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23265 (INSN_DEBUG_MARKER_KIND): Likewise.
23266 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23267 * tree-inline.c (expand_call_inline): Build and insert
23268 debug_inline_entry stmt.
23269 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23270 inline entry blocks early, if nonbind markers are enabled.
23271 (dump_scope_block): Dump fragment info.
23272 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23273 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23274 (gimple_build_debug_inline_entry): New.
23275 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23276 Enable/disable inline entry points too.
23277 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23278 (DEBUG_INSN): Describe inline entry markers.
23280 * common.opt (gvariable-location-views): New.
23281 (gvariable-location-views=incompat5): New.
23282 * config.in: Rebuilt.
23283 * configure: Rebuilt.
23284 * configure.ac: Test assembler for view support.
23285 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23286 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23287 * dwarf2out.c (var_loc_view): New typedef.
23288 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23289 (dwarf2out_locviews_in_attribute): New.
23290 (dwarf2out_locviews_in_loclist): New.
23291 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23292 (enum dw_line_info_opcode): Add LI_adv_address.
23293 (struct dw_line_info_table): Add view.
23294 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23295 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23296 (zero_view_p): New variable.
23297 (ZERO_VIEW_P): New macro.
23298 (output_asm_line_debug_info): New.
23299 (struct var_loc_node): Add view.
23300 (add_AT_view_list, AT_loc_list): New.
23301 (add_var_loc_to_decl): Add view param. Test it against last.
23302 (new_loc_list): Add view params. Record them.
23303 (AT_loc_list_ptr): Handle loc and view lists.
23304 (view_list_to_loc_list_val_node): New.
23305 (print_dw_val): Handle dw_val_class_view_list.
23306 (size_of_die): Likewise.
23307 (value_format): Likewise.
23308 (loc_list_has_views): New.
23309 (gen_llsym): Set vl_symbol too.
23310 (maybe_gen_llsym, skip_loc_list_entry): New.
23311 (dwarf2out_maybe_output_loclist_view_pair): New.
23312 (output_loc_list): Output view list or entries too.
23313 (output_view_list_offset): New.
23314 (output_die): Handle dw_val_class_view_list.
23315 (output_dwarf_version): New.
23316 (output_compilation_unit_header): Use it.
23317 (output_skeleton_debug_sections): Likewise.
23318 (output_rnglists, output_line_info): Likewise.
23319 (output_pubnames, output_aranges): Update version comments.
23320 (output_one_line_info_table): Output view numbers in asm comments.
23321 (dw_loc_list): Determine current endview, pass it to new_loc_list.
23322 Call maybe_gen_llsym.
23323 (loc_list_from_tree_1): Adjust.
23324 (add_AT_location_description): Create view list attribute if
23325 needed, check it's absent otherwise.
23326 (convert_cfa_to_fb_loc_list): Adjust.
23327 (maybe_emit_file): Call output_asm_line_debug_info for test.
23328 (dwarf2out_var_location): Reset views as needed. Precompute
23329 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
23330 attribute. Set view.
23331 (new_line_info_table): Reset next view.
23332 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23333 (dwarf2out_source_line): Likewise. Output view resets and labels to
23334 the assembler, or select appropriate line info opcodes.
23335 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23336 (optimize_string_length): Catch it. Adjust.
23337 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
23338 dw_val_class_view_list, and remove it if no longer needed.
23339 (hash_loc_list): Hash view numbers.
23340 (loc_list_hasher::equal): Compare them.
23341 (optimize_location_lists): Check whether a view list symbol is
23342 needed, and whether the locview attribute is present, and
23343 whether they match. Remove the locview attribute if no longer
23345 (index_location_lists): Call skip_loc_list_entry for test.
23346 (dwarf2out_finish): Call output_asm_line_debug_info for test.
23347 Use output_dwarf_version.
23348 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23349 (struct dw_val_node): Add val_view_list.
23350 * final.c (SEEN_NEXT_VIEW): New.
23351 (set_next_view_needed): New.
23352 (clear_next_view_needed): New.
23353 (maybe_output_next_view): New.
23354 (final_start_function): Rename to...
23355 (final_start_function_1): ... this. Take pointer to FIRST,
23356 add SEEN parameter. Emit param bindings in the initial view.
23357 (final_start_function): Reintroduce SEEN-less interface.
23358 (final): Rename to...
23359 (final_1): ... this. Take SEEN parameter. Output final pending
23360 next view at the end.
23361 (final): Reintroduce seen-less interface.
23362 (final_scan_insn): Output pending next view before switching
23363 sections or ending a block. Mark the next view as needed when
23364 outputting variable locations. Notify debug backend of section
23365 changes, and of location view changes.
23366 (rest_of_handle_final): Adjust.
23367 * toplev.c (process_options): Autodetect value for debug variable
23368 location views option. Warn on incompat5 without -gdwarf-5.
23369 * doc/invoke.texi (gvariable-location-views): New.
23370 (gvariable-location-views=incompat5): New.
23371 (gno-variable-location-views): New.
23373 2018-02-08 David Malcolm <dmalcolm@redhat.com>
23375 PR tree-optimization/84136
23376 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
23377 that the result of find_edge is non-NULL.
23379 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23382 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
23383 storing integer register in SImode. Fix cost of 256 and 512
23384 byte aligned SSE register store.
23386 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23388 * config/i386/i386.c (ix86_multiplication_cost): Fix
23389 multiplication cost for TARGET_AVX512DQ.
23391 2018-02-08 Marek Polacek <polacek@redhat.com>
23393 PR tree-optimization/84238
23394 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
23397 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23399 PR tree-optimization/84265
23400 * tree-vect-stmts.c (vectorizable_store): Don't treat
23401 VMAT_CONTIGUOUS accesses as grouped.
23402 (vectorizable_load): Likewise.
23404 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23406 PR tree-optimization/81635
23407 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
23408 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
23409 (test_round_for_mask): New functions.
23410 (wide_int_cc_tests): Call test_round_for_mask.
23411 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
23412 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
23413 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
23414 range returned by get_range_info.
23416 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23419 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
23420 * symtab.c: Include builtins.h
23421 (symtab_node::output_to_lto_symbol_table_p): Move here
23422 from lto-streamer-out.c:output_symbol_p.
23423 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
23424 (output_symbol_p): Move all logic to symtab.c
23425 (produce_symtab): Update.
23427 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23429 * config/s390/s390-opts.h (enum indirect_branch): Define.
23430 * config/s390/s390-protos.h (s390_return_addr_from_memory)
23431 (s390_indirect_branch_via_thunk)
23432 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
23433 (enum s390_indirect_branch_type): Define.
23434 * config/s390/s390.c (struct s390_frame_layout, struct
23435 machine_function): Remove.
23436 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
23437 (indirect_branch_table_label_no, indirect_branch_table_name):
23439 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
23440 (enum s390_indirect_branch_option): Define.
23441 (s390_return_addr_from_memory): New function.
23442 (s390_handle_string_attribute): New function.
23443 (s390_attribute_table): Add new attribute handler.
23444 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
23445 (s390_indirect_branch_via_thunk): New function.
23446 (s390_indirect_branch_via_inline_thunk): New function.
23447 (s390_function_ok_for_sibcall): When jumping via thunk disallow
23448 sibling call optimization for non z10 compiles.
23449 (s390_emit_call): Force indirect branch target to be a single
23450 register. Add r1 clobber for non-z10 compiles.
23451 (s390_emit_epilogue): Emit return jump via return_use expander.
23452 (s390_reorg): Handle JUMP_INSNs as execute targets.
23453 (s390_option_override_internal): Perform validity checks for the
23454 new command line options.
23455 (s390_indirect_branch_attrvalue): New function.
23456 (s390_indirect_branch_settings): New function.
23457 (s390_set_current_function): Invoke s390_indirect_branch_settings.
23458 (s390_output_indirect_thunk_function): New function.
23459 (s390_code_end): Implement target hook.
23460 (s390_case_values_threshold): Implement target hook.
23461 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
23463 * config/s390/s390.h (struct s390_frame_layout)
23464 (struct machine_function): Move here from s390.c.
23465 (TARGET_INDIRECT_BRANCH_NOBP_RET)
23466 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
23467 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
23468 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
23469 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
23470 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
23471 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
23472 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
23473 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
23474 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
23475 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
23476 (mnemonic attribute): Add values which aren't recognized
23478 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
23479 pattern for branch conversion. Fix mnemonic attribute.
23480 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
23481 indirect branch via thunk if requested.
23482 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
23483 ("*indirect_jump"): Disable for branch conversion using out of
23485 ("indirect_jump_via_thunk<mode>_z10")
23486 ("indirect_jump_via_thunk<mode>")
23487 ("indirect_jump_via_inlinethunk<mode>_z10")
23488 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
23489 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
23490 ("casesi_jump_via_inlinethunk<mode>_z10")
23491 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
23492 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
23493 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
23494 ("*indirect2_jump"): Disable for branch conversion.
23495 ("casesi_jump"): Turn into expander and expand patterns for branch
23497 ("return_use"): New expander.
23498 ("*return"): Emit return via thunk and rename it to ...
23499 ("*return<mode>"): ... this one.
23500 * config/s390/s390.opt: Add new options and and enum for the
23503 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23505 * lra-constraints.c (match_reload): Unconditionally use
23506 gen_lowpart_SUBREG, rather than selecting between that
23507 and equivalent gen_rtx_SUBREG code.
23509 2018-02-08 Richard Biener <rguenther@suse.de>
23511 PR tree-optimization/84233
23512 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
23513 changed flag instead of boguously re-using phi_inserted.
23515 2018-02-08 Martin Jambor <mjambor@suse.cz>
23517 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
23518 static local variables.
23520 2018-02-08 Richard Biener <rguenther@suse.de>
23522 PR tree-optimization/84278
23523 * tree-vect-stmts.c (vectorizable_store): When looking for
23524 smaller vector types to perform grouped strided loads/stores
23525 make sure the mode is supported by the target.
23526 (vectorizable_load): Likewise.
23528 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23530 * config/aarch64/aarch64.c (aarch64_components_for_bb):
23531 Increase LDP/STP opportunities by adding adjacent callee-saves.
23533 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23535 PR rtl-optimization/84068
23536 PR rtl-optimization/83459
23537 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
23539 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
23541 PR tree-optimization/84224
23542 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
23543 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
23544 non-zero arguments.
23546 2018-02-07 Iain Sandoe <iain@codesourcery.com>
23549 * config/rs6000/altivec.md (*restore_world): Remove LR use.
23550 * config/rs6000/predicates.md (restore_world_operation): Adjust op
23551 count, remove one USE.
23553 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
23555 * doc/install.texi (Configuration): Document the
23556 --with-long-double-format={ibm,ieee} PowerPC configuration
23560 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
23561 Convert from define_expand to be define_insn_and_split. Rework
23562 float/double/_Float128 conversions to QI/HI/SImode to work with
23563 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
23564 conversions to QI/HImode types did a store and then a load to
23565 truncate the value. For conversions to VSX registers, don't split
23566 the insn, instead emit the code directly. Use the code iterator
23567 any_fix to combine signed and unsigned conversions.
23568 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
23569 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
23570 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23571 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
23572 (fix_<mode>di2_hw): Likewise.
23573 (fixuns_<mode>di2_hw): Likewise.
23574 (fix_<mode>si2_hw): Likewise.
23575 (fixuns_<mode>si2_hw): Likewise.
23576 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
23577 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23578 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
23579 fix<uns>_trunc<SFDF:mode>si2_p8.
23580 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
23581 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
23582 (fix<uns>_<mode>_mem): Likewise.
23583 (fctiw<u>z_<mode>_mem): Likewise.
23584 (fix<uns>_<mode>_mem): Likewise.
23585 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
23586 the register allocator from doing a direct move to the GPRs to do
23587 a store, and instead use the ISA 3.0 store byte/half-word from
23588 vector register instruction. For IEEE 128-bit floating point,
23589 also optimize stores of 32-bit ints.
23590 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
23592 2018-02-07 Alan Hayward <alan.hayward@arm.com>
23594 * genextract.c (push_pathstr_operand): New function to support
23596 (walk_rtx): Call push_pathstr_operand.
23597 (print_path): Support [a-zA-Z].
23599 2018-02-07 Richard Biener <rguenther@suse.de>
23601 PR tree-optimization/84037
23602 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
23603 (cse_and_gimplify_to_preheader): Declare.
23604 (vect_get_place_in_interleaving_chain): Likewise.
23605 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23607 (_loop_vec_info::~_loop_vec_info): Delete it.
23608 (cse_and_gimplify_to_preheader): New function.
23609 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
23610 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
23611 (vectorizable_load): Likewise. For grouped stores always base
23612 the IV on the first element.
23613 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
23614 condition before gimplifying.
23616 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23618 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
23619 *DIV_EXPR and *MOD_EXPR.
23621 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
23624 * config/i386/i386.c (ix86_option_override_internal): Mask out
23625 the CF_SET bit when checking -fcf-protection.
23627 2018-02-07 Tom de Vries <tom@codesourcery.com>
23630 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
23633 2018-02-07 Richard Biener <rguenther@suse.de>
23635 PR tree-optimization/84204
23636 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
23639 PR tree-optimization/84205
23640 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
23641 special-case isl_ast_op_zdiv_r.
23643 PR tree-optimization/84223
23644 * graphite-scop-detection.c (gather_bbs::before_dom_children):
23645 Only add conditions from within the region.
23646 (gather_bbs::after_dom_children): Adjust.
23648 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
23651 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
23652 * config/avr/avr.md: Only post-reload split REG-REG moves if
23653 either register is GENERAL_REG_P.
23655 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23657 PR tree-optimization/84235
23658 * tree-ssa-scopedtables.c
23659 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
23660 if the subtraction is performed in floating point type where NaNs are
23661 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
23662 build 1. Formatting fix.
23664 2018-02-06 Jakub Jelinek <jakub@redhat.com>
23667 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
23668 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
23669 and skip it regardless of bb boundaries. Use CALL_P macro,
23670 don't test INSN_P (insn) together with CALL_P or JUMP_P check
23671 unnecessarily, formatting fix.
23673 2018-02-06 Michael Collison <michael.collison@arm.com>
23675 * config/arm/thumb2.md:
23676 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
23677 (*thumb_mov_notscc): Ditto.
23679 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
23682 * config/rs6000/rs6000.md (su code attribute): Use "u" for
23683 unsigned_fix, not "s".
23685 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23687 * configure.ac (gcc_fn_eh_frame_ro): New function.
23688 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
23689 correct .eh_frame permissions.
23690 * configure: Regenerate.
23692 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
23694 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
23695 irrelevant options.
23697 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23699 * config/rs6000/rs6000.c (rs6000_option_override_internal):
23700 Display warning message for -mno-speculate-indirect-jumps.
23702 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
23704 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
23706 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
23708 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
23710 PR tree-optimization/84225
23711 * tree-eh.c (find_trapping_overflow): Only call
23712 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
23714 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23717 * config/i386/i386.c: Reimplement the check of possible options
23718 -mibt/-mshstk conbination. Change error messages.
23719 * doc/invoke.texi: Fix a typo: remove extra '='.
23721 2018-02-06 Marek Polacek <polacek@redhat.com>
23723 PR tree-optimization/84228
23724 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
23726 2018-02-06 Tamar Christina <tamar.christina@arm.com>
23729 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
23730 emitted arch directives.
23731 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
23732 __ARM_FEATURE_COPROC before changing architectures.
23734 2018-02-06 Richard Biener <rguenther@suse.de>
23736 * config/i386/i386.c (print_reg): Fix typo.
23737 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
23739 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
23741 * configure: Regenerate.
23743 2018-02-05 Martin Sebor <msebor@redhat.com>
23745 PR tree-optimization/83369
23746 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
23749 2018-02-05 Martin Liska <mliska@suse.cz>
23751 * doc/invoke.texi: Cherry-pick upstream r323995.
23753 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
23755 * ira.c (ira_init_register_move_cost): Adjust comment.
23757 2018-02-05 Martin Liska <mliska@suse.cz>
23759 PR gcov-profile/84137
23760 * doc/gcov.texi: Fix typo in documentation.
23762 2018-02-05 Martin Liska <mliska@suse.cz>
23764 PR gcov-profile/83879
23765 * doc/gcov.texi: Document necessity of --dynamic-list-data when
23766 using dlopen functionality.
23768 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
23770 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
23771 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
23772 _mm_maskz_range_ss, _mm_mask_range_round_ss,
23773 _mm_maskz_range_round_ss): New intrinsics.
23774 (__builtin_ia32_rangesd128_round)
23775 (__builtin_ia32_rangess128_round): Remove.
23776 (__builtin_ia32_rangesd128_mask_round,
23777 __builtin_ia32_rangess128_mask_round): New builtins.
23778 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
23779 __builtin_ia32_rangess128_round): Remove.
23780 (__builtin_ia32_rangesd128_mask_round,
23781 __builtin_ia32_rangess128_mask_round): New builtins.
23782 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
23783 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
23784 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
23785 "<round_saeonly_constraint>")): Changed to ...
23786 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
23787 "<round_saeonly_scalar_constraint>")): ... this.
23788 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
23789 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
23790 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
23791 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
23792 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
23794 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
23796 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
23798 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
23799 Remove all values except native, 8540 and 8548.
23801 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
23803 * config/i386/i386.c (ix86_output_function_return): Pass
23804 INVALID_REGNUM, instead of -1, as invalid register number to
23805 indirect_thunk_name and output_indirect_thunk.
23807 2018-02-02 Julia Koval <julia.koval@intel.com>
23809 * config.gcc: Add -march=icelake.
23810 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
23811 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
23812 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
23813 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
23814 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
23815 (processor_target_table): Add icelake.
23816 (ix86_option_override_internal): Handle new PTAs.
23817 (get_builtin_code_for_version): Handle icelake.
23818 (M_INTEL_COREI7_ICELAKE): New.
23819 (fold_builtin_cpu): Handle icelake.
23820 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
23821 * doc/invoke.texi: Add -march=icelake.
23823 2018-02-02 Julia Koval <julia.koval@intel.com>
23825 * config/i386/i386.c (ix86_option_override_internal): Change flags type
23826 to wide_int_bitmask.
23827 * wide-int-bitmask.h: New.
23829 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23832 * config/i386/i386.md: Replace Pmode with word_mode in
23833 builtin_setjmp_setup and builtin_longjmp to support x32.
23835 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
23839 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
23841 (rs6000_supported_cpu_names): New static variable.
23842 (linux_cpu_translation_table): Likewise.
23843 (elf_platform) <cpu>: Define new static variable and use it.
23844 Translate kernel AT_PLATFORM name to canonical name if needed.
23845 Error if platform name is unknown.
23847 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
23850 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
23852 2018-02-01 Jeff Law <law@redhat.com>
23855 * config/i386/i386.c (release_scratch_register_on_entry): Add new
23856 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
23857 the scratch if RELEASE_VIA_POP is false.
23858 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
23859 If we have to save a temporary register, decrement SIZE appropriately.
23860 Pass new arguments to release_scratch_register_on_entry.
23861 (ix86_adjust_stack_and_probe): Likewise.
23862 (ix86_emit_probe_stack_range): Pass new arguments to
23863 release_scratch_register_on_entry.
23865 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
23867 PR rtl-optimization/84157
23868 * combine.c (change_zero_ext): Use REG_P predicate in
23869 front of HARD_REGISTER_P predicate.
23871 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
23873 * config/avr/avr.c (avr_option_override): Move disabling of
23874 -fdelete-null-pointer-checks to...
23875 * common/config/avr/avr-common.c (avr_option_optimization_table):
23878 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23880 PR tree-optimization/81635
23881 * tree-data-ref.c (split_constant_offset_1): For types that
23882 wrap on overflow, try to use range info to prove that wrapping
23885 2018-02-01 Renlin Li <renlin.li@arm.com>
23888 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
23889 TAILCALL_ADDR_REGS.
23890 (aarch64_register_move_cost): Likewise.
23891 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
23892 TAILCALL_ADDR_REGS.
23893 (REG_CLASS_NAMES): Likewise.
23894 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
23895 TAILCALL_ADDR_REGS. Remove IP registers.
23896 * config/aarch64/aarch64.md (Ucs): Update register constraint.
23898 2018-02-01 Richard Biener <rguenther@suse.de>
23900 * domwalk.h (dom_walker::dom_walker): Add additional constructor
23901 for specifying RPO order and allow NULL for that.
23902 * domwalk.c (dom_walker::dom_walker): Likewise.
23903 (dom_walker::walk): Handle NULL RPO order.
23904 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
23906 (rewrite_update_dom_walker): Likewise.
23907 (mark_def_dom_walker): Likewise.
23909 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23911 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
23912 (aarch64_maybe_expand_sve_subreg_move): Declare.
23913 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
23914 * config/aarch64/predicates.md (aarch64_any_register_operand): New
23916 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
23917 that are semantically a reverse operation.
23918 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
23919 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
23920 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
23922 (aarch64_can_change_mode_class): For big-endian, forbid changes
23923 between two SVE modes if they have different element sizes.
23925 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23927 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
23928 the TImode handling for big-endian targets.
23930 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23932 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
23933 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
23935 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
23936 Remove BSWAP handing for big-endian targets and use the form of
23937 LD1RQ appropariate for the mode.
23939 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23941 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
23942 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
23943 duplicated element.
23945 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23948 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
23949 check for operands that need to go through aarch64_sve_reload_be.
23951 2018-02-01 Jakub Jelinek <jakub@redhat.com>
23953 PR tree-optimization/81661
23954 PR tree-optimization/84117
23955 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
23956 * tree-eh.c: Include gimplify.h.
23957 (find_trapping_overflow, replace_trapping_overflow,
23958 rewrite_to_non_trapping_overflow): New functions.
23959 * tree-vect-loop.c: Include tree-eh.h.
23960 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
23961 * tree-data-ref.c: Include tree-eh.h.
23962 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
23964 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
23966 PR rtl-optimization/84123
23967 * combine.c (change_zero_ext): Check if hard register satisfies
23968 can_change_dest_mode before calling gen_lowpart_SUBREG.
23970 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
23973 * ira.c (ira_init_register_move_cost): Remove assert.
23975 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
23977 PR rtl-optimization/84071
23978 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
23979 * doc/tm.texi: Regenerate.
23981 2018-01-31 Richard Biener <rguenther@suse.de>
23983 PR tree-optimization/84132
23984 * tree-data-ref.c (analyze_miv_subscript): Properly
23985 check whether evolution_function_is_affine_multivariate_p
23986 before calling gcd_of_steps_may_divide_p.
23988 2018-01-31 Julia Koval <julia.koval@intel.com>
23991 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
23992 * config/i386/i386.md (rdpid_rex64) New.
23993 (rdpid): Make 32bit only.
23995 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
23998 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
23999 an IDENTIFIER_NODE for FUNCTION_TYPE's.
24001 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24004 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
24006 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24008 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24010 PR rtl-optimization/84071
24011 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
24012 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
24014 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24016 * config/arc/arc.c (arc_handle_aux_attribute): New function.
24017 (arc_attribute_table): Add 'aux' attribute.
24018 (arc_in_small_data_p): Consider aux like variables.
24019 (arc_is_aux_reg_p): New function.
24020 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
24021 (arc_get_aux_arg): New function.
24022 (prepare_move_operands): Handle aux-register access.
24023 (arc_handle_aux_attribute): New function.
24024 * doc/extend.texi (ARC Variable attributes): Add subsection.
24026 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24028 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
24029 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
24030 (arc_attribute_table): Add 'uncached' attribute.
24031 (arc_print_operand): Print '.di' flag for uncached memory
24033 (arc_in_small_data_p): Do not consider for small data the uncached
24035 (arc_is_uncached_mem_p): New function.
24036 * config/arc/predicates.md (compact_store_memory_operand): Check
24037 for uncached memory accesses.
24038 (nonvol_nonimm_operand): Likewise.
24039 * doc/extend.texi (ARC Type Attribute): New subsection.
24041 2018-01-31 Jakub Jelinek <jakub@redhat.com>
24044 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
24045 falign-loops=): Add Optimization flag.
24047 2018-01-30 Jeff Law <law@redhat.com>
24050 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
24051 INT_REGISTERS_SAVED. Check it prior to calling
24052 get_scratch_register_on_entry.
24053 (ix86_adjust_stack_and_probe): Similarly.
24054 (ix86_emit_probe_stack_range): Similarly.
24055 (ix86_expand_prologue): Corresponding changes.
24057 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24060 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
24061 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
24063 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
24066 * lra-constraints.c (curr_insn_transform): Process AND in the
24069 2018-01-30 Jakub Jelinek <jakub@redhat.com>
24071 PR rtl-optimization/83986
24072 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
24073 dependence against last_pending_memory_flush in addition to
24074 pending_jump_insns.
24076 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
24078 PR tree-optimization/81611
24079 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
24082 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24085 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
24088 2018-01-30 Richard Biener <rguenther@suse.de>
24089 Jakub Jelinek <jakub@redhat.com>
24091 PR tree-optimization/84111
24092 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
24093 inner loops added during recursion, as they don't have up-to-date
24096 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24099 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
24100 (can_inline_edge_by_limits_p): ... here.
24101 (can_early_inline_edge_p, check_callers,
24102 update_caller_keys, update_callee_keys, recursive_inlining,
24103 add_new_edges_to_heap, speculation_useful_p,
24104 inline_small_functions,
24105 inline_small_functions, flatten_function,
24106 inline_to_all_callers_1): Update.
24108 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24110 * profile-count.c (profile_count::combine_with_ipa_count): Handle
24113 2018-01-30 Richard Biener <rguenther@suse.de>
24115 PR tree-optimization/83008
24116 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
24117 invariant and constant vector uses in stmts when they need
24118 more than one stmt.
24120 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24123 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
24124 * configure: Regenerate.
24126 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24128 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
24130 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
24131 Use gen_rtx_REG rather than gen_lowpart.
24133 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24135 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
24136 rather than 0 when creating partial subregs.
24138 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24140 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
24143 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
24146 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
24147 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
24148 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
24149 flags. This restores the settings used before the 2017-07-24.
24150 Turning off pre increment/decrement/modify allows IVOPTS to
24151 optimize DF/SF loops where the index is an int.
24153 2018-01-29 Richard Biener <rguenther@suse.de>
24154 Kelvin Nilsen <kelvin@gcc.gnu.org>
24157 * tree-vect-stmts.c (vectorizable_call): Don't call
24158 targetm.vectorize_builtin_md_vectorized_function if callee is
24161 2018-01-22 Carl Love <cel@us.ibm.com>
24163 * doc/extend.tex: Fix typo in second arg in
24164 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
24166 2018-01-29 Richard Biener <rguenther@suse.de>
24168 PR tree-optimization/84086
24169 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
24170 (flush_ssaname_freelist): When SSA names were released reset
24171 the SCEV hash table.
24173 2018-01-29 Richard Biener <rguenther@suse.de>
24175 PR tree-optimization/84057
24176 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
24177 removed paths when removing edges.
24179 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
24181 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
24182 -mfunction-return=@var{choice}.
24184 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
24186 PR diagnostic/84034
24187 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
24188 Handle CR like TAB.
24189 (layout::print_source_line): Likewise.
24190 (test_get_line_width_without_trailing_whitespace): Add test cases.
24192 2018-01-27 Jakub Jelinek <jakub@redhat.com>
24194 PR middle-end/84040
24195 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
24198 2018-01-26 Jim Wilson <jimw@sifive.com>
24200 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
24202 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
24205 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24207 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
24208 and CMP + SUB-immediate -> SUBS.
24210 2018-01-26 Martin Sebor <msebor@redhat.com>
24212 PR tree-optimization/83896
24213 * tree-ssa-strlen.c (get_string_len): Rename...
24214 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
24215 Avoid assuming length is constant.
24216 (handle_char_store): Use HOST_WIDE_INT for string length.
24218 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
24221 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
24222 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
24224 2018-01-26 Richard Biener <rguenther@suse.de>
24226 PR rtl-optimization/84003
24227 * dse.c (record_store): Only record redundant stores when
24228 the earlier store aliases at least all accesses the later one does.
24230 2018-01-26 Jakub Jelinek <jakub@redhat.com>
24232 PR rtl-optimization/83985
24233 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
24234 REG_CFA_RESTORE insns.
24235 (delete_unmarked_insns): Don't ignore separate shrink wrapping
24236 REG_CFA_RESTORE insns here.
24239 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
24240 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
24242 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24244 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
24245 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
24246 (arc_init): Likewise.
24247 (arc_override_options): Likewise.
24248 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
24250 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
24252 * config/arc/arc.h (TARGET_DBNZ): Define.
24253 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
24254 properly set the tune attribute.
24255 (dbnz): Use TARGET_DBNZ guard.
24256 * config/arc/arc.opt (mtune): Add core3 option.
24258 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24260 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24261 recognize new pic like addresses.
24262 (arc_delegitimize_address): Clean up.
24264 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24266 * config/arc/arc-arches.def: Option mrf16 valid for all
24268 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24269 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24270 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24271 * config/arc/arc-tables.opt: Regenerate.
24272 * config/arc/arc.c (arc_conditional_register_usage): Handle
24273 reduced register file case.
24274 (arc_file_start): Set must have build attributes.
24275 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24276 mrf16 option value.
24277 * config/arc/arc.opt (mrf16): Add new option.
24278 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24279 * config/arc/genmultilib.awk: Handle new mrf16 option.
24280 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24281 * config/arc/t-multilib: Regenerate.
24282 * doc/invoke.texi (ARC Options): Document mrf16 option.
24284 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24286 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24287 * config/arc/arc.c (arc_handle_secure_attribute): New function.
24288 (arc_attribute_table): Add 'secure_call' attribute.
24289 (arc_print_operand): Print secure call operand.
24290 (arc_function_ok_for_sibcall): Don't optimize tail calls when
24292 (arc_is_secure_call_p): New function. * config/arc/arc.md
24293 (call_i): Add support for sjli instruction.
24294 (call_value_i): Likewise.
24295 * config/arc/constraints.md (Csc): New constraint.
24297 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24298 John Eric Martin <John.Martin@emmicro-us.com>
24300 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24301 * config/arc/arc.c (_arc_jli_section): New struct.
24302 (arc_jli_section): New type.
24303 (rc_jli_sections): New static variable.
24304 (arc_handle_jli_attribute): New function.
24305 (arc_attribute_table): Add jli_always and jli_fixed attribute.
24306 (arc_file_end): New function.
24307 (TARGET_ASM_FILE_END): Define.
24308 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24309 (arc_add_jli_section): New function.
24310 (jli_call_scan): Likewise.
24311 (arc_reorg): Call jli_call_scan.
24312 (arc_output_addsi): Remove 'S' from printing asm operand.
24313 (arc_is_jli_call_p): New function.
24314 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24316 (movhi_insn): Likewise.
24317 (movsi_insn): Likewise.
24318 (movsi_set_cc_insn): Likewise.
24319 (loadqi_update): Likewise.
24320 (load_zeroextendqisi_update): Likewise.
24321 (load_signextendqisi_update): Likewise.
24322 (loadhi_update): Likewise.
24323 (load_zeroextendhisi_update): Likewise.
24324 (load_signextendhisi_update): Likewise.
24325 (loadsi_update): Likewise.
24326 (loadsf_update): Likewise.
24327 (movsicc_insn): Likewise.
24328 (bset_insn): Likewise.
24329 (bxor_insn): Likewise.
24330 (bclr_insn): Likewise.
24331 (bmsk_insn): Likewise.
24332 (bicsi3_insn): Likewise.
24333 (cmpsi_cc_c_insn): Likewise.
24334 (movsi_ne): Likewise.
24335 (movsi_cond_exec): Likewise.
24336 (clrsbsi2): Likewise.
24337 (norm_f): Likewise.
24347 (call_i): Remove 'S' asm letter, add jli instruction.
24348 (call_value_i): Likewise.
24349 * config/arc/arc.op (mjli-always): New option.
24350 * config/arc/constraints.md (Cji): New constraint.
24351 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24353 (subsf3_fpx): Likewise.
24354 (mulsf3_fpx): Likewise.
24355 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24357 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24358 function attrbutes.
24359 * doc/invoke.texi (ARC): Document mjli-always option.
24361 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
24363 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24364 avoid addition with 0 and use incw and decw where possible.
24366 2018-01-26 Richard Biener <rguenther@suse.de>
24368 PR tree-optimization/81082
24369 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24370 association if it requires casting to unsigned.
24371 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24372 from fold_plusminus_mult_expr to catch important cases late when
24373 range info is available.
24375 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24377 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
24378 * configure.ac (hidden_linkonce): New test.
24379 * configure: Regenerate.
24380 * config.in: Regenerate.
24382 2018-01-26 Julia Koval <julia.koval@intel.com>
24384 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
24385 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
24386 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
24387 _mm_mask_bitshuffle_epi64_mask): Fix type.
24388 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
24389 USI_FTYPE_V4DI_V4DI_USI): Remove.
24390 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
24391 __builtin_ia32_vpshufbitqmb256_mask,
24392 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
24393 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
24394 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
24396 2018-01-26 Alan Modra <amodra@gmail.com>
24399 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
24400 UNSPEC_VBPERMQ. Sort other unspecs.
24402 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
24404 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
24406 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
24408 PR middle-end/83055
24409 * predict.c (drop_profile): Do not push/pop cfun; update also
24411 (handle_missing_profiles): Fix logic looking for zero profiles.
24413 2018-01-25 Jakub Jelinek <jakub@redhat.com>
24415 PR middle-end/83977
24416 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
24417 on functions with #pragma omp declare simd or functions with simd
24419 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
24420 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
24421 Remove trailing \n from warning_at calls.
24423 2018-01-25 Tom de Vries <tom@codesourcery.com>
24426 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24427 for neutered workers.
24429 2018-01-24 Joseph Myers <joseph@codesourcery.com>
24432 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
24433 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
24435 2018-01-24 Jeff Law <law@redhat.com>
24438 * i386.c (get_probe_interval): Move to earlier point.
24439 (ix86_compute_frame_layout): If -fstack-clash-protection and
24440 the frame is larger than the probe interval, then use pushes
24441 to save registers rather than reg->mem moves.
24442 (ix86_expand_prologue): Remove conditional for int_registers_saved
24445 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
24448 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
24449 min/max for never referenced object.
24451 2018-01-24 Jakub Jelinek <jakub@redhat.com>
24453 PR middle-end/83977
24454 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
24456 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
24457 attributes from DECL_ATTRIBUTES (decl) without affecting
24458 DECL_ATTRIBUTES (current_function_decl).
24459 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
24460 functions with non-NULL DECL_ABSTRACT_ORIGIN.
24462 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
24464 PR tree-optimization/83979
24465 * fold-const.c (fold_comparison): Use constant_boolean_node
24466 instead of boolean_{true,false}_node.
24468 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
24470 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
24473 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24475 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24476 Simplify the clause that sets the length attribute.
24477 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24478 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
24479 clause that sets the length attribute.
24480 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24482 2018-01-24 Tom de Vries <tom@codesourcery.com>
24485 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
24486 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
24487 Add strict parameter.
24488 (prevent_branch_around_nothing): Insert dummy insn between branch to
24489 label and label with no ptx insn inbetween.
24490 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
24492 2018-01-24 Tom de Vries <tom@codesourcery.com>
24495 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24496 for neutered threads in warp.
24497 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
24499 2018-01-24 Richard Biener <rguenther@suse.de>
24501 PR tree-optimization/83176
24502 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
24505 2018-01-24 Richard Biener <rguenther@suse.de>
24507 PR tree-optimization/82819
24508 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
24509 code generating pluses that are no-ops in the target precision.
24511 2018-01-24 Richard Biener <rguenther@suse.de>
24513 PR middle-end/84000
24514 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
24516 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24518 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
24519 to merge probabilities.
24520 * predict.c (probably_never_executed): Also mark as cold functions
24521 with global 0 profile and guessed local profile.
24522 * profile-count.c (profile_probability::combine_with_count): New
24524 * profile-count.h (profile_probability::operator*,
24525 profile_probability::operator*=, profile_probability::operator/,
24526 profile_probability::operator/=): Reduce precision to adjusted
24527 and set value to guessed on contradictory divisions.
24528 (profile_probability::combine_with_freq): Remove.
24529 (profile_probability::combine_wiht_count): Declare.
24530 (profile_count::force_nonzero):: Set to adjusted.
24531 (profile_count::probability_in):: Set quality to adjusted.
24532 * tree-ssa-tail-merge.c (replace_block_by): Use
24533 combine_with_count.
24535 2018-01-23 Andrew Waterman <andrew@sifive.com>
24536 Jim Wilson <jimw@sifive.com>
24538 * config/riscv/riscv.c (riscv_stack_boundary): New.
24539 (riscv_option_override): Set riscv_stack_boundary. Handle
24540 riscv_preferred_stack_boundary_arg.
24541 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
24542 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
24543 (STACK_BOUNDARY): Set to riscv_stack_boundary.
24544 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
24545 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
24546 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
24548 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
24551 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
24552 of struct ix86_frame.
24553 (ix86_expand_epilogue): Likewise. Add a local variable for
24554 the reg_save_offset field in struct ix86_frame.
24556 2018-01-23 Bin Cheng <bin.cheng@arm.com>
24558 PR tree-optimization/82604
24559 * tree-loop-distribution.c (enum partition_kind): New enum item
24560 PKIND_PARTIAL_MEMSET.
24561 (partition_builtin_p): Support above new enum item.
24562 (generate_code_for_partition): Ditto.
24563 (compute_access_range): Differentiate cases that equality can be
24564 proven at all loops, the innermost loops or no loops.
24565 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
24566 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
24567 (finalize_partitions, distribute_loop): Don't fuse partition of
24568 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
24569 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
24570 parloop is enabled.
24572 2018-01-23 Martin Liska <mliska@suse.cz>
24574 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
24575 order to ignore the predictor.
24576 (PRED_POLYMORPHIC_CALL): Likewise.
24577 (PRED_RECURSIVE_CALL): Likewise.
24579 2018-01-23 Martin Liska <mliska@suse.cz>
24581 * tree-profile.c (tree_profiling): Print function header to
24582 aware reader which function we are working on.
24583 * value-prof.c (gimple_find_values_to_profile): Do not print
24584 not interesting value histograms.
24586 2018-01-23 Martin Liska <mliska@suse.cz>
24588 * profile-count.h (enum profile_quality): Add
24589 profile_uninitialized as the first value. Do not number values
24590 as they are zero based.
24591 (profile_count::verify): Update sanity check.
24592 (profile_probability::verify): Likewise.
24594 2018-01-23 Nathan Sidwell <nathan@acm.org>
24596 * doc/invoke.texi (ffor-scope): Deprecate.
24598 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24600 PR tree-optimization/83510
24601 * domwalk.c (set_all_edges_as_executable): New function.
24602 (dom_walker::dom_walker): Convert bool param
24603 "skip_unreachable_blocks" to enum reachability. Move setup of
24604 edge flags to set_all_edges_as_executable and only do it when
24605 reachability is REACHABLE_BLOCKS.
24606 * domwalk.h (enum dom_walker::reachability): New enum.
24607 (dom_walker::dom_walker): Convert bool param
24608 "skip_unreachable_blocks" to enum reachability.
24609 (set_all_edges_as_executable): New decl.
24610 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
24611 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
24613 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
24614 but converting true to REACHABLE_BLOCKS.
24615 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
24617 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
24618 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
24619 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
24621 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
24622 if check_all_array_refs will be called.
24624 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24626 * tree.c (selftest::test_location_wrappers): Add more test
24629 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24631 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
24632 (selftest::test_bit_in_range): Likewise.
24634 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24637 * doc/sourcebuild.texi (vect_float): Say that the selector
24638 only describes the situation when -funsafe-math-optimizations is on.
24639 (vect_float_strict): Document.
24641 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24643 PR tree-optimization/83965
24644 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
24645 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
24646 instead of checking only for a reduction.
24647 (vect_recog_widen_sum_pattern): Likewise.
24649 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24651 * predict.c (probably_never_executed): Only use precise profile info.
24652 (compute_function_frequency): Skip after inlining hack since we now
24653 have quality checking.
24655 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24657 * profile-count.h (profile_probability::very_unlikely,
24658 profile_probability::unlikely, profile_probability::even): Set
24659 precision to guessed.
24661 2018-01-23 Richard Biener <rguenther@suse.de>
24663 PR tree-optimization/83963
24664 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
24665 Properly terminate dominator walk when crossing the exit edge not
24666 when visiting its source block.
24668 2018-01-23 Jakub Jelinek <jakub@redhat.com>
24671 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
24672 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
24674 2018-01-22 Jakub Jelinek <jakub@redhat.com>
24676 PR tree-optimization/83957
24677 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
24678 semicolon after for body surrounded by braces.
24680 PR tree-optimization/83081
24681 * profile-count.h (profile_probability::split): New method.
24682 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
24683 Use profile_probability::split.
24684 (do_compare_rtx_and_jump): Fix adjustment of probabilities
24685 when splitting a single conditional jump into 2.
24687 2018-01-22 David Malcolm <dmalcolm@redhat.com>
24689 PR tree-optimization/69452
24690 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
24693 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24695 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
24696 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
24697 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
24699 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24701 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
24703 * config/rl78/rl78.md (movdi): New define_expand.
24704 * config/rl78/rl78.c (rl78_split_movdi): New function.
24706 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
24709 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
24711 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
24712 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
24713 128-bit to produce an UNSPEC move to get the double word with the
24714 signbit and then a shift directly to do signbit.
24715 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
24716 implementation with a new version that just does either a direct
24717 move or a regular move. Move memory interface to separate insns.
24718 Move insns so they are next to the expander.
24719 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
24720 with signbit move. Split big and little endian case.
24721 (signbit<mode>2_dm_mem_le): Likewise.
24722 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
24723 (signbit<mode>2_dm2): Likewise.
24725 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24727 * config/rl78/rl78.md (anddi3): New define_expand.
24729 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24731 * config/rl78/rl78.md (umindi3): New define_expand.
24733 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24735 * config/rl78/rl78.md (smindi3): New define_expand.
24737 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24739 * config/rl78/rl78.md (smaxdi3): New define_expand.
24741 2018-01-22 Carl Love <cel@us.ibm.com>
24743 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
24744 LVX_V1TI): Add macro expansion.
24745 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
24746 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
24747 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
24748 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
24749 Change check to determine if the instruction is a byte reversing
24750 entry. Fix typo in comment.
24751 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
24752 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
24753 Add def_builtin calls for new builtins.
24754 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
24755 Add define_insn expansion.
24757 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24759 * config/rl78/rl78.md (umaxdi3): New define_expand.
24761 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24763 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
24764 for non-QImode registers.
24766 2018-01-22 Richard Biener <rguenther@suse.de>
24768 PR tree-optimization/83963
24769 * graphite-scop-detection.c (scop_detection::get_sese): Delay
24770 including the loop exit block.
24771 (scop_detection::merge_sese): Likewise.
24772 (scop_detection::add_scop): Do it here instead.
24774 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24776 * doc/sourcebuild.texi (arm_softfloat): Document.
24778 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
24781 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
24782 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
24783 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
24785 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24786 David Edelsohn <dje.gcc@gmail.com>
24789 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24790 Change "crset eq" to "crset 2".
24791 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24792 (*call_indirect_aix<mode>_nospec): Likewise.
24793 (*call_value_indirect_aix<mode>_nospec): Likewise.
24794 (*call_indirect_elfv2<mode>_nospec): Likewise.
24795 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
24796 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
24797 change assembly output from . to $.
24798 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24799 (indirect_jump<mode>_nospec): Change assembly output from . to $.
24800 (*tablejump<mode>_internal1_nospec): Likewise.
24802 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
24805 * config/sh/sh_optimize_sett_clrt.cc:
24806 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
24808 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
24810 PR tree-optimization/83940
24811 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
24812 offset_dt to vect_constant_def rather than vect_unknown_def_type.
24813 (vect_check_load_store_mask): Add a mask_dt_out parameter and
24814 use it to pass back the definition type.
24815 (vect_check_store_rhs): Likewise rhs_dt_out.
24816 (vect_build_gather_load_calls): Add a mask_dt argument and use
24817 it instead of a call to vect_is_simple_use.
24818 (vectorizable_store): Update calls to vect_check_load_store_mask
24819 and vect_check_store_rhs. Use the dt returned by the latter instead
24820 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
24821 instead of calls to vect_is_simple_use. Pass the scalar rather
24822 than the vector operand to vect_is_simple_use when handling
24823 second and subsequent copies of an rhs value.
24824 (vectorizable_load): Update calls to vect_check_load_store_mask
24825 and vect_build_gather_load_calls. Use the cached mask_dt and
24826 gs_info.offset_dt instead of calls to vect_is_simple_use.
24828 2018-01-20 Jakub Jelinek <jakub@redhat.com>
24830 PR middle-end/83945
24831 * tree-emutls.c: Include gimplify.h.
24832 (lower_emutls_2): New function.
24833 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
24834 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
24835 it before further processing.
24838 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
24839 UINTVAL (trueop1) instead of INTVAL (op1).
24841 2018-01-19 Jakub Jelinek <jakub@redhat.com>
24845 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
24846 INCOMING_FRAME_SP_OFFSET if not defined.
24847 (scan_trace): Add ENTRY argument. If true and
24848 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
24849 emit a note to adjust the CFA offset.
24850 (create_cfi_notes): Adjust scan_trace callers.
24851 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
24852 INCOMING_FRAME_SP_OFFSET in the CIE.
24853 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
24854 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
24856 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
24857 * doc/tm.texi: Regenerated.
24859 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24861 PR rtl-optimization/83147
24862 * lra-constraints.c (remove_inheritance_pseudos): Use
24863 lra_substitute_pseudo_within_insn.
24865 2018-01-19 Tom de Vries <tom@codesourcery.com>
24866 Cesar Philippidis <cesar@codesourcery.com>
24869 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
24871 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
24874 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
24875 spaces for function labels.
24877 2018-01-19 Martin Liska <mliska@suse.cz>
24879 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
24880 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
24881 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
24882 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
24883 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
24884 (PRED_CONST_RETURN): Change from 69 to 65.
24885 (PRED_NULL_RETURN): Change from 91 to 71.
24886 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
24887 (PRED_LOOP_GUARD): Change from 66 to 73.
24889 2018-01-19 Martin Liska <mliska@suse.cz>
24891 * predict.c (predict_insn_def): Add new assert.
24892 (struct branch_predictor): Change type to signed integer.
24893 (test_prediction_value_range): Amend test to cover
24894 PROB_UNINITIALIZED.
24895 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
24896 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
24897 (PRED_LOOP_ITERATIONS_MAX): Likewise.
24898 (PRED_LOOP_IV_COMPARE): Likewise.
24899 * predict.h (PROB_UNINITIALIZED): Define new constant.
24901 2018-01-19 Martin Liska <mliska@suse.cz>
24903 * predict.c (dump_prediction): Add new format for
24904 analyze_brprob.py script which is enabled with -details
24906 * profile-count.h (precise_p): New function.
24908 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
24910 PR tree-optimization/83922
24911 * tree-vect-loop.c (vect_verify_full_masking): Return false if
24912 there are no statements that need masking.
24913 (vect_active_double_reduction_p): New function.
24914 (vect_analyze_loop_operations): Use it when handling phis that
24915 are not in the loop header.
24917 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
24919 PR tree-optimization/83914
24920 * tree-vect-loop.c (vectorizable_induction): Don't convert
24921 init_expr or apply the peeling adjustment for inductions
24922 that are nested within the vectorized loop.
24924 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24926 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
24929 2018-01-18 Jakub Jelinek <jakub@redhat.com>
24933 * function.h (gimplify_parameters): Add gimple_seq * argument.
24934 * function.c: Include gimple.h and options.h.
24935 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
24936 for the added local temporaries if needed.
24937 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
24938 if there are any parameter cleanups, wrap whole body into a
24939 try/finally with the cleanups.
24941 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
24944 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
24945 Use GET_MODE_CLASS for scalar floating point.
24947 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
24951 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
24952 Fix call of call_cgraph_insertion_hooks.
24954 2018-01-18 Martin Sebor <msebor@redhat.com>
24956 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
24958 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
24961 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
24964 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
24967 * common.opt: (-ffile-prefix-map): New option.
24968 * opts.c (common_handle_option): Defer it.
24969 * opts-global.c (handle_common_deferred_options): Handle it.
24970 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
24971 * file-prefix-map.h: New file.
24972 (remap_debug_filename, add_debug_prefix_map): ...here.
24973 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
24974 * final.c (debug_prefix_map, add_debug_prefix_map
24975 remap_debug_filename): Move to...
24976 * file-prefix-map.c: New file.
24977 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
24978 generalize, get rid of alloca(), use strrchr() instead of strchr().
24979 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
24980 Implement in terms of add_prefix_map().
24981 (remap_macro_filename, remap_debug_filename): Implement in term of
24983 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
24984 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
24985 * dbxout.c: Include file-prefix-map.h.
24986 * varasm.c: Likewise.
24987 * vmsdbgout.c: Likewise.
24988 * xcoffout.c: Likewise.
24989 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
24990 * doc/cppopts.texi (-fmacro-prefix-map): Document.
24991 * doc/invoke.texi (-ffile-prefix-map): Document.
24992 (-fdebug-prefix-map): Update description.
24994 2018-01-18 Martin Liska <mliska@suse.cz>
24996 * config/i386/i386.c (indirect_thunk_name): Document that also
24998 (output_indirect_thunk): Document why both instructions
24999 (pause and lfence) are generated.
25001 2018-01-18 Richard Biener <rguenther@suse.de>
25003 PR tree-optimization/83887
25004 * graphite-scop-detection.c
25005 (scop_detection::get_nearest_dom_with_single_entry): Remove.
25006 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
25007 (scop_detection::merge_sese): Re-implement with a flood-fill
25008 algorithm that properly finds a SESE region if it exists.
25010 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25013 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
25014 pointer_diff optimizations use view_convert instead of convert.
25016 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25018 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25019 Generate different code for -mno-speculate-indirect-jumps.
25020 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25021 (*call_indirect_aix<mode>): Disable for
25022 -mno-speculate-indirect-jumps.
25023 (*call_indirect_aix<mode>_nospec): New define_insn.
25024 (*call_value_indirect_aix<mode>): Disable for
25025 -mno-speculate-indirect-jumps.
25026 (*call_value_indirect_aix<mode>_nospec): New define_insn.
25027 (*sibcall_nonlocal_sysv<mode>): Generate different code for
25028 -mno-speculate-indirect-jumps.
25029 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25031 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
25033 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
25034 long double type, set the flags for noting the default long double
25035 type, even if we don't pass or return a long double type.
25037 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
25040 * ipa-inline.c (flatten_function): Do not overwrite final inlining
25043 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
25045 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
25046 support for merge[hl].
25047 (fold_mergehl_helper): New helper function.
25048 (tree-vector-builder.h): New #include for tree_vector_builder usage.
25049 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
25050 (altivec_vmrglw_direct): Add xxmrglw insn.
25052 2018-01-17 Andrew Waterman <andrew@sifive.com>
25054 * config/riscv/riscv.c (riscv_conditional_register_usage): If
25055 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
25057 2018-01-17 David Malcolm <dmalcolm@redhat.com>
25060 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
25061 call the lto_location_cache before reading the
25062 DECL_SOURCE_LOCATION of the types.
25064 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
25065 Richard Sandiford <richard.sandiford@linaro.org>
25067 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
25068 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
25069 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
25070 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
25071 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
25073 * config/aarch64/constraints.md (aarch64_movti_operand):
25075 * config/aarch64/predicates.md (Uti): Add new constraint.
25077 2018-01-17 Carl Love <cel@us.ibm.com>
25079 * config/rs6000/vsx.md (define_expand xl_len_r,
25080 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
25081 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
25083 (define_expand, define_insn): Move the shift left from the
25084 define_insn to the define_expand for lxvl and stxvl instructions.
25085 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
25086 and XL_LEN_R definitions to PURE.
25088 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
25090 * config/i386/i386.c (indirect_thunk_name): Declare regno
25091 as unsigned int. Compare regno with INVALID_REGNUM.
25092 (output_indirect_thunk): Ditto.
25093 (output_indirect_thunk_function): Ditto.
25094 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
25095 in the call to output_indirect_thunk_function.
25097 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
25099 PR middle-end/83884
25100 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
25101 rather than the size of inner_type to determine the stack slot size
25102 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
25104 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
25107 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
25110 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
25112 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
25113 endian Linux systems to optionally enable multilibs for selecting
25114 the long double type if the user configured an explicit type.
25115 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
25116 have no long double multilibs if not defined.
25117 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
25118 warn if the user used -mabi={ieee,ibm}longdouble and we built
25119 multilibs for long double.
25120 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
25121 appropriate multilib option.
25122 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
25124 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
25125 for building long double multilibs.
25126 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
25128 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
25130 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
25133 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
25135 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
25138 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
25141 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
25144 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25146 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
25147 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
25149 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
25151 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
25152 different rtl trees depending on TARGET_64BIT.
25153 (rs6000_gen_lvx): Likewise.
25155 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25157 * config/visium/visium.md (nop): Tweak comment.
25158 (hazard_nop): Likewise.
25160 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25162 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
25163 -mspeculate-indirect-jumps.
25164 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
25165 for -mno-speculate-indirect-jumps.
25166 (*call_indirect_elfv2<mode>_nospec): New define_insn.
25167 (*call_value_indirect_elfv2<mode>): Disable for
25168 -mno-speculate-indirect-jumps.
25169 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
25170 (indirect_jump): Emit different RTL for
25171 -mno-speculate-indirect-jumps.
25172 (*indirect_jump<mode>): Disable for
25173 -mno-speculate-indirect-jumps.
25174 (*indirect_jump<mode>_nospec): New define_insn.
25175 (tablejump): Emit different RTL for
25176 -mno-speculate-indirect-jumps.
25177 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
25178 (tablejumpsi_nospec): New define_expand.
25179 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
25180 (tablejumpdi_nospec): New define_expand.
25181 (*tablejump<mode>_internal1): Disable for
25182 -mno-speculate-indirect-jumps.
25183 (*tablejump<mode>_internal1_nospec): New define_insn.
25184 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
25187 2018-01-16 Artyom Skrobov tyomitch@gmail.com
25189 * caller-save.c (insert_save): Drop unnecessary parameter. All
25192 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25193 Richard Biener <rguenth@suse.de>
25196 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
25197 return early, inline manually is_gimple_sizepos. Make sure if we
25198 call gimplify_expr we don't end up with a gimple constant.
25199 * tree.c (variably_modified_type_p): Don't return true for
25200 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
25201 * gimplify.h (is_gimple_sizepos): Remove.
25203 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25205 PR tree-optimization/83857
25206 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
25207 vectorizable_live_operation for pure SLP statements.
25208 (vectorizable_live_operation): Handle PHIs.
25210 2018-01-16 Richard Biener <rguenther@suse.de>
25212 PR tree-optimization/83867
25213 * tree-vect-stmts.c (vect_transform_stmt): Precompute
25214 nested_in_vect_loop_p since the scalar stmt may get invalidated.
25216 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25219 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
25220 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
25221 If off is not INTEGER_CST, issue a may not be aligned warning
25222 rather than isn't aligned. Use isn%'t rather than isn't.
25223 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
25225 <case MULT_EXPR>: Improve the case when bottom and one of the
25226 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
25227 operand, in that case check if the other operand is multiple of
25228 bottom divided by the INTEGER_CST operand.
25230 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25233 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
25234 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
25235 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
25236 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
25237 * config/pa/pa.c (pa_function_arg_advance): Likewise.
25238 (pa_function_arg, pa_arg_partial_bytes): Likewise.
25239 (pa_function_arg_size): New function.
25241 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25243 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
25244 in a separate statement.
25246 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25248 PR tree-optimization/83847
25249 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
25250 group gathers and scatters.
25252 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25254 PR rtl-optimization/86620
25255 * params.def (max-sched-ready-insns): Bump minimum value to 1.
25257 PR rtl-optimization/83213
25258 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25259 to last if both are JUMP_INSNs.
25261 PR tree-optimization/83843
25262 * gimple-ssa-store-merging.c
25263 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25264 store_immediate_info for bswap/nop orig_stores.
25266 2018-01-15 Andrew Waterman <andrew@sifive.com>
25268 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25270 <UDIV>: Increase cost if !TARGET_DIV.
25272 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
25274 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25275 (define_attr "cr_logical_3op"): New.
25276 (cceq_ior_compare): Adjust.
25277 (cceq_ior_compare_complement): Adjust.
25278 (*cceq_rev_compare): Adjust.
25279 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25280 (is_cracked_insn): Adjust.
25281 (insn_must_be_first_in_group): Adjust.
25282 * config/rs6000/40x.md: Adjust.
25283 * config/rs6000/440.md: Adjust.
25284 * config/rs6000/476.md: Adjust.
25285 * config/rs6000/601.md: Adjust.
25286 * config/rs6000/603.md: Adjust.
25287 * config/rs6000/6xx.md: Adjust.
25288 * config/rs6000/7450.md: Adjust.
25289 * config/rs6000/7xx.md: Adjust.
25290 * config/rs6000/8540.md: Adjust.
25291 * config/rs6000/cell.md: Adjust.
25292 * config/rs6000/e300c2c3.md: Adjust.
25293 * config/rs6000/e500mc.md: Adjust.
25294 * config/rs6000/e500mc64.md: Adjust.
25295 * config/rs6000/e5500.md: Adjust.
25296 * config/rs6000/e6500.md: Adjust.
25297 * config/rs6000/mpc.md: Adjust.
25298 * config/rs6000/power4.md: Adjust.
25299 * config/rs6000/power5.md: Adjust.
25300 * config/rs6000/power6.md: Adjust.
25301 * config/rs6000/power7.md: Adjust.
25302 * config/rs6000/power8.md: Adjust.
25303 * config/rs6000/power9.md: Adjust.
25304 * config/rs6000/rs64.md: Adjust.
25305 * config/rs6000/titan.md: Adjust.
25307 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25309 * config/i386/predicates.md (indirect_branch_operand): Rewrite
25310 ix86_indirect_branch_register logic.
25312 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25314 * config/i386/constraints.md (Bs): Update
25315 ix86_indirect_branch_register check. Don't check
25316 ix86_indirect_branch_register with GOT_memory_operand.
25318 * config/i386/predicates.md (GOT_memory_operand): Don't check
25319 ix86_indirect_branch_register here.
25320 (GOT32_symbol_operand): Likewise.
25322 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25324 * config/i386/predicates.md (constant_call_address_operand):
25325 Rewrite ix86_indirect_branch_register logic.
25326 (sibcall_insn_operand): Likewise.
25328 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25330 * config/i386/constraints.md (Bs): Replace
25331 ix86_indirect_branch_thunk_register with
25332 ix86_indirect_branch_register.
25334 * config/i386/i386.md (indirect_jump): Likewise.
25335 (tablejump): Likewise.
25336 (*sibcall_memory): Likewise.
25337 (*sibcall_value_memory): Likewise.
25338 Peepholes of indirect call and jump via memory: Likewise.
25339 * config/i386/i386.opt: Likewise.
25340 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25341 (GOT_memory_operand): Likewise.
25342 (call_insn_operand): Likewise.
25343 (sibcall_insn_operand): Likewise.
25344 (GOT32_symbol_operand): Likewise.
25346 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25348 PR middle-end/83837
25349 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25350 type rather than type addr's type points to.
25351 (expand_omp_atomic_mutex): Likewise.
25352 (expand_omp_atomic): Likewise.
25354 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25357 * config/i386/i386.c (output_indirect_thunk_function): Use
25358 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25359 for __x86_return_thunk.
25361 2018-01-15 Richard Biener <rguenther@suse.de>
25363 PR middle-end/83850
25364 * expmed.c (extract_bit_field_1): Fix typo.
25366 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25369 * config/arm/iterators.md (VF): New mode iterator.
25370 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25371 Remove integer-related logic from pattern.
25372 (neon_vabd<mode>_3): Likewise.
25374 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25376 PR middle-end/82694
25377 * common.opt (fstrict-overflow): No longer an alias.
25378 (fwrapv-pointer): New option.
25379 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
25380 also for pointer types based on flag_wrapv_pointer.
25381 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
25382 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
25383 opts->x_flag_wrapv got set.
25384 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
25385 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
25386 POINTER_TYPE_OVERFLOW_UNDEFINED.
25387 * match.pd: Likewise in address comparison pattern.
25388 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
25390 2018-01-15 Richard Biener <rguenther@suse.de>
25393 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
25394 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
25395 Reset type names to their identifier if their TYPE_DECL doesn't
25396 have linkage (and thus is used for ODR and devirt).
25397 (save_debug_info_for_decl): Remove.
25398 (save_debug_info_for_type): Likewise.
25399 (add_tree_to_fld_list): Adjust.
25400 * tree-pretty-print.c (dump_generic_node): Make dumping of
25401 type names more robust.
25403 2018-01-15 Richard Biener <rguenther@suse.de>
25405 * BASE-VER: Bump to 8.0.1.
25407 2018-01-14 Martin Sebor <msebor@redhat.com>
25410 * builtins.c (check_access): Avoid warning when the no-warning bit
25413 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
25415 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
25416 * ira-color (allocno_hard_regs_compare): Likewise.
25418 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
25421 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
25422 Use .pushsection/.popsection.
25424 2018-01-14 Martin Sebor <msebor@redhat.com>
25427 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
25429 2018-01-14 Jakub Jelinek <jakub@redhat.com>
25431 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
25432 entry from extra_headers.
25433 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
25434 extra_headers, make the list bitwise identical to the i?86-*-* one.
25436 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25438 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
25439 -mcmodel=large with -mindirect-branch=thunk,
25440 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
25441 -mfunction-return=thunk-extern.
25442 * doc/invoke.texi: Document -mcmodel=large is incompatible with
25443 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
25444 -mfunction-return=thunk and -mfunction-return=thunk-extern.
25446 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25448 * config/i386/i386.c (print_reg): Print the name of the full
25449 integer register without '%'.
25450 (ix86_print_operand): Handle 'V'.
25451 * doc/extend.texi: Document 'V' modifier.
25453 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25455 * config/i386/constraints.md (Bs): Disallow memory operand for
25456 -mindirect-branch-register.
25458 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25459 (GOT_memory_operand): Likewise.
25460 (call_insn_operand): Likewise.
25461 (sibcall_insn_operand): Likewise.
25462 (GOT32_symbol_operand): Likewise.
25463 * config/i386/i386.md (indirect_jump): Call convert_memory_address
25464 for -mindirect-branch-register.
25465 (tablejump): Likewise.
25466 (*sibcall_memory): Likewise.
25467 (*sibcall_value_memory): Likewise.
25468 Disallow peepholes of indirect call and jump via memory for
25469 -mindirect-branch-register.
25470 (*call_pop): Replace m with Bw.
25471 (*call_value_pop): Likewise.
25472 (*sibcall_pop_memory): Replace m with Bs.
25473 * config/i386/i386.opt (mindirect-branch-register): New option.
25474 * doc/invoke.texi: Document -mindirect-branch-register option.
25476 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25478 * config/i386/i386-protos.h (ix86_output_function_return): New.
25479 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
25480 set function_return_type.
25481 (indirect_thunk_name): Add ret_p to indicate thunk for function
25483 (output_indirect_thunk_function): Pass false to
25484 indirect_thunk_name.
25485 (ix86_output_indirect_branch_via_reg): Likewise.
25486 (ix86_output_indirect_branch_via_push): Likewise.
25487 (output_indirect_thunk_function): Create alias for function
25488 return thunk if regno < 0.
25489 (ix86_output_function_return): New function.
25490 (ix86_handle_fndecl_attribute): Handle function_return.
25491 (ix86_attribute_table): Add function_return.
25492 * config/i386/i386.h (machine_function): Add
25493 function_return_type.
25494 * config/i386/i386.md (simple_return_internal): Use
25495 ix86_output_function_return.
25496 (simple_return_internal_long): Likewise.
25497 * config/i386/i386.opt (mfunction-return=): New option.
25498 (indirect_branch): Mention -mfunction-return=.
25499 * doc/extend.texi: Document function_return function attribute.
25500 * doc/invoke.texi: Document -mfunction-return= option.
25502 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25504 * config/i386/i386-opts.h (indirect_branch): New.
25505 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
25506 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
25507 with local indirect jump when converting indirect call and jump.
25508 (ix86_set_indirect_branch_type): New.
25509 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
25510 (indirectlabelno): New.
25511 (indirect_thunk_needed): Likewise.
25512 (indirect_thunk_bnd_needed): Likewise.
25513 (indirect_thunks_used): Likewise.
25514 (indirect_thunks_bnd_used): Likewise.
25515 (INDIRECT_LABEL): Likewise.
25516 (indirect_thunk_name): Likewise.
25517 (output_indirect_thunk): Likewise.
25518 (output_indirect_thunk_function): Likewise.
25519 (ix86_output_indirect_branch_via_reg): Likewise.
25520 (ix86_output_indirect_branch_via_push): Likewise.
25521 (ix86_output_indirect_branch): Likewise.
25522 (ix86_output_indirect_jmp): Likewise.
25523 (ix86_code_end): Call output_indirect_thunk_function if needed.
25524 (ix86_output_call_insn): Call ix86_output_indirect_branch if
25526 (ix86_handle_fndecl_attribute): Handle indirect_branch.
25527 (ix86_attribute_table): Add indirect_branch.
25528 * config/i386/i386.h (machine_function): Add indirect_branch_type
25529 and has_local_indirect_jump.
25530 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
25532 (tablejump): Likewise.
25533 (*indirect_jump): Use ix86_output_indirect_jmp.
25534 (*tablejump_1): Likewise.
25535 (simple_return_indirect_internal): Likewise.
25536 * config/i386/i386.opt (mindirect-branch=): New option.
25537 (indirect_branch): New.
25540 (thunk-inline): Likewise.
25541 (thunk-extern): Likewise.
25542 * doc/extend.texi: Document indirect_branch function attribute.
25543 * doc/invoke.texi: Document -mindirect-branch= option.
25545 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
25548 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
25550 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
25552 * ipa-inline.c (want_inline_small_function_p): Return false if
25553 inlining has already failed with CIF_FINAL_ERROR.
25554 (update_caller_keys): Call want_inline_small_function_p before
25556 (update_callee_keys): Likewise.
25558 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
25560 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
25562 (rs6000_quadword_masked_address_p): Likewise.
25563 (quad_aligned_load_p): Likewise.
25564 (quad_aligned_store_p): Likewise.
25565 (const_load_sequence_p): Add comment to describe the outer-most loop.
25566 (mimic_memory_attributes_and_flags): New function.
25567 (rs6000_gen_stvx): Likewise.
25568 (replace_swapped_aligned_store): Likewise.
25569 (rs6000_gen_lvx): Likewise.
25570 (replace_swapped_aligned_load): Likewise.
25571 (replace_swapped_load_constant): Capitalize argument name in
25572 comment describing this function.
25573 (rs6000_analyze_swaps): Add a third pass to search for vector loads
25574 and stores that access quad-word aligned addresses and replace
25575 with stvx or lvx instructions when appropriate.
25576 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
25577 New function prototype.
25578 (rs6000_quadword_masked_address_p): Likewise.
25579 (rs6000_gen_lvx): Likewise.
25580 (rs6000_gen_stvx): Likewise.
25581 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
25582 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
25583 when memory address is aligned.
25584 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
25585 this split to select lvx instruction when memory address is aligned.
25586 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
25587 instruction when memory address is aligned.
25588 (*vsx_le_perm_load_v16qi): Likewise.
25589 (four unnamed splitters): Modify to select the stvx instruction
25590 when memory is aligned.
25592 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
25594 * predict.c (determine_unlikely_bbs): Handle correctly BBs
25595 which appears in the queue multiple times.
25597 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25598 Alan Hayward <alan.hayward@arm.com>
25599 David Sherwood <david.sherwood@arm.com>
25601 * tree-vectorizer.h (vec_lower_bound): New structure.
25602 (_loop_vec_info): Add check_nonzero and lower_bounds.
25603 (LOOP_VINFO_CHECK_NONZERO): New macro.
25604 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
25605 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
25606 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
25607 fields. Make seg_len the distance travelled, not including the
25609 (dr_direction_indicator): Declare.
25610 (dr_zero_step_indicator): Likewise.
25611 (dr_known_forward_stride_p): Likewise.
25612 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
25614 (runtime_alias_check_p): Allow runtime alias checks with
25616 (operator ==): Compare access_size and align.
25617 (prune_runtime_alias_test_list): Rework for new distinction between
25618 the access_size and seg_len.
25619 (create_intersect_range_checks_index): Likewise. Cope with polynomial
25621 (get_segment_min_max): New function.
25622 (create_intersect_range_checks): Use it.
25623 (dr_step_indicator): New function.
25624 (dr_direction_indicator): Likewise.
25625 (dr_zero_step_indicator): Likewise.
25626 (dr_known_forward_stride_p): Likewise.
25627 * tree-loop-distribution.c (data_ref_segment_size): Return
25628 DR_STEP * (niters - 1).
25629 (compute_alias_check_pairs): Update call to the dr_with_seg_len
25631 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
25632 (vect_preserves_scalar_order_p): New function, split out from...
25633 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
25634 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
25635 (vect_vfa_access_size): New function.
25636 (vect_vfa_align): Likewise.
25637 (vect_compile_time_alias): Take access_size_a and access_b arguments.
25638 (dump_lower_bound): New function.
25639 (vect_check_lower_bound): Likewise.
25640 (vect_small_gap_p): Likewise.
25641 (vectorizable_with_step_bound_p): Likewise.
25642 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
25643 depencies if the vectorization factor is 1. Convert the checks
25644 for nonzero steps into checks on the bounds of DR_STEP. Try using
25645 a bunds check for variable steps if the minimum required step is
25646 relatively small. Update calls to the dr_with_seg_len
25647 constructor and to vect_compile_time_alias.
25648 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
25650 (vect_loop_versioning): Call it.
25651 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
25653 (vect_estimate_min_profitable_iters): Account for any bounds checks.
25655 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25656 Alan Hayward <alan.hayward@arm.com>
25657 David Sherwood <david.sherwood@arm.com>
25659 * doc/sourcebuild.texi (vect_scatter_store): Document.
25660 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
25662 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
25664 * genopinit.c (main): Add supports_vec_scatter_store and
25665 supports_vec_scatter_store_cached to target_optabs.
25666 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
25667 IFN_MASK_SCATTER_STORE.
25668 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
25670 * internal-fn.h (internal_store_fn_p): Declare.
25671 (internal_fn_stored_value_index): Likewise.
25672 * internal-fn.c (scatter_store_direct): New macro.
25673 (expand_scatter_store_optab_fn): New function.
25674 (direct_scatter_store_optab_supported_p): New macro.
25675 (internal_store_fn_p): New function.
25676 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
25677 IFN_MASK_SCATTER_STORE.
25678 (internal_fn_mask_index): Likewise.
25679 (internal_fn_stored_value_index): New function.
25680 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
25681 for scatter stores.
25682 * optabs-query.h (supports_vec_scatter_store_p): Declare.
25683 * optabs-query.c (supports_vec_scatter_store_p): New function.
25684 * tree-vectorizer.h (vect_get_store_rhs): Declare.
25685 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
25686 true for scatter stores.
25687 (vect_gather_scatter_fn_p): Handle scatter stores too.
25688 (vect_check_gather_scatter): Consider using scatter stores if
25689 supports_vec_scatter_store_p.
25690 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
25691 scatter stores too.
25692 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25693 internal_fn_stored_value_index.
25694 (check_load_store_masking): Handle scatter stores too.
25695 (vect_get_store_rhs): Make public.
25696 (vectorizable_call): Use internal_store_fn_p.
25697 (vectorizable_store): Handle scatter store internal functions.
25698 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
25699 when deciding whether the end of the group has been reached.
25700 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
25701 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
25702 (mask_scatter_store<mode>): New insns.
25704 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25705 Alan Hayward <alan.hayward@arm.com>
25706 David Sherwood <david.sherwood@arm.com>
25708 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
25709 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
25710 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
25712 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
25713 Use vect_truncate_gather_scatter_offset if we can't treat the
25714 operation as a normal gather load or scatter store.
25715 (get_group_load_store_type): Take the gather_scatter_info
25716 as argument. Try using a gather load or scatter store for
25717 single-element groups.
25718 (get_load_store_type): Update calls to get_group_load_store_type
25719 and vect_use_strided_gather_scatters_p.
25721 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25722 Alan Hayward <alan.hayward@arm.com>
25723 David Sherwood <david.sherwood@arm.com>
25725 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
25726 optional tree argument.
25727 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
25729 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
25730 but continue to use the current value as a fallback.
25731 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
25732 to compare the updates.
25733 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
25734 (get_load_store_type): Use it when handling a strided access.
25735 (vect_get_strided_load_store_ops): New function.
25736 (vect_get_data_ptr_increment): Likewise.
25737 (vectorizable_load): Handle strided gather loads. Always pass
25738 a step to vect_create_data_ref_ptr and bump_vector_ptr.
25740 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25741 Alan Hayward <alan.hayward@arm.com>
25742 David Sherwood <david.sherwood@arm.com>
25744 * doc/md.texi (gather_load@var{m}): Document.
25745 (mask_gather_load@var{m}): Likewise.
25746 * genopinit.c (main): Add supports_vec_gather_load and
25747 supports_vec_gather_load_cached to target_optabs.
25748 * optabs-tree.c (init_tree_optimization_optabs): Use
25749 ggc_cleared_alloc to allocate target_optabs.
25750 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
25751 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
25753 * internal-fn.h (internal_load_fn_p): Declare.
25754 (internal_gather_scatter_fn_p): Likewise.
25755 (internal_fn_mask_index): Likewise.
25756 (internal_gather_scatter_fn_supported_p): Likewise.
25757 * internal-fn.c (gather_load_direct): New macro.
25758 (expand_gather_load_optab_fn): New function.
25759 (direct_gather_load_optab_supported_p): New macro.
25760 (direct_internal_fn_optab): New function.
25761 (internal_load_fn_p): Likewise.
25762 (internal_gather_scatter_fn_p): Likewise.
25763 (internal_fn_mask_index): Likewise.
25764 (internal_gather_scatter_fn_supported_p): Likewise.
25765 * optabs-query.c (supports_at_least_one_mode_p): New function.
25766 (supports_vec_gather_load_p): Likewise.
25767 * optabs-query.h (supports_vec_gather_load_p): Declare.
25768 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
25769 and memory_type field.
25770 (NUM_PATTERNS): Bump to 15.
25771 * tree-vect-data-refs.c: Include internal-fn.h.
25772 (vect_gather_scatter_fn_p): New function.
25773 (vect_describe_gather_scatter_call): Likewise.
25774 (vect_check_gather_scatter): Try using internal functions for
25775 gather loads. Recognize existing calls to a gather load function.
25776 (vect_analyze_data_refs): Consider using gather loads if
25777 supports_vec_gather_load_p.
25778 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
25779 (vect_get_gather_scatter_offset_type): Likewise.
25780 (vect_convert_mask_for_vectype): Likewise.
25781 (vect_add_conversion_to_patterm): Likewise.
25782 (vect_try_gather_scatter_pattern): Likewise.
25783 (vect_recog_gather_scatter_pattern): New pattern recognizer.
25784 (vect_vect_recog_func_ptrs): Add it.
25785 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25786 internal_fn_mask_index and internal_gather_scatter_fn_p.
25787 (check_load_store_masking): Take the gather_scatter_info as an
25788 argument and handle gather loads.
25789 (vect_get_gather_scatter_ops): New function.
25790 (vectorizable_call): Check internal_load_fn_p.
25791 (vectorizable_load): Likewise. Handle gather load internal
25793 (vectorizable_store): Update call to check_load_store_masking.
25794 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
25795 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
25796 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
25797 (aarch64_gather_scale_operand_d): New predicates.
25798 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
25799 (mask_gather_load<mode>): New insns.
25801 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25802 Alan Hayward <alan.hayward@arm.com>
25803 David Sherwood <david.sherwood@arm.com>
25805 * optabs.def (fold_left_plus_optab): New optab.
25806 * doc/md.texi (fold_left_plus_@var{m}): Document.
25807 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
25808 * internal-fn.c (fold_left_direct): Define.
25809 (expand_fold_left_optab_fn): Likewise.
25810 (direct_fold_left_optab_supported_p): Likewise.
25811 * fold-const-call.c (fold_const_fold_left): New function.
25812 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
25813 * tree-parloops.c (valid_reduction_p): New function.
25814 (gather_scalar_reductions): Use it.
25815 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
25816 (vect_finish_replace_stmt): Declare.
25817 * tree-vect-loop.c (fold_left_reduction_fn): New function.
25818 (needs_fold_left_reduction_p): New function, split out from...
25819 (vect_is_simple_reduction): ...here. Accept reductions that
25820 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
25821 (vect_force_simple_reduction): Also store the reduction type in
25822 the assignment's STMT_VINFO_REDUC_TYPE.
25823 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
25824 (merge_with_identity): New function.
25825 (vect_expand_fold_left): Likewise.
25826 (vectorize_fold_left_reduction): Likewise.
25827 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
25828 scalar phi in place for it. Check for target support and reject
25829 cases that would reassociate the operation. Defer the transform
25830 phase to vectorize_fold_left_reduction.
25831 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
25832 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
25833 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
25835 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25837 * tree-if-conv.c (predicate_mem_writes): Remove redundant
25838 call to ifc_temp_var.
25840 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25841 Alan Hayward <alan.hayward@arm.com>
25842 David Sherwood <david.sherwood@arm.com>
25844 * target.def (legitimize_address_displacement): Take the original
25845 offset as a poly_int.
25846 * targhooks.h (default_legitimize_address_displacement): Update
25848 * targhooks.c (default_legitimize_address_displacement): Likewise.
25849 * doc/tm.texi: Regenerate.
25850 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
25851 as an argument, moving assert of ad->disp == ad->disp_term to...
25852 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
25853 Try calling targetm.legitimize_address_displacement before expanding
25854 the address rather than afterwards, and adjust for the new interface.
25855 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
25856 Match the new hook interface. Handle SVE addresses.
25857 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
25858 new hook interface.
25860 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25862 * Makefile.in (OBJS): Add early-remat.o.
25863 * target.def (select_early_remat_modes): New hook.
25864 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
25865 * doc/tm.texi: Regenerate.
25866 * targhooks.h (default_select_early_remat_modes): Declare.
25867 * targhooks.c (default_select_early_remat_modes): New function.
25868 * timevar.def (TV_EARLY_REMAT): New timevar.
25869 * passes.def (pass_early_remat): New pass.
25870 * tree-pass.h (make_pass_early_remat): Declare.
25871 * early-remat.c: New file.
25872 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
25874 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
25876 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25877 Alan Hayward <alan.hayward@arm.com>
25878 David Sherwood <david.sherwood@arm.com>
25880 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
25881 vfm1 with a bound_epilog parameter.
25882 (vect_do_peeling): Update calls accordingly, and move the prologue
25883 call earlier in the function. Treat the base bound_epilog as 0 for
25884 fully-masked loops and retain vf - 1 for other loops. Add 1 to
25885 this base when peeling for gaps.
25886 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
25887 with fully-masked loops.
25888 (vect_estimate_min_profitable_iters): Handle the single peeled
25889 iteration in that case.
25891 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25892 Alan Hayward <alan.hayward@arm.com>
25893 David Sherwood <david.sherwood@arm.com>
25895 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
25896 single-element interleaving even if the size is not a power of 2.
25897 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
25898 accesses for single-element interleaving if the group size is
25901 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25902 Alan Hayward <alan.hayward@arm.com>
25903 David Sherwood <david.sherwood@arm.com>
25905 * doc/md.texi (fold_extract_last_@var{m}): Document.
25906 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
25907 * optabs.def (fold_extract_last_optab): New optab.
25908 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
25909 * internal-fn.c (fold_extract_direct): New macro.
25910 (expand_fold_extract_optab_fn): Likewise.
25911 (direct_fold_extract_optab_supported_p): Likewise.
25912 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
25913 * tree-vect-loop.c (vect_model_reduction_cost): Handle
25914 EXTRACT_LAST_REDUCTION.
25915 (get_initial_def_for_reduction): Do not create an initial vector
25916 for EXTRACT_LAST_REDUCTION reductions.
25917 (vectorizable_reduction): Leave the scalar phi in place for
25918 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
25919 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
25920 epilogue code for EXTRACT_LAST_REDUCTION and defer the
25921 transform phase to vectorizable_condition.
25922 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
25924 (vect_finish_stmt_generation): ...here.
25925 (vect_finish_replace_stmt): New function.
25926 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
25927 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
25929 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
25931 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25932 Alan Hayward <alan.hayward@arm.com>
25933 David Sherwood <david.sherwood@arm.com>
25935 * doc/md.texi (extract_last_@var{m}): Document.
25936 * optabs.def (extract_last_optab): New optab.
25937 * internal-fn.def (EXTRACT_LAST): New internal function.
25938 * internal-fn.c (cond_unary_direct): New macro.
25939 (expand_cond_unary_optab_fn): Likewise.
25940 (direct_cond_unary_optab_supported_p): Likewise.
25941 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
25942 loops using EXTRACT_LAST.
25943 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
25944 (extract_last_<mode>): ...this optab.
25945 (vec_extract<mode><Vel>): Update accordingly.
25947 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25948 Alan Hayward <alan.hayward@arm.com>
25949 David Sherwood <david.sherwood@arm.com>
25951 * target.def (empty_mask_is_expensive): New hook.
25952 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
25953 * doc/tm.texi: Regenerate.
25954 * targhooks.h (default_empty_mask_is_expensive): Declare.
25955 * targhooks.c (default_empty_mask_is_expensive): New function.
25956 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
25957 if the target says that empty masks are expensive.
25958 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
25960 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
25962 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25963 Alan Hayward <alan.hayward@arm.com>
25964 David Sherwood <david.sherwood@arm.com>
25966 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
25967 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
25968 (vect_use_loop_mask_for_alignment_p): New function.
25969 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
25970 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
25971 niters_skip argument. Make sure that the first niters_skip elements
25972 of the first iteration are inactive.
25973 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
25974 Update call to vect_set_loop_masks_directly.
25975 (get_misalign_in_elems): New function, split out from...
25976 (vect_gen_prolog_loop_niters): ...here.
25977 (vect_update_init_of_dr): Take a code argument that specifies whether
25978 the adjustment should be added or subtracted.
25979 (vect_update_init_of_drs): Likewise.
25980 (vect_prepare_for_masked_peels): New function.
25981 (vect_do_peeling): Skip prologue peeling if we're using a mask
25982 instead. Update call to vect_update_inits_of_drs.
25983 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25985 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
25986 alignment. Do not include the number of peeled iterations in
25987 the minimum threshold in that case.
25988 (vectorizable_induction): Adjust the start value down by
25989 LOOP_VINFO_MASK_SKIP_NITERS iterations.
25990 (vect_transform_loop): Call vect_prepare_for_masked_peels.
25991 Take the number of skipped iterations into account when calculating
25993 * tree-vect-stmts.c (vect_gen_while_not): New function.
25995 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25996 Alan Hayward <alan.hayward@arm.com>
25997 David Sherwood <david.sherwood@arm.com>
25999 * doc/sourcebuild.texi (vect_fully_masked): Document.
26000 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
26001 default value to 0.
26002 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
26004 (vect_analyze_loop_2): ...here. Don't check the vectorization
26005 factor against the number of loop iterations if the loop is
26008 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26009 Alan Hayward <alan.hayward@arm.com>
26010 David Sherwood <david.sherwood@arm.com>
26012 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
26013 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
26014 (dump_groups): Update accordingly.
26015 (iv_use::mem_type): New member variable.
26016 (address_p): New function.
26017 (record_use): Add a mem_type argument and initialize the new
26019 (record_group_use): Add a mem_type argument. Use address_p.
26020 Remove obsolete null checks of base_object. Update call to record_use.
26021 (find_interesting_uses_op): Update call to record_group_use.
26022 (find_interesting_uses_cond): Likewise.
26023 (find_interesting_uses_address): Likewise.
26024 (get_mem_type_for_internal_fn): New function.
26025 (find_address_like_use): Likewise.
26026 (find_interesting_uses_stmt): Try find_address_like_use before
26027 calling find_interesting_uses_op.
26028 (addr_offset_valid_p): Use the iv mem_type field as the type
26029 of the addressed memory.
26030 (add_autoinc_candidates): Likewise.
26031 (get_address_cost): Likewise.
26032 (split_small_address_groups_p): Use address_p.
26033 (split_address_groups): Likewise.
26034 (add_iv_candidate_for_use): Likewise.
26035 (autoinc_possible_for_pair): Likewise.
26036 (rewrite_groups): Likewise.
26037 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
26038 (determine_group_iv_cost): Update after split of USE_ADDRESS.
26039 (get_alias_ptr_type_for_ptr_address): New function.
26040 (rewrite_use_address): Rewrite address uses in calls that were
26041 identified by find_address_like_use.
26043 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26044 Alan Hayward <alan.hayward@arm.com>
26045 David Sherwood <david.sherwood@arm.com>
26047 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
26049 * gimple-expr.h (is_gimple_addressable: Likewise.
26050 * gimple-expr.c (is_gimple_address): Likewise.
26051 * internal-fn.c (expand_call_mem_ref): New function.
26052 (expand_mask_load_optab_fn): Use it.
26053 (expand_mask_store_optab_fn): Likewise.
26055 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26056 Alan Hayward <alan.hayward@arm.com>
26057 David Sherwood <david.sherwood@arm.com>
26059 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
26060 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
26061 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
26062 (cond_umax@var{mode}): Document.
26063 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
26064 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
26065 (cond_umin_optab, cond_umax_optab): New optabs.
26066 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
26067 (COND_IOR, COND_XOR): New internal functions.
26068 * internal-fn.h (get_conditional_internal_fn): Declare.
26069 * internal-fn.c (cond_binary_direct): New macro.
26070 (expand_cond_binary_optab_fn): Likewise.
26071 (direct_cond_binary_optab_supported_p): Likewise.
26072 (get_conditional_internal_fn): New function.
26073 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
26074 Cope with reduction statements that are vectorized as calls rather
26076 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
26077 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
26078 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
26079 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
26080 (UNSPEC_COND_EOR): New unspecs.
26081 (optab): Add mappings for them.
26082 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
26083 (sve_int_op, sve_fp_op): New int attributes.
26085 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26086 Alan Hayward <alan.hayward@arm.com>
26087 David Sherwood <david.sherwood@arm.com>
26089 * optabs.def (while_ult_optab): New optab.
26090 * doc/md.texi (while_ult@var{m}@var{n}): Document.
26091 * internal-fn.def (WHILE_ULT): New internal function.
26092 * internal-fn.h (direct_internal_fn_supported_p): New override
26093 that takes two types as argument.
26094 * internal-fn.c (while_direct): New macro.
26095 (expand_while_optab_fn): New function.
26096 (convert_optab_supported_p): Likewise.
26097 (direct_while_optab_supported_p): New macro.
26098 * wide-int.h (wi::udiv_ceil): New function.
26099 * tree-vectorizer.h (rgroup_masks): New structure.
26100 (vec_loop_masks): New typedef.
26101 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
26102 and fully_masked_p.
26103 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
26104 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
26105 (vect_max_vf): New function.
26106 (slpeel_make_loop_iterate_ntimes): Delete.
26107 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
26108 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
26109 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
26110 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
26111 internal-fn.h, stor-layout.h and optabs-query.h.
26112 (vect_set_loop_mask): New function.
26113 (add_preheader_seq): Likewise.
26114 (add_header_seq): Likewise.
26115 (interleave_supported_p): Likewise.
26116 (vect_maybe_permute_loop_masks): Likewise.
26117 (vect_set_loop_masks_directly): Likewise.
26118 (vect_set_loop_condition_masked): Likewise.
26119 (vect_set_loop_condition_unmasked): New function, split out from
26120 slpeel_make_loop_iterate_ntimes.
26121 (slpeel_make_loop_iterate_ntimes): Rename to..
26122 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
26123 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
26124 (vect_do_peeling): Update call accordingly.
26125 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
26127 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26128 mask_compare_type, can_fully_mask_p and fully_masked_p.
26129 (release_vec_loop_masks): New function.
26130 (_loop_vec_info): Use it to free the loop masks.
26131 (can_produce_all_loop_masks_p): New function.
26132 (vect_get_max_nscalars_per_iter): Likewise.
26133 (vect_verify_full_masking): Likewise.
26134 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
26135 retries, and free the mask rgroups before retrying. Check loop-wide
26136 reasons for disallowing fully-masked loops. Make the final decision
26137 about whether use a fully-masked loop or not.
26138 (vect_estimate_min_profitable_iters): Do not assume that peeling
26139 for the number of iterations will be needed for fully-masked loops.
26140 (vectorizable_reduction): Disable fully-masked loops.
26141 (vectorizable_live_operation): Likewise.
26142 (vect_halve_mask_nunits): New function.
26143 (vect_double_mask_nunits): Likewise.
26144 (vect_record_loop_mask): Likewise.
26145 (vect_get_loop_mask): Likewise.
26146 (vect_transform_loop): Handle the case in which the final loop
26147 iteration might handle a partial vector. Call vect_set_loop_condition
26148 instead of slpeel_make_loop_iterate_ntimes.
26149 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
26150 (check_load_store_masking): New function.
26151 (prepare_load_store_mask): Likewise.
26152 (vectorizable_store): Handle fully-masked loops.
26153 (vectorizable_load): Likewise.
26154 (supportable_widening_operation): Use vect_halve_mask_nunits for
26156 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
26157 (vect_gen_while): New function.
26158 * config/aarch64/aarch64.md (umax<mode>3): New expander.
26159 (aarch64_uqdec<mode>): New insn.
26161 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26162 Alan Hayward <alan.hayward@arm.com>
26163 David Sherwood <david.sherwood@arm.com>
26165 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
26166 (reduc_xor_scal_optab): New optabs.
26167 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
26168 (reduc_xor_scal_@var{m}): Document.
26169 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
26170 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
26171 internal functions.
26172 * fold-const-call.c (fold_const_call): Handle them.
26173 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
26174 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
26175 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
26176 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
26177 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
26178 (UNSPEC_XORV): New unspecs.
26179 (optab): Add entries for them.
26180 (BITWISEV): New int iterator.
26181 (bit_reduc_op): New int attributes.
26183 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26184 Alan Hayward <alan.hayward@arm.com>
26185 David Sherwood <david.sherwood@arm.com>
26187 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
26188 * internal-fn.def (VEC_SHL_INSERT): New internal function.
26189 * optabs.def (vec_shl_insert_optab): New optab.
26190 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
26191 (duplicate_and_interleave): Likewise.
26192 * tree-vect-loop.c: Include internal-fn.h.
26193 (neutral_op_for_slp_reduction): New function, split out from
26194 get_initial_defs_for_reduction.
26195 (get_initial_def_for_reduction): Handle option 2 for variable-length
26196 vectors by loading the neutral value into a vector and then shifting
26197 the initial value into element 0.
26198 (get_initial_defs_for_reduction): Replace the code argument with
26199 the neutral value calculated by neutral_op_for_slp_reduction.
26200 Use gimple_build_vector for constant-length vectors.
26201 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
26202 but the first group_size elements have a neutral value.
26203 Use duplicate_and_interleave otherwise.
26204 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
26205 Update call to get_initial_defs_for_reduction. Handle SLP
26206 reductions for variable-length vectors by creating one vector
26207 result for each scalar result, with the elements associated
26208 with other scalar results stubbed out with the neutral value.
26209 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
26210 Require IFN_VEC_SHL_INSERT for double reductions on
26211 variable-length vectors, or SLP reductions that have
26212 a neutral value. Require can_duplicate_and_interleave_p
26213 support for variable-length unchained SLP reductions if there
26214 is no neutral value, such as for MIN/MAX reductions. Also require
26215 the number of vector elements to be a multiple of the number of
26216 SLP statements when doing variable-length unchained SLP reductions.
26217 Update call to vect_create_epilog_for_reduction.
26218 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
26219 and remove initial values.
26220 (duplicate_and_interleave): Make public.
26221 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
26222 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
26224 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26225 Alan Hayward <alan.hayward@arm.com>
26226 David Sherwood <david.sherwood@arm.com>
26228 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
26229 (can_duplicate_and_interleave_p): New function.
26230 (vect_get_and_check_slp_defs): Take the vector of statements
26231 rather than just the current one. Remove excess parentheses.
26232 Restriction rejectinon of vect_constant_def and vect_external_def
26233 for variable-length vectors to boolean types, or types for which
26234 can_duplicate_and_interleave_p is false.
26235 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
26236 (duplicate_and_interleave): New function.
26237 (vect_get_constant_vectors): Use gimple_build_vector for
26238 constant-length vectors and suitable variable-length constant
26239 vectors. Use duplicate_and_interleave for other variable-length
26240 vectors. Don't defer the update when inserting new statements.
26242 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26243 Alan Hayward <alan.hayward@arm.com>
26244 David Sherwood <david.sherwood@arm.com>
26246 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
26247 min_profitable_iters doesn't go negative.
26249 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26250 Alan Hayward <alan.hayward@arm.com>
26251 David Sherwood <david.sherwood@arm.com>
26253 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
26254 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
26255 * optabs.def (vec_mask_load_lanes_optab): New optab.
26256 (vec_mask_store_lanes_optab): Likewise.
26257 * internal-fn.def (MASK_LOAD_LANES): New internal function.
26258 (MASK_STORE_LANES): Likewise.
26259 * internal-fn.c (mask_load_lanes_direct): New macro.
26260 (mask_store_lanes_direct): Likewise.
26261 (expand_mask_load_optab_fn): Handle masked operations.
26262 (expand_mask_load_lanes_optab_fn): New macro.
26263 (expand_mask_store_optab_fn): Handle masked operations.
26264 (expand_mask_store_lanes_optab_fn): New macro.
26265 (direct_mask_load_lanes_optab_supported_p): Likewise.
26266 (direct_mask_store_lanes_optab_supported_p): Likewise.
26267 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26269 (vect_load_lanes_supported): Likewise.
26270 * tree-vect-data-refs.c (strip_conversion): New function.
26271 (can_group_stmts_p): Likewise.
26272 (vect_analyze_data_ref_accesses): Use it instead of checking
26273 for a pair of assignments.
26274 (vect_store_lanes_supported): Take a masked_p parameter.
26275 (vect_load_lanes_supported): Likewise.
26276 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26277 vect_store_lanes_supported and vect_load_lanes_supported.
26278 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26279 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26280 parameter. Don't allow gaps for masked accesses.
26281 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
26282 and vect_load_lanes_supported.
26283 (get_load_store_type): Take a masked_p parameter and update
26284 call to get_group_load_store_type.
26285 (vectorizable_store): Update call to get_load_store_type.
26286 Handle IFN_MASK_STORE_LANES.
26287 (vectorizable_load): Update call to get_load_store_type.
26288 Handle IFN_MASK_LOAD_LANES.
26290 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26291 Alan Hayward <alan.hayward@arm.com>
26292 David Sherwood <david.sherwood@arm.com>
26294 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26296 * config/aarch64/aarch64-protos.h
26297 (aarch64_sve_struct_memory_operand_p): Declare.
26298 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26299 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26300 (VPRED, vpred): Handle SVE structure modes.
26301 * config/aarch64/constraints.md (Utx): New constraint.
26302 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26303 (aarch64_sve_struct_nonimmediate_operand): New predicates.
26304 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26305 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26306 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26307 structure modes. Split into pieces after RA.
26308 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26309 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26311 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26312 SVE structure modes.
26313 (aarch64_classify_address): Likewise.
26314 (sizetochar): Move earlier in file.
26315 (aarch64_print_operand): Handle SVE register lists.
26316 (aarch64_array_mode): New function.
26317 (aarch64_sve_struct_memory_operand_p): Likewise.
26318 (TARGET_ARRAY_MODE): Redefine.
26320 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26321 Alan Hayward <alan.hayward@arm.com>
26322 David Sherwood <david.sherwood@arm.com>
26324 * target.def (array_mode): New target hook.
26325 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26326 * doc/tm.texi: Regenerate.
26327 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26328 * hooks.c (hook_optmode_mode_uhwi_none): New function.
26329 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26330 targetm.array_mode.
26331 * stor-layout.c (mode_for_array): Likewise. Support polynomial
26334 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26335 Alan Hayward <alan.hayward@arm.com>
26336 David Sherwood <david.sherwood@arm.com>
26338 * fold-const.c (fold_binary_loc): Check the argument types
26339 rather than the result type when testing for a vector operation.
26341 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26343 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26344 * doc/tm.texi: Regenerate.
26346 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26347 Alan Hayward <alan.hayward@arm.com>
26348 David Sherwood <david.sherwood@arm.com>
26350 * doc/invoke.texi (-msve-vector-bits=): Document new option.
26351 (sve): Document new AArch64 extension.
26352 * doc/md.texi (w): Extend the description of the AArch64
26353 constraint to include SVE vectors.
26354 (Upl, Upa): Document new AArch64 predicate constraints.
26355 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26357 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26358 (msve-vector-bits=): New option.
26359 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26360 SVE when these are disabled.
26361 (sve): New extension.
26362 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26363 modes. Adjust their number of units based on aarch64_sve_vg.
26364 (MAX_BITSIZE_MODE_ANY_MODE): Define.
26365 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26366 aarch64_addr_query_type.
26367 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26368 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26369 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26370 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26371 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26372 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26373 (aarch64_simd_imm_zero_p): Delete.
26374 (aarch64_check_zero_based_sve_index_immediate): Declare.
26375 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26376 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26377 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26378 (aarch64_sve_float_mul_immediate_p): Likewise.
26379 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26380 rather than an rtx.
26381 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
26382 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
26383 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
26384 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
26385 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
26386 (aarch64_regmode_natural_size): Likewise.
26387 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
26388 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
26390 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
26391 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
26392 for VG and the SVE predicate registers.
26393 (V_ALIASES): Add a "z"-prefixed alias.
26394 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
26395 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
26396 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
26397 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
26398 (REG_CLASS_NAMES): Add entries for them.
26399 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
26400 and the predicate registers.
26401 (aarch64_sve_vg): Declare.
26402 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
26403 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
26404 (REGMODE_NATURAL_SIZE): Define.
26405 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
26407 * config/aarch64/aarch64.c: Include cfgrtl.h.
26408 (simd_immediate_info): Add a constructor for series vectors,
26409 and an associated step field.
26410 (aarch64_sve_vg): New variable.
26411 (aarch64_dbx_register_number): Handle VG and the predicate registers.
26412 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
26413 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
26414 (VEC_ANY_DATA, VEC_STRUCT): New constants.
26415 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
26416 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
26417 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
26418 (aarch64_get_mask_mode): New functions.
26419 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
26420 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
26421 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
26422 predicate modes and predicate registers. Explicitly restrict
26423 GPRs to modes of 16 bytes or smaller. Only allow FP registers
26424 to store a vector mode if it is recognized by
26425 aarch64_classify_vector_mode.
26426 (aarch64_regmode_natural_size): New function.
26427 (aarch64_hard_regno_caller_save_mode): Return the original mode
26429 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
26430 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
26431 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
26432 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
26434 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
26435 does not overlap dest if the function is frame-related. Handle
26437 (aarch64_split_add_offset): New function.
26438 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
26439 them aarch64_add_offset.
26440 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
26441 and update call to aarch64_sub_sp.
26442 (aarch64_add_cfa_expression): New function.
26443 (aarch64_expand_prologue): Pass extra temporary registers to the
26444 functions above. Handle the case in which we need to emit new
26445 DW_CFA_expressions for registers that were originally saved
26446 relative to the stack pointer, but now have to be expressed
26447 relative to the frame pointer.
26448 (aarch64_output_mi_thunk): Pass extra temporary registers to the
26450 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
26451 IP0 and IP1 values for SVE frames.
26452 (aarch64_expand_vec_series): New function.
26453 (aarch64_expand_sve_widened_duplicate): Likewise.
26454 (aarch64_expand_sve_const_vector): Likewise.
26455 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
26456 Handle SVE constants. Use emit_move_insn to move a force_const_mem
26457 into the register, rather than emitting a SET directly.
26458 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
26459 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
26460 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
26461 (offset_9bit_signed_scaled_p): New functions.
26462 (aarch64_replicate_bitmask_imm): New function.
26463 (aarch64_bitmask_imm): Use it.
26464 (aarch64_cannot_force_const_mem): Reject expressions involving
26465 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
26466 (aarch64_classify_index): Handle SVE indices, by requiring
26467 a plain register index with a scale that matches the element size.
26468 (aarch64_classify_address): Handle SVE addresses. Assert that
26469 the mode of the address is VOIDmode or an integer mode.
26470 Update call to aarch64_classify_symbol.
26471 (aarch64_classify_symbolic_expression): Update call to
26472 aarch64_classify_symbol.
26473 (aarch64_const_vec_all_in_range_p): New function.
26474 (aarch64_print_vector_float_operand): Likewise.
26475 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
26476 "vN" for FP registers with SVE modes. Handle (const ...) vectors
26477 and the FP immediates 1.0 and 0.5.
26478 (aarch64_print_address_internal): Handle SVE addresses.
26479 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
26480 (aarch64_regno_regclass): Handle predicate registers.
26481 (aarch64_secondary_reload): Handle big-endian reloads of SVE
26483 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
26484 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
26485 (aarch64_convert_sve_vector_bits): New function.
26486 (aarch64_override_options): Use it to handle -msve-vector-bits=.
26487 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26488 rather than an rtx.
26489 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
26490 Handle SVE vector and predicate modes. Accept VL-based constants
26491 that need only one temporary register, and VL offsets that require
26492 no temporary registers.
26493 (aarch64_conditional_register_usage): Mark the predicate registers
26494 as fixed if SVE isn't available.
26495 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
26496 Return true for SVE vector and predicate modes.
26497 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
26498 rather than an unsigned int. Handle SVE modes.
26499 (aarch64_preferred_simd_mode): Update call accordingly. Handle
26501 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
26503 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26504 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26505 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26506 (aarch64_sve_float_mul_immediate_p): New functions.
26507 (aarch64_sve_valid_immediate): New function.
26508 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
26509 Explicitly reject structure modes. Check for INDEX constants.
26510 Handle PTRUE and PFALSE constants.
26511 (aarch64_check_zero_based_sve_index_immediate): New function.
26512 (aarch64_simd_imm_zero_p): Delete.
26513 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
26514 vector modes. Accept constants in the range of CNT[BHWD].
26515 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
26516 ask for an Advanced SIMD mode.
26517 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
26518 (aarch64_simd_vector_alignment): Handle SVE predicates.
26519 (aarch64_vectorize_preferred_vector_alignment): New function.
26520 (aarch64_simd_vector_alignment_reachable): Use it instead of
26522 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
26523 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
26525 (MAX_VECT_LEN): Delete.
26526 (expand_vec_perm_d): Add a vec_flags field.
26527 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
26528 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
26529 (aarch64_evpc_ext): Don't apply a big-endian lane correction
26531 (aarch64_evpc_rev): Rename to...
26532 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
26533 (aarch64_evpc_rev_global): New function.
26534 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
26535 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
26537 (aarch64_evpc_sve_tbl): New function.
26538 (aarch64_expand_vec_perm_const_1): Update after rename of
26539 aarch64_evpc_rev. Handle SVE permutes too, trying
26540 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
26541 than aarch64_evpc_tbl.
26542 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
26543 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
26544 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
26545 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
26546 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
26547 (aarch64_expand_sve_vcond): New functions.
26548 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
26549 of aarch64_vector_mode_p.
26550 (aarch64_dwarf_poly_indeterminate_value): New function.
26551 (aarch64_compute_pressure_classes): Likewise.
26552 (aarch64_can_change_mode_class): Likewise.
26553 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
26554 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
26555 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
26556 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
26557 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
26558 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
26559 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
26560 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
26562 (Dn, Dl, Dr): Accept const as well as const_vector.
26563 (Dz): Likewise. Compare against CONST0_RTX.
26564 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
26565 of "vector" where appropriate.
26566 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
26567 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
26568 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
26569 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
26570 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
26571 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
26572 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
26573 (v_int_equiv): Extend to SVE modes.
26574 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
26576 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
26577 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
26578 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
26579 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
26580 (SVE_COND_FP_CMP): New int iterators.
26581 (perm_hilo): Handle the new unpack unspecs.
26582 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
26584 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
26585 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
26586 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
26587 (aarch64_equality_operator, aarch64_constant_vector_operand)
26588 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
26589 (aarch64_sve_nonimmediate_operand): Likewise.
26590 (aarch64_sve_general_operand): Likewise.
26591 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
26592 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
26593 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
26594 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
26595 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
26596 (aarch64_sve_float_arith_immediate): Likewise.
26597 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
26598 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
26599 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
26600 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
26601 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
26602 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
26603 (aarch64_sve_float_arith_operand): Likewise.
26604 (aarch64_sve_float_arith_with_sub_operand): Likewise.
26605 (aarch64_sve_float_mul_operand): Likewise.
26606 (aarch64_sve_vec_perm_operand): Likewise.
26607 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
26608 (aarch64_mov_operand): Accept const_poly_int and const_vector.
26609 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
26610 as well as const_vector.
26611 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
26612 in file. Use CONST0_RTX and CONSTM1_RTX.
26613 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
26614 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
26615 Use aarch64_simd_imm_zero.
26616 * config/aarch64/aarch64-sve.md: New file.
26617 * config/aarch64/aarch64.md: Include it.
26618 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
26619 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
26620 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
26621 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
26622 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
26623 (sve): New attribute.
26624 (enabled): Disable instructions with the sve attribute unless
26626 (movqi, movhi): Pass CONST_POLY_INT operaneds through
26627 aarch64_expand_mov_immediate.
26628 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
26629 CNT[BHSD] immediates.
26630 (movti): Split CONST_POLY_INT moves into two halves.
26631 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
26632 Split additions that need a temporary here if the destination
26633 is the stack pointer.
26634 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
26635 (*add<mode>3_poly_1): New instruction.
26636 (set_clobber_cc): New expander.
26638 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26640 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
26641 parameter and use it instead of GET_MODE_SIZE (innermode). Use
26642 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
26643 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
26644 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
26645 Change innermode from fixed_mode_size to machine_mode.
26646 (simplify_subreg): Update call accordingly. Handle a constant-sized
26647 subreg of a variable-length CONST_VECTOR.
26649 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26650 Alan Hayward <alan.hayward@arm.com>
26651 David Sherwood <david.sherwood@arm.com>
26653 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
26654 (add_offset_to_base): New function, split out from...
26655 (create_mem_ref): ...here. When handling a scale other than 1,
26656 check first whether the address is valid without the offset.
26657 Add it into the base if so, leaving the index and scale as-is.
26659 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26662 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
26663 fold_for_warn before checking if arg2 is INTEGER_CST.
26665 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
26667 * config/rs6000/predicates.md (load_multiple_operation): Delete.
26668 (store_multiple_operation): Delete.
26669 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
26670 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
26671 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
26672 guarded by TARGET_STRING.
26673 (rs6000_output_load_multiple): Delete.
26674 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
26675 OPTION_MASK_STRING / TARGET_STRING handling.
26676 (print_operand) <'N', 'O'>: Add comment that these are unused now.
26677 (const rs6000_opt_masks) <"string">: Change mask to 0.
26678 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
26679 (MASK_STRING): Delete.
26680 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
26682 (load_multiple): Delete.
26689 (store_multiple): Delete.
26696 (movmemsi_8reg): Delete.
26697 (corresponding unnamed define_insn): Delete.
26698 (movmemsi_6reg): Delete.
26699 (corresponding unnamed define_insn): Delete.
26700 (movmemsi_4reg): Delete.
26701 (corresponding unnamed define_insn): Delete.
26702 (movmemsi_2reg): Delete.
26703 (corresponding unnamed define_insn): Delete.
26704 (movmemsi_1reg): Delete.
26705 (corresponding unnamed define_insn): Delete.
26706 * config/rs6000/rs6000.opt (mno-string): New.
26707 (mstring): Replace by deprecation warning stub.
26708 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
26710 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26712 * regrename.c (regrename_do_replace): If replacing the same
26713 reg multiple times, try to reuse last created gen_raw_REG.
26716 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
26717 main to workaround a bug in GDB.
26719 2018-01-12 Tom de Vries <tom@codesourcery.com>
26722 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
26724 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
26726 PR rtl-optimization/80481
26727 * ira-color.c (get_cap_member): New function.
26728 (allocnos_conflict_by_live_ranges_p): Use it.
26729 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
26730 (setup_slot_coalesced_allocno_live_ranges): Ditto.
26732 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
26735 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
26736 (*saddl_se_1): Ditto.
26737 (*ssubsi_1): Ditto.
26738 (*ssubl_se_1): Ditto.
26740 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26742 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
26743 rather than wi::to_widest for DR_INITs.
26744 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
26745 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
26746 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
26748 (vect_analyze_group_access_1): Note that here.
26750 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26752 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
26753 polynomial type sizes.
26755 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26757 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
26758 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
26759 (gimple_add_tmp_var): Likewise.
26761 2018-01-12 Martin Liska <mliska@suse.cz>
26763 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
26764 (gimple_alloc_sizes): Likewise.
26765 (dump_gimple_statistics): Use PRIu64 in printf format.
26766 * gimple.h: Change uint64_t to int.
26768 2018-01-12 Martin Liska <mliska@suse.cz>
26770 * tree-core.h: Use uint64_t instead of int.
26771 * tree.c (tree_node_counts): Likewise.
26772 (tree_node_sizes): Likewise.
26773 (dump_tree_statistics): Use PRIu64 in printf format.
26775 2018-01-12 Martin Liska <mliska@suse.cz>
26777 * Makefile.in: As qsort_chk is implemented in vec.c, add
26778 vec.o to linkage of gencfn-macros.
26779 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
26780 passing the info to record_node_allocation_statistics.
26781 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
26783 * ggc-common.c (struct ggc_usage): Add operator== and use
26784 it in operator< and compare function.
26785 * mem-stats.h (struct mem_usage): Likewise.
26786 * vec.c (struct vec_usage): Remove operator< and compare
26787 function. Can be simply inherited.
26789 2018-01-12 Martin Jambor <mjambor@suse.cz>
26792 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
26793 * tree-ssa-math-opts.c: Include domwalk.h.
26794 (convert_mult_to_fma_1): New function.
26795 (fma_transformation_info): New type.
26796 (fma_deferring_state): Likewise.
26797 (cancel_fma_deferring): New function.
26798 (result_of_phi): Likewise.
26799 (last_fma_candidate_feeds_initial_phi): Likewise.
26800 (convert_mult_to_fma): Added deferring logic, split actual
26801 transformation to convert_mult_to_fma_1.
26802 (math_opts_dom_walker): New type.
26803 (math_opts_dom_walker::after_dom_children): New method, body moved
26804 here from pass_optimize_widening_mul::execute, added deferring logic
26806 (pass_optimize_widening_mul::execute): Moved most of code to
26807 math_opts_dom_walker::after_dom_children.
26808 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
26809 * config/i386/i386.c (ix86_option_override_internal): Added
26810 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
26812 2018-01-12 Richard Biener <rguenther@suse.de>
26815 * dwarf2out.c (gen_variable_die): Do not reset old_die for
26816 inline instance vars.
26818 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
26821 * config/rx/rx.c (rx_is_restricted_memory_address):
26822 Handle SUBREG case.
26824 2018-01-12 Richard Biener <rguenther@suse.de>
26826 PR tree-optimization/80846
26827 * target.def (split_reduction): New target hook.
26828 * targhooks.c (default_split_reduction): New function.
26829 * targhooks.h (default_split_reduction): Declare.
26830 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
26831 target requests first reduce vectors by combining low and high
26833 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
26834 (get_vectype_for_scalar_type_and_size): Export.
26835 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
26836 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
26837 * doc/tm.texi: Regenerate.
26838 * config/i386/i386.c (ix86_split_reduction): Implement
26839 TARGET_VECTORIZE_SPLIT_REDUCTION.
26841 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26844 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
26845 in PIC mode except for TARGET_VXWORKS_RTP.
26846 * config/sparc/sparc.c: Include cfgrtl.h.
26847 (TARGET_INIT_PIC_REG): Define.
26848 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
26849 (sparc_pic_register_p): New predicate.
26850 (sparc_legitimate_address_p): Use it.
26851 (sparc_legitimize_pic_address): Likewise.
26852 (sparc_delegitimize_address): Likewise.
26853 (sparc_mode_dependent_address_p): Likewise.
26854 (gen_load_pcrel_sym): Remove 4th parameter.
26855 (load_got_register): Adjust call to above. Remove obsolete stuff.
26856 (sparc_expand_prologue): Do not call load_got_register here.
26857 (sparc_flat_expand_prologue): Likewise.
26858 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
26859 (sparc_use_pseudo_pic_reg): New function.
26860 (sparc_init_pic_reg): Likewise.
26861 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26862 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
26864 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
26866 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
26867 Add item for branch_cost.
26869 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26871 PR rtl-optimization/83565
26872 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
26873 not extend the result to a larger mode for rotate operations.
26874 (num_sign_bit_copies1): Likewise.
26876 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26879 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
26881 Use values-Xc.o for -pedantic.
26882 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
26884 2018-01-12 Martin Liska <mliska@suse.cz>
26887 * ipa-devirt.c (final_warning_record::grow_type_warnings):
26889 (possible_polymorphic_call_targets): Use it.
26890 (ipa_devirt): Likewise.
26892 2018-01-12 Martin Liska <mliska@suse.cz>
26894 * profile-count.h (enum profile_quality): Use 0 as invalid
26895 enum value of profile_quality.
26897 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
26899 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
26900 -mext-string options.
26902 2018-01-12 Richard Biener <rguenther@suse.de>
26904 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
26905 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
26906 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
26908 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
26910 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
26912 * configure.ac (--with-long-double-format): Add support for the
26913 configuration option to change the default long double format on
26915 * config.gcc (powerpc*-linux*-*): Likewise.
26916 * configure: Regenerate.
26917 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
26918 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
26919 used without modification.
26921 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26923 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
26924 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
26925 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
26926 MISC_BUILTIN_SPEC_BARRIER.
26927 (rs6000_init_builtins): Likewise.
26928 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
26930 (speculation_barrier): New define_insn.
26931 * doc/extend.texi: Document __builtin_speculation_barrier.
26933 2018-01-11 Jakub Jelinek <jakub@redhat.com>
26936 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
26937 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
26938 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
26940 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
26941 integral modes instead of "ss" and "sd".
26942 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
26943 vectors with 32-bit and 64-bit elements.
26944 (vecdupssescalarmodesuffix): New mode attribute.
26945 (vec_dup<mode>): Use it.
26947 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
26950 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
26951 frame if argument is passed on stack.
26953 2018-01-11 Jakub Jelinek <jakub@redhat.com>
26956 * ree.c (combine_reaching_defs): Optimize also
26957 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
26958 reg2=any_extend(exp); reg1=reg2;, formatting fix.
26960 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
26962 PR middle-end/83189
26963 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
26965 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
26967 PR middle-end/83718
26968 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
26969 after they are computed.
26971 2018-01-11 Bin Cheng <bin.cheng@arm.com>
26973 PR tree-optimization/83695
26974 * gimple-loop-linterchange.cc
26975 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
26976 reset cached scev information after interchange.
26977 (pass_linterchange::execute): Remove call to scev_reset_htab.
26979 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26981 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
26982 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
26983 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
26984 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
26985 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
26986 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
26987 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
26988 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
26989 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
26990 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
26991 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
26992 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
26993 (V_lane_reg): Likewise.
26994 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
26996 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
26997 (vfmal_lane_low<mode>_intrinsic,
26998 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
26999 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
27000 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
27001 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
27002 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
27003 vfmsl_lane_high<mode>_intrinsic): New define_insns.
27005 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27007 * config/arm/arm-cpus.in (fp16fml): New feature.
27008 (ALL_SIMD): Add fp16fml.
27009 (armv8.2-a): Add fp16fml as an option.
27010 (armv8.3-a): Likewise.
27011 (armv8.4-a): Add fp16fml as part of fp16.
27012 * config/arm/arm.h (TARGET_FP16FML): Define.
27013 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
27015 * config/arm/arm-modes.def (V2HF): Define.
27016 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
27017 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
27018 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
27019 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
27020 vfmsl_low, vfmsl_high): New set of builtins.
27021 * config/arm/iterators.md (PLUSMINUS): New code iterator.
27022 (vfml_op): New code attribute.
27023 (VFMLHALVES): New int iterator.
27024 (VFML, VFMLSEL): New mode attributes.
27025 (V_reg): Define mapping for V2HF.
27026 (V_hi, V_lo): New mode attributes.
27027 (VF_constraint): Likewise.
27028 (vfml_half, vfml_half_selector): New int attributes.
27029 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
27031 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
27032 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
27034 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
27035 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
27036 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
27037 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
27039 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
27040 Document new effective target and option set.
27042 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27044 * config/arm/arm-cpus.in (armv8_4): New feature.
27045 (ARMv8_4a): New fgroup.
27046 (armv8.4-a): New arch.
27047 * config/arm/arm-tables.opt: Regenerate.
27048 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
27049 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
27050 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
27051 Add matching rules for -march=armv8.4-a and extensions.
27052 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
27054 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
27057 * config/rx/rx.md (BW): New mode attribute.
27058 (sync_lock_test_and_setsi): Add mode suffix to insn output.
27060 2018-01-11 Richard Biener <rguenther@suse.de>
27062 PR tree-optimization/83435
27063 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
27064 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
27065 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
27067 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27068 Alan Hayward <alan.hayward@arm.com>
27069 David Sherwood <david.sherwood@arm.com>
27071 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
27073 (aarch64_classify_address): Initialize it. Track polynomial offsets.
27074 (aarch64_print_address_internal): Use it to check for a zero offset.
27076 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27077 Alan Hayward <alan.hayward@arm.com>
27078 David Sherwood <david.sherwood@arm.com>
27080 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
27081 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
27082 Return a poly_int64 rather than a HOST_WIDE_INT.
27083 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
27084 rather than a HOST_WIDE_INT.
27085 * config/aarch64/aarch64.h (aarch64_frame): Protect with
27086 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
27087 hard_fp_offset, frame_size, initial_adjust, callee_offset and
27088 final_offset from HOST_WIDE_INT to poly_int64.
27089 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
27090 to_constant when getting the number of units in an Advanced SIMD
27092 (aarch64_builtin_vectorized_function): Check for a constant number
27094 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
27096 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
27097 attribute instead of GET_MODE_NUNITS.
27098 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
27099 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
27100 GET_MODE_SIZE for fixed-size registers.
27101 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
27102 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
27103 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
27104 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
27105 (aarch64_print_operand, aarch64_print_address_internal)
27106 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
27107 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
27108 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
27109 Handle polynomial GET_MODE_SIZE.
27110 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
27111 wider than SImode without modification.
27112 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
27113 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
27114 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
27115 passing and returning SVE modes.
27116 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
27117 rather than GEN_INT.
27118 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
27119 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
27120 (aarch64_allocate_and_probe_stack_space): Likewise.
27121 (aarch64_layout_frame): Cope with polynomial offsets.
27122 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
27123 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
27124 polynomial offsets.
27125 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
27126 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
27127 poly_int64 rather than a HOST_WIDE_INT.
27128 (aarch64_get_separate_components, aarch64_process_components)
27129 (aarch64_expand_prologue, aarch64_expand_epilogue)
27130 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
27131 (aarch64_anchor_offset): New function, split out from...
27132 (aarch64_legitimize_address): ...here.
27133 (aarch64_builtin_vectorization_cost): Handle polynomial
27134 TYPE_VECTOR_SUBPARTS.
27135 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
27137 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
27138 number of elements from the PARALLEL rather than the mode.
27139 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
27140 rather than GET_MODE_BITSIZE.
27141 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
27142 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
27143 (aarch64_expand_vec_perm_const_1): Handle polynomial
27144 d->perm.length () and d->perm elements.
27145 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
27146 Apply to_constant to d->perm elements.
27147 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
27148 polynomial CONST_VECTOR_NUNITS.
27149 (aarch64_move_pointer): Take amount as a poly_int64 rather
27151 (aarch64_progress_pointer): Avoid temporary variable.
27152 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
27153 the mode attribute instead of GET_MODE.
27155 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27156 Alan Hayward <alan.hayward@arm.com>
27157 David Sherwood <david.sherwood@arm.com>
27159 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
27160 x exists before using it.
27161 (aarch64_add_constant_internal): Rename to...
27162 (aarch64_add_offset_1): ...this. Replace regnum with separate
27163 src and dest rtxes. Handle the case in which they're different,
27164 including when the offset is zero. Replace scratchreg with an rtx.
27165 Use 2 additions if there is no spare register into which we can
27166 move a 16-bit constant.
27167 (aarch64_add_constant): Delete.
27168 (aarch64_add_offset): Replace reg with separate src and dest
27169 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
27170 Use aarch64_add_offset_1.
27171 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
27172 an rtx rather than an int. Take the delta as a poly_int64
27173 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
27174 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
27175 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
27176 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
27177 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
27178 and aarch64_add_sp.
27179 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
27180 aarch64_add_constant.
27182 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27184 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
27185 Use scalar_float_mode.
27187 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27189 * config/aarch64/aarch64-simd.md
27190 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
27191 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
27192 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
27193 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
27194 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
27195 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
27196 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
27197 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
27198 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
27199 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
27201 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27204 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
27205 targ_options->x_arm_arch_string is non NULL.
27207 2018-01-11 Tamar Christina <tamar.christina@arm.com>
27209 * config/aarch64/aarch64.h
27210 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
27212 2018-01-11 Sudakshina Das <sudi.das@arm.com>
27215 * expmed.c (emit_store_flag_force): Swap if const op0
27216 and change VOIDmode to mode of op0.
27218 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27220 PR rtl-optimization/83761
27221 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
27222 than bytes to mode_for_size.
27224 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27226 PR middle-end/83189
27227 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
27228 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
27231 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27233 PR middle-end/83575
27234 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
27235 when in layout mode.
27236 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
27237 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
27240 2018-01-10 Michael Collison <michael.collison@arm.com>
27242 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
27243 * config/aarch64/aarch64-option-extension.def: Add
27244 AARCH64_OPT_EXTENSION of 'fp16fml'.
27245 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27246 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
27247 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
27248 * config/aarch64/constraints.md (Ui7): New constraint.
27249 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
27250 (VFMLA_SEL_W): Ditto.
27253 (VFMLA16_LOW): New int iterator.
27254 (VFMLA16_HIGH): Ditto.
27255 (UNSPEC_FMLAL): New unspec.
27256 (UNSPEC_FMLSL): Ditto.
27257 (UNSPEC_FMLAL2): Ditto.
27258 (UNSPEC_FMLSL2): Ditto.
27259 (f16mac): New code attribute.
27260 * config/aarch64/aarch64-simd-builtins.def
27261 (aarch64_fmlal_lowv2sf): Ditto.
27262 (aarch64_fmlsl_lowv2sf): Ditto.
27263 (aarch64_fmlalq_lowv4sf): Ditto.
27264 (aarch64_fmlslq_lowv4sf): Ditto.
27265 (aarch64_fmlal_highv2sf): Ditto.
27266 (aarch64_fmlsl_highv2sf): Ditto.
27267 (aarch64_fmlalq_highv4sf): Ditto.
27268 (aarch64_fmlslq_highv4sf): Ditto.
27269 (aarch64_fmlal_lane_lowv2sf): Ditto.
27270 (aarch64_fmlsl_lane_lowv2sf): Ditto.
27271 (aarch64_fmlal_laneq_lowv2sf): Ditto.
27272 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27273 (aarch64_fmlalq_lane_lowv4sf): Ditto.
27274 (aarch64_fmlsl_lane_lowv4sf): Ditto.
27275 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27276 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27277 (aarch64_fmlal_lane_highv2sf): Ditto.
27278 (aarch64_fmlsl_lane_highv2sf): Ditto.
27279 (aarch64_fmlal_laneq_highv2sf): Ditto.
27280 (aarch64_fmlsl_laneq_highv2sf): Ditto.
27281 (aarch64_fmlalq_lane_highv4sf): Ditto.
27282 (aarch64_fmlsl_lane_highv4sf): Ditto.
27283 (aarch64_fmlalq_laneq_highv4sf): Ditto.
27284 (aarch64_fmlsl_laneq_highv4sf): Ditto.
27285 * config/aarch64/aarch64-simd.md:
27286 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27287 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27288 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27289 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27290 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27291 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27292 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27293 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27294 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27295 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27296 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27297 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27298 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27299 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27300 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27301 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27302 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27303 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27304 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27305 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27306 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27307 (vfmlsl_low_u32): Ditto.
27308 (vfmlalq_low_u32): Ditto.
27309 (vfmlslq_low_u32): Ditto.
27310 (vfmlal_high_u32): Ditto.
27311 (vfmlsl_high_u32): Ditto.
27312 (vfmlalq_high_u32): Ditto.
27313 (vfmlslq_high_u32): Ditto.
27314 (vfmlal_lane_low_u32): Ditto.
27315 (vfmlsl_lane_low_u32): Ditto.
27316 (vfmlal_laneq_low_u32): Ditto.
27317 (vfmlsl_laneq_low_u32): Ditto.
27318 (vfmlalq_lane_low_u32): Ditto.
27319 (vfmlslq_lane_low_u32): Ditto.
27320 (vfmlalq_laneq_low_u32): Ditto.
27321 (vfmlslq_laneq_low_u32): Ditto.
27322 (vfmlal_lane_high_u32): Ditto.
27323 (vfmlsl_lane_high_u32): Ditto.
27324 (vfmlal_laneq_high_u32): Ditto.
27325 (vfmlsl_laneq_high_u32): Ditto.
27326 (vfmlalq_lane_high_u32): Ditto.
27327 (vfmlslq_lane_high_u32): Ditto.
27328 (vfmlalq_laneq_high_u32): Ditto.
27329 (vfmlslq_laneq_high_u32): Ditto.
27330 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27331 (AARCH64_FL_FOR_ARCH8_4): New.
27332 (AARCH64_ISA_F16FML): New ISA flag.
27333 (TARGET_F16FML): New feature flag for fp16fml.
27334 (doc/invoke.texi): Document new fp16fml option.
27336 2018-01-10 Michael Collison <michael.collison@arm.com>
27338 * config/aarch64/aarch64-builtins.c:
27339 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27340 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27341 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27342 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27343 (AARCH64_ISA_SHA3): New ISA flag.
27344 (TARGET_SHA3): New feature flag for sha3.
27345 * config/aarch64/iterators.md (sha512_op): New int attribute.
27346 (CRYPTO_SHA512): New int iterator.
27347 (UNSPEC_SHA512H): New unspec.
27348 (UNSPEC_SHA512H2): Ditto.
27349 (UNSPEC_SHA512SU0): Ditto.
27350 (UNSPEC_SHA512SU1): Ditto.
27351 * config/aarch64/aarch64-simd-builtins.def
27352 (aarch64_crypto_sha512hqv2di): New builtin.
27353 (aarch64_crypto_sha512h2qv2di): Ditto.
27354 (aarch64_crypto_sha512su0qv2di): Ditto.
27355 (aarch64_crypto_sha512su1qv2di): Ditto.
27356 (aarch64_eor3qv8hi): Ditto.
27357 (aarch64_rax1qv2di): Ditto.
27358 (aarch64_xarqv2di): Ditto.
27359 (aarch64_bcaxqv8hi): Ditto.
27360 * config/aarch64/aarch64-simd.md:
27361 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27362 (aarch64_crypto_sha512su0qv2di): Ditto.
27363 (aarch64_crypto_sha512su1qv2di): Ditto.
27364 (aarch64_eor3qv8hi): Ditto.
27365 (aarch64_rax1qv2di): Ditto.
27366 (aarch64_xarqv2di): Ditto.
27367 (aarch64_bcaxqv8hi): Ditto.
27368 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27369 (vsha512h2q_u64): Ditto.
27370 (vsha512su0q_u64): Ditto.
27371 (vsha512su1q_u64): Ditto.
27372 (veor3q_u16): Ditto.
27373 (vrax1q_u64): Ditto.
27374 (vxarq_u64): Ditto.
27375 (vbcaxq_u16): Ditto.
27376 * config/arm/types.md (crypto_sha512): New type attribute.
27377 (crypto_sha3): Ditto.
27378 (doc/invoke.texi): Document new sha3 option.
27380 2018-01-10 Michael Collison <michael.collison@arm.com>
27382 * config/aarch64/aarch64-builtins.c:
27383 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
27384 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27385 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
27386 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
27387 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
27388 (AARCH64_ISA_SM4): New ISA flag.
27389 (TARGET_SM4): New feature flag for sm4.
27390 * config/aarch64/aarch64-simd-builtins.def
27391 (aarch64_sm3ss1qv4si): Ditto.
27392 (aarch64_sm3tt1aq4si): Ditto.
27393 (aarch64_sm3tt1bq4si): Ditto.
27394 (aarch64_sm3tt2aq4si): Ditto.
27395 (aarch64_sm3tt2bq4si): Ditto.
27396 (aarch64_sm3partw1qv4si): Ditto.
27397 (aarch64_sm3partw2qv4si): Ditto.
27398 (aarch64_sm4eqv4si): Ditto.
27399 (aarch64_sm4ekeyqv4si): Ditto.
27400 * config/aarch64/aarch64-simd.md:
27401 (aarch64_sm3ss1qv4si): Ditto.
27402 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
27403 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
27404 (aarch64_sm4eqv4si): Ditto.
27405 (aarch64_sm4ekeyqv4si): Ditto.
27406 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
27407 (sm3part_op): Ditto.
27408 (CRYPTO_SM3TT): Ditto.
27409 (CRYPTO_SM3PART): Ditto.
27410 (UNSPEC_SM3SS1): New unspec.
27411 (UNSPEC_SM3TT1A): Ditto.
27412 (UNSPEC_SM3TT1B): Ditto.
27413 (UNSPEC_SM3TT2A): Ditto.
27414 (UNSPEC_SM3TT2B): Ditto.
27415 (UNSPEC_SM3PARTW1): Ditto.
27416 (UNSPEC_SM3PARTW2): Ditto.
27417 (UNSPEC_SM4E): Ditto.
27418 (UNSPEC_SM4EKEY): Ditto.
27419 * config/aarch64/constraints.md (Ui2): New constraint.
27420 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
27421 * config/arm/types.md (crypto_sm3): New type attribute.
27422 (crypto_sm4): Ditto.
27423 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
27424 (vsm3tt1aq_u32): Ditto.
27425 (vsm3tt1bq_u32): Ditto.
27426 (vsm3tt2aq_u32): Ditto.
27427 (vsm3tt2bq_u32): Ditto.
27428 (vsm3partw1q_u32): Ditto.
27429 (vsm3partw2q_u32): Ditto.
27430 (vsm4eq_u32): Ditto.
27431 (vsm4ekeyq_u32): Ditto.
27432 (doc/invoke.texi): Document new sm4 option.
27434 2018-01-10 Michael Collison <michael.collison@arm.com>
27436 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
27437 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
27438 (AARCH64_FL_FOR_ARCH8_4): New.
27439 (AARCH64_FL_V8_4): New flag.
27440 (doc/invoke.texi): Document new armv8.4-a option.
27442 2018-01-10 Michael Collison <michael.collison@arm.com>
27444 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27445 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
27446 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
27447 * config/aarch64/aarch64-option-extension.def: Add
27448 AARCH64_OPT_EXTENSION of 'sha2'.
27449 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
27450 (crypto): Disable sha2 and aes if crypto disabled.
27451 (crypto): Enable aes and sha2 if enabled.
27452 (simd): Disable sha2 and aes if simd disabled.
27453 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
27455 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
27456 (TARGET_SHA2): New feature flag for sha2.
27457 (TARGET_AES): New feature flag for aes.
27458 * config/aarch64/aarch64-simd.md:
27459 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
27460 conditional on TARGET_AES.
27461 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
27462 (aarch64_crypto_sha1hsi): Make pattern conditional
27464 (aarch64_crypto_sha1hv4si): Ditto.
27465 (aarch64_be_crypto_sha1hv4si): Ditto.
27466 (aarch64_crypto_sha1su1v4si): Ditto.
27467 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
27468 (aarch64_crypto_sha1su0v4si): Ditto.
27469 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
27470 (aarch64_crypto_sha256su0v4si): Ditto.
27471 (aarch64_crypto_sha256su1v4si): Ditto.
27472 (doc/invoke.texi): Document new aes and sha2 options.
27474 2018-01-10 Martin Sebor <msebor@redhat.com>
27476 PR tree-optimization/83781
27477 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
27480 2018-01-11 Martin Sebor <msebor@gmail.com>
27481 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27483 PR tree-optimization/83501
27484 PR tree-optimization/81703
27486 * tree-ssa-strlen.c (get_string_cst): Rename...
27487 (get_string_len): ...to this. Handle global constants.
27488 (handle_char_store): Adjust.
27490 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
27491 Jim Wilson <jimw@sifive.com>
27493 * config/riscv/riscv-protos.h (riscv_output_return): New.
27494 * config/riscv/riscv.c (struct machine_function): New naked_p field.
27495 (riscv_attribute_table, riscv_output_return),
27496 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
27497 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
27498 (riscv_compute_frame_info): Only compute frame->mask if not a naked
27500 (riscv_expand_prologue): Add early return for naked function.
27501 (riscv_expand_epilogue): Likewise.
27502 (riscv_function_ok_for_sibcall): Return false for naked function.
27503 (riscv_set_current_function): New.
27504 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
27505 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
27506 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
27507 * doc/extend.texi (RISC-V Function Attributes): New.
27509 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
27511 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
27512 check for 128-bit long double before checking TCmode.
27513 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
27514 128-bit long doubles before checking TFmode or TCmode.
27515 (FLOAT128_IBM_P): Likewise.
27517 2018-01-10 Martin Sebor <msebor@redhat.com>
27519 PR tree-optimization/83671
27520 * builtins.c (c_strlen): Unconditionally return zero for the empty
27522 Use -Warray-bounds for warnings.
27523 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
27524 for non-constant array indices with COMPONENT_REF, arrays of
27525 arrays, and pointers to arrays.
27526 (gimple_fold_builtin_strlen): Determine and set length range for
27527 non-constant character arrays.
27529 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
27531 PR middle-end/81897
27532 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
27535 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
27537 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
27539 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27542 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
27543 VECTOR_MEM_ALTIVEC_OR_VSX_P.
27544 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
27545 indexed_or_indirect_operand predicate.
27546 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
27547 (*vsx_le_perm_load_v8hi): Likewise.
27548 (*vsx_le_perm_load_v16qi): Likewise.
27549 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
27550 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
27551 (*vsx_le_perm_store_v8hi): Likewise.
27552 (*vsx_le_perm_store_v16qi): Likewise.
27553 (eight unnamed splitters): Likewise.
27555 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27557 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
27558 * config/rs6000/emmintrin.h: Likewise.
27559 * config/rs6000/mmintrin.h: Likewise.
27560 * config/rs6000/xmmintrin.h: Likewise.
27562 2018-01-10 David Malcolm <dmalcolm@redhat.com>
27565 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
27567 * tree.c (tree_nop_conversion): Return true for location wrapper
27569 (maybe_wrap_with_location): New function.
27570 (selftest::check_strip_nops): New function.
27571 (selftest::test_location_wrappers): New function.
27572 (selftest::tree_c_tests): Call it.
27573 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
27574 (maybe_wrap_with_location): New decl.
27575 (EXPR_LOCATION_WRAPPER_P): New macro.
27576 (location_wrapper_p): New inline function.
27577 (tree_strip_any_location_wrapper): New inline function.
27579 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
27582 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
27583 stack_realign_offset for the largest alignment of stack slot
27585 (ix86_find_max_used_stack_alignment): New function.
27586 (ix86_finalize_stack_frame_flags): Use it. Set
27587 max_used_stack_alignment if we don't realign stack.
27588 * config/i386/i386.h (machine_function): Add
27589 max_used_stack_alignment.
27591 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
27593 * config/arm/arm.opt (-mbranch-cost): New option.
27594 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
27597 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
27600 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
27601 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
27603 2018-01-10 Richard Biener <rguenther@suse.de>
27606 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
27607 early out so it also covers the case where we have a non-NULL
27610 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27612 PR tree-optimization/83753
27613 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
27614 for non-strided grouped accesses if the number of elements is 1.
27616 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27619 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
27620 * i386.h (TARGET_USE_GATHER): Define.
27621 * x86-tune.def (X86_TUNE_USE_GATHER): New.
27623 2018-01-10 Martin Liska <mliska@suse.cz>
27626 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
27627 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
27629 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
27630 CLEANUP_NO_PARTITIONING is not set.
27632 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27634 * doc/rtl.texi: Remove documentation of (const ...) wrappers
27635 for vectors, as a partial revert of r254296.
27636 * rtl.h (const_vec_p): Delete.
27637 (const_vec_duplicate_p): Don't test for vector CONSTs.
27638 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
27639 * expmed.c (make_tree): Likewise.
27642 * common.md (E, F): Use CONSTANT_P instead of checking for
27644 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
27645 checking for CONST_VECTOR.
27647 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27649 PR middle-end/83575
27650 * predict.c (force_edge_cold): Handle in more sane way edges
27651 with no prediction.
27653 2018-01-09 Carl Love <cel@us.ibm.com>
27655 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
27657 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
27658 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
27659 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
27660 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
27661 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
27662 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
27663 * config/rs6000/rs6000-protos.h: Add extern defition for
27664 rs6000_generate_float2_double_code.
27665 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
27667 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
27668 (float2_v2df): Add define_expand.
27670 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
27673 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
27674 op_mode in the force_to_mode call.
27676 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27678 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
27679 instead of checking each element individually.
27680 (aarch64_evpc_uzp): Likewise.
27681 (aarch64_evpc_zip): Likewise.
27682 (aarch64_evpc_ext): Likewise.
27683 (aarch64_evpc_rev): Likewise.
27684 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
27685 instead of checking each element individually. Return true without
27687 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
27688 whether all selected elements come from the same input, instead of
27689 checking each element individually. Remove calls to gen_rtx_REG,
27690 start_sequence and end_sequence and instead assert that no rtl is
27693 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27695 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
27696 order of HIGH and CONST checks.
27698 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27700 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
27701 if the destination isn't an SSA_NAME.
27703 2018-01-09 Richard Biener <rguenther@suse.de>
27705 PR tree-optimization/83668
27706 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
27708 (canonicalize_loop_form): ... here, renamed from ...
27709 (canonicalize_loop_closed_ssa_form): ... this and amended to
27710 swap successor edges for loop exit blocks to make us use
27711 the RPO order we need for initial schedule generation.
27713 2018-01-09 Joseph Myers <joseph@codesourcery.com>
27715 PR tree-optimization/64811
27716 * match.pd: When optimizing comparisons with Inf, avoid
27717 introducing or losing exceptions from comparisons with NaN.
27719 2018-01-09 Martin Liska <mliska@suse.cz>
27722 * asan.c (shadow_mem_size): Add gcc_assert.
27724 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
27726 Don't save registers in main().
27729 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
27730 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
27731 * config/avr/avr.c (avr_set_current_function): Don't error if
27732 naked, OS_task or OS_main are specified at the same time.
27733 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
27735 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
27737 * common/config/avr/avr-common.c (avr_option_optimization_table):
27738 Switch on -mmain-is-OS_task for optimizing compilations.
27740 2018-01-09 Richard Biener <rguenther@suse.de>
27742 PR tree-optimization/83572
27743 * graphite.c: Include cfganal.h.
27744 (graphite_transform_loops): Connect infinite loops to exit
27745 and remove fake edges at the end.
27747 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27749 * ipa-inline.c (edge_badness): Revert accidental checkin.
27751 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27754 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
27755 symbols; not inline clones.
27757 2018-01-09 Jakub Jelinek <jakub@redhat.com>
27760 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
27761 hard registers. Formatting fixes.
27763 PR preprocessor/83722
27764 * gcc.c (try_generate_repro): Pass
27765 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
27766 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
27769 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
27770 Kito Cheng <kito.cheng@gmail.com>
27772 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
27773 (riscv_leaf_function_p): Delete.
27774 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
27776 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27778 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
27780 (do_ifelse): New function.
27781 (do_isel): New function.
27782 (do_sub3): New function.
27783 (do_add3): New function.
27784 (do_load_mask_compare): New function.
27785 (do_overlap_load_compare): New function.
27786 (expand_compare_loop): New function.
27787 (expand_block_compare): Call expand_compare_loop() when appropriate.
27788 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
27789 option description.
27790 (-mblock-compare-inline-loop-limit): New option.
27792 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27795 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
27796 Reverse order of second and third operands in first alternative.
27797 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
27798 of first and second elements in UNSPEC_VPERMR vector.
27799 (altivec_expand_vec_perm_le): Likewise.
27801 2018-01-08 Jeff Law <law@redhat.com>
27803 PR rtl-optimizatin/81308
27804 * tree-switch-conversion.c (cfg_altered): New file scoped static.
27805 (process_switch): If group_case_labels makes a change, then set
27807 (pass_convert_switch::execute): If a switch is converted, then
27808 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
27810 PR rtl-optimization/81308
27811 * recog.c (split_all_insns): Conditionally cleanup the CFG after
27814 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
27816 PR target/83663 - Revert r255946
27817 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
27818 generation for cases where splatting a value is not useful.
27819 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
27820 across a vec_duplicate and a paradoxical subreg forming a vector
27821 mode to a vec_concat.
27823 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27825 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
27826 -march=armv8.3-a variants.
27827 * config/arm/t-multilib: Likewise.
27828 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
27830 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27832 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
27834 (cceq_ior_compare_complement): Give it a name so I can use it, and
27835 change boolean_or_operator predicate to boolean_operator so it can
27836 be used to generate a crand.
27837 (eqne): New code iterator.
27838 (bd/bd_neg): New code_attrs.
27839 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
27840 a single define_insn.
27841 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
27842 decrement (bdnzt/bdnzf/bdzt/bdzf).
27843 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
27844 with the new names of the branch decrement patterns, and added the
27845 names of the branch decrement conditional patterns.
27847 2018-01-08 Richard Biener <rguenther@suse.de>
27849 PR tree-optimization/83563
27850 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
27853 2018-01-08 Richard Biener <rguenther@suse.de>
27855 PR middle-end/83713
27856 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
27858 2018-01-08 Richard Biener <rguenther@suse.de>
27860 PR tree-optimization/83685
27861 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
27862 references to abnormals.
27864 2018-01-08 Richard Biener <rguenther@suse.de>
27867 * dwarf2out.c (output_indirect_strings): Handle empty
27868 skeleton_debug_str_hash.
27869 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
27871 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
27873 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
27874 (emit_store_direct): Likewise.
27875 (arc_trampoline_adjust_address): Likewise.
27876 (arc_asm_trampoline_template): New function.
27877 (arc_initialize_trampoline): Use asm_trampoline_template.
27878 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
27879 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
27880 * config/arc/arc.md (flush_icache): Delete pattern.
27882 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
27884 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
27885 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
27888 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
27891 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
27892 by not USED_FOR_TARGET.
27893 (make_pass_resolve_sw_modes): Likewise.
27895 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
27897 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
27900 2018-01-08 Richard Biener <rguenther@suse.de>
27902 PR middle-end/83580
27903 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
27905 2018-01-08 Richard Biener <rguenther@suse.de>
27907 PR middle-end/83517
27908 * match.pd ((t * 2) / 2) -> t): Add missing :c.
27910 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
27912 PR middle-end/81897
27913 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
27914 basic blocks with a small number of successors.
27915 (convert_control_dep_chain_into_preds): Improve handling of
27917 (dump_predicates): Split apart into...
27918 (dump_pred_chain): ...here...
27919 (dump_pred_info): ...and here.
27920 (can_one_predicate_be_invalidated_p): Add debugging printfs.
27921 (can_chain_union_be_invalidated_p): Improve check for invalidation
27923 (uninit_uses_cannot_happen): Avoid unnecessary if
27924 convert_control_dep_chain_into_preds yielded nothing.
27926 2018-01-06 Martin Sebor <msebor@redhat.com>
27928 PR tree-optimization/83640
27929 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
27930 subtracting negative offset from size.
27931 (builtin_access::overlap): Adjust offset bounds of the access to fall
27932 within the size of the object if possible.
27934 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
27936 PR rtl-optimization/83699
27937 * expmed.c (extract_bit_field_1): Restrict the vector usage of
27938 extract_bit_field_as_subreg to cases in which the extracted
27939 value is also a vector.
27941 * lra-constraints.c (process_alt_operands): Test for the equivalence
27942 substitutions when detecting a possible reload cycle.
27944 2018-01-06 Jakub Jelinek <jakub@redhat.com>
27947 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
27948 by default if flag_selective_schedling{,2}. Formatting fixes.
27950 PR rtl-optimization/83682
27951 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
27952 if it has non-VECTOR_MODE element mode.
27953 (vec_duplicate_p): Likewise.
27955 PR middle-end/83694
27956 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
27957 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
27959 2018-01-05 Jakub Jelinek <jakub@redhat.com>
27962 * config/i386/i386-builtin.def
27963 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
27964 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
27965 Require also OPTION_MASK_ISA_AVX512F in addition to
27966 OPTION_MASK_ISA_GFNI.
27967 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
27968 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
27969 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
27970 to OPTION_MASK_ISA_GFNI.
27971 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
27972 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
27973 OPTION_MASK_ISA_AVX512BW.
27974 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
27975 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
27976 addition to OPTION_MASK_ISA_GFNI.
27977 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
27978 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
27979 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
27980 to OPTION_MASK_ISA_GFNI.
27981 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
27982 a requirement for all ISAs rather than any of them with a few
27984 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
27986 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
27987 bitmasks to be enabled with 3 exceptions, instead of requiring any
27988 enabled ISA with lots of exceptions.
27989 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
27990 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
27991 Change avx512bw in isa attribute to avx512f.
27992 * config/i386/sgxintrin.h: Add license boilerplate.
27993 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
27994 to __AVX512F__ and __AVX512VL to __AVX512VL__.
27995 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
27996 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
27998 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
27999 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
28000 temporarily sse2 rather than sse if not enabled already.
28003 * config/i386/sse.md (VI248_VLBW): Rename to ...
28004 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
28005 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
28006 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
28007 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
28008 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
28009 mode iterator instead of VI248_VLBW.
28011 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
28013 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
28014 (record_modified): Skip clobbers; add debug output.
28015 (param_change_prob): Use sreal frequencies.
28017 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28019 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
28020 punt for user-aligned variables.
28022 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28024 * tree-chrec.c (chrec_contains_symbols): Return true for
28027 2018-01-05 Sudakshina Das <sudi.das@arm.com>
28030 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
28031 of (x|y) == x for BICS pattern.
28033 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28035 PR tree-optimization/83605
28036 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
28037 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
28040 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
28042 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
28043 * config/epiphany/rtems.h: New file.
28045 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28046 Uros Bizjak <ubizjak@gmail.com>
28049 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
28050 QIreg_operand instead of register_operand predicate.
28051 * config/i386/i386.c (ix86_rop_should_change_byte_p,
28052 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
28053 comments instead of -fmitigate[-_]rop.
28055 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28058 * cgraphunit.c (symbol_table::compile): Switch to text_section
28059 before calling assembly_start debug hook.
28060 * run-rtl-passes.c (run_rtl_passes): Likewise.
28063 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28065 * tree-vrp.c (extract_range_from_binary_expr_1): Check
28066 range_int_cst_p rather than !symbolic_range_p before calling
28067 extract_range_from_multiplicative_op_1.
28069 2018-01-04 Jeff Law <law@redhat.com>
28071 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
28072 redundant test in assertion.
28074 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28076 * doc/rtl.texi: Document machine_mode wrapper classes.
28078 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28080 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
28081 using tree_to_uhwi.
28083 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28085 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
28086 the VEC_PERM_EXPR fold to fail.
28088 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28091 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
28092 to switched_sections.
28094 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28097 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
28098 test for d.testing.
28100 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
28103 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
28104 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
28106 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28109 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
28110 is BLKmode and bitpos not zero or mode change is needed.
28112 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28115 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
28118 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
28121 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
28122 instead of MULT rtx. Update all corresponding splitters.
28123 (*saddl_se): Ditto.
28124 (*ssub<modesuffix>): Ditto.
28125 (*ssubl_se): Ditto.
28126 (*cmp_sadd_di): Update split patterns.
28127 (*cmp_sadd_si): Ditto.
28128 (*cmp_sadd_sidi): Ditto.
28129 (*cmp_ssub_di): Ditto.
28130 (*cmp_ssub_si): Ditto.
28131 (*cmp_ssub_sidi): Ditto.
28132 * config/alpha/predicates.md (const23_operand): New predicate.
28133 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
28134 Look for ASHIFT, not MULT inner operand.
28135 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
28137 2018-01-04 Martin Liska <mliska@suse.cz>
28139 PR gcov-profile/83669
28140 * gcov.c (output_intermediate_file): Add version to intermediate
28142 * doc/gcov.texi: Document new field 'version' in intermediate
28143 file format. Fix location of '-k' option of gcov command.
28145 2018-01-04 Martin Liska <mliska@suse.cz>
28148 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
28150 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28152 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
28154 2018-01-03 Martin Sebor <msebor@redhat.com>
28156 PR tree-optimization/83655
28157 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
28158 checking calls with invalid arguments.
28160 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28162 * tree-vect-stmts.c (vect_get_store_rhs): New function.
28163 (vectorizable_mask_load_store): Delete.
28164 (vectorizable_call): Return false for masked loads and stores.
28165 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
28166 instead of gimple_assign_rhs1.
28167 (vectorizable_load): Handle IFN_MASK_LOAD.
28168 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
28170 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28172 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
28174 (vectorizable_mask_load_store): ...here.
28175 (vectorizable_load): ...and here.
28177 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28179 * tree-vect-stmts.c (vect_build_all_ones_mask)
28180 (vect_build_zero_merge_argument): New functions, split out from...
28181 (vectorizable_load): ...here.
28183 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28185 * tree-vect-stmts.c (vect_check_store_rhs): New function,
28187 (vectorizable_mask_load_store): ...here.
28188 (vectorizable_store): ...and here.
28190 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28192 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
28194 (vectorizable_mask_load_store): ...here.
28196 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28198 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
28199 (vect_model_store_cost): Take a vec_load_store_type instead of a
28201 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
28202 (vect_model_store_cost): Take a vec_load_store_type instead of a
28204 (vectorizable_mask_load_store): Update accordingly.
28205 (vectorizable_store): Likewise.
28206 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
28208 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28210 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
28211 IFN_MASK_LOAD calls here rather than...
28212 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
28214 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28215 Alan Hayward <alan.hayward@arm.com>
28216 David Sherwood <david.sherwood@arm.com>
28218 * expmed.c (extract_bit_field_1): For vector extracts,
28219 fall back to extract_bit_field_as_subreg if vec_extract
28222 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28223 Alan Hayward <alan.hayward@arm.com>
28224 David Sherwood <david.sherwood@arm.com>
28226 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
28227 they are variable or constant sized.
28228 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
28229 slots for constant-sized data.
28231 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28232 Alan Hayward <alan.hayward@arm.com>
28233 David Sherwood <david.sherwood@arm.com>
28235 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
28236 handling COND_EXPRs with boolean comparisons, try to find a better
28237 basis for the mask type than the boolean itself.
28239 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28241 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
28242 is calculated and how it can be overridden.
28243 * genmodes.c (max_bitsize_mode_any_mode): New variable.
28244 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
28246 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
28249 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28250 Alan Hayward <alan.hayward@arm.com>
28251 David Sherwood <david.sherwood@arm.com>
28253 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
28254 Remove the mode argument.
28255 (aarch64_simd_valid_immediate): Remove the mode and inverse
28257 * config/aarch64/iterators.md (bitsize): New iterator.
28258 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28259 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28260 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28261 aarch64_simd_valid_immediate.
28262 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28263 (aarch64_reg_or_bic_imm): Likewise.
28264 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28265 with an insn_type enum and msl with a modifier_type enum.
28266 Replace element_width with a scalar_mode. Change the shift
28267 to unsigned int. Add constructors for scalar_float_mode and
28268 scalar_int_mode elements.
28269 (aarch64_vect_float_const_representable_p): Delete.
28270 (aarch64_can_const_movi_rtx_p)
28271 (aarch64_simd_scalar_immediate_valid_for_move)
28272 (aarch64_simd_make_constant): Update call to
28273 aarch64_simd_valid_immediate.
28274 (aarch64_advsimd_valid_immediate_hs): New function.
28275 (aarch64_advsimd_valid_immediate): Likewise.
28276 (aarch64_simd_valid_immediate): Remove mode and inverse
28277 arguments. Rewrite to use the above. Use const_vec_duplicate_p
28278 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28279 and aarch64_float_const_representable_p on the result.
28280 (aarch64_output_simd_mov_immediate): Remove mode argument.
28281 Update call to aarch64_simd_valid_immediate and use of
28282 simd_immediate_info.
28283 (aarch64_output_scalar_simd_mov_immediate): Update call
28286 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28287 Alan Hayward <alan.hayward@arm.com>
28288 David Sherwood <david.sherwood@arm.com>
28290 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28291 (mode_nunits): Likewise CONST_MODE_NUNITS.
28292 * machmode.def (ADJUST_NUNITS): Document.
28293 * genmodes.c (mode_data::need_nunits_adj): New field.
28294 (blank_mode): Update accordingly.
28295 (adj_nunits): New variable.
28296 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28298 (emit_mode_size_inline): Set need_bytesize_adj for all modes
28299 listed in adj_nunits.
28300 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28301 listed in adj_nunits. Don't emit case statements for such modes.
28302 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28303 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
28304 nothing if adj_nunits is nonnull.
28305 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28306 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28307 (emit_mode_fbit): Update use of print_maybe_const_decl.
28308 (emit_move_size): Likewise. Treat the array as non-const
28310 (emit_mode_adjustments): Handle adj_nunits.
28312 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28314 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28315 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28316 (VECTOR_MODES): Use it.
28317 (make_vector_modes): Take the prefix as an argument.
28319 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28320 Alan Hayward <alan.hayward@arm.com>
28321 David Sherwood <david.sherwood@arm.com>
28323 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28324 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28325 for MODE_VECTOR_BOOL.
28326 * machmode.def (VECTOR_BOOL_MODE): Document.
28327 * genmodes.c (VECTOR_BOOL_MODE): New macro.
28328 (make_vector_bool_mode): New function.
28329 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28331 * lto-streamer-in.c (lto_input_mode_table): Likewise.
28332 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28334 * stor-layout.c (int_mode_for_mode): Likewise.
28335 * tree.c (build_vector_type_for_mode): Likewise.
28336 * varasm.c (output_constant_pool_2): Likewise.
28337 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28338 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
28339 for MODE_VECTOR_BOOL.
28340 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28341 of mode class checks.
28342 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28343 instead of a list of mode class checks.
28344 (expand_vector_scalar_condition): Likewise.
28345 (type_for_widest_vector_mode): Handle BImode as an inner mode.
28347 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28348 Alan Hayward <alan.hayward@arm.com>
28349 David Sherwood <david.sherwood@arm.com>
28351 * machmode.h (mode_size): Change from unsigned short to
28353 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28354 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28355 or if measurement_type is not polynomial.
28356 (fixed_size_mode::includes_p): Check for constant-sized modes.
28357 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28358 return a poly_uint16 rather than an unsigned short.
28359 (emit_mode_size): Change the type of mode_size from unsigned short
28360 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
28361 (emit_mode_adjustments): Cope with polynomial vector sizes.
28362 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28364 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28366 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28367 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28368 * caller-save.c (setup_save_areas): Likewise.
28369 (replace_reg_with_saved_mem): Likewise.
28370 * calls.c (emit_library_call_value_1): Likewise.
28371 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28372 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28373 (gen_lowpart_for_combine): Likewise.
28374 * convert.c (convert_to_integer_1): Likewise.
28375 * cse.c (equiv_constant, cse_insn): Likewise.
28376 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
28377 (cselib_subst_to_values): Likewise.
28378 * dce.c (word_dce_process_block): Likewise.
28379 * df-problems.c (df_word_lr_mark_ref): Likewise.
28380 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
28381 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
28382 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
28383 (rtl_for_decl_location): Likewise.
28384 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
28385 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
28386 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
28387 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
28388 (expand_expr_real_1): Likewise.
28389 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
28390 (pad_below): Likewise.
28391 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28392 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
28393 * ira.c (get_subreg_tracking_sizes): Likewise.
28394 * ira-build.c (ira_create_allocno_objects): Likewise.
28395 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
28396 (ira_sort_regnos_for_alter_reg): Likewise.
28397 * ira-costs.c (record_operand_costs): Likewise.
28398 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
28399 (resolve_simple_move): Likewise.
28400 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
28401 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
28402 (lra_constraints): Likewise.
28403 (CONST_POOL_OK_P): Reject variable-sized modes.
28404 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
28405 (add_pseudo_to_slot, lra_spill): Likewise.
28406 * omp-low.c (omp_clause_aligned_alignment): Likewise.
28407 * optabs-query.c (get_best_extraction_insn): Likewise.
28408 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28409 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
28410 (expand_mult_highpart, valid_multiword_target_p): Likewise.
28411 * recog.c (offsettable_address_addr_space_p): Likewise.
28412 * regcprop.c (maybe_mode_change): Likewise.
28413 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
28414 * regrename.c (build_def_use): Likewise.
28415 * regstat.c (dump_reg_info): Likewise.
28416 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
28417 (find_reloads, find_reloads_subreg_address): Likewise.
28418 * reload1.c (eliminate_regs_1): Likewise.
28419 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
28420 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
28421 (simplify_binary_operation_1, simplify_subreg): Likewise.
28422 * targhooks.c (default_function_arg_padding): Likewise.
28423 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
28424 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
28425 (verify_gimple_assign_ternary): Likewise.
28426 * tree-inline.c (estimate_move_cost): Likewise.
28427 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28428 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
28429 (get_address_cost_ainc): Likewise.
28430 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
28431 (vect_supportable_dr_alignment): Likewise.
28432 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28433 (vectorizable_reduction): Likewise.
28434 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
28435 (vectorizable_operation, vectorizable_load): Likewise.
28436 * tree.c (build_same_sized_truth_vector_type): Likewise.
28437 * valtrack.c (cleanup_auto_inc_dec): Likewise.
28438 * var-tracking.c (emit_note_insn_var_location): Likewise.
28439 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
28440 (ADDR_VEC_ALIGN): Likewise.
28442 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28443 Alan Hayward <alan.hayward@arm.com>
28444 David Sherwood <david.sherwood@arm.com>
28446 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
28448 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28449 or if measurement_type is polynomial.
28450 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
28451 * combine.c (make_extraction): Likewise.
28452 * dse.c (find_shift_sequence): Likewise.
28453 * dwarf2out.c (mem_loc_descriptor): Likewise.
28454 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
28455 (extract_bit_field, extract_low_bits): Likewise.
28456 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
28457 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
28458 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
28459 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
28460 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28461 * reload.c (find_reloads): Likewise.
28462 * reload1.c (alter_reg): Likewise.
28463 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
28464 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
28465 * tree-if-conv.c (predicate_mem_writes): Likewise.
28466 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
28467 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
28468 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
28469 * valtrack.c (dead_debug_insert_temp): Likewise.
28470 * varasm.c (mergeable_constant_section): Likewise.
28471 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
28473 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28474 Alan Hayward <alan.hayward@arm.com>
28475 David Sherwood <david.sherwood@arm.com>
28477 * expr.c (expand_assignment): Cope with polynomial mode sizes
28478 when assigning to a CONCAT.
28480 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28481 Alan Hayward <alan.hayward@arm.com>
28482 David Sherwood <david.sherwood@arm.com>
28484 * machmode.h (mode_precision): Change from unsigned short to
28486 (mode_to_precision): Return a poly_uint16 rather than an unsigned
28488 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
28489 or if measurement_type is not polynomial.
28490 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
28491 in which the mode is already known to be a scalar_int_mode.
28492 * genmodes.c (emit_mode_precision): Change the type of mode_precision
28493 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
28495 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28496 for GET_MODE_PRECISION.
28497 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28498 for GET_MODE_PRECISION.
28499 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
28501 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
28502 (expand_field_assignment, make_extraction): Likewise.
28503 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
28504 (get_last_value): Likewise.
28505 * convert.c (convert_to_integer_1): Likewise.
28506 * cse.c (cse_insn): Likewise.
28507 * expr.c (expand_expr_real_1): Likewise.
28508 * lra-constraints.c (simplify_operand_subreg): Likewise.
28509 * optabs-query.c (can_atomic_load_p): Likewise.
28510 * optabs.c (expand_atomic_load): Likewise.
28511 (expand_atomic_store): Likewise.
28512 * ree.c (combine_reaching_defs): Likewise.
28513 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
28514 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
28515 * tree.h (type_has_mode_precision_p): Likewise.
28516 * ubsan.c (instrument_si_overflow): Likewise.
28518 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28519 Alan Hayward <alan.hayward@arm.com>
28520 David Sherwood <david.sherwood@arm.com>
28522 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
28523 polynomial numbers of units.
28524 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
28525 (valid_vector_subparts_p): New function.
28526 (build_vector_type): Remove temporary shim and take the number
28527 of units as a poly_uint64 rather than an int.
28528 (build_opaque_vector_type): Take the number of units as a
28529 poly_uint64 rather than an int.
28530 * tree.c (build_vector_from_ctor): Handle polynomial
28531 TYPE_VECTOR_SUBPARTS.
28532 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
28533 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
28534 (build_vector_from_val): If the number of units is variable,
28535 use build_vec_duplicate_cst for constant operands and
28536 VEC_DUPLICATE_EXPR otherwise.
28537 (make_vector_type): Remove temporary is_constant ().
28538 (build_vector_type, build_opaque_vector_type): Take the number of
28539 units as a poly_uint64 rather than an int.
28540 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
28542 * cfgexpand.c (expand_debug_expr): Likewise.
28543 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
28544 (store_constructor, expand_expr_real_1): Likewise.
28545 (const_scalar_mask_from_tree): Likewise.
28546 * fold-const-call.c (fold_const_reduction): Likewise.
28547 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
28548 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
28549 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
28550 (fold_relational_const): Likewise.
28551 (native_interpret_vector): Likewise. Change the size from an
28552 int to an unsigned int.
28553 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
28554 TYPE_VECTOR_SUBPARTS.
28555 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
28556 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
28557 duplicating a non-constant operand into a variable-length vector.
28558 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
28559 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
28560 * ipa-icf.c (sem_variable::equals): Likewise.
28561 * match.pd: Likewise.
28562 * omp-simd-clone.c (simd_clone_subparts): Likewise.
28563 * print-tree.c (print_node): Likewise.
28564 * stor-layout.c (layout_type): Likewise.
28565 * targhooks.c (default_builtin_vectorization_cost): Likewise.
28566 * tree-cfg.c (verify_gimple_comparison): Likewise.
28567 (verify_gimple_assign_binary): Likewise.
28568 (verify_gimple_assign_ternary): Likewise.
28569 (verify_gimple_assign_single): Likewise.
28570 * tree-pretty-print.c (dump_generic_node): Likewise.
28571 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28572 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
28573 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
28574 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
28575 (vect_shift_permute_load_chain): Likewise.
28576 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
28577 (expand_vector_condition, optimize_vector_constructor): Likewise.
28578 (lower_vec_perm, get_compute_type): Likewise.
28579 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28580 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
28581 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
28582 (vect_recog_mask_conversion_pattern): Likewise.
28583 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
28584 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
28585 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28586 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
28587 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
28588 (vectorizable_shift, vectorizable_operation, vectorizable_store)
28589 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
28590 (supportable_widening_operation): Likewise.
28591 (supportable_narrowing_operation): Likewise.
28592 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
28594 * varasm.c (output_constant): Likewise.
28596 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28597 Alan Hayward <alan.hayward@arm.com>
28598 David Sherwood <david.sherwood@arm.com>
28600 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
28601 so that both the length == 3 and length != 3 cases set up their
28602 own permute vectors. Add comments explaining why we know the
28603 number of elements is constant.
28604 (vect_permute_load_chain): Likewise.
28606 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28607 Alan Hayward <alan.hayward@arm.com>
28608 David Sherwood <david.sherwood@arm.com>
28610 * machmode.h (mode_nunits): Change from unsigned char to
28612 (ONLY_FIXED_SIZE_MODES): New macro.
28613 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
28614 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
28615 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
28617 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
28618 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
28619 or if measurement_type is not polynomial.
28620 * genmodes.c (ZERO_COEFFS): New macro.
28621 (emit_mode_nunits_inline): Make mode_nunits_inline return a
28623 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
28624 Use ZERO_COEFFS when emitting initializers.
28625 * data-streamer.h (bp_pack_poly_value): New function.
28626 (bp_unpack_poly_value): Likewise.
28627 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28628 for GET_MODE_NUNITS.
28629 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28630 for GET_MODE_NUNITS.
28631 * tree.c (make_vector_type): Remove temporary shim and make
28632 the real function take the number of units as a poly_uint64
28633 rather than an int.
28634 (build_vector_type_for_mode): Handle polynomial nunits.
28635 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
28636 * emit-rtl.c (const_vec_series_p_1): Likewise.
28637 (gen_rtx_CONST_VECTOR): Likewise.
28638 * fold-const.c (test_vec_duplicate_folding): Likewise.
28639 * genrecog.c (validate_pattern): Likewise.
28640 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
28641 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28642 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
28643 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
28644 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
28645 * rtlanal.c (subreg_get_info): Likewise.
28646 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28647 (vect_grouped_load_supported): Likewise.
28648 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
28649 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
28650 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
28651 (simplify_const_unary_operation, simplify_binary_operation_1)
28652 (simplify_const_binary_operation, simplify_ternary_operation)
28653 (test_vector_ops_duplicate, test_vector_ops): Likewise.
28654 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
28655 instead of CONST_VECTOR_NUNITS.
28656 * varasm.c (output_constant_pool_2): Likewise.
28657 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
28658 explicit-encoded elements in the XVEC for variable-length vectors.
28660 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28662 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
28664 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28665 Alan Hayward <alan.hayward@arm.com>
28666 David Sherwood <david.sherwood@arm.com>
28668 * coretypes.h (fixed_size_mode): Declare.
28669 (fixed_size_mode_pod): New typedef.
28670 * builtins.h (target_builtins::x_apply_args_mode)
28671 (target_builtins::x_apply_result_mode): Change type to
28672 fixed_size_mode_pod.
28673 * builtins.c (apply_args_size, apply_result_size, result_vector)
28674 (expand_builtin_apply_args_1, expand_builtin_apply)
28675 (expand_builtin_return): Update accordingly.
28677 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28679 * cse.c (hash_rtx_cb): Hash only the encoded elements.
28680 * cselib.c (cselib_hash_rtx): Likewise.
28681 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
28682 CONST_VECTOR encoding.
28684 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28685 Jeff Law <law@redhat.com>
28688 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
28689 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
28690 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
28691 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
28694 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
28695 explicitly probe *sp in a noreturn function if there were any callee
28696 register saves or frame pointer is needed.
28698 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28701 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
28702 BLKmode for ternary, binary or unary expressions.
28705 * var-tracking.c (delete_vta_debug_insn): New inline function.
28706 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
28707 insns from get_insns () to NULL instead of each bb separately.
28708 Use delete_vta_debug_insn. No longer static.
28709 (vt_debug_insns_local, variable_tracking_main_1): Adjust
28710 delete_vta_debug_insns callers.
28711 * rtl.h (delete_vta_debug_insns): Declare.
28712 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
28713 instead of variable_tracking_main.
28715 2018-01-03 Martin Sebor <msebor@redhat.com>
28717 PR tree-optimization/83603
28718 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
28719 arguments past the endof the argument list in functions declared
28720 without a prototype.
28721 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
28722 Avoid checking when arguments are null.
28724 2018-01-03 Martin Sebor <msebor@redhat.com>
28727 * doc/extend.texi (attribute const): Fix a typo.
28728 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
28729 issuing -Wsuggest-attribute for void functions.
28731 2018-01-03 Martin Sebor <msebor@redhat.com>
28733 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
28734 offset_int::from instead of wide_int::to_shwi.
28735 (maybe_diag_overlap): Remove assertion.
28736 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
28737 * gimple-ssa-sprintf.c (format_directive): Same.
28738 (parse_directive): Same.
28739 (sprintf_dom_walker::compute_format_length): Same.
28740 (try_substitute_return_value): Same.
28742 2018-01-03 Jeff Law <law@redhat.com>
28744 PR middle-end/83654
28745 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
28746 non-constant residual for zero at runtime and avoid probing in
28747 that case. Reorganize code for trailing problem to mirror handling
28750 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28752 PR tree-optimization/83501
28753 * tree-ssa-strlen.c (get_string_cst): New.
28754 (handle_char_store): Call get_string_cst.
28756 2018-01-03 Martin Liska <mliska@suse.cz>
28758 PR tree-optimization/83593
28759 * tree-ssa-strlen.c: Include tree-cfg.h.
28760 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
28761 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
28762 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
28764 (strlen_dom_walker::before_dom_children): Call
28765 gimple_purge_dead_eh_edges. Dump tranformation with details
28767 (strlen_dom_walker::before_dom_children): Update call by adding
28768 new argument cleanup_eh.
28769 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
28771 2018-01-03 Martin Liska <mliska@suse.cz>
28774 * cif-code.def (VARIADIC_THUNK): New enum value.
28775 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
28778 2018-01-03 Jan Beulich <jbeulich@suse.com>
28780 * sse.md (mov<mode>_internal): Tighten condition for when to use
28781 vmovdqu<ssescalarsize> for TI and OI modes.
28783 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28785 Update copyright years.
28787 2018-01-03 Martin Liska <mliska@suse.cz>
28790 * ipa-visibility.c (function_and_variable_visibility): Skip
28791 functions with noipa attribure.
28793 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28795 * gcc.c (process_command): Update copyright notice dates.
28796 * gcov-dump.c (print_version): Ditto.
28797 * gcov.c (print_version): Ditto.
28798 * gcov-tool.c (print_version): Ditto.
28799 * gengtype.c (create_file): Ditto.
28800 * doc/cpp.texi: Bump @copying's copyright year.
28801 * doc/cppinternals.texi: Ditto.
28802 * doc/gcc.texi: Ditto.
28803 * doc/gccint.texi: Ditto.
28804 * doc/gcov.texi: Ditto.
28805 * doc/install.texi: Ditto.
28806 * doc/invoke.texi: Ditto.
28808 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28810 * vector-builder.h (vector_builder::m_full_nelts): Change from
28811 unsigned int to poly_uint64.
28812 (vector_builder::full_nelts): Update prototype accordingly.
28813 (vector_builder::new_vector): Likewise.
28814 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
28815 (vector_builder::operator ==): Likewise.
28816 (vector_builder::finalize): Likewise.
28817 * int-vector-builder.h (int_vector_builder::int_vector_builder):
28818 Take the number of elements as a poly_uint64 rather than an
28820 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
28821 from unsigned int to poly_uint64.
28822 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
28823 (vec_perm_indices::new_vector): Likewise.
28824 (vec_perm_indices::length): Likewise.
28825 (vec_perm_indices::nelts_per_input): Likewise.
28826 (vec_perm_indices::input_nelts): Likewise.
28827 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
28828 number of elements per input as a poly_uint64 rather than an
28829 unsigned int. Use the original encoding for variable-length
28830 vectors, rather than clamping each individual element.
28831 For the second and subsequent elements in each pattern,
28832 clamp the step and base before clamping their sum.
28833 (vec_perm_indices::series_p): Handle polynomial element counts.
28834 (vec_perm_indices::all_in_range_p): Likewise.
28835 (vec_perm_indices_to_tree): Likewise.
28836 (vec_perm_indices_to_rtx): Likewise.
28837 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
28838 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
28839 (tree_vector_builder::new_binary_operation): Handle polynomial
28840 element counts. Return false if we need to know the number
28841 of elements at compile time.
28842 * fold-const.c (fold_vec_perm): Punt if the number of elements
28843 isn't known at compile time.
28845 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28847 * vec-perm-indices.h (vec_perm_builder): Change element type
28848 from HOST_WIDE_INT to poly_int64.
28849 (vec_perm_indices::element_type): Update accordingly.
28850 (vec_perm_indices::clamp): Handle polynomial element_types.
28851 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28852 (vec_perm_indices::all_in_range_p): Likewise.
28853 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
28855 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
28856 polynomial vec_perm_indices element types.
28857 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
28858 * fold-const.c (fold_vec_perm): Likewise.
28859 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
28860 * tree-vect-generic.c (lower_vec_perm): Likewise.
28861 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28862 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
28863 element type to HOST_WIDE_INT.
28865 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28866 Alan Hayward <alan.hayward@arm.com>
28867 David Sherwood <david.sherwood@arm.com>
28869 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
28870 rather than an int. Use plus_constant.
28871 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
28872 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
28874 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28875 Alan Hayward <alan.hayward@arm.com>
28876 David Sherwood <david.sherwood@arm.com>
28878 * calls.c (emit_call_1, expand_call): Change struct_value_size from
28879 a HOST_WIDE_INT to a poly_int64.
28881 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28882 Alan Hayward <alan.hayward@arm.com>
28883 David Sherwood <david.sherwood@arm.com>
28885 * calls.c (load_register_parameters): Cope with polynomial
28886 mode sizes. Require a constant size for BLKmode parameters
28887 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
28888 forces a parameter to be padded at the lsb end in order to
28889 fill a complete number of words, require the parameter size
28890 to be ordered wrt UNITS_PER_WORD.
28892 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28893 Alan Hayward <alan.hayward@arm.com>
28894 David Sherwood <david.sherwood@arm.com>
28896 * reload1.c (spill_stack_slot_width): Change element type
28897 from unsigned int to poly_uint64_pod.
28898 (alter_reg): Treat mode sizes as polynomial.
28900 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28901 Alan Hayward <alan.hayward@arm.com>
28902 David Sherwood <david.sherwood@arm.com>
28904 * reload.c (complex_word_subreg_p): New function.
28905 (reload_inner_reg_of_subreg, push_reload): Use it.
28907 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28908 Alan Hayward <alan.hayward@arm.com>
28909 David Sherwood <david.sherwood@arm.com>
28911 * lra-constraints.c (process_alt_operands): Reject matched
28912 operands whose sizes aren't ordered.
28913 (match_reload): Refer to this check here.
28915 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28916 Alan Hayward <alan.hayward@arm.com>
28917 David Sherwood <david.sherwood@arm.com>
28919 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
28920 that the mode size is in the set {1, 2, 4, 8, 16}.
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 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
28927 Use plus_constant instead of gen_rtx_PLUS.
28929 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28930 Alan Hayward <alan.hayward@arm.com>
28931 David Sherwood <david.sherwood@arm.com>
28933 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
28934 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
28935 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
28936 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
28937 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
28938 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
28939 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
28940 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
28941 * config/i386/i386.c (ix86_push_rounding): ...this new function.
28942 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
28944 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
28945 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
28946 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
28947 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
28948 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
28949 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
28950 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
28951 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
28952 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
28953 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
28955 * expr.c (emit_move_resolve_push): Treat the input and result
28956 of PUSH_ROUNDING as a poly_int64.
28957 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
28958 (emit_push_insn): Likewise.
28959 * lra-eliminations.c (mark_not_eliminable): Likewise.
28960 * recog.c (push_operand): Likewise.
28961 * reload1.c (elimination_effects): Likewise.
28962 * rtlanal.c (nonzero_bits1): Likewise.
28963 * calls.c (store_one_arg): Likewise. Require the padding to be
28964 known at compile time.
28966 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28967 Alan Hayward <alan.hayward@arm.com>
28968 David Sherwood <david.sherwood@arm.com>
28970 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
28971 Use plus_constant instead of gen_rtx_PLUS.
28973 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28974 Alan Hayward <alan.hayward@arm.com>
28975 David Sherwood <david.sherwood@arm.com>
28977 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
28978 rather than an int.
28980 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28981 Alan Hayward <alan.hayward@arm.com>
28982 David Sherwood <david.sherwood@arm.com>
28984 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
28985 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
28986 via stack temporaries. Treat the mode size as polynomial too.
28988 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28989 Alan Hayward <alan.hayward@arm.com>
28990 David Sherwood <david.sherwood@arm.com>
28992 * expr.c (expand_expr_real_2): When handling conversions involving
28993 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
28994 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
28995 as a poly_uint64 too.
28997 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28998 Alan Hayward <alan.hayward@arm.com>
28999 David Sherwood <david.sherwood@arm.com>
29001 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
29003 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29004 Alan Hayward <alan.hayward@arm.com>
29005 David Sherwood <david.sherwood@arm.com>
29007 * combine.c (can_change_dest_mode): Handle polynomial
29008 REGMODE_NATURAL_SIZE.
29009 * expmed.c (store_bit_field_1): Likewise.
29010 * expr.c (store_constructor): Likewise.
29011 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
29012 and polynomial REGMODE_NATURAL_SIZE.
29013 (gen_lowpart_common): Likewise.
29014 * reginfo.c (record_subregs_of_mode): Likewise.
29015 * rtlanal.c (read_modify_subreg_p): Likewise.
29017 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29018 Alan Hayward <alan.hayward@arm.com>
29019 David Sherwood <david.sherwood@arm.com>
29021 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
29022 numbers of elements.
29024 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29025 Alan Hayward <alan.hayward@arm.com>
29026 David Sherwood <david.sherwood@arm.com>
29028 * match.pd: Cope with polynomial numbers of vector elements.
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 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
29035 in a POINTER_PLUS_EXPR.
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 * omp-simd-clone.c (simd_clone_subparts): New function.
29042 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
29043 (ipa_simd_modify_function_body): Likewise.
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 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
29050 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
29051 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
29052 (expand_vector_condition, vector_element): Likewise.
29053 (subparts_gt): New function.
29054 (get_compute_type): Use subparts_gt.
29055 (count_type_subparts): Delete.
29056 (expand_vector_operations_1): Use subparts_gt instead of
29057 count_type_subparts.
29059 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29060 Alan Hayward <alan.hayward@arm.com>
29061 David Sherwood <david.sherwood@arm.com>
29063 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
29064 (vect_compile_time_alias): ...this new function. Do the calculation
29065 on poly_ints rather than trees.
29066 (vect_prune_runtime_alias_test_list): Update call accordingly.
29068 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29069 Alan Hayward <alan.hayward@arm.com>
29070 David Sherwood <david.sherwood@arm.com>
29072 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
29074 (vect_schedule_slp_instance): Likewise.
29076 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29077 Alan Hayward <alan.hayward@arm.com>
29078 David Sherwood <david.sherwood@arm.com>
29080 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
29081 constant and extern definitions for variable-length vectors.
29082 (vect_get_constant_vectors): Note that the number of units
29083 is known to be constant.
29085 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29086 Alan Hayward <alan.hayward@arm.com>
29087 David Sherwood <david.sherwood@arm.com>
29089 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
29090 of units as polynomial. Choose between WIDE and NARROW based
29093 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29094 Alan Hayward <alan.hayward@arm.com>
29095 David Sherwood <david.sherwood@arm.com>
29097 * tree-vect-stmts.c (simd_clone_subparts): New function.
29098 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
29100 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29101 Alan Hayward <alan.hayward@arm.com>
29102 David Sherwood <david.sherwood@arm.com>
29104 * tree-vect-stmts.c (vectorizable_call): Treat the number of
29105 vectors as polynomial. Use build_index_vector for
29106 IFN_GOMP_SIMD_LANE.
29108 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29109 Alan Hayward <alan.hayward@arm.com>
29110 David Sherwood <david.sherwood@arm.com>
29112 * tree-vect-stmts.c (get_load_store_type): Treat the number of
29113 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
29114 for variable-length vectors.
29115 (vectorizable_mask_load_store): Treat the number of units as
29116 polynomial, asserting that it is constant if the condition has
29117 already been enforced.
29118 (vectorizable_store, vectorizable_load): Likewise.
29120 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29121 Alan Hayward <alan.hayward@arm.com>
29122 David Sherwood <david.sherwood@arm.com>
29124 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
29125 of units as polynomial. Punt if we can't tell at compile time
29126 which vector contains the final result.
29128 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29129 Alan Hayward <alan.hayward@arm.com>
29130 David Sherwood <david.sherwood@arm.com>
29132 * tree-vect-loop.c (vectorizable_induction): Treat the number
29133 of units as polynomial. Punt on SLP inductions. Use an integer
29134 VEC_SERIES_EXPR for variable-length integer reductions. Use a
29135 cast of such a series for variable-length floating-point
29138 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29139 Alan Hayward <alan.hayward@arm.com>
29140 David Sherwood <david.sherwood@arm.com>
29142 * tree.h (build_index_vector): Declare.
29143 * tree.c (build_index_vector): New function.
29144 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
29145 of units as polynomial, forcibly converting it to a constant if
29146 vectorizable_reduction has already enforced the condition.
29147 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
29148 to create a {1,2,3,...} vector.
29149 (vectorizable_reduction): Treat the number of units as polynomial.
29150 Choose vectype_in based on the largest scalar element size rather
29151 than the smallest number of units. Enforce the restrictions
29154 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29155 Alan Hayward <alan.hayward@arm.com>
29156 David Sherwood <david.sherwood@arm.com>
29158 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
29159 number of units as polynomial.
29161 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29162 Alan Hayward <alan.hayward@arm.com>
29163 David Sherwood <david.sherwood@arm.com>
29165 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
29166 * target.def (autovectorize_vector_sizes): Return the vector sizes
29167 by pointer, using vector_sizes rather than a bitmask.
29168 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
29169 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
29170 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
29172 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
29173 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
29174 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
29175 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
29176 * omp-general.c (omp_max_vf): Likewise.
29177 * omp-low.c (omp_clause_aligned_alignment): Likewise.
29178 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
29179 * tree-vect-loop.c (vect_analyze_loop): Likewise.
29180 * tree-vect-slp.c (vect_slp_bb): Likewise.
29181 * doc/tm.texi: Regenerate.
29182 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
29184 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
29185 the vector size as a poly_uint64 rather than an unsigned int.
29186 (current_vector_size): Change from an unsigned int to a poly_uint64.
29187 (get_vectype_for_scalar_type): Update accordingly.
29188 * tree.h (build_truth_vector_type): Take the size and number of
29189 units as a poly_uint64 rather than an unsigned int.
29190 (build_vector_type): Add a temporary overload that takes
29191 the number of units as a poly_uint64 rather than an unsigned int.
29192 * tree.c (make_vector_type): Likewise.
29193 (build_truth_vector_type): Take the number of units as a poly_uint64
29194 rather than an unsigned int.
29196 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29197 Alan Hayward <alan.hayward@arm.com>
29198 David Sherwood <david.sherwood@arm.com>
29200 * target.def (get_mask_mode): Take the number of units and length
29201 as poly_uint64s rather than unsigned ints.
29202 * targhooks.h (default_get_mask_mode): Update accordingly.
29203 * targhooks.c (default_get_mask_mode): Likewise.
29204 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
29205 * doc/tm.texi: Regenerate.
29207 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29208 Alan Hayward <alan.hayward@arm.com>
29209 David Sherwood <david.sherwood@arm.com>
29211 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
29212 * omp-general.c (omp_max_vf): Likewise.
29213 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
29214 (expand_omp_simd): Handle polynomial safelen.
29215 * omp-low.c (omplow_simd_context): Add a default constructor.
29216 (omplow_simd_context::max_vf): Change from int to poly_uint64.
29217 (lower_rec_simd_input_clauses): Update accordingly.
29218 (lower_rec_input_clauses): Likewise.
29220 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29221 Alan Hayward <alan.hayward@arm.com>
29222 David Sherwood <david.sherwood@arm.com>
29224 * tree-vectorizer.h (vect_nunits_for_cost): New function.
29225 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
29226 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
29227 (vect_analyze_slp_cost): Likewise.
29228 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
29229 (vect_model_load_cost): Likewise.
29231 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29232 Alan Hayward <alan.hayward@arm.com>
29233 David Sherwood <david.sherwood@arm.com>
29235 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
29236 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
29237 from an unsigned int * to a poly_uint64_pod *.
29238 (calculate_unrolling_factor): New function.
29239 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
29241 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29242 Alan Hayward <alan.hayward@arm.com>
29243 David Sherwood <david.sherwood@arm.com>
29245 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
29246 from an unsigned int to a poly_uint64.
29247 (_loop_vec_info::slp_unrolling_factor): Likewise.
29248 (_loop_vec_info::vectorization_factor): Change from an int
29250 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
29251 (vect_get_num_vectors): New function.
29252 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
29253 (vect_get_num_copies): Use vect_get_num_vectors.
29254 (vect_analyze_data_ref_dependences): Change max_vf from an int *
29255 to an unsigned int *.
29256 (vect_analyze_data_refs): Change min_vf from an int * to a
29258 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29259 than an unsigned HOST_WIDE_INT.
29260 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29261 (vect_analyze_data_ref_dependence): Change max_vf from an int *
29262 to an unsigned int *.
29263 (vect_analyze_data_ref_dependences): Likewise.
29264 (vect_compute_data_ref_alignment): Handle polynomial vf.
29265 (vect_enhance_data_refs_alignment): Likewise.
29266 (vect_prune_runtime_alias_test_list): Likewise.
29267 (vect_shift_permute_load_chain): Likewise.
29268 (vect_supportable_dr_alignment): Likewise.
29269 (dependence_distance_ge_vf): Take the vectorization factor as a
29270 poly_uint64 rather than an unsigned HOST_WIDE_INT.
29271 (vect_analyze_data_refs): Change min_vf from an int * to a
29273 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29274 vfm1 as a poly_uint64 rather than an int. Make the same change
29275 for the returned bound_scalar.
29276 (vect_gen_vector_loop_niters): Handle polynomial vf.
29277 (vect_do_peeling): Likewise. Update call to
29278 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29279 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29281 * tree-vect-loop.c (vect_determine_vectorization_factor)
29282 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29283 (vect_get_known_peeling_cost): Likewise.
29284 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29285 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29286 (vect_transform_loop): Likewise. Use the lowest possible VF when
29287 updating the upper bounds of the loop.
29288 (vect_min_worthwhile_factor): Make static. Return an unsigned int
29289 rather than an int.
29290 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29291 polynomial unroll factors.
29292 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29293 (vect_make_slp_decision): Likewise.
29294 (vect_supported_load_permutation_p): Likewise, and polynomial
29296 (vect_analyze_slp_cost): Handle polynomial vf.
29297 (vect_slp_analyze_node_operations): Likewise.
29298 (vect_slp_analyze_bb_1): Likewise.
29299 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29300 than an unsigned HOST_WIDE_INT.
29301 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29302 (vectorizable_load): Handle polynomial vf.
29303 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29305 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29307 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29308 Alan Hayward <alan.hayward@arm.com>
29309 David Sherwood <david.sherwood@arm.com>
29311 * match.pd: Handle bit operations involving three constants
29312 and try to fold one pair.
29314 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29316 * tree-vect-loop-manip.c: Include gimple-fold.h.
29317 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29318 niters_maybe_zero parameters. Handle other cases besides a step of 1.
29319 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29320 Add a path that uses a step of VF instead of 1, but disable it
29322 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29323 and niters_no_overflow parameters. Update calls to
29324 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29325 Create a new SSA name if the latter choses to use a ste other
29326 than zero, and return it via niters_vector_mult_vf_var.
29327 * tree-vect-loop.c (vect_transform_loop): Update calls to
29328 vect_do_peeling, vect_gen_vector_loop_niters and
29329 slpeel_make_loop_iterate_ntimes.
29330 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29331 (vect_gen_vector_loop_niters): Update declarations after above changes.
29333 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
29335 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29336 128-bit round to integer instructions.
29337 (ceil<mode>2): Likewise.
29338 (btrunc<mode>2): Likewise.
29339 (round<mode>2): Likewise.
29341 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29343 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29344 unaligned VSX load/store on P8/P9.
29345 (expand_block_clear): Allow the use of unaligned VSX
29346 load/store on P8/P9.
29348 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29350 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29352 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29353 swap associated with both a load and a store.
29355 2018-01-02 Andrew Waterman <andrew@sifive.com>
29357 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29358 * config/riscv/riscv.md (clear_cache): Use it.
29360 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
29362 * web.c: Remove out-of-date comment.
29364 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29366 * expr.c (fixup_args_size_notes): Check that any existing
29367 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29368 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29369 (emit_single_push_insn): ...here.
29371 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29373 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29374 (const_vector_encoded_nelts): New function.
29375 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29376 (const_vector_int_elt, const_vector_elt): Declare.
29377 * emit-rtl.c (const_vector_int_elt_1): New function.
29378 (const_vector_elt): Likewise.
29379 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
29380 of CONST_VECTOR_ELT.
29382 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29384 * expr.c: Include rtx-vector-builder.h.
29385 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
29386 directly on the tree encoding.
29387 (const_vector_from_tree): Likewise.
29388 * optabs.c: Include rtx-vector-builder.h.
29389 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
29390 sequence of "u" values.
29391 * vec-perm-indices.c: Include rtx-vector-builder.h.
29392 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
29393 directly on the vec_perm_indices encoding.
29395 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29397 * doc/rtl.texi (const_vector): Describe new encoding scheme.
29398 * Makefile.in (OBJS): Add rtx-vector-builder.o.
29399 * rtx-vector-builder.h: New file.
29400 * rtx-vector-builder.c: Likewise.
29401 * rtl.h (rtx_def::u2): Add a const_vector field.
29402 (CONST_VECTOR_NPATTERNS): New macro.
29403 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
29404 (CONST_VECTOR_DUPLICATE_P): Likewise.
29405 (CONST_VECTOR_STEPPED_P): Likewise.
29406 (CONST_VECTOR_ENCODED_ELT): Likewise.
29407 (const_vec_duplicate_p): Check for a duplicated vector encoding.
29408 (unwrap_const_vec_duplicate): Likewise.
29409 (const_vec_series_p): Check for a non-duplicated vector encoding.
29410 Say that the function only returns true for integer vectors.
29411 * emit-rtl.c: Include rtx-vector-builder.h.
29412 (gen_const_vec_duplicate_1): Delete.
29413 (gen_const_vector): Call gen_const_vec_duplicate instead of
29414 gen_const_vec_duplicate_1.
29415 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
29416 (gen_const_vec_duplicate): Use rtx_vector_builder.
29417 (gen_const_vec_series): Likewise.
29418 (gen_rtx_CONST_VECTOR): Likewise.
29419 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
29420 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29421 Build a new vector rather than modifying a CONST_VECTOR in-place.
29422 (handle_special_swappables): Update call accordingly.
29423 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
29424 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29425 Build a new vector rather than modifying a CONST_VECTOR in-place.
29426 (handle_special_swappables): Update call accordingly.
29428 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29430 * simplify-rtx.c (simplify_const_binary_operation): Use
29431 CONST_VECTOR_ELT instead of XVECEXP.
29433 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29435 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
29436 the selector elements to be different from the data elements
29437 if the selector is a VECTOR_CST.
29438 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
29439 ssizetype for the selector.
29441 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29443 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
29444 before testing each element individually.
29445 * tree-vect-generic.c (lower_vec_perm): Likewise.
29447 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29449 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
29450 * selftest-run-tests.c (selftest::run_tests): Call it.
29451 * vector-builder.h (vector_builder::operator ==): New function.
29452 (vector_builder::operator !=): Likewise.
29453 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
29454 (vec_perm_indices::all_from_input_p): New function.
29455 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29456 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
29457 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
29458 instead of reading the VECTOR_CST directly. Detect whether both
29459 vector inputs are the same before constructing the vec_perm_indices,
29460 and update the number of inputs argument accordingly. Use the
29461 utility functions added above. Only construct sel2 if we need to.
29463 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29465 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
29466 the broadcast of the low byte.
29467 (expand_mult_highpart): Use an explicit encoding for the permutes.
29468 * optabs-query.c (can_mult_highpart_p): Likewise.
29469 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
29470 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29471 (vectorizable_bswap): Likewise.
29472 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
29473 explicit encoding for the power-of-2 permutes.
29474 (vect_permute_store_chain): Likewise.
29475 (vect_grouped_load_supported): Likewise.
29476 (vect_permute_load_chain): Likewise.
29478 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29480 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
29481 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
29482 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
29483 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29484 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
29485 (vect_gen_perm_mask_any): Likewise.
29487 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29489 * int-vector-builder.h: New file.
29490 * vec-perm-indices.h: Include int-vector-builder.h.
29491 (vec_perm_indices): Redefine as an int_vector_builder.
29492 (auto_vec_perm_indices): Delete.
29493 (vec_perm_builder): Redefine as a stand-alone class.
29494 (vec_perm_indices::vec_perm_indices): New function.
29495 (vec_perm_indices::clamp): Likewise.
29496 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
29497 (vec_perm_indices::new_vector): New function.
29498 (vec_perm_indices::new_expanded_vector): Update for new
29499 vec_perm_indices class.
29500 (vec_perm_indices::rotate_inputs): New function.
29501 (vec_perm_indices::all_in_range_p): Operate directly on the
29502 encoded form, without computing elided elements.
29503 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
29504 encoding. Update for new vec_perm_indices class.
29505 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
29506 the given vec_perm_builder.
29507 (expand_vec_perm_var): Update vec_perm_builder constructor.
29508 (expand_mult_highpart): Use vec_perm_builder instead of
29509 auto_vec_perm_indices.
29510 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
29511 vec_perm_indices instead of auto_vec_perm_indices. Use a single
29512 or double series encoding as appropriate.
29513 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
29514 vec_perm_indices instead of auto_vec_perm_indices.
29515 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29516 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29517 (vect_permute_store_chain): Likewise.
29518 (vect_grouped_load_supported): Likewise.
29519 (vect_permute_load_chain): Likewise.
29520 (vect_shift_permute_load_chain): Likewise.
29521 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29522 (vect_transform_slp_perm_load): Likewise.
29523 (vect_schedule_slp_instance): Likewise.
29524 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29525 (vectorizable_mask_load_store): Likewise.
29526 (vectorizable_bswap): Likewise.
29527 (vectorizable_store): Likewise.
29528 (vectorizable_load): Likewise.
29529 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
29530 vec_perm_indices instead of auto_vec_perm_indices. Use
29531 tree_to_vec_perm_builder to read the vector from a tree.
29532 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
29533 vec_perm_builder instead of a vec_perm_indices.
29534 (have_whole_vector_shift): Use vec_perm_builder and
29535 vec_perm_indices instead of auto_vec_perm_indices. Leave the
29536 truncation to calc_vec_perm_mask_for_shift.
29537 (vect_create_epilog_for_reduction): Likewise.
29538 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
29539 from auto_vec_perm_indices to vec_perm_indices.
29540 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29541 instead of changing individual elements.
29542 (aarch64_vectorize_vec_perm_const): Use new_vector to install
29543 the vector in d.perm.
29544 * config/arm/arm.c (expand_vec_perm_d::perm): Change
29545 from auto_vec_perm_indices to vec_perm_indices.
29546 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29547 instead of changing individual elements.
29548 (arm_vectorize_vec_perm_const): Use new_vector to install
29549 the vector in d.perm.
29550 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
29551 Update vec_perm_builder constructor.
29552 (rs6000_expand_interleave): Likewise.
29553 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
29554 (rs6000_expand_interleave): Likewise.
29556 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29558 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
29559 to qimode could truncate the indices.
29560 * optabs.c (expand_vec_perm_var): Likewise.
29562 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29564 * Makefile.in (OBJS): Add vec-perm-indices.o.
29565 * vec-perm-indices.h: New file.
29566 * vec-perm-indices.c: Likewise.
29567 * target.h (vec_perm_indices): Replace with a forward class
29569 (auto_vec_perm_indices): Move to vec-perm-indices.h.
29570 * optabs.h: Include vec-perm-indices.h.
29571 (expand_vec_perm): Delete.
29572 (selector_fits_mode_p, expand_vec_perm_var): Declare.
29573 (expand_vec_perm_const): Declare.
29574 * target.def (vec_perm_const_ok): Replace with...
29575 (vec_perm_const): ...this new hook.
29576 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
29577 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
29578 * doc/tm.texi: Regenerate.
29579 * optabs.def (vec_perm_const): Delete.
29580 * doc/md.texi (vec_perm_const): Likewise.
29581 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
29582 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
29583 expand_vec_perm for constant permutation vectors. Assert that
29584 the mode of variable permutation vectors is the integer equivalent
29585 of the mode that is being permuted.
29586 * optabs-query.h (selector_fits_mode_p): Declare.
29587 * optabs-query.c: Include vec-perm-indices.h.
29588 (selector_fits_mode_p): New function.
29589 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
29590 is defined, instead of checking whether the vec_perm_const_optab
29591 exists. Use targetm.vectorize.vec_perm_const instead of
29592 targetm.vectorize.vec_perm_const_ok. Check whether the indices
29593 fit in the vector mode before using a variable permute.
29594 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
29595 vec_perm_indices instead of an rtx.
29596 (expand_vec_perm): Replace with...
29597 (expand_vec_perm_const): ...this new function. Take the selector
29598 as a vec_perm_indices rather than an rtx. Also take the mode of
29599 the selector. Update call to shift_amt_for_vec_perm_mask.
29600 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
29601 Use vec_perm_indices::new_expanded_vector to expand the original
29602 selector into bytes. Check whether the indices fit in the vector
29603 mode before using a variable permute.
29604 (expand_vec_perm_var): Make global.
29605 (expand_mult_highpart): Use expand_vec_perm_const.
29606 * fold-const.c: Includes vec-perm-indices.h.
29607 * tree-ssa-forwprop.c: Likewise.
29608 * tree-vect-data-refs.c: Likewise.
29609 * tree-vect-generic.c: Likewise.
29610 * tree-vect-loop.c: Likewise.
29611 * tree-vect-slp.c: Likewise.
29612 * tree-vect-stmts.c: Likewise.
29613 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
29615 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
29616 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
29617 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
29618 (aarch64_vectorize_vec_perm_const): ...this new function.
29619 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29620 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29621 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
29622 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
29623 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29624 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29625 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
29627 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
29628 check for NEON modes.
29629 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
29630 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
29631 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
29632 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
29634 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
29635 the old VEC_PERM_CONST conditions.
29636 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
29637 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
29638 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
29639 (ia64_vectorize_vec_perm_const_ok): Merge into...
29640 (ia64_vectorize_vec_perm_const): ...this new function.
29641 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
29642 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
29643 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
29644 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
29645 * config/mips/mips.c (mips_expand_vec_perm_const)
29646 (mips_vectorize_vec_perm_const_ok): Merge into...
29647 (mips_vectorize_vec_perm_const): ...this new function.
29648 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
29649 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
29650 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
29651 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
29652 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
29653 (rs6000_expand_vec_perm_const): Delete.
29654 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
29656 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29657 (altivec_expand_vec_perm_const_le): Take each operand individually.
29658 Operate on constant selectors rather than rtxes.
29659 (altivec_expand_vec_perm_const): Likewise. Update call to
29660 altivec_expand_vec_perm_const_le.
29661 (rs6000_expand_vec_perm_const): Delete.
29662 (rs6000_vectorize_vec_perm_const_ok): Delete.
29663 (rs6000_vectorize_vec_perm_const): New function.
29664 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29665 an element count and rtx array.
29666 (rs6000_expand_extract_even): Update call accordingly.
29667 (rs6000_expand_interleave): Likewise.
29668 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
29669 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
29670 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
29671 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
29672 (rs6000_expand_vec_perm_const): Delete.
29673 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29674 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29675 (altivec_expand_vec_perm_const_le): Take each operand individually.
29676 Operate on constant selectors rather than rtxes.
29677 (altivec_expand_vec_perm_const): Likewise. Update call to
29678 altivec_expand_vec_perm_const_le.
29679 (rs6000_expand_vec_perm_const): Delete.
29680 (rs6000_vectorize_vec_perm_const_ok): Delete.
29681 (rs6000_vectorize_vec_perm_const): New function. Remove stray
29682 reference to the SPE evmerge intructions.
29683 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29684 an element count and rtx array.
29685 (rs6000_expand_extract_even): Update call accordingly.
29686 (rs6000_expand_interleave): Likewise.
29687 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
29688 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
29690 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29692 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29694 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
29695 vector mode and that that mode matches the mode of the data
29697 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
29698 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
29699 directly using expand_vec_perm_1 when forcing selectors into
29701 (expand_vec_perm_var): New function, split out from expand_vec_perm.
29703 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29705 * optabs-query.h (can_vec_perm_p): Delete.
29706 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
29707 * optabs-query.c (can_vec_perm_p): Split into...
29708 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
29709 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
29710 particular selector is valid.
29711 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29712 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29713 (vect_grouped_load_supported): Likewise.
29714 (vect_shift_permute_load_chain): Likewise.
29715 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29716 (vect_transform_slp_perm_load): Likewise.
29717 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29718 (vectorizable_bswap): Likewise.
29719 (vect_gen_perm_mask_checked): Likewise.
29720 * fold-const.c (fold_ternary_loc): Likewise. Don't take
29721 implementations of variable permutation vectors into account
29722 when deciding which selector to use.
29723 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
29724 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
29725 with a false third argument.
29726 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
29727 to test whether the constant selector is valid and can_vec_perm_var_p
29728 to test whether a variable selector is valid.
29730 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29732 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
29733 * optabs-query.c (can_vec_perm_p): Likewise.
29734 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
29735 instead of vec_perm_indices.
29736 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
29737 (vect_gen_perm_mask_checked): Likewise,
29738 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
29739 (vect_gen_perm_mask_checked): Likewise,
29741 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29743 * optabs-query.h (qimode_for_vec_perm): Declare.
29744 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
29745 (qimode_for_vec_perm): ...this new function.
29746 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
29748 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29750 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
29751 does not have a conditional at the top.
29753 2018-01-02 Richard Biener <rguenther@suse.de>
29755 * ipa-inline.c (big_speedup_p): Fix expression.
29757 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29760 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
29763 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29767 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
29768 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
29769 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
29770 cond_taken_branch_cost 3->4.
29772 2018-01-01 Jakub Jelinek <jakub@redhat.com>
29774 PR tree-optimization/83581
29775 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
29776 TODO_cleanup_cfg if any changes have been made.
29778 PR middle-end/83608
29779 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
29780 convert_modes if target mode has the right side, but different mode
29783 PR middle-end/83609
29784 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
29785 last argument when extracting from CONCAT. If either from_real or
29786 from_imag is NULL, use expansion through memory. If result is not
29787 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
29788 the parts directly to inner mode, if even that fails, use expansion
29791 PR middle-end/83623
29792 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
29793 check for bswap in mode rather than HImode and use that in expand_unop
29796 Copyright (C) 2018 Free Software Foundation, Inc.
29798 Copying and distribution of this file, with or without modification,
29799 are permitted in any medium without royalty provided the copyright
29800 notice and this notice are preserved.