1 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
4 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
5 RETURN+USE when returning via %r14.
7 2018-09-24 Martin Liska <mliska@suse.cz>
9 * gcov.c (output_lines): Print colorization legend
10 for both flag_use_colors and flag_use_hotness_colors.
13 2018-09-24 Martin Liska <mliska@suse.cz>
15 * coverage.c (get_coverage_counts): Use warning_at
16 with current_function_decl location. Use %qD in warning
19 2018-09-24 Martin Liska <mliska@suse.cz>
21 * memory-block.h (memory_block_pool::release): Annotate with
22 valgrind that the memory is not accessible.
24 2018-09-24 Martin Liska <mliska@suse.cz>
27 * asan.c: Make asan_handled_variables extern.
29 * cfgexpand.c (expand_stack_vars): Make sure
30 a representative is unpoison if another
31 variable in the partition is handled by
32 use-after-scope sanitization.
34 2018-09-24 Richard Biener <rguenther@suse.de>
36 PR tree-optimization/63155
37 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
38 the worklist when the edge of the respective argument isn't
41 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
43 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
44 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
45 (MASK_CLASS_P): Update for rename.
46 (MAYBE_MASK_CLASS_P): Ditto.
47 (REG_CLASS_NAMES): Update.
48 (REG_CLASS_CONTENT): Update.
49 * config/i386/i386.c (regclass_map): Update for MASK_REG
50 and ALL_MASK_REGS rename.
51 * config/i386/constraints.md (Yk): Update for rename.
54 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
56 * config/i386/i386.h (enum reg_class): Remove
57 EVEX_SSE_REGS and MOD4_SSE_REGS.
58 (REG_CLASS_NAMES): Update.
59 (REG_CLASS_CONTENT): Update.
60 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
61 registers as ALL_SSE_REGS.
62 (ix86_additional_allocno_class_p): Remove.
63 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
64 (ix86_register_priority): Lower priority of EVEX SSE registers.
65 Use IN_RANGE macro where appropriate.
66 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
68 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
69 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
70 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
71 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
72 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
73 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
74 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
75 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
76 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
77 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
78 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
79 * config/i386/constraints.md (Yh): Remove.
81 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
83 * config/i386/i386.c (regclass_map): Declare integer REX registers
86 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
88 * doc/service.texi (Service): Switch the fsf.org link to https.
90 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
93 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
94 Define to speculation_safe_value_not_needed.
96 2018-09-21 Florian Weimer <fweimer@redhat.com>
99 * doc/extend.texi (Common Function Attributes): Mention that
100 noreturn suppresses tail call optimization.
102 2018-09-21 Jeff Law <law@redhat.com>
104 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
105 vr_values::cleanup_edges_and_switches.
106 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
108 (identify_jump_threads): Remove EDGE_IGNORE handling.
109 (execute_vrp): Move handling of to_remove_edges and
110 to_update_switch_stmts into vr_values class member functions.
111 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
112 (to_update_switch_stmts): Likewise.
113 * vr-values.c: Include cfghooks.h.
114 (vr_values::vr_values): Initialize to_remove_edges and
115 to_update_switch_stmts.
116 (vr_values::~vr_values): Verify to_remove_edges and
117 to_update_switch_stmts are empty.
118 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
119 (vr_values::cleanup_edges_and_switches): New member function.
120 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
121 function. Add new data members.
123 2018-09-21 David Malcolm <dmalcolm@redhat.com>
125 PR tree-optimization/87309
126 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
127 calls with pflags and alt_flags.
128 (selftest::test_capture_of_dump_calls): Add test of interaction of
129 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
131 2018-09-21 Olivier Hainque <hainque@adacore.com>
133 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
135 2018-09-21 Olivier Hainque <hainque@adacore.com>
137 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
139 2018-09-21 Olivier Hainque <hainque@adacore.com>
141 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
142 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
143 (VXWORKS_LIBS_RTP): Minor reordering.
145 2018-09-21 Olivier Hainque <hainque@adacore.com>
147 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
148 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
150 2018-09-21 Olivier Hainque <hainque@adacore.com>
152 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
153 (PTRDIFF_TYPE): Likewise.
155 2018-09-21 Olivier Hainque <hainque@adacore.com>
157 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
158 triplet, similar to support for VxWorks7.
159 * config/vxworks-dummy.h: Provide a default definition
160 of TARGET_VXWORKS64 to 0.
162 2018-09-21 Olivier Hainque <hainque@adacore.com>
164 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
165 * config/vxworks-dummy.h: here.
167 2018-09-21 Olivier Hainque <hainque@adacore.com>
169 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
171 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
172 Bo Zhou <zbo.zhou@hisilicon.com>
174 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
175 * config/aarch64/aarch64-tune.md: Regenerated.
176 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
177 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
178 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
180 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
181 Julian Brown <julian@codesourcery.com>
183 * builtins.c (get_builtin_sync_mem): Handle address spaces.
185 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
187 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
188 if the call takes a static chain.
190 2018-09-21 Martin Liska <mliska@suse.cz>
192 * auto-profile.c (autofdo_source_profile::read): Do not
194 (read_profile): Do not add working sets.
195 (read_autofdo_file): Remove sum_all.
196 (afdo_callsite_hot_enough_for_early_inline): Remove const
198 * coverage.c (struct counts_entry): Remove gcov_summary.
199 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
200 do not support GCOV_TAG_PROGRAM_SUMMARY.
201 (get_coverage_counts): Remove summary and expected
203 * coverage.h (get_coverage_counts): Likewise.
204 * doc/gcov-dump.texi: Remove -w option.
205 * gcov-dump.c (dump_working_sets): Remove.
206 (main): Do not support '-w' option.
207 (print_usage): Likewise.
208 (tag_summary): Likewise.
209 * gcov-io.c (gcov_write_summary): Do not dump
211 (gcov_read_summary): Likewise.
212 (gcov_histo_index): Remove.
213 (gcov_histogram_merge): Likewise.
214 (compute_working_sets): Likewise.
215 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
217 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
218 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
219 (GCOV_HISTOGRAM_SIZE): Remove.
220 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
221 (struct gcov_summary): Simplify rapidly just
222 to runs and sum_max fields.
223 (gcov_histo_index): Remove.
224 (NUM_GCOV_WORKING_SETS): Likewise.
225 (compute_working_sets): Likewise.
226 * gcov-tool.c (print_overlap_usage_message): Remove
228 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
229 (output_lines): Remove program related line.
230 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
231 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
233 (input_profile_summary): Do not read it.
234 (merge_profile_summaries): And do not merge it.
235 (input_symtab): Do not call removed function.
236 * modulo-sched.c (sms_schedule): Do not print sum_max.
237 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
238 removed when histogram method was invented.
239 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
241 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
243 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
244 and dump selected value.
245 * profile.c (add_working_set): Remove.
246 (get_working_sets): Likewise.
247 (find_working_set): Likewise.
248 (get_exec_counts): Do not work with working sets.
249 (read_profile_edge_counts): Do not inform as sum_max is removed.
250 (compute_branch_probabilities): Likewise.
251 (compute_value_histograms): Remove argument for call of
253 * profile.h: Do not make gcov_summary const.
255 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
257 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
259 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
261 PR tree-optimization/86990
262 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
263 Check that the entire merged store group is made of constants only for
266 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
268 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
269 (VTABLE_VERIFICATION_SPEC): Likewise.
270 (SANITIZER_EARLY_SPEC): Likewise.
271 (SANITIZER_SPEC): Likewise.
272 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
273 * doc/invoke.texi (Link Options): Document -r.
275 2018-09-20 Richard Biener <rguenther@suse.de>
278 * gimplify.c (gimplify_expr): Retain alignment of
279 addressable lvalue in dereference.
281 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
284 * configure.ac: Check for .loc is_stmt support.
285 * configure, config.in: Rebuilt.
286 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
289 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
291 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
292 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
295 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
297 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
299 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
302 2018-09-20 Marek Polacek <polacek@redhat.com>
304 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
306 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
308 PR tree-optimization/87288
309 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
310 into account when determining PEELING_FOR_NITERS.
312 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
314 PR tree-optimization/86877
315 * tree-vect-loop.c (vect_analyze_loop_2): Call
316 vect_verify_datarefs_alignment.
318 2018-09-19 Marek Polacek <polacek@redhat.com>
320 * doc/invoke.texi: Document -Wclass-conversion.
322 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
324 * config/pa/pa.c (pa_adjust_priority): Delete.
325 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
327 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
328 (atomic_storehi): Likewise.
329 (atomic_storesi): Likewise.
330 (atomic_loaddi): Restore compare and swap exchange loop code.
332 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
334 PR rtl-optimization/86902
335 * combine.c (try_combine): When changing the CC mode used, don't change
336 an unrelated mode in other_insn to that new CC mode.
338 2018-09-19 David Malcolm <dmalcolm@redhat.com>
340 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
341 with %T in place of calls to dump_generic_expr.
342 (prune_runtime_alias_test_list): Likewise.
343 (create_runtime_alias_checks): Likewise.
344 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
345 (vect_analyze_data_ref_dependence): Likewise.
346 (vect_slp_analyze_data_ref_dependence): Likewise.
347 (vect_record_base_alignment): Likewise. Use %G in place of call
349 (vect_compute_data_ref_alignment): Likewise.
350 (verify_data_ref_alignment): Likewise.
351 (vect_find_same_alignment_drs): Likewise.
352 (vect_analyze_group_access_1): Likewise.
353 (vect_analyze_data_ref_accesses): Likewise.
354 (dependence_distance_ge_vf): Likewise.
355 (dump_lower_bound): Likewise.
356 (vect_prune_runtime_alias_test_list): Likewise.
357 (vect_find_stmt_data_reference): Likewise.
358 (vect_analyze_data_refs): Likewise.
359 (vect_create_addr_base_for_vector_ref): Likewise.
360 (vect_create_data_ref_ptr): Likewise.
361 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
362 (vect_can_advance_ivs_p): Likewise.
363 (vect_update_ivs_after_vectorizer): Likewise.
364 (vect_gen_prolog_loop_niters): Likewise.
365 (vect_prepare_for_masked_peels): Likewise.
366 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
367 (vect_determine_vectorization_factor): Likewise.
368 (vect_is_simple_iv_evolution): Likewise.
369 (vect_analyze_scalar_cycles_1): Likewise.
370 (vect_analyze_loop_operations): Likewise.
371 (report_vect_op): Likewise.
372 (vect_is_slp_reduction): Likewise.
373 (check_reduction_path): Likewise.
374 (vect_is_simple_reduction): Likewise.
375 (vect_create_epilog_for_reduction): Likewise.
376 (vect_finalize_reduction:): Likewise.
377 (vectorizable_induction): Likewise.
378 (vect_transform_loop_stmt): Likewise.
379 (vect_transform_loop): Likewise.
380 (optimize_mask_stores): Likewise.
381 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
382 (vect_split_statement): Likewise.
383 (vect_recog_over_widening_pattern): Likewise.
384 (vect_recog_average_pattern): Likewise.
385 (vect_determine_min_output_precision_1): Likewise.
386 (vect_determine_precisions_from_range): Likewise.
387 (vect_determine_precisions_from_users): Likewise.
388 (vect_mark_pattern_stmts): Likewise.
389 (vect_pattern_recog_1): Likewise.
390 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
391 (vect_record_max_nunits): Likewise.
392 (vect_build_slp_tree_1): Likewise.
393 (vect_build_slp_tree_2): Likewise.
394 (vect_print_slp_tree): Likewise.
395 (vect_analyze_slp_instance): Likewise.
396 (vect_detect_hybrid_slp_stmts): Likewise.
397 (vect_detect_hybrid_slp_1): Likewise.
398 (vect_slp_analyze_operations): Likewise.
399 (vect_slp_analyze_bb_1): Likewise.
400 (vect_transform_slp_perm_load): Likewise.
401 (vect_schedule_slp_instance): Likewise.
402 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
403 (vect_mark_stmts_to_be_vectorized): Likewise.
404 (vect_init_vector_1): Likewise.
405 (vect_get_vec_def_for_operand): Likewise.
406 (vect_finish_stmt_generation_1): Likewise.
407 (vect_check_load_store_mask): Likewise.
408 (vectorizable_call): Likewise.
409 (vectorizable_conversion): Likewise.
410 (vectorizable_operation): Likewise.
411 (vectorizable_load): Likewise.
412 (vect_analyze_stmt): Likewise.
413 (vect_is_simple_use): Likewise.
414 (vect_get_vector_types_for_stmt): Likewise.
415 (vect_get_mask_type_for_stmt): Likewise.
416 * tree-vectorizer.c (increase_alignment): Likewise.
418 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
420 * doc/rtl.texi: Adjust vec_select description.
421 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
422 non-constant selectors.
424 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
426 * config/aarch64/aarch64-protos.h
427 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
428 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
429 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
430 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
431 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
432 (AARCH64_FL_PROFILE): Move index so flags are ordered.
433 (AARCH64_ISA_RCPC8_4): New flag.
434 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
435 to aarch64_offset_9bit_signed_unscaled_p.
436 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
438 * config/aarch64/constraints.md (Ust): New constraint.
439 * config/aarch64/predicates.md.
440 (aarch64_9bit_offset_memory_operand): New predicate.
441 (aarch64_rcpc_memory_operand): New predicate.
443 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
445 PR rtl-optimization/87361
446 * rtlanal.c (nonzero_bits1): Revert accidental change.
448 2018-09-19 Richard Biener <rguenther@suse.de>
450 PR tree-optimization/87349
451 PR tree-optimization/87342
452 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
454 2018-09-18 Marek Polacek <polacek@redhat.com>
456 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
457 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
459 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
461 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
463 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
465 PR rtl-optimization/86882
466 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
468 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
470 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
471 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
473 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
476 * doc/invoke.texi (Link Options): Fix formatting and grammar.
478 2018-09-18 Richard Biener <rguenther@suse.de>
481 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
482 (compute_samebase_partition_bases): Likewise.
483 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
484 (gimple_can_coalesce_p): Simplify.
486 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
488 Handle a library implementation of ffs calling __builtin_ffs.
489 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
490 (mmix_init_libfuncs): New function: make __builtin_ffs expand
493 2018-09-17 David Malcolm <dmalcolm@redhat.com>
495 * diagnostic-show-locus.c (class layout_range): Add field
497 (layout_range::layout_range): Add "original_idx" param and use it
498 to initialize new field.
499 (make_range): Use 0 for original_idx.
500 (layout::layout): Pass in index to calls to
501 maybe_add_location_range.
502 (layout::maybe_add_location_range): Add param "original_idx" and
503 pass it on to layout_range.
504 (layout::print_any_labels): Pass on range->m_original_idx to
506 (gcc_rich_location::add_location_if_nearby): Use 0 for
508 * gcc-rich-location.h (text_range_label::get_text): Update for new
510 (range_label_for_type_mismatch::get_text): Likewise.
512 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
514 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
516 2018-09-17 David Malcolm <dmalcolm@redhat.com>
518 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
519 format_string_diagnostic_t.
520 (fmtwarn_n): Likewise.
521 * substring-locations.c
522 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
523 (format_warning_n_va): Convert to...
524 (format_string_diagnostic_t::emit_warning_n_va): ...this.
525 (format_warning_va): Convert to...
526 (format_string_diagnostic_t::emit_warning_va): ...this.
527 (format_warning_at_substring): Convert to...
528 (format_string_diagnostic_t::emit_warning): ...this.
529 (format_warning_at_substring_n): Convert to...
530 (format_string_diagnostic_t::emit_warning_n): ...this.
531 * substring-locations.h (class format_string_diagnostic_t): New
533 (format_warning_va): Convert to
534 format_string_diagnostic_t::emit_warning_va.
535 (format_warning_n_va): Convert to
536 format_string_diagnostic_t::emit_warning_n_va.
537 (format_warning_at_substring): Convert to
538 format_string_diagnostic_t::emit_warning.
539 (format_warning_at_substring_n): Convert to
540 format_string_diagnostic_t::emit_warning_n.
542 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
543 Bernd Schmidt <bernds_cb1@t-online.de>
545 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
548 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
550 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
551 operand 0 predicate to nonimmediate operand.
552 (rint<mode>2_frndint): Remove insn pattern.
553 (rint<mode>2): Change operand 1 predicate to general_operand.
554 Extend operand 1 to XFmode and generate rintxf2 insn.
555 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
556 Do not use X87MODEF mode macro.
557 (frndintxf2_<rounding>_i387): Rename from
558 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
559 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
560 to XFmode and generate significandxf3 insn.
562 2018-09-17 Richard Biener <rguenther@suse.de>
564 PR tree-optimization/87328
565 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
566 visiting unexecutable backedges when not iterating.
567 (do_rpo_vn): Mark all edges not executable even when not
570 2018-09-17 Martin Jambor <mjambor@suse.cz>
573 * doc/invoke.texi (Warning Options): Likewise.
575 2018-09-17 Richard Biener <rguenther@suse.de>
577 PR tree-optimization/87301
578 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
579 clean EH info from leftover copy assignments.
581 2018-09-17 Martin Liska <mliska@suse.cz>
583 PR gcov-profile/85871
584 * gcov.c (output_intermediate_file): Fix out of bounds
587 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
589 * config/arc/arc.c: Object attributes for core4 not reflected
591 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
594 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
596 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
598 2018-09-17 Martin Liska <mliska@suse.cz>
600 * doc/gcov.texi: Document new option --use-hotness-colors.
601 * gcov.c (struct source_info): Declare new field.
602 (source_info::source_info): Set default for maximum_count.
603 (print_usage): Add new -q option.
604 (process_args): Process it.
605 (accumulate_line_info): Save src->maximum_count.
606 (output_line_beginning): Make color line number if
607 flag_use_hotness_colors is set.
608 (output_line_details): Pass default argument value.
609 (output_lines): Pass src->maximum_count.
611 2018-09-17 Martin Liska <mliska@suse.cz>
613 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
614 Use processor_names table.
615 * config/i386/i386.c (ix86_default_align): Use
616 processor_cost_table for alignment values.
617 (ix86_option_override_internal): Use processor_names.
618 (ix86_function_specific_print): Likewise.
619 * config/i386/i386.h (struct processor_costs):
620 Add alignment values.
621 (struct ptt): Remove and replace with const char *.
622 * config/i386/x86-tune-costs.h (struct processor_costs):
623 Declare default alignments for all costs.
625 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
627 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
628 symbolics or VR_VARYING ranges for ABS_EXPR.
629 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
630 when range will wrap.
632 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
635 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
636 before and after a JUMP_TABLE_DATA.
638 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
641 * dojump.c (do_compare_and_jump): Canonicalize function pointers
642 when one operand is a function pointer. Use POINTER_TYPE_P and
643 FUNC_OR_METHOD_TYPE_P.
644 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
645 * fold-const.c (build_range_check): Likewise.
646 * match.pd (simple_comparison): Likewise.
648 2018-09-14 David Malcolm <dmalcolm@redhat.com>
651 * spellcheck.c (get_edit_distance_cutoff): New function.
652 (selftest::test_edit_distance_unit_test_oneway): Rename to...
653 (selftest::test_get_edit_distance_one_way): ...this.
654 (selftest::test_get_edit_distance_unit): Rename to...
655 (selftest::test_get_edit_distance_both_ways): ...this.
656 (selftest::test_edit_distances): Move tests to this new function,
657 and test some more pairs of strings. Update for above renaming.
658 (selftest::get_old_cutoff): New function.
659 (selftest::test_get_edit_distance_cutoff): New function.
660 (selftest::assert_suggested_for): New function.
661 (ASSERT_SUGGESTED_FOR): New macro.
662 (selftest::assert_not_suggested_for): New function.
663 (ASSERT_NOT_SUGGESTED_FOR): New macro.
664 (selftest::test_suggestions): New function.
665 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
666 tests to selftest::test_edit_distances and call it. Add calls to
667 selftest::test_get_edit_distance_cutoff and
668 selftest::test_suggestions.
669 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
670 (best_match::consider): Replace hard-coded cutoff calculation with
672 (best_match::get_cutoff): New declaration.
673 (best_match::get_best_meaningful_candidate): Likewise.
675 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
677 * builtins.c (fold_builtin_strlen): Remove TODO comment.
679 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
682 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
684 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
685 terminated string literal.
687 2018-09-14 Martin Sebor <msebor@redhat.com>
689 * builtins.c (unterminated_array): Handle ARRAY_REF.
690 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
691 * builtins.h (unterminated_array): Declare extern.
692 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
694 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
697 2018-09-14 Martin Sebor <msebor@redhat.com>
698 Jeff Law <law@redhat.com>
700 * builtins.c (unterminated_array): New.
701 (expand_builtin_strcpy): Adjust.
702 (expand_builtin_strcpy_args): Detect unterminated arrays.
703 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
705 * gimple-fold.h (get_maxval_strlen): Add argument.
706 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
708 * gimple-fold.c (get_range_strlen): Add argument.
709 (get_maxval_strlen): Adjust.
710 * gimple-fold.h (get_range_strlen): Add argument.
712 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
714 * config/i386/movdirintrin.h: Fix copyright year.
716 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
718 * reg-stack.c: Include regs.h.
719 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
720 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
721 FIRST_STACK_REG, not DFmode.
722 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
723 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
724 (change stack): Default register mode to the reg_raw_mode of
725 FIRST_STACK_REG, not DFmode.
726 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
727 (*swapxf): Rename from swapxf.
729 2018-09-14 Carl Love <cel@us.ibm.com>
731 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
732 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
734 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
737 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
740 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
743 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
745 2018-09-14 Jason Merrill <jason@redhat.com>
747 Fix --enable-gather-detailed-mem-stats.
748 * hash-table.c (hash_table_usage): Change from variable to function.
749 * hash-table.h: Adjust.
750 * Makefile.in: Add missing dependencies on hash-table.h.
752 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
754 PR tree-optimization/87259
756 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
757 execute_cse_reciprocals_1 has tried transforming.
759 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
761 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
762 VR_VARYING for PLUS/MINUS_EXPR.
764 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
766 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
769 2018-09-14 Richard Biener <rguenther@suse.de>
772 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
773 bits for the merged partition.
775 2018-09-13 Martin Sebor <msebor@redhat.com>
776 Bernd Edlinger <bernd.edlinger@hotmail.de>
778 * builtins.h (c_srlen): Add argument.
779 * builtins.c (warn_string_no_nul): New function.
780 (c_strlen): Add argument and use it. Update recursive calls.
781 Pass DECL argument to string_constant to get info on non
782 terminated strings. Update *NONSTR as needed.
783 (fold_builtin_strlen): Add argument to calls to c_strlen.
784 Warn for unterminated arrays.
785 (warn_string_no_null): Add prototype.
786 * expr.c (string_constant): Update arguments. Update recursive
787 calls appropriately. Detect missing NUL terminator and outermost
788 declaration its missing in.
789 Improve checks for arrays with nonzero lower bound or elements
790 that are not a single byte. Simplify offset computation.
791 Simplify checks for non-NUL terminated strings.
792 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
793 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
795 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
797 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
799 * fold-const.c (c_getstr): Fix function comment. Remove unused third
800 argument. Fix range checks.
801 * fold-const.h (c_getstr): Adjust protoype.
802 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
803 string is constant but contains no NUL byte.
805 * expr.c (string_constant): Adjust function comment.
806 Remove bogus check for zero termination.
808 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
810 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
811 (get_constant_size): Don't make STRING_CSTs larger than they are.
812 (check_string_literal): New check function for STRING_CSTs.
813 (output_constant): Use it.
815 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
818 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
820 2018-09-13 Richard Biener <rguenther@suse.de>
822 PR tree-optimization/87263
823 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
824 (struct unwind_state): Add max_rpo field.
825 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
826 Compute max_rpo, the max RPO number a block can be backwards reached
827 from. Re-write non-iterating mode to a RPO ordered worklist approach,
828 separating it from the iterating mode.
830 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
832 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
833 (rfs_decision): New scheduling decision.
835 2018-09-13 Richard Biener <rguenther@suse.de>
838 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
839 (vn_nary_op_insert_pieces_predicated): Do not write useless
840 valid_dominated_by_p entry outside of the allocated storage.
842 2018-09-13 Omar Sandoval <osandov@osandov.com>
843 Tom de Vries <tdevries@suse.de>
846 * dwarf2out.c (is_c): New function.
847 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
849 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
852 * config/aarch64/aarch64.md (*aarch64_bfxil):
854 * config/aarch64/constraints.md (Ulc): Define.
855 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
857 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
860 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
862 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
863 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
864 aarch64_layout_frame call.
865 (aarch64_expand_epilogue): Likewise.
866 (aarch64_initial_elimination_offset): Likewise.
867 (aarch64_get_separate_components): Likewise.
868 (aarch64_use_return_insn_p): Likewise.
869 (aarch64_layout_frame): Remove unneeded check.
871 2018-09-13 Jakub Jelinek <jakub@redhat.com>
873 * configure.ac: Only append
874 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
875 gcc_config_arguments if it was never reconfigured or last reconfigure
876 was with different arguments.
877 * configure: Regenerated.
879 2018-09-13 Jakub Jelinek <jakub@redhat.com>
880 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
883 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
884 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
886 2018-09-13 Jakub Jelinek <jakub@redhat.com>
888 PR tree-optimization/87287
889 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
890 X % C == 0 to X % (unsigned) C == 0 optimization to ...
891 * match.pd (X % C == 0): ... here. New optimization.
893 2018-09-12 Jakub Jelinek <jakub@redhat.com>
896 * expr.h (maybe_optimize_mod_cmp): Declare.
897 * expr.c (mod_inv): New function.
898 (maybe_optimize_mod_cmp): New function.
899 (do_store_flag): Use it.
900 * cfgexpand.c (expand_gimple_cond): Likewise.
902 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
903 Julian Brown <julian@codesourcery.com>
906 * gimplify.c (gimplify_scan_omp_clauses): Set
907 target_firstprivatize_array_bases in OpenACC parallel and kernels
908 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
909 OpenACC data regions.
911 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
913 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
914 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
916 2018-09-12 Richard Biener <rguenther@suse.de>
918 PR tree-optimization/87280
919 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
920 edge but unreachable target.
921 (do_rpo_vn): For conservatively handling a PHI only mark
922 the backedge executable but not the block reachable.
924 2018-09-12 Richard Biener <rguenther@suse.de>
926 PR tree-optimization/87266
927 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
930 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
932 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
934 ("trunc<BFP:mode><DFP_ALL:mode>2")
935 ("trunc<DFP_ALL:mode><BFP:mode>2")
936 ("extend<BFP:mode><DFP_ALL:mode>2")
937 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
938 according to the target operand type.
940 2018-09-12 Jakub Jelinek <jakub@redhat.com>
941 Andreas Krebbel <krebbel@linux.ibm.com>
943 PR tree-optimization/86844
944 * gimple-ssa-store-merging.c
945 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
946 there are any overlapping stores in between them, make sure they are
947 also coalesced or we give up completely.
949 2018-09-12 Jakub Jelinek <jakub@redhat.com>
952 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
953 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
955 2018-09-12 Tom de Vries <tdevries@suse.de>
957 * common.opt (gdescribe-dies): Add option.
958 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
959 attribute for artifical and nameless decls.
960 (dwarf2out_register_external_die): Add description attribute to
961 external reference die.
962 (add_desc_attribute): New functions.
963 (gen_subprogram_die): Add description attribute to
964 DW_TAG_call_site_parameter.
965 * tree-pretty-print.c (print_generic_expr_to_str): New function.
966 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
967 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
969 (@item -gdescribe-dies): Add.
971 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
973 * tree-vrp.c (vrp_shift_undefined_p): Remove.
974 (extract_range_from_binary_expr_1: Call
975 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
976 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
979 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
981 * gimple-ssa-warn-alloca.c
982 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
983 field for ALLOCA_BOUND_*_LARGE.
985 2018-09-11 Nathan Sidwell <nathan@acm.org>
987 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
989 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
991 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
992 for clobbers. Remove obsolete comment.
994 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
996 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
997 mpxchk, mpxld and mpxst types.
998 (define_attr length_immediate): Remove all processing of mpx types.
999 (define_attr prefix_0f): Ditto.
1000 (define_attr memory): Ditto.
1002 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
1004 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
1005 (log<mode>2): Change operand 1 predicate to general_operand.
1006 Extend operand 1 to XFmode and generate logxf3 insn.
1007 (log10<mode>2): Change operand 1 predicate to general_operand.
1008 Extend operand 1 to XFmode and generate log10xf3 insn.
1009 (log2<mode>2): Change operand 1 predicate to general_operand.
1010 Extend operand 1 to XFmode and generate log2xf3 insn.
1011 (fyl2xp1_extend<mode>xf3_i387): Remove.
1012 (log1p<mode>2): Change operand 1 predicate to general_operand.
1013 Extend operand 1 to XFmode and generate log1pxf3 insn.
1014 (fxtract_extend<mode>xf3_i387): Remove.
1015 (logb<mode>2): Change operand 1 predicate to general_operand.
1016 Extend operand 1 to XFmode and generate logbxf3 insn.
1017 (ilogb<mode>2): Change operand 1 predicate to general_operand.
1018 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
1019 (significand<mode>2): Change operand 1 predicate to general_operand.
1020 Extend operand 1 to XFmode and generate significandxf3 insn.
1022 2018-09-11 Nathan Sidwell <nathan@acm.org>
1024 * gcc.c (perror_with_name, pfatal_with_name): Delete.
1025 (load_specs): Use fatal_error.
1026 (DELETE_IF_ORDINARY, process_command): Use error.
1027 (execute, run_attempt): Use fatal_error.
1029 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
1031 * diagnostic-core.h (sorry_at): New prototype.
1032 * diagnostic.c (sorry_at): New function.
1034 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
1036 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
1037 by zero as VR_UNDEFINED.
1039 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
1041 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
1042 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
1043 (<sincos>mode2): New expander.
1044 (sincos_extend<mode>xf3_i387): Remove insn pattern.
1045 (sincos -> sin, cos splitters): Remove splitter patterns.
1046 (sincos<mode>3): Change operand 2 predicate to general_operand.
1047 Extend operand 2 to XFmode and generate sincosxf3 insn.
1048 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
1049 Change operand 3 predicate to const1_operand.
1050 (fptan_extend<mode>xf4_i387): Remove insn pattern.
1051 (tanxf2): Update operands in the call to fptanxf4_i387.
1052 (tan<mode>2): Change operand 1 predicate to general_operand.
1053 Extend operand 1 to XFmode and generate tanxf3 insn.
1054 (atan2xf3): Rename from *fpatanxf3_i387.
1055 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
1056 (atan2xf3): Remove expander.
1057 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
1058 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
1059 (atan<mode>2): Change operand 1 predicate to general_operand.
1060 Extend operand 1 to XFmode and generate atanxf3 insn.
1062 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
1064 * config/i386/i386.md (x87/SSE constant load splitter): Use
1065 memory_operand instead of nonimmediate_operand for input operand
1068 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
1070 * config/i386/i386.md (float partial SSE register stall splitter): Move
1071 splitter near its instruction pattern.
1072 (float_extend partial SSE register stall splitter): Ditto.
1073 (float_truncate partial SSE register stall splitter): Ditto.
1075 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
1078 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1079 to speculation_safe_value_not_needed.
1082 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
1083 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
1084 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
1085 leaf_function_p, instead use has_hard_reg_initial_val.
1087 2018-09-09 Nathan Sidwell <nathan@acm.org>
1089 * gcc.h (pfatal_with_name): Don't declare here.
1090 * gcc.c (pfatal_with_name): Make static.
1092 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
1094 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
1097 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
1099 PR rtl-optimization/85458
1100 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
1101 priority hook to reduce the priority of EXPR.
1103 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
1105 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
1106 DImode for x87 on 32bit targets. Conditionally disable x87 modes
1107 with X87_ENABLE_FLOAT. Remove preparation code.
1108 (*float<SWI48:mode><MODEF:mode>2): Rename from
1109 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
1110 math using "enabled" attribute.
1111 (*floatdi<MODEF:mode>2_i387): Rename from
1112 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
1113 enable for 32bit targets only.
1114 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
1116 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
1117 as operand 1 predicate. Rewrite as define_insn_and_split.
1118 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
1120 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
1122 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
1123 to fallthru to FLOAT case.
1125 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
1128 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
1129 around folding of vec_sl to handle out of range shift values.
1131 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
1133 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
1134 Update callers to gen_fix_trunc<mode>_i387_fisttp
1135 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
1136 nonimmediate_operand.
1137 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
1138 and corresponding splitters.
1139 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
1140 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
1141 (fix_truncdi_i387_with_temp): Remove insn pattern
1142 and corresponding splitters.
1143 (fix_trunc<mode>_i387): Change operand 0 predicate to
1144 nonimmediate_operand.
1145 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
1146 and corresponding splitters.
1147 (*fistdi2_1): Remove.
1149 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
1150 (lrintxfdi2): Remove expander. Reimplement as define_insn.
1151 (*fist<mode>2_1): Remove.
1152 (fist<mode>2): Ditto.
1153 (fist<mode>2_with_temp): Remove insn pattern and corresponding
1155 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
1156 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
1157 (fistdi2_<rounding>): Change operand 0 predicate to
1158 nonimmediate_operand.
1159 (fistdi2_<rounding>_with_temp): Remove insn pattern
1160 and corresponding splitters.
1161 (fist<mode>2_<rounding>): Change operand 0 predicate to
1162 nonimmediate_operand.
1163 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
1164 and corresponding splitters.
1166 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
1168 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1170 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
1173 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
1175 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
1176 early gimple folding of vec_splat().
1177 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
1178 * gimple-fold.h: Add an extern define for tree_vec_extract().
1180 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
1182 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
1183 wrappers around TREE_TYPE comparisons.
1185 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1188 * config/s390/predicates.md: Add nonsym_memory_operand.
1189 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
1190 contains a SYMBOL_REF, load it into an intermediate pseudo.
1191 (s390_emit_compare_and_swap): Legitimize operand.
1192 * config/s390/s390.md: Use the new nonsym_memory_operand
1193 with UNSPECV_CAS patterns.
1195 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1198 * config/s390/s390-passes.def: New file.
1199 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
1201 (make_pass_s390_early_mach): Add declaration.
1202 * config/s390/s390.c (make_pass_s390_early_mach):
1203 (s390_option_override): Remove dynamic registration.
1204 * config/s390/t-s390: Add s390-passes.def.
1206 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1208 * config/s390/s390.c (s390_decompose_constant_pool_ref):
1209 Remove UNSPEC_LTREL_BASE check.
1210 (annotate_constant_pool_refs): Likewise.
1211 (find_constant_pool_ref): Likewise.
1212 (find_ltrel_base): Removed.
1213 (replace_ltrel_base): Removed.
1214 (s390_mainpool_finish): Remove replace_ltrel_base call.
1215 (s390_chunkify_start): Remove pending LTREL_BASE logic.
1216 (s390_chunkify_finish): Remove replace_ltrel_base call.
1217 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
1219 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
1222 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1223 to speculation_safe_value_not_needed.
1225 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
1226 Bernd Schmidt <bernds_cb1@t-online.de>
1228 * config/nvptx/nvptx-opts.h: New file.
1229 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
1230 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
1232 (TARGET_SM35): New macro.
1233 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
1235 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
1237 (misa=): New option.
1238 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
1240 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
1242 * config/i386/i386.md (truncdfsf2): Remove expander.
1243 (truncdfsf2_with_temp): Ditto.
1244 (truncxf<mode>2): Ditto.
1245 (*truncdfsf_fast_mixed): Remove insn pattern.
1246 (*truncdfsf_fast_i387): Ditto.
1247 (*truncdfsf_mixed): Ditto.
1248 (*truncdfsf_i387): Ditto.
1249 (*truncdfsf2_i387_1): Ditto.
1250 (*truncxfsf2_mixed): Ditto.
1251 (*truncxfdf2_mixed): Ditto.
1252 (*truncxf<mode>2_i387_noop): Ditto. Update callers
1253 to call gen_truncxf<mode>2 instead.
1254 (*truncxf<mode>2_i387): Remove.
1255 (reg->reg splitters): Remove splitter pattern.
1256 (reg->mem splitters): Ditto.
1258 (truncdfsf2): New insn pattern.
1259 (truncxf<mode>2): Ditto.
1261 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1263 * tree-ssa-math-opts.c (is_mult_by): New function.
1264 (is_square_of): Use the above.
1265 (optimize_recip_sqrt): New function.
1266 (pass_cse_reciprocals::execute): Use the above.
1268 2018-09-05 Richard Biener <rguenther@suse.de>
1271 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
1272 to zero-init the emplaced vec.
1274 2018-09-05 Martin Liska <mliska@suse.cz>
1276 PR tree-optimization/87205
1277 * tree-switch-conversion.c (pass_lower_switch::execute):
1278 Group cases for switch statements.
1280 2018-09-05 Richard Biener <rguenther@suse.de>
1282 PR tree-optimization/87217
1283 * tree-ssa-sccvn.c (vuse_valueize): New.
1284 (vn_reference_lookup_pieces): Use it.
1285 (vn_reference_lookup): Likewise.
1287 2018-09-05 Nathan Sidwell <nathan@acm.org>
1290 * stor-layout.c (place_field): Scan forwards to check last
1291 bitfield when ms_bitfield_placement is in effect.
1293 2018-09-05 Richard Biener <rguenther@suse.de>
1296 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
1299 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
1300 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
1302 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
1303 * config.gcc (extra_objs): Build it.
1304 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
1306 * config/aarch64/aarch64-passes.def
1307 (pass_tag_collision_avoidance): New pass.
1308 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
1309 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
1310 (aarch64_classify_address): Remove static qualifier.
1311 (aarch64_address_info, aarch64_address_type): Move to...
1312 * config/aarch64/aarch64-protos.h: ... here.
1313 (make_pass_tag_collision_avoidance): New function.
1314 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
1317 2018-09-05 Martin Liska <mliska@suse.cz>
1319 * doc/gcov.texi: Update documentation of humar
1321 * gcov.c (format_count): Print one decimal place, it provides
1322 more fine number of situations like '1G' vs. '1.4G'.
1324 2018-09-05 Martin Liska <mliska@suse.cz>
1327 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
1328 * optc-gen.awk: Allow 'Var' for Deprecated options in order
1329 to generate a MASK value.
1331 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
1334 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
1335 if frame pointer isn't used.
1336 (compute_frame_pointer_to_fb_displacement): Likewise.
1338 2018-09-04 Jakub Jelinek <jakub@redhat.com>
1341 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
1342 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
1343 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
1344 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
1345 and OPTION_MASK_ISA_XSAVEC_UNSET.
1347 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
1349 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
1350 XOR operations in NAND case.
1352 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
1354 * wide-int-range.cc (wide_int_range_convert): New.
1355 * wide-int-range.h (wide_int_range_convert): New.
1356 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
1357 code into wide_int_range_convert.
1358 (extract_range_into_wide_ints): Do not munge anti range constants
1359 into the entire domain. Just return the range back.
1361 2018-09-04 Martin Liska <mliska@suse.cz>
1363 * genmatch.c (output_line_directive): Add new argument
1365 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
1367 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
1369 * doc/invoke.texi (Option Summary): Add whitespace.
1371 * doc/invoke.texi (Option Summary): Add -Waligned-new.
1373 2018-09-04 Richard Biener <rguenther@suse.de>
1375 PR tree-optimization/87211
1376 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
1377 backedge value we're supposed to treat as VARYING also number
1378 the PHI to VARYING in case it got a different value-number already.
1380 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
1382 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
1383 (extract_range_from_binary_expr_1): Do not call
1384 vrp_can_optimize_bit_op.
1385 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
1387 (wide_int_range_get_mask_and_bounds): New.
1388 (wide_int_range_optimize_bit_op): New.
1389 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
1390 (wide_int_range_bit_and): Same.
1391 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
1392 (wide_int_range_optimize_bit_op): New.
1393 (wide_int_range_get_mask_and_bounds): New.
1395 2018-09-04 Richard Biener <rguenther@suse.de>
1397 PR tree-optimization/87176
1398 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
1399 variable. When value-numbering a virtual PHI node make sure
1400 to not value-number to the backedge value.
1402 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
1404 * doc/extend.texi (Long Long, Hex Floats): Document support for
1405 long long and hex floats in more recent versions of ISO C++.
1407 2018-09-03 Richard Biener <rguenther@suse.de>
1409 PR tree-optimization/87177
1410 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
1413 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1415 * bb-reorder.c (edge_order): Convert to C-qsort-style
1416 tri-state comparator.
1417 (reorder_basic_blocks_simple): Change std::stable_sort to
1420 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1422 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
1423 tri-state comparator.
1424 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
1426 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1428 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
1429 (mergesort): ... here as maximum count for using netsort.
1430 (gcc_qsort): Set nlim to 3 if stable sort is requested.
1431 (gcc_stablesort): New.
1432 * system.h (gcc_stablesort): Declare.
1434 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1436 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
1437 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
1438 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
1440 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
1442 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
1443 lxsdx and stxsdx alternatives.
1444 (*mov<mode>_hardfloat64): Ditto.
1445 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
1447 2018-09-03 Richard Biener <rguenther@suse.de>
1449 PR tree-optimization/87200
1450 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
1453 2018-09-03 Martin Liska <mliska@suse.cz>
1455 PR tree-optimization/87201
1456 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
1457 Fix parenthesis in an expression.
1459 2018-09-03 Richard Biener <rguenther@suse.de>
1461 PR tree-optimization/87197
1462 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
1463 visited. CSE the VN_INFO hashtable lookup.
1465 PR tree-optimization/87169
1466 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
1467 iterating make sure there's no extra backedges from irreducible
1468 regions feeding the header. Mark the destination block
1471 2018-09-03 Martin Liska <mliska@suse.cz>
1474 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
1475 * common/common-targhooks.c (default_get_valid_option_values):
1477 * common/common-targhooks.h (default_get_valid_option_values):
1479 * common/config/i386/i386-common.c: Move processor_target_table
1481 (ix86_get_valid_option_values): New function.
1482 (TARGET_GET_VALID_OPTION_VALUES): New macro.
1483 * config/i386/i386.c (struct ptt): Move to i386-common.c.
1484 (PTA_*): Move all defined masks into i386-common.c.
1485 (ix86_function_specific_restore): Use new processor_cost_table.
1486 * config/i386/i386.h (struct ptt): Moved from i386.c.
1487 (struct pta): Likewise.
1488 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
1489 * doc/tm.texi.in: Likewise.
1490 * opt-suggestions.c (option_proposer::suggest_option):
1491 Pass prefix to build_option_suggestions.
1492 (option_proposer::get_completions): Likewise.
1493 (option_proposer::build_option_suggestions): Use the new target
1495 * opts.c (struct option_help_tuple): New struct.
1496 (print_filtered_help): Use the new target hook.
1498 2018-09-03 Martin Liska <mliska@suse.cz>
1501 * predict.c (set_even_probabilities): Add likely_edges
1502 argument and handle cases where we have precisely one
1504 (combine_predictions_for_bb): Catch also likely_edges.
1505 (tree_predict_by_opcode): Handle gswitch statements.
1506 * tree-cfg.h (find_case_label_for_value): New declaration.
1507 (find_taken_edge_switch_expr): Likewise.
1508 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
1509 Find pivot in decision tree based on probabily, not by number of
1512 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
1514 * doc/standards.texi (Standards): Update Objective-C reference.
1516 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1518 * doc/install.texi (Prerequisites): Update link for MPC.
1520 2018-09-01 Michael Matz <matz@suse.de>
1522 PR tree-optimization/87074
1523 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
1524 PHIs for outer-loop uses.
1526 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1528 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
1529 * doc/invoke.texi (C Dialect Options): Ditto.
1531 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1533 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
1535 2018-08-31 Richard Biener <rguenther@suse.de>
1537 PR tree-optimization/87168
1538 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
1539 (rpo_elim::eliminate_avail): When OP was not visited it must
1542 2018-08-31 David Malcolm <dmalcolm@redhat.com>
1544 * tree-vrp.c (copy_value_range): Convert param "from" from
1545 "value_range *" to "const value_range *".
1546 (range_is_null): Likewise for param "vr".
1547 (range_int_cst_p): Likewise.
1548 (range_int_cst_singleton_p): Likewise.
1549 (symbolic_range_p): Likewise.
1550 (value_ranges_intersect_p): Likewise for both params.
1551 (value_range_nonnegative_p): Likewise for param "vr".
1552 (value_range_constant_singleton): Likewise.
1553 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
1554 (extract_range_into_wide_ints): Likewise for param "vr".
1555 (extract_range_from_multiplicative_op): Likewise for params "vr0"
1557 (vrp_can_optimize_bit_op): Likewise.
1558 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
1560 (extract_range_from_unary_expr): Likewise.
1561 (debug_value_range): Likewise for param "vr".
1562 (value_range::dump): Add "const" qualifier.
1563 (vrp_prop::check_array_ref): Convert local "vr" from
1564 "value_range *" to "const value_range *".
1565 (vrp_prop::check_mem_ref): Likewise.
1566 (vrp_prop::visit_stmt): Likewise for local "old_vr".
1567 (vrp_intersect_ranges_1): Likewise for param "vr_1".
1568 (vrp_intersect_ranges): Likewise.
1569 (simplify_stmt_for_jump_threading): Likewise for local "vr".
1570 (vrp_prop::vrp_finalize): Likewise.
1571 * tree-vrp.h (value_range::dump): Add "const" qualifier.
1572 (vrp_intersect_ranges): Add "const" qualifier to params as above.
1573 (extract_range_from_unary_expr): Likewise.
1574 (value_range_constant_singleton): Likewise.
1575 (symbolic_range_p): Likewise.
1576 (copy_value_range): Likewise.
1577 (extract_range_from_binary_expr_1): Likewise.
1578 (range_int_cst_p): Likewise.
1579 (vrp_set_zero_nonzero_bits): Likewise.
1580 (range_int_cst_singleton_p): Likewise.
1582 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
1584 * config/aarch64/arm_neon.h (vabsd_s64): New.
1585 (vnegd_s64): Likewise.
1587 2018-08-31 Martin Jambor <mjambor@suse.cz>
1589 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
1591 2018-08-31 Martin Liska <mliska@suse.cz>
1593 * ipa-icf.c (sem_item::add_type): Use
1594 sem_item::m_type_hash_cache.
1595 * ipa-icf.h: Move the cache from sem_item_optimizer
1598 2018-08-31 Nathan Sidwell <nathan@acm.org>
1600 * doc/extend.texi (Backwards Compatibility): Remove implicit
1601 extern C leeway of () being (...).
1603 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1605 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
1607 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
1611 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
1613 2018-08-31 Jakub Jelinek <jakub@redhat.com>
1616 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
1617 gen_int_mode. Formatting fixes.
1619 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
1621 * target.def (custom_function_descriptors): Improve documentation.
1622 * doc/tm.texi.in (Trampolines): Expand discussion of function
1623 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
1624 beginning of the section.
1625 * doc/tm.texi: Regenerated.
1627 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
1629 * cfg.h (class auto_edge_flag): Spell out the template-id of the
1630 base class in the initializer list. This is a workaround for
1631 building with older GCC.
1632 (class auto_bb_flag): Likewise.
1634 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
1636 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
1637 (altivec_vcmpequ<VI_char>_p): Remove star.
1638 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
1640 (expand_strncmp_vec_sequence): New function.
1641 (emit_final_str_compare_vec): New function.
1642 (expand_strn_compare): Add support for vector strncmp.
1643 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
1644 length specification to bytes.
1645 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
1646 (vcmpnezb_p): New pattern.
1647 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
1648 for option -mstring-compare-inline-limit.
1650 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
1652 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
1653 (PTA_SKYLAKE): Add PTA_AES.
1654 (PTA_GOLDMONT): Likewise.
1656 2018-08-29 Jan Hubicka <jh@suse.cz>
1659 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
1660 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
1662 2018-08-29 Jan Hubicka <jh@suse.cz>
1664 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
1666 (hash_tree): Do not visit TYPE_STUB_DECL.
1667 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
1668 stream TYPE_STUB_DECL.
1669 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
1670 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
1671 after free_lang_data.
1672 (type_in_anonymous_namespace_p): Likewise.
1674 2018-08-29 Jan Hubicka <jh@suse.cz>
1676 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1677 comment that it has to be even number.
1678 (class sreal): Change m_sig type to int32_t.
1679 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1680 int64_t for temporary calculations.
1681 (sreal_verify_basics): Drop one bit from minimum and maximum.
1683 2018-08-30 Richard Biener <rguenther@suse.de>
1685 PR tree-optimization/87147
1686 * tree-ssa-sccvn.c (SSA_VISITED): New function.
1687 (visit_phi): When the degenerate result is from the backedge and
1688 we didn't visit its definition yet drop to VARYING.
1689 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
1691 2018-08-29 Jan Hubicka <jh@suse.cz>
1693 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
1695 (hash_tree): Likewise.
1697 2018-08-29 Jan Hubicka <jh@suse.cz>
1699 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
1700 and TYPE_NEXT_REF_TO.
1702 2018-08-29 Jan Hubicka <jh@suse.cz>
1704 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1705 comment that it has to be even number.
1706 (class sreal): Change m_sig type to int32_t.
1707 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1708 int64_t for temporary calculations.
1709 (sreal_verify_basics): Drop one bit from minimum and maximum.
1711 2018-08-30 Tamar Christina <tamar.christina@arm.com>
1713 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
1715 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
1718 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
1719 if to_add is negative.
1721 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
1724 * builtins.c (c_strlen): Improve range checks.
1726 2018-08-29 Martin Sebor <msebor@redhat.com>
1727 Jeff Law <law@redhat.com>
1729 PR tree-optimization/86714
1730 PR tree-optimization/86711
1731 * builtins.c (c_strlen): Add arguments to call to string_constant.
1732 * expr.c (string_constant): Add argument. Detect missing nul
1733 terminator and outermost declaration it's missing in.
1734 * expr.h (string_constant): Add argument.
1735 * fold-const.c (read_from_constant_string): Add arguments to call to
1737 (c_getstr): Likewise.
1738 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1740 * tree-ssa-strlen.c (get_stridx): Likewise.
1742 2018-08-29 Jan Hubicka <jh@suse.cz>
1744 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
1745 Do not stream DECL_VINDEX.
1746 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
1747 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
1748 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
1750 2018-08-29 Richard Biener <rguenther@suse.de>
1752 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
1753 virtual operands that are not default defs to honor region
1755 (rpo_vn_valueize): Remove ineffective code here.
1757 2018-08-29 Richard Biener <rguenther@suse.de>
1759 PR tree-optimization/87132
1760 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
1761 when skipping defs reachable over backedges.
1763 2018-08-29 Richard Biener <rguenther@suse.de>
1765 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
1766 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
1767 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
1768 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
1769 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
1770 (vn_reference_lookup_3): Remove use of const_parms.
1771 (free_rpo_vn): Do not free const_parms.
1772 (do_rpo_vn): Do not call init_const_parms.
1773 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
1774 SSA_NAME_POINTS_TO_READONLY_MEMORY.
1775 (call_may_clobber_ref_p_1): Likewise.
1777 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
1780 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
1782 (-ftree-scev-cprop): Document.
1784 2018-08-29 Jan Hubicka <jh@suse.cz>
1786 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
1788 (sreal constructor): Update.
1789 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
1790 sreal:operator/): Update.
1792 2018-08-29 Martin Liska <mliska@suse.cz>
1794 * tree-switch-conversion.c (switch_conversion::expand):
1795 Strenghten assumption about gswitch statements.
1797 2018-08-29 Richard Biener <rguenther@suse.de>
1799 PR tree-optimization/87117
1800 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1801 re-value-number released SSA VDEFs.
1803 2018-08-29 Richard Biener <rguenther@suse.de>
1805 PR tree-optimization/87126
1806 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
1808 2018-08-28 Jim Wilson <jimw@sifive.com>
1810 * config/riscv/pic.md: Rewrite.
1811 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
1813 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
1814 (SOFTF, default_load, softload, softstore): New.
1816 2018-08-28 Jeff Law <law@redhat.com>
1818 * fold-const.c (fold_binary_loc): Remove recently added assert.
1820 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
1822 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
1823 to OP parmeter of generated function.
1825 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
1827 PR tree-optimization/87009
1828 * match.pd: Add boolean optimizations.
1830 2018-08-28 Martin Sebor <msebor@redhat.com>
1833 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1834 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1835 (pass_walloca::gate): Use it.
1836 (alloca_call_type): Same.
1837 (pass_walloca::execute): Same.
1838 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1840 2018-08-28 David Malcolm <dmalcolm@redhat.com>
1842 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1843 GCC_VERSION for usage of "__gcc_dump_printf__" format from
1846 2018-08-28 Richard Biener <rguenther@suse.de>
1848 PR tree-optimization/87124
1849 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1850 constants before looking up avail.
1852 2018-08-28 Jakub Jelinek <jakub@redhat.com>
1855 * calls.c (maybe_warn_nonstring_arg): Punt early if
1856 warn_stringop_overflow is zero. Don't call get_range_strlen
1857 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1858 Swap comparison operands to have constants on rhs. Only use
1859 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
1860 increment lenrng[0].
1862 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
1864 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1865 use of tree_to_shwi. Remove duplicated test for the size being
1866 a whole number of bytes.
1868 2018-08-28 Richard Biener <rguenther@suse.de>
1870 PR tree-optimization/87117
1871 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1872 Handle removed stmt without LHS (GIMPLE_NOP).
1874 2018-08-28 Richard Biener <rguenther@suse.de>
1876 PR tree-optimization/87117
1877 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1878 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1880 2018-08-28 Richard Biener <rguenther@suse.de>
1882 PR tree-optimization/87117
1883 * tree-ssa-pre.c (compute_avail): Do not make expressions
1884 with predicated values available.
1885 (get_expr_value_id): Assert we do not run into predicated value
1888 2018-08-28 Richard Biener <rguenther@suse.de>
1890 PR tree-optimization/87117
1891 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1892 get virtual operands.
1893 (get_expr_operands): Handle STRING_CST like other decls.
1895 2018-08-28 Martin Liska <mliska@suse.cz>
1897 * tree.h: Update documentation of fndecl_built_in_p
1901 2018-08-27 Jeff Law <law@redhat.com>
1902 PR tree-optimization/87110
1903 * tree-ssa-dse.c (compute_trims): Handle non-constant
1906 2018-08-27 Martin Sebor <msebor@redhat.com>
1908 PR tree-optimization/86914
1909 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1911 2018-08-27 Martin Sebor <msebor@redhat.com>
1913 PR tree-optimization/87112
1914 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1915 the type of the bound argument.
1917 2018-08-27 Jeff Law <law@redhat.com>
1919 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1920 type does not have a TYPE_SIZE_UNIT.
1922 2018-08-27 Steve Ellcey <sellcey@cavium.com>
1924 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1925 with include of backend.h.
1927 2018-08-27 Richard Biener <rguenther@suse.de>
1929 PR tree-optimization/86927
1930 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1931 use const cond reduction code.
1933 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
1935 PR tree-optimization/85758
1936 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1938 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1941 * diagnostic-show-locus.c (class layout_range): Update for
1942 conversion of show_caret_p to a tri-state.
1943 (layout_range::layout_range): Likewise.
1944 (make_range): Likewise.
1945 (layout::maybe_add_location_range): Likewise.
1946 (layout::should_print_annotation_line_p): Don't show annotation
1947 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1948 (layout::get_state_at_point): Update for conversion of
1949 show_caret_p to a tri-state. Bail out early for
1950 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1951 underlining or source colorization.
1952 (gcc_rich_location::add_location_if_nearby): Update for conversion
1953 of show_caret_p to a tri-state.
1954 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1955 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1957 (selftest::test_one_liner_labels): Likewise.
1958 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1959 conversion of show_caret_p to a tri-state.
1960 * pretty-print.c (text_info::set_location): Likewise.
1961 * pretty-print.h (text_info::set_location): Likewise.
1962 * substring-locations.c (format_warning_n_va): Likewise.
1963 * tree-diagnostic.c (default_tree_printer): Likewise.
1964 * tree-pretty-print.c (newline_and_indent): Likewise.
1966 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1969 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1970 line above for line-insertion fix-it hints.
1971 (selftest::test_fixit_insert_containing_newline): Update the
1972 expected results, and add a test with line-numbering enabled.
1974 2018-08-27 Martin Liska <mliska@suse.cz>
1977 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1978 params with DECL_HAS_VALUE_EXPR_P.
1980 2018-08-27 Martin Liska <mliska@suse.cz>
1982 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1983 selected expansion strategy.
1985 2018-08-27 Martin Liska <mliska@suse.cz>
1987 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1988 * builtins.c (is_builtin_fn): Likewise.
1989 * attribs.c (diag_attr_exclusions): Use new function
1990 fndecl_built_in_p and remove check for FUNCTION_DECL if
1992 (builtin_mathfn_code): Likewise.
1993 (fold_builtin_expect): Likewise.
1994 (fold_call_expr): Likewise.
1995 (fold_builtin_call_array): Likewise.
1996 (fold_call_stmt): Likewise.
1997 (set_builtin_user_assembler_name): Likewise.
1998 (is_simple_builtin): Likewise.
1999 * calls.c (gimple_alloca_call_p): Likewise.
2000 (maybe_warn_nonstring_arg): Likewise.
2001 * cfgexpand.c (expand_call_stmt): Likewise.
2002 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
2003 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
2004 (cgraph_node::verify_node): Likewise.
2005 * cgraphclones.c (build_function_decl_skip_args): Likewise.
2006 (cgraph_node::create_clone): Likewise.
2007 * config/arm/arm.c (arm_insert_attributes): Likewise.
2008 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
2009 * dse.c (scan_insn): Likewise.
2010 * expr.c (expand_expr_real_1): Likewise.
2011 * fold-const.c (operand_equal_p): Likewise.
2012 (fold_binary_loc): Likewise.
2013 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
2014 * gimple-low.c (lower_stmt): Likewise.
2015 * gimple-pretty-print.c (dump_gimple_call): Likewise.
2016 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
2018 * gimple.c (gimple_build_call_from_tree): Likewise.
2019 (gimple_call_builtin_p): Likewise.
2020 (gimple_call_combined_fn): Likewise.
2021 * gimplify.c (gimplify_call_expr): Likewise.
2022 (gimple_boolify): Likewise.
2023 (gimplify_modify_expr): Likewise.
2024 (gimplify_addr_expr): Likewise.
2025 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
2026 * ipa-cp.c (determine_versionability): Likewise.
2027 * ipa-fnsummary.c (compute_fn_summary): Likewise.
2028 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
2029 * ipa-split.c (visit_bb): Likewise.
2030 (split_function): Likewise.
2031 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
2032 * lto-cgraph.c (input_node): Likewise.
2033 * lto-streamer-out.c (write_symbol): Likewise.
2034 * omp-low.c (setjmp_or_longjmp_p): Likewise.
2035 (lower_omp_1): Likewise.
2036 * predict.c (strip_predict_hints): Likewise.
2037 * print-tree.c (print_node): Likewise.
2038 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
2039 * trans-mem.c (is_tm_irrevocable): Likewise.
2040 (is_tm_load): Likewise.
2041 (is_tm_simple_load): Likewise.
2042 (is_tm_store): Likewise.
2043 (is_tm_simple_store): Likewise.
2044 (is_tm_abort): Likewise.
2045 (tm_region_init_1): Likewise.
2046 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
2047 * tree-cfg.c (verify_gimple_call): Likewise.
2048 (move_stmt_r): Likewise.
2049 (stmt_can_terminate_bb_p): Likewise.
2050 * tree-eh.c (lower_eh_constructs_2): Likewise.
2051 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
2052 * tree-inline.c (remap_gimple_stmt): Likewise.
2053 (copy_bb): Likewise.
2054 (estimate_num_insns): Likewise.
2055 (fold_marked_statements): Likewise.
2056 * tree-sra.c (scan_function): Likewise.
2057 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
2058 (optimize_stack_restore): Likewise.
2059 (pass_fold_builtins::execute): Likewise.
2060 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
2061 (mark_all_reaching_defs_necessary_1): Likewise.
2062 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
2063 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
2064 (pass_forwprop::execute): Likewise.
2065 * tree-ssa-loop-im.c (stmt_cost): Likewise.
2066 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
2067 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
2068 * tree-ssa-strlen.c (get_string_length): Likewise.
2069 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
2070 (find_func_aliases_for_call): Likewise.
2071 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
2072 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
2073 * tree-tailcall.c (find_tail_calls): Likewise.
2074 * tree.c (need_assembler_name_p): Likewise.
2075 (free_lang_data_in_decl): Likewise.
2076 (get_call_combined_fn): Likewise.
2077 * ubsan.c (is_ubsan_builtin_p): Likewise.
2078 * varasm.c (incorporeal_function_p): Likewise.
2079 * tree.h (DECL_BUILT_IN): Remove and replace with
2081 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
2082 (fndecl_built_in_p): New.
2084 2018-08-27 Martin Liska <mliska@suse.cz>
2086 PR tree-optimization/86847
2087 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
2088 Dump also subtree probability.
2089 (switch_decision_tree::do_jump_if_equal): New function.
2090 (switch_decision_tree::emit_case_nodes): Handle special
2091 situations in balanced tree that can be emitted much simpler.
2092 Fix calculation of probabilities that happen in tree expansion.
2093 * tree-switch-conversion.h (struct cluster): Add
2095 (struct simple_cluster): Likewise.
2096 (struct case_tree_node): Add new function has_child.
2097 (do_jump_if_equal): New.
2099 2018-08-27 Martin Liska <mliska@suse.cz>
2101 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
2102 Add new argument to bit_test_cluster constructor.
2103 (bit_test_cluster::emit): Set bits really number of values
2105 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
2106 probability argument.
2107 * tree-switch-conversion.h (struct bit_test_cluster):
2108 Add m_handles_entire_switch.
2110 2018-08-27 Martin Liska <mliska@suse.cz>
2112 PR tree-optimization/86702
2113 * tree-switch-conversion.c (jump_table_cluster::emit):
2114 Make probabilities even for values in jump table
2115 according to number of cases handled.
2116 (switch_decision_tree::compute_cases_per_edge): Pass
2117 argument to reset_out_edges_aux function.
2118 (switch_decision_tree::analyze_switch_statement): Likewise.
2119 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
2122 2018-08-27 Martin Liska <mliska@suse.cz>
2124 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
2125 cfun argument explicitly.
2126 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
2127 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
2128 function gimple_switch_default_bb.
2129 (convert_switch_statements):
2131 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
2132 * stmt.c (label_to_block_fn): Use label_to_block and pass
2133 cfun argument explicitly and use gimple_switch_label_bb.
2134 (expand_case): Likewise.
2135 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
2136 cfun argument explicitly. Likewise.
2137 (make_edges_bb): Likewise.
2138 (make_cond_expr_edges): Likewise.
2139 (get_cases_for_edge): Likewise.
2140 (make_gimple_switch_edges): Likewise.
2141 (label_to_block_fn): Likewise.
2142 (label_to_block): Likewise.
2143 (make_goto_expr_edges): Likewise.
2144 (make_gimple_asm_edges): Likewise.
2145 (main_block_label): Likewise.
2146 (group_case_labels_stmt): Likewise.
2147 (find_taken_edge_computed_goto): Likewise.
2148 (find_taken_edge_switch_expr): Likewise.
2149 (gimple_verify_flow_info): Likewise.
2150 (gimple_redirect_edge_and_branch): Likewise.
2151 (gimple_switch_label_bb): New function.
2152 (gimple_switch_default_bb): Likewise.
2153 (gimple_switch_edge): Likewise.
2154 (gimple_switch_default_edge): Likewise.
2155 * tree-cfg.h (label_to_block_fn): Remove and replace ...
2156 (label_to_block): ... with this.
2157 (gimple_switch_label_bb): New.
2158 (gimple_switch_default_bb): Likewise.
2159 (gimple_switch_edge): Likewise.
2160 (gimple_switch_default_edge): Likewise.
2161 * tree-cfgcleanup.c (convert_single_case_switch): Use
2162 new gimple functions and pass new argument to label_to_block.
2163 (cleanup_control_flow_bb):
2164 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
2165 cfun argument explicitly.
2166 (make_eh_edges): Likewise.
2167 (redirect_eh_dispatch_edge): Likewise.
2168 (lower_resx): Likewise.
2169 (lower_eh_dispatch): Likewise.
2170 (maybe_remove_unreachable_handlers): Likewise.
2171 (unsplit_eh): Likewise.
2172 (cleanup_empty_eh): Likewise.
2173 (verify_eh_edges): Likewise.
2174 (verify_eh_dispatch_edge): Likewise.
2175 * tree-ssa-dom.c (record_edge_info): Likewise.
2176 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
2177 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
2178 (thread_through_normal_block): Likewise.
2179 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
2180 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
2181 * tree-switch-conversion.c (switch_conversion::collect): Use new
2183 (switch_conversion::check_final_bb): Likewise.
2184 (switch_conversion::gather_default_values): Pass new argument
2186 (switch_conversion::build_constructors): Likewise.
2187 (switch_decision_tree::compute_cases_per_edge): Use new
2188 gimple_switch_edge function.
2189 (switch_decision_tree::analyze_switch_statement): Pass new argument
2191 (switch_decision_tree::try_switch_expansion): Use
2192 gimple_switch_default_edge.
2193 * tree-vrp.c (find_switch_asserts): Pass new argument
2195 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
2196 (vr_values::simplify_switch_using_ranges): Likewise.
2198 2018-08-27 Richard Biener <rguenther@suse.de>
2200 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
2201 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
2203 * tree-ssa-sccvn.h (struct vn_pval): New structure.
2204 (struct vn_nary_op_s): Add unwind_to member. Add
2205 predicated_values flag and put result into a union together
2206 with a linked list of vn_pval.
2207 (struct vn_ssa_aux): Add name member to make maintaining
2208 a map of SSA name to vn_ssa_aux possible. Remove no longer
2209 needed info, dfsnum, low, visited, on_sccstack, use_processed
2210 and range_info_anti_range_p members.
2211 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
2212 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
2214 (vn_valueize): New global.
2215 (vn_context_bb): Likewise.
2216 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
2217 VN_INFO_PTR_INFO): Remove.
2218 * tree-ssa-sccvn.c: ... (rewrite)
2219 (pass_fre::execute): For -O2+ initialize loops and run
2220 RPO VN in optimistic mode (iterating). For -O1 and -Og
2221 run RPO VN in non-optimistic mode.
2222 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
2223 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
2224 * doc/invoke.texi (sccvn-max-scc-size): Remove.
2225 (rpo-vn-max-loop-depth): Document.
2226 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
2227 when valuezing the VUSE signals we walked out of the region.
2228 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
2229 (phi_translate): Set VN context block to use for availability
2231 (compute_avail): Likewise.
2232 (pre_valueize): New function.
2233 (pass_pre::execute): Adjust to the RPO VN API.
2235 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
2236 (propagate_constants_for_unrolling): Remove.
2237 (tree_unroll_loops_completely): Perform value-numbering
2238 on the unrolled bodies loop parent.
2240 2018-08-27 Richard Biener <rguenther@suse.de>
2242 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
2243 for partial antic compute.
2245 2018-08-27 Jakub Jelinek <jakub@redhat.com>
2247 PR rtl-optimization/87065
2248 * combine.c (simplify_if_then_else): Formatting fix.
2249 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
2251 (known_cond): Don't return const_true_rtx for vector modes. Use
2252 CONST0_RTX instead of const0_rtx. Formatting fixes.
2254 2018-08-27 Martin Liska <mliska@suse.cz>
2256 PR gcov-profile/87069
2257 * gcov.c (process_file): Record files already processed
2258 and warn about a file being processed multiple times.
2260 2018-08-27 Martin Liska <mliska@suse.cz>
2263 * config/aarch64/aarch64.c (aarch64_override_options_internal):
2264 Set default values for x_aarch64_*_string strings.
2265 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
2266 prefix. For -mabi do not print '=ABI' in help and use
2267 <option_value> format for -msve-vector-bits and -moverride
2270 2018-08-26 Jeff Law <law@redhat.com>
2272 * config/mips/frame-header-opt.c: Include "backend.h" rather than
2275 2018-08-26 Marek Polacek <polacek@redhat.com>
2277 PR c++/87029, Implement -Wredundant-move.
2278 * doc/invoke.texi: Document -Wredundant-move.
2280 2018-08-25 Martin Sebor <msebor@redhat.com>
2282 PR tree-optimization/87059
2283 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
2284 to the same type as the other.
2285 * fold-const.c (fold_binary_loc): Assert expectation.
2287 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
2289 * config/darwin.c (machopic_legitimize_pic_address): Clean up
2290 extraneous parentheses, dead code section and formatting.
2292 2018-08-24 David Malcolm <dmalcolm@redhat.com>
2295 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
2296 wide enough for jumps in the line-numbering to be visible.
2297 (layout::print_gap_in_line_numbering): New member function.
2298 (layout::calculate_line_spans): When using line numbering, merge
2299 line spans that are only 1 line apart.
2300 (diagnostic_show_locus): When printing line numbers, show gaps in
2301 line numbering directly, rather than printing headers.
2302 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
2303 line-numbering with multiple line spans.
2304 (selftest::test_fixit_insert_containing_newline_2): Add test of
2305 line-numbering, in which the spans are close enough to be merged.
2307 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
2309 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
2310 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
2311 * tree-vrp.c (range_is_nonnull): Remove.
2312 (range_includes_zero_p): Accept value_range instead of min/max.
2313 (extract_range_from_binary_expr_1): Do not early bail on
2315 Use range_includes_zero_p instead of range_is_nonnull.
2316 (extract_range_from_unary_expr): Use range_includes_zero_p instead
2317 of range_is_nonnull.
2318 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
2319 special case VR_ANTI_RANGE.
2320 (vrp_finalize): Same.
2321 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
2323 (range_is_nonnull): Remove.
2324 * vr-values.c (vrp_stmt_computes_nonzero): Use
2325 range_includes_zero_p instead of range_is_nonnull.
2326 (extract_range_basic): Pass value_range to range_includes_zero_p
2327 instead of range_is_nonnull.
2329 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
2331 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
2332 * emit-rtl.h (rtl_data): Remove return_bnd.
2333 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
2334 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
2335 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
2336 (POINTER_BOUNDS_MODE): Remove definition.
2337 (make_pointer_bounds_mode): Remove.
2338 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
2339 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
2340 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
2341 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
2342 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
2343 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
2344 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
2346 * config/i386/i386-modes.def (BND32, BND64): Remove.
2347 * config/i386/i386.c (dbx_register_map): Remove bound registers.
2348 (dbx64_register_map): Ditto.
2349 (svr4_dbx_register_map): Ditto.
2350 (indirect_thunk_bnd_needed): Remove.
2351 (indirect_thunks_bnd_used): Ditto.
2352 (indirect_return_bnd_needed): Ditto.
2353 (indirect_return_via_cx_bnd): Ditto.
2354 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
2355 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
2356 (output_indirect_thunk): Ditto. Remove need_prefix argument.
2357 (output_indirect_thunk_function): Remove handling of
2358 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
2359 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
2360 (ix86_save_reg): Remove handling of crtl->return_bnd.
2361 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
2362 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
2363 and UNSPEC_BNDLX_ADDR.
2364 (ix86_output_indirect_branch_via_reg): Remove handling of
2365 indirect_thunk_prefix_bnd.
2366 (ix86_output_indirect_branch_via_push): Ditto.
2367 (ix86_output_function_return): Ditto.
2368 (ix86_output_indirect_function_return): Ditto.
2369 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
2370 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
2371 (CALL_USED_REGISTERS): Ditto.
2372 (REG_ALLOC_ORDER): Update for removal of bound registers.
2373 (HI_REGISTER_NAMES): Ditto.
2374 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
2375 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
2376 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
2377 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
2378 (FIRST_PSEUDO_REG): Update.
2379 (BND): Remove mode iterator.
2380 * config/i386/predicates.md (bnd_mem_operator): Remove.
2382 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
2384 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
2387 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
2389 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
2390 the case in which the permute needs only a single element and
2391 repeats for every vector of the result. Extend that case to
2392 handle variable-length vectors.
2393 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2395 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
2398 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
2399 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
2401 2018-08-24 Richard Biener <rguenther@suse.de>
2403 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
2404 bb_flags_allocated members.
2405 (auto_flag): New RAII class for allocating flags.
2406 (auto_edge_flag): New RAII class for allocating edge flags.
2407 (auto_bb_flag): New RAII class for allocating bb flags.
2408 * cfgloop.c (verify_loop_structure): Allocate temporary edge
2410 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
2411 in favor of temporarily allocated BB flag.
2412 * hsa-brig.c: Re-order includes.
2413 * hsa-dump.c: Likewise.
2414 * hsa-regalloc.c: Likewise.
2415 * print-rtl.c: Likewise.
2416 * profile-count.c: Likewise.
2418 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
2421 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
2424 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
2427 * wide-int-range.cc (wide_int_range_div): Do not ignore result
2428 from wide_int_range_multiplicative_op.
2430 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2432 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
2435 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
2437 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
2440 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
2442 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
2443 full GENERIC expression used for replacement.
2445 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
2447 * tree-vrp.c (abs_extent_range): Remove.
2448 (extract_range_into_wide_ints): Pass wide ints by reference.
2449 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
2450 Pass wide ints by reference in all calls to
2451 extract_range_into_wide_ints.
2452 * wide-int-range.cc (wide_int_range_div): New.
2453 * wide-int-range.h (wide_int_range_div): New.
2454 (wide_int_range_includes_zero_p): New.
2455 (wide_int_range_zero_p): New.
2457 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
2459 * config/aarch64/aarch64.md (arches): New enum.
2460 (arch): New enum attr.
2461 (arch_enabled): New attr.
2462 (enabled): Now uses arch_enabled only.
2463 (simd, sve, fp16): Removed attribute.
2464 (fp): Attr now defined in terms of 'arch'.
2465 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
2466 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
2467 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
2468 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
2469 attributes into 'arch'.
2470 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
2471 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
2472 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
2473 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
2474 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
2475 'simd' attribute into 'arch'.
2476 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
2477 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
2478 Convert use of 'fp' attribute to 'arch'.
2479 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
2480 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
2482 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
2483 (different modes) Merge 'fp' and 'simd' into 'arch'.
2484 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
2487 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
2489 PR rtl-optimization/87026
2490 * expmed.c (canonicalize_comparison): If we can no longer create
2491 pseudoregisters, don't.
2493 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
2496 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
2498 * config/arm/arm.c (speculation_barrier_libfunc): New static
2500 (arm_init_libfuncs): Initialize it.
2501 (arm_emit_speculation_barrier): New function.
2502 * config/arm/arm.md (speculation_barrier): Call
2503 arm_emit_speculation_barrier for architectures that do not have
2505 (speculation_barrier_insn): Only match on Armv7 or later.
2507 2018-08-23 Richard Biener <rguenther@suse.de>
2510 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
2513 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
2515 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
2516 of single-vector TBLs.
2517 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
2520 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
2523 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
2524 aarch64_evpc_tbl guard.
2526 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
2528 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
2531 2018-08-22 Martin Sebor <msebor@redhat.com>
2534 * tree-pretty-print.c (pretty_print_string): Add argument.
2535 (dump_generic_node): Call to pretty_print_string with string size.
2537 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
2539 PR rtl-optimization/86771
2540 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
2541 of two SETs into those two SETs, one to be placed at i2, if that SETs
2542 destination is modified between i2 and i3.
2544 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2546 PR tree-optimization/86725
2547 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
2549 (vect_analyze_scalar_cycles_1): Check it.
2551 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2553 PR tree-optimization/86725
2554 * tree-vect-loop.c (vect_is_simple_reduction): When treating
2555 an outer loop phi as a double reduction, make sure that the
2556 single user of the phi result is an inner loop phi.
2558 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2560 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
2561 grouped stores with gaps to a strided group.
2563 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2565 * tree-vect-stmts.c (get_group_load_store_type)
2566 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
2567 first statement in a group.
2569 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2571 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
2572 the sequence used in gcc/gcc.c.
2574 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2577 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
2580 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2582 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
2583 Darwin10-specific unwinder-shim.
2584 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
2585 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
2586 New to cater for Darwin10 Rosetta.
2588 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2590 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
2591 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
2593 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2598 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
2599 (dwarf2out_switch_text_section): Generate a local label for the
2600 second function sub-section and apply it as the second FDE start
2602 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
2603 second sub-section start.
2605 2018-08-22 Richard Biener <rguenther@suse.de>
2607 PR tree-optimization/86988
2608 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
2610 2018-08-22 Richard Biener <rguenther@suse.de>
2612 PR tree-optimization/86945
2613 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
2615 2018-08-22 Alexandre Oliva <oliva@adacore.com>
2617 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
2618 a comment about how uses of r2 for .sdata2 come about.
2620 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
2622 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
2624 2018-08-21 Marek Polacek <polacek@redhat.com>
2626 PR c++/86981, Implement -Wpessimizing-move.
2627 * doc/invoke.texi: Document -Wpessimizing-move.
2629 2018-08-21 Jan Hubicka <jh@suse.cz>
2631 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
2632 * tree.h (is_redundant_typedef): Remove.
2633 * dwarf2out.c (is_redundant_typedef): Turn into static function.
2635 2018-08-21 Jan Hubicka <jh@suse.cz>
2637 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
2640 2018-08-21 Tamar Christina <tamar.christina@arm.com>
2642 * expmed.c (extract_low_bits): Reject invalid subregs early.
2644 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2647 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
2650 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2652 * config/vxworks.h: Guard vxworks_asm_out_constructor and
2653 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
2654 * config/vxworks.c: Likewise.
2656 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2658 * config/vxworks.c: Set targetm.have_ctors_dtors
2659 if HAVE_INITFINI_ARRAY_SUPPORT.
2660 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
2661 if HAVE_INITFINI_ARRAY_SUPPORT.
2663 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2665 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
2666 default search path for VxWorks < 7.
2668 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2670 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
2671 (get_format_string): Refer to c_getstr.
2673 2018-08-21 Tom de Vries <tdevries@suse.de>
2675 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2676 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2677 (debuginfo_early_stop): Declare.
2678 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2679 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2680 (debuginfo_early_stop): New function.
2681 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
2682 and debuginfo_early_stop.
2683 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
2684 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
2685 (general_init): Call debuginfo_early_init.
2686 (finalize): Call debuginfo_fini.
2687 (do_compile): Call debuginfo_init.
2688 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
2690 (@item -fdump-debug, @item -fdump-earlydebug): Add.
2692 2018-08-21 Tom de Vries <tdevries@suse.de>
2694 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
2695 flag_dump_noaddr and flag_dump_unnumbered.
2697 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
2699 * wide-int-range.cc (wide_int_range_abs): New.
2700 (wide_int_range_order_set): Rename from wide_int_range_min_max.
2701 * wide-int-range.h (wide_int_range_abs): New.
2702 (wide_int_range_min_max): New.
2703 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
2704 case to call wide_int_range_abs.
2705 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
2706 (extract_range_from_abs_expr): Delete.
2708 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
2711 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
2712 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
2715 2018-08-20 Nathan Sidwell <nathan@acm.org>
2716 Jeff Law <law@redhat.com>
2718 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
2719 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
2721 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2724 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
2725 (decl_attributes): Likewise.
2726 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
2728 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
2729 * diagnostic-core.h (class auto_diagnostic_group): New class.
2730 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
2731 (diagnostic_report_diagnostic): Handle the first diagnostics within
2733 (emit_diagnostic): Add auto_diagnostic_group instance.
2735 (inform_n): Likewise.
2736 (warning): Likewise.
2737 (warning_at): Likewise.
2738 (warning_n): Likewise.
2739 (pedwarn): Likewise.
2740 (permerror): Likewise.
2742 (error_n): Likewise.
2743 (error_at): Likewise.
2745 (fatal_error): Likewise.
2746 (internal_error): Likewise.
2747 (internal_error_no_backtrace): Likewise.
2748 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
2749 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
2750 * diagnostic.h (struct diagnostic_context): Add fields
2751 "diagnostic_group_nesting_depth",
2752 "diagnostic_group_emission_count", "begin_group_cb",
2754 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
2755 Add auto_diagnostic_group instance(s).
2756 (find_explicit_erroneous_behavior): Likewise.
2757 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
2758 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
2759 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
2760 (gimplify_va_arg_expr): Likewise.
2761 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
2762 (HSA_SORRY_AT): Likewise.
2763 * ipa-devirt.c (compare_virtual_tables): Likewise.
2764 (warn_odr): Likewise.
2765 * multiple_target.c (expand_target_clones): Likewise.
2766 * opts-common.c (cmdline_handle_error): Likewise.
2767 * reginfo.c (globalize_reg): Likewise.
2768 * substring-locations.c (format_warning_n_va): Likewise.
2769 * tree-inline.c (expand_call_inline): Likewise.
2770 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
2771 * tree-ssa-loop-niter.c
2772 (do_warn_aggressive_loop_optimizations): Likewise.
2773 * tree-ssa-uninit.c (warn_uninit): Likewise.
2774 * tree.c (warn_deprecated_use): Likewise.
2776 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
2779 * config/i386/i386.md (eh_return): Always update EH return
2780 address in word_mode.
2782 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
2784 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
2785 TARGET_SPLIT_COMPLEX_ARG is defined.
2787 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2789 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
2791 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2794 * expr.c (expand_assignment): Assert that bitpos is positive.
2795 (store_field): Likewise
2796 (expand_expr_real_1): Make sure that bitpos is positive.
2797 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
2800 2018-08-20 Nathan Sidwell <nathan@acm.org>
2802 * Makefile.in (CPP_ID_DATA_H): Delete.
2803 (CPP_INTERNAL_H): Don't add it.
2804 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
2805 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
2807 2018-08-20 Richard Biener <rguenther@suse.de>
2809 PR tree-optimization/78655
2810 * tree-vrp.c (extract_range_from_binary_expr_1): Make
2811 pointer + offset nonnull if either operand is nonnull work.
2813 2018-08-20 Tom de Vries <tdevries@suse.de>
2815 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
2816 unless the referenced die describes the added property using
2817 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
2818 Otherwise, add a DW_AT_location to the referenced die.
2820 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
2823 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
2824 register_operand when calling ix86_set_reg_reg_cost.
2825 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
2826 Set *total to 0 for operands that satisfy x86_64_immediate_operand
2827 predicate and to 1 otherwise.
2829 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
2831 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2832 emit a diagnostic that it is not supported and reset the option.
2833 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2834 supported and consume the option. (ASM_FINAL_SPEC): New.
2836 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2838 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2841 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
2843 C-SKY port: Documentation
2845 * doc/extend.texi (C-SKY Function Attributes): New section.
2846 * doc/invoke.texi (Option Summary): Add C-SKY options.
2847 (C-SKY Options): New section.
2848 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2850 2018-08-17 Jojo <jijie_rong@c-sky.com>
2851 Huibin Wang <huibin_wang@c-sky.com>
2852 Sandra Loosemore <sandra@codesourcery.com>
2853 Chung-Lin Tang <cltang@codesourcery.com>
2855 C-SKY port: Backend implementation
2857 * config/csky/*: New.
2858 * common/config/csky/*: New.
2860 2018-08-17 Jojo <jijie_rong@c-sky.com>
2861 Huibin Wang <huibin_wang@c-sky.com>
2862 Sandra Loosemore <sandra@codesourcery.com>
2863 Chung-Lin Tang <cltang@codesourcery.com>
2864 Andrew Jenner <andrew@codesourcery.com>
2866 C-SKY port: Configury
2868 * config.gcc (csky-*-*): New.
2869 * configure.ac: Add csky to targets for dwarf2 debug_line support.
2870 * configure: Regenerated.
2872 2018-08-17 David Malcolm <dmalcolm@redhat.com>
2874 * dump-context.h: Include "dumpfile.h".
2875 (dump_context::dump_printf_va): Convert final param from va_list
2876 to va_list *. Convert from ATTRIBUTE_PRINTF to
2877 ATTRIBUTE_GCC_DUMP_PRINTF.
2878 (dump_context::dump_printf_loc_va): Likewise.
2879 * dumpfile.c: Include "stringpool.h".
2880 (make_item_for_dump_printf_va): Delete.
2881 (make_item_for_dump_printf): Delete.
2882 (class dump_pretty_printer): New class.
2883 (dump_pretty_printer::dump_pretty_printer): New ctor.
2884 (dump_pretty_printer::emit_items): New member function.
2885 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2887 (dump_pretty_printer::emit_item): New member function.
2888 (dump_pretty_printer::stash_item): New member function.
2889 (dump_pretty_printer::format_decoder_cb): New member function.
2890 (dump_pretty_printer::decode_format): New member function.
2891 (dump_context::dump_printf_va): Reimplement in terms of
2892 dump_pretty_printer.
2893 (dump_context::dump_printf_loc_va): Convert final param from va_list
2895 (dump_context::begin_scope): Reimplement call to
2896 make_item_for_dump_printf.
2897 (dump_printf): Update for change to dump_printf_va.
2898 (dump_printf_loc): Likewise.
2899 (selftest::test_capture_of_dump_calls): Convert "stmt" from
2900 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
2901 with %T, %E, and %G.
2902 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2903 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2904 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2905 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2906 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2907 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2908 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2909 within a dump_printf_loc call to "%wu".
2910 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2911 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
2912 missing space after "=".
2913 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2914 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2915 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2916 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2917 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
2918 duplicate "vectorized" from message.
2920 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2922 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2923 polyNxK_t element's TYPE_STRING_FLAG.
2925 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2927 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2928 (they were unnamed before). Fix comments.
2930 2018-08-17 Nathan Sidwell <nathan@acm.org>
2932 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2934 2018-08-17 Richard Biener <rguenther@suse.de>
2936 PR tree-optimization/86841
2937 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2939 2018-08-17 Martin Liska <mliska@suse.cz>
2941 * common.opt: Remove Warn, Init and Report for options with
2942 Ignore/Deprecated flag. Warning is done automatically for
2944 * config/i386/i386.opt: Likewise.
2945 * config/ia64/ia64.opt: Likewise.
2946 * config/rs6000/rs6000.opt: Likewise.
2947 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2948 Remove usage of flag_check_pointer_bounds.
2949 * lto-wrapper.c (merge_and_complain): Do not handle
2950 OPT_fcheck_pointer_bounds.
2951 (append_compiler_options): Likewise.
2952 * opt-functions.awk: Do not handle Deprecated.
2953 * optc-gen.awk: Check that Var, Report and Init are not
2954 used for an option with Ignore/Deprecated flag.
2955 * opts-common.c (decode_cmdline_option): Do not report
2957 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2959 * opts.h (struct cl_option): Remove cl_deprecated flag.
2960 (CL_ERR_DEPRECATED): Remove error enum value.
2962 2018-08-17 Richard Biener <rguenther@suse.de>
2965 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2966 across a va-arg-pack using call adjust its return value accordingly.
2968 2018-08-16 Martin Sebor <msebor@redhat.com>
2970 PR tree-optimization/86853
2971 * gimple-ssa-sprintf.c (struct format_result): Rename member.
2972 (struct fmtresult): Add member and initialize it in ctors.
2973 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
2974 (format_string): Handle %S the same as %ls. Set MAYFAIL.
2975 (format_directive): Set POSUNDER4K when MAYFAIL is set.
2976 (parse_directive): Handle %C same as %c.
2977 (sprintf_dom_walker::compute_format_length): Adjust.
2978 (is_call_safe): Adjust.
2980 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2982 * builtins.c (c_strlen): Add new parameter eltsize. Use it
2983 for determining how to count the elements.
2984 * builtins.h (c_strlen): Adjust prototype.
2985 * expr.c (string_constant): Add new parameter mem_size.
2986 Set *mem_size appropriately.
2987 * expr.h (string_constant): Adjust protoype.
2988 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2989 * gimple-fold.h (get_range_strlen): Adjust prototype.
2990 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2991 (format_string): Call get_string_length with eltsize.
2993 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2995 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2996 to emit the span, rather than setting it as the prefix.
2998 2018-08-16 David Malcolm <dmalcolm@redhat.com>
3000 * diagnostic-show-locus.c (layout::start_annotation_line): Add
3001 "margin_char" parameter, defaulting to space. Use it in place
3002 of pp_space for the initial part of the margin.
3003 (layout::print_leading_fixits): Use '+' when filling the margin
3004 of line-insertion fix-it hints.
3006 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
3008 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
3011 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
3013 * config/rs6000/altivec.md: Don't set length attribute to the default
3015 * config/rs6000/darwin.md: Ditto.
3016 * config/rs6000/dfp.md: Ditto.
3017 * config/rs6000/htm.md: Ditto.
3018 * config/rs6000/rs6000.md: Ditto.
3019 * config/rs6000/sync.md: Ditto.
3020 * config/rs6000/vsx.md: Ditto.
3022 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
3024 * config/rs6000/altivec.md: Don't set length attribute to the default
3025 value, for branch instructions.
3026 * config/rs6000/darwin.md: Ditto.
3027 * config/rs6000/rs6000.md: Ditto.
3029 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
3031 * config/rs6000/rs6000.md (length): Always define as const_int 4.
3032 (unnamed conditional branch define_insn): Set length to 4 or 8
3033 depending on offset.
3034 (<bd>_<mode>): Similar, for alternative 0.
3035 (<bd>tf_<mode>): Ditto.
3037 2018-08-16 Tamar Christina <tamar.christina@arm.com>
3039 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
3041 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
3043 * doc/rtl.texi: Replace old RTX class names with new names.
3046 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
3048 * expmed.h (canonicalize_comparison): New declaration.
3049 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
3050 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
3051 * optabs.c (prepare_cmp_insn): Likewise.
3052 * rtl.h (unsigned_condition_p): New function which checks if a
3053 comparison operator is unsigned.
3055 2018-08-16 Nathan Sidwell <nathan@acm.org>
3057 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
3058 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
3060 2018-08-16 Tamar Christina <tamar.christina@arm.com>
3063 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
3064 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
3065 (mov<mov>): ..this and enable unconditionally.
3067 2018-08-16 Tamar Christina <tamar.christina@arm.com>
3069 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
3071 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
3073 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
3074 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
3075 "Common" with "Target".
3077 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
3079 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
3080 * doc/invoke.texi (mmitigate-rop): Remove.
3081 * config/i386/i386.c: Do not include "regrename.h".
3082 (ix86_rop_should_change_byte_p, reg_encoded_number)
3083 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
3085 (ix86_reorg): Remove call to ix86_mitigate_rop.
3086 * config/i386/i386.md (attr "modrm_class"): Remove.
3087 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
3088 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
3089 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
3091 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
3093 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
3094 allow folding of mergeh() and mergel() for the float and double types.
3095 (fold_mergehl_helper): Rework to handle building a permute tree
3098 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
3100 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
3103 2018-08-15 David Malcolm <dmalcolm@redhat.com>
3105 * common.opt (fdiagnostics-show-labels): New option.
3106 * diagnostic-show-locus.c (class layout_range): Add field
3108 (class layout): Add field "m_show_labels_p".
3109 (layout_range::layout_range): Add param "label" and use it to
3111 (make_range): Pass in NULL for new "label" param of layout_range's
3113 (layout::layout): Initialize m_show_labels_p.
3114 (layout::maybe_add_location_range): Pass in loc_range->m_label
3115 when constructing layout_range instances.
3116 (struct line_label): New struct.
3117 (layout::print_any_labels): New member function.
3118 (layout::print_line): Call it if label-printing is enabled.
3119 (selftest::test_one_liner_labels): New test.
3120 (selftest::test_diagnostic_show_locus_one_liner): Call it.
3121 * diagnostic.c (diagnostic_initialize): Initialize
3122 context->show_labels_p.
3123 * diagnostic.h (struct diagnostic_context): Add field
3125 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
3126 -fno-diagnostics-show-labels.
3127 * dwarf2out.c (gen_producer_string): Add
3128 OPT_fdiagnostics_show_labels to the ignored options.
3129 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
3131 (gcc_rich_location::maybe_add_expr): Likewise.
3132 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
3133 label" param, defaulting to NULL.
3134 (gcc_rich_location::add_expr): Add "label" param.
3135 (gcc_rich_location::maybe_add_expr): Likewise.
3136 (class text_range_label): New class.
3137 (class range_label_for_type_mismatch): New class.
3138 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
3139 of format_warning_va.
3140 (fmtwarn_n): Likewise for new params of format_warning_n_va.
3141 * lto-wrapper.c (merge_and_complain): Add
3142 OPT_fdiagnostics_show_labels to the "pick one setting" options.
3143 (append_compiler_options): Likewise to the dropped options.
3144 (append_diag_options): Likewise to the passed-on options.
3145 * opts.c (common_handle_option): Handle the new option.
3146 * selftest-diagnostic.c
3147 (test_diagnostic_context::test_diagnostic_context): Enable
3149 * substring-locations.c: Include "gcc-rich-location.h".
3150 (format_warning_n_va): Add "fmt_label" and "param_label" params
3151 and use them as appropriate.
3152 (format_warning_va): Add "fmt_label" and "param_label" params,
3153 passing them on to format_warning_n_va.
3154 (format_warning_at_substring): Likewise.
3155 (format_warning_at_substring_n): Likewise.
3156 * substring-locations.h (format_warning_va): Add "fmt_label" and
3157 "param_label" params.
3158 (format_warning_n_va): Likewise.
3159 (format_warning_at_substring): Likewise.
3160 (format_warning_at_substring_n): Likewise.
3161 * toplev.c (general_init): Initialize global_dc->show_labels_p.
3163 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
3166 * builtins.c (expand_builtin_memcmp): Do not expand the call
3167 when overflow is detected.
3169 2018-08-15 Martin Sebor <msebor@redhat.com>
3171 PR tree-optimization/71625
3172 * config/aarch64/aarch64-builtins.c
3173 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
3175 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
3177 * config/s390/s390.c (s390_reorg): Remove loop.
3179 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3182 (darwin_function_switched_text_sections): Delete.
3183 * gcc/config/darwin.h
3184 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
3186 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3189 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
3190 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
3191 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
3193 2018-08-15 Martin Liska <mliska@suse.cz>
3195 PR tree-optimization/86925
3196 * predict.c (expr_expected_value_1): When taking
3197 later predictor, assign also probability.
3198 Use fold_build2_initializer_loc in order to fold
3199 the expression in -frounding-math.
3201 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
3203 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
3205 (expand_vec_perm_1): Try the new method.
3207 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
3210 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
3211 Check whether lra_live_max_point is 0 before dividing.
3213 2018-08-14 Martin Sebor <msebor@redhat.com>
3215 PR tree-optimization/86650
3216 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
3217 (vrp_prop::check_mem_ref): Same.
3219 2018-08-13 Liu Hao <lh_mouse@126.com>
3221 * pretty-print.c (eat_esc_sequence): Swap the foreground and
3222 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
3223 and clear it thereafter, as it only works for DBCS.
3225 2018-08-13 Liu Hao <lh_mouse@126.com>
3227 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
3228 handle returned by _get_osf_handle().
3230 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3232 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
3233 for folding vec_perm.
3235 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3237 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
3238 Add support for gimple-folding of vec_pack() and vec_unpack()
3241 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3243 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
3244 vec_xst variants to the list.
3245 (rs6000_gimple_fold_builtin): Add support for folding unaligned
3246 vector loads and stores.
3248 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
3250 * config.gcc (rs6000-ibm-aix4.x): Delete.
3251 (rs6000-ibm-aix5.1): Delete.
3252 (rs6000-ibm-aix5.2): Delete.
3253 (rs6000-ibm-aix5.3): Delete.
3254 * config/rs6000/aix43.h: Delete.
3255 * config/rs6000/aix51.h: Delete.
3256 * config/rs6000/aix52.h: Delete.
3257 * config/rs6000/t-aix43: Delete.
3259 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
3261 * config/s390/s390.c (s390_decompose_constant_pool_ref):
3263 (s390_decompose_address): Factor out constant pool ref
3266 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3268 * config/nds32/nds32-predicates.c
3269 (nds32_can_use_bclr_p): Change return type as bool.
3270 (nds32_can_use_bset_p): Ditto.
3271 (nds32_can_use_btgl_p): Ditto.
3272 (nds32_can_use_bitci_p): Ditto.
3273 * config/nds32/nds32-protos.h
3274 (nds32_can_use_bclr_p): Change declaration.
3275 (nds32_can_use_bset_p): Ditto.
3276 (nds32_can_use_btgl_p): Ditto.
3277 (nds32_can_use_bitci_p): Ditto.
3279 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3281 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
3282 Support -msched-prolog-epilog option.
3283 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
3285 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3287 * common/config/nds32/nds32-common.c
3288 (nds32_option_optimization_table): Enalbe -malways-align.
3290 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3292 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
3294 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
3295 OPT_misr_secure_ case.
3296 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
3297 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
3298 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
3300 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
3301 (nds32_isr_info): New field security_level.
3302 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
3303 * config/nds32/nds32.md (return_internal): Consider critical attribute.
3304 * config/nds32/nds32.opt (misr-secure): New option.
3305 * config/nds32/nds32_init.inc: New file.
3306 * config/nds32/nds32_isr.h: New file.
3308 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
3310 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
3311 Update comment for atomic instructions.
3312 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
3313 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
3315 (atomic_loaddi): Revise fence expansion to only emit fence prior to
3316 load for __ATOMIC_SEQ_CST model.
3317 (atomic_loaddi_1): Remove float register target.
3318 (atomic_storedi): Handle CONST_INT values.
3319 (atomic_storedi_1): Remove float register source. Add special case
3321 (memory_barrier): New expander and insn.
3323 2018-08-11 Jakub Jelinek <jakub@redhat.com>
3325 PR tree-optimization/86835
3326 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
3327 new_stmt after def_gsi, make sure to insert new_square_stmt after
3328 that stmt, not 2 stmts before it.
3330 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
3333 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
3336 2018-08-10 Martin Liska <mliska@suse.cz>
3339 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
3341 * builtins.c (expand_builtin_expect_with_probability):
3343 (expand_builtin_expect_with_probability): New function.
3344 (build_builtin_expect_predicate): Add new argumnet probability
3345 for BUILT_IN_EXPECT_WITH_PROBABILITY.
3346 (fold_builtin_expect):
3349 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
3350 * builtins.h (fold_builtin_expect): Set new argument.
3351 * doc/extend.texi: Document __builtin_expect_with_probability.
3352 * doc/invoke.texi: Likewise.
3353 * gimple-fold.c (gimple_fold_call): Pass new argument.
3354 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
3355 also BUILT_IN_EXPECT_WITH_PROBABILITY.
3356 * predict.c (get_predictor_value): New function.
3357 (expr_expected_value): Add new argument probability. Assume
3358 that predictor and probability are always non-null.
3359 (expr_expected_value_1): Likewise. For __builtin_expect and
3360 __builtin_expect_with_probability set probability. Handle
3361 combination in binary expressions.
3362 (tree_predict_by_opcode): Simplify code by simply calling
3363 get_predictor_value.
3364 (pass_strip_predict_hints::execute): Add handling of
3365 BUILT_IN_EXPECT_WITH_PROBABILITY.
3366 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
3368 * tree.h (DECL_BUILT_IN_P): New function.
3370 2018-08-10 Martin Liska <mliska@suse.cz>
3372 PR tree-optimization/85799
3373 * passes.def: Add argument for pass_strip_predict_hints.
3374 * predict.c (class pass_strip_predict_hints): Add new argument
3376 (strip_predictor_early): New function.
3377 (pass_strip_predict_hints::execute): Call the function to
3379 (strip_predict_hints): New function.
3380 * predict.def: Fix comment.
3382 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
3384 * Makefile.in: Clarify which tm.texi to copy over to assert the
3385 right to grant a GFDL license for all.
3387 2018-08-09 Jeff Law <law@redhat.com>
3389 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
3392 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
3394 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
3397 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3399 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
3400 reductions for variable-length vectors.
3402 2018-08-09 David Malcolm <dmalcolm@redhat.com>
3405 * common.opt (fdiagnostics-show-line-numbers): New option.
3406 * diagnostic-show-locus.c (class layout): Add fields
3407 "m_show_line_numbers_p" and "m_linenum_width";
3408 (num_digits): New function.
3409 (test_num_digits): New function.
3410 (layout::layout): Initialize new fields. Update m_x_offset
3411 logic to handle any left margin.
3412 (layout::print_source_line): Print line number when requested.
3413 (layout::start_annotation_line): New member function.
3414 (layout::print_annotation_line): Call it.
3415 (layout::print_leading_fixits): Likewise.
3416 (layout::print_trailing_fixits): Likewise. Update calls to
3417 move_to_column for new parameter.
3418 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
3419 it to potentially call start_annotation_line.
3420 (layout::show_ruler): Call start_annotation_line.
3421 (selftest::test_line_numbers_multiline_range): New selftest.
3422 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
3423 and selftest::test_line_numbers_multiline_range.
3424 * diagnostic.c (diagnostic_initialize): Initialize
3425 show_line_numbers_p.
3426 * diagnostic.h (struct diagnostic_context): Add field
3427 "show_line_numbers_p".
3428 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
3429 -fno-diagnostics-show-line-numbers.
3430 * dwarf2out.c (gen_producer_string): Add
3431 OPT_fdiagnostics_show_line_numbers to the ignored options.
3432 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
3433 one setting" options.
3434 (append_compiler_options): Likewise to the dropped options.
3435 (append_diag_options): Likewise to the passed-on options.
3436 * opts.c (common_handle_option): Handle the new option.
3437 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
3439 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
3441 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
3442 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
3443 third argument of type "const signed char" to descriptions of
3444 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
3445 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
3446 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
3447 __builtin_bcdsub_ov functions.
3449 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3451 PR tree-optimization/86858
3452 * tree-vect-loop.c (vect_is_simple_reduction): Restore
3453 flow_bb_inside_loop_p calls.
3455 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3457 PR tree-optimization/86871
3458 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
3459 instead of gimple_assign_lhs.
3461 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
3464 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
3465 register constraint to operand 0.
3466 (add<mode>3_carryinC): Likewise.
3467 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
3469 2018-08-09 Martin Liska <mliska@suse.cz>
3472 * common.opt: Remove extra line.
3474 2018-08-09 Martin Liska <mliska@suse.cz>
3476 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
3477 at the end of a line, make first letter capital and end up
3478 a sentence with a dot.
3479 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
3480 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
3481 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
3482 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
3483 (PARAM_MAX_ISL_OPERATIONS): Likewise.
3484 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
3485 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
3486 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
3487 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
3488 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
3489 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
3490 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
3491 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
3492 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
3493 (PARAM_TREE_REASSOC_WIDTH): Likewise.
3494 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
3495 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
3496 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
3498 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
3501 * config/s390/s390.c (s390_option_override_internal): Reduce the
3502 stack-clash-protection-probe-interval param if it would be too big
3505 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
3508 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
3509 * config/m68k/m68k.c (handle_move_double): Don't call
3510 m68k_final_prescan_insn.
3511 (m68k_adjust_decorated_operand): Renamed from
3512 m68k_final_prescan_insn, remove first and third operand and
3514 (print_operand): Call it.
3515 (print_operand_address): Call it.
3517 2018-08-08 Nathan Sidwell <nathan@acm.org>
3519 * diagnostic.c (diagnostic_report_current_module): Use
3520 linemap_included_from & linemap_included_from_linemap.
3522 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
3524 * config/aarch64/aarch64-cores.def: Add phecda core.
3525 * config/aarch64/aarch64-tune.md: Regenerate.
3526 * doc/invoke.texi: Add phecda core.
3528 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
3531 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
3533 * config/s390/s390.md ("movti"): Add more alternatives for
3534 constant to GPR copies.
3536 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
3538 * config/s390/s390.c: Fix whitespace damage throughout the file.
3539 * config/s390/s390.h: Likewise.
3540 * config/s390/tpf.h: Likewise.
3542 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
3544 * config/s390/s390.c (s390_loadrelative_operand_p):
3545 Remove TARGET_CPU_ZARCH usages.
3546 (s390_rtx_costs): Likewise.
3547 (s390_legitimate_constant_p): Likewise.
3548 (s390_cannot_force_const_mem): Likewise.
3549 (legitimate_reload_constant_p): Likewise.
3550 (s390_preferred_reload_class): Likewise.
3551 (legitimize_pic_address): Likewise.
3552 (legitimize_tls_address): Likewise.
3553 (s390_split_branches): Removed.
3554 (s390_add_execute): Removed.
3555 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
3556 (s390_mainpool_start): Likewise.
3557 (s390_mainpool_finish): Likewise.
3558 (s390_mainpool_cancel): Removed.
3559 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
3560 (s390_chunkify_cancel): Likewise.
3561 (s390_return_addr_rtx): Likewise.
3562 (s390_register_info): Remove split_branches_pending_p uages.
3563 (s390_optimize_register_info): Likewise.
3564 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
3565 split_branches_pending_p usages.
3566 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
3567 (s390_load_got): Likewise.
3568 (s390_expand_split_stack_prologue): Likewise.
3569 (output_asm_nops): Likewise.
3570 (s390_function_profiler): Likewise.
3571 (s390_emit_call): Likewise.
3572 (s390_conditional_register_usage): Likewise.
3573 (s390_optimize_prologue): Likewise.
3574 (s390_reorg): Remove TARGET_CPU_ZARCH and
3575 split_branches_pending_p usages.
3576 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
3578 (s390_output_indirect_thunk_function): Likewise.
3579 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
3580 (TARGET_CPU_ZARCH_P): Removed.
3581 (struct machine_function): Remove split_branches_pending_p.
3582 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
3584 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
3586 * common/config/s390/s390-common.c (processor_flags_table):
3588 * config.gcc: Remove with_arch/with_tune support.
3589 * config/s390/2064.md: Remove cpu attribute comparisons.
3590 * config/s390/driver-native.c (s390_host_detect_local_cpu):
3592 * config/s390/linux.h (ASM_SPEC):
3593 Remove -march support.
3594 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
3595 Use a table to get an arch level.
3596 * config/s390/s390-opts.h (enum processor_type):
3598 * config/s390/s390.c
3599 (processor_table): Remove entries, add arch_level values.
3600 (s390_issue_rate): Remove cases.
3601 (s390_option_override): Adjust
3602 s390_option_override_internal() call.
3603 (s390_option_override_internal): Remove deprecation warning.
3604 (s390_valid_target_attribute_tree): Adjust
3605 s390_option_override_internal() call.
3606 * config/s390/s390.h (struct s390_processor):
3607 Share with s390-c.c, add arch_level field.
3608 * config/s390/s390.md:
3609 Remove occurrences in cpu attribute.
3610 * config/s390/s390.opt: Remove -march/-mtune support.
3611 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
3612 * doc/invoke.texi: Remove deprecation warning.
3614 2018-08-08 Luis Machado <luis.machado@linaro.org>
3616 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
3618 (qdf24xx_tunings): Set vector cost structure to
3619 qdf24xx_vector_cost.
3621 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
3622 <register_sextend>: Set to 3.
3624 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
3627 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
3628 * config/aarch64/aarch64-simd.md
3629 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
3630 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
3631 (aarch64_frecpx<mode>): ...this new pattern.
3632 * config/aarch64/aarch64-simd-builtins.def: Remove comment
3633 about aarch64_frecp<FRECP:frecp_suffix><mode>.
3635 2018-08-07 Martin Liska <mliska@suse.cz>
3638 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
3639 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
3640 * predict.def (PRED_MALLOC_NONNULL): New predictor.
3641 * doc/extend.texi: Document that malloc attribute adds
3644 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
3647 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3648 Define to speculation_safe_value_not_needed.
3650 2018-08-06 Jeff Law <law@redhat.com>
3652 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
3653 the vr_values instance to cprop_into_stmt.
3654 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
3655 (cprop_operand): Also query EVRP to determine if OP is a constant.
3657 2018-08-06 Nathan Sidwell <nathan@acm.org>
3659 * diagnostic.c (diagnostic_report_current_module): Reroll
3660 included-at loop. Translate text.
3662 2018-08-06 David Malcolm <dmalcolm@redhat.com>
3664 * function-tests.c (selftest::test_expansion_to_rtl): Call
3665 free_after_compilation.
3667 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3669 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
3671 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
3673 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
3674 loops with memory block operations from getting unrolled.
3676 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
3679 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3680 Define to speculation_safe_value_not_needed.
3682 2018-08-06 Jeff Law <law@redhat.com>
3684 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
3687 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3690 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
3691 with all enabled __intN types.
3693 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
3695 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3697 * alias.c (record_set): Check for clobber high.
3698 * cfgexpand.c (expand_gimple_stmt): Likewise.
3699 * combine-stack-adj.c (single_set_for_csa): Likewise.
3700 * combine.c (find_single_use_1): Likewise.
3701 (set_nonzero_bits_and_sign_copies): Likewise.
3702 (get_combine_src_dest): Likewise.
3703 (is_parallel_of_n_reg_sets): Likewise.
3704 (try_combine): Likewise.
3705 (record_dead_and_set_regs_1): Likewise.
3706 (reg_dead_at_p_1): Likewise.
3707 (reg_dead_at_p): Likewise.
3708 * dce.c (deletable_insn_p): Likewise.
3709 (mark_nonreg_stores_1): Likewise.
3710 (mark_nonreg_stores_2): Likewise.
3711 * df-scan.c (df_find_hard_reg_defs): Likewise.
3712 (df_uses_record): Likewise.
3713 (df_get_call_refs): Likewise.
3714 * dwarf2out.c (mem_loc_descriptor): Likewise.
3715 * haifa-sched.c (haifa_classify_rtx): Likewise.
3716 * ira-build.c (create_insn_allocnos): Likewise.
3717 * ira-costs.c (scan_one_insn): Likewise.
3718 * ira.c (equiv_init_movable_p): Likewise.
3719 (rtx_moveable_p): Likewise.
3720 (interesting_dest_for_shprep): Likewise.
3721 * jump.c (mark_jump_label_1): Likewise.
3722 * postreload-gcse.c (record_opr_changes): Likewise.
3723 * postreload.c (reload_cse_simplify): Likewise.
3724 (struct reg_use): Add source expr.
3725 (reload_combine): Check for clobber high.
3726 (reload_combine_note_use): Likewise.
3727 (reload_cse_move2add): Likewise.
3728 (move2add_note_store): Likewise.
3729 * print-rtl.c (print_pattern): Likewise.
3730 * recog.c (decode_asm_operands): Likewise.
3731 (store_data_bypass_p): Likewise.
3732 (if_test_bypass_p): Likewise.
3733 * regcprop.c (kill_clobbered_value): Likewise.
3734 (kill_set_value): Likewise.
3735 * reginfo.c (reg_scan_mark_refs): Likewise.
3736 * reload1.c (maybe_fix_stack_asms): Likewise.
3737 (eliminate_regs_1): Likewise.
3738 (elimination_effects): Likewise.
3739 (mark_not_eliminable): Likewise.
3740 (scan_paradoxical_subregs): Likewise.
3741 (forget_old_reloads_1): Likewise.
3742 * reorg.c (find_end_label): Likewise.
3743 (try_merge_delay_insns): Likewise.
3744 (redundant_insn): Likewise.
3745 (own_thread_p): Likewise.
3746 (fill_simple_delay_slots): Likewise.
3747 (fill_slots_from_thread): Likewise.
3748 (dbr_schedule): Likewise.
3749 * resource.c (update_live_status): Likewise.
3750 (mark_referenced_resources): Likewise.
3751 (mark_set_resources): Likewise.
3752 * rtl.c (copy_rtx): Likewise.
3753 * rtlanal.c (reg_referenced_p): Likewise.
3754 (single_set_2): Likewise.
3755 (noop_move_p): Likewise.
3756 (note_stores): Likewise.
3757 * sched-deps.c (sched_analyze_reg): Likewise.
3758 (sched_analyze_insn): Likewise.
3760 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3762 * cse.c (invalidate_reg): New function extracted from...
3763 (invalidate): ...here.
3764 (canonicalize_insn): Check for clobber high.
3765 (invalidate_from_clobbers): invalidate clobber highs.
3766 (invalidate_from_sets_and_clobbers): Likewise.
3767 (count_reg_usage): Check for clobber high.
3768 (insn_live_p): Likewise.
3769 * cselib.c (cselib_expand_value_rtx_1):Likewise.
3770 (cselib_invalidate_regno): Check for clobber in setter.
3771 (cselib_invalidate_rtx): Pass through setter.
3772 (cselib_invalidate_rtx_note_stores):
3773 (cselib_process_insn): Check for clobber high.
3774 * cselib.h (cselib_invalidate_rtx): Add operand.
3776 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3778 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
3779 (mark_not_eliminable): Likewise.
3780 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
3781 * lra-lives.c (process_bb_lives): Check for clobber high.
3782 * lra.c (new_insn_reg): Remember clobber highs.
3783 (collect_non_operand_hard_regs): Check for clobber high.
3784 (lra_set_insn_recog_data): Likewise.
3785 (add_regs_to_insn_regno_info): Likewise.
3786 (lra_update_insn_regno_info): Likewise.
3788 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3790 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
3791 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
3793 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3795 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
3796 (copy_insn_1): Likewise.
3797 (gen_hard_reg_clobber_high): New gen function.
3798 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
3799 * genemit.c (gen_exp): Likewise.
3800 (gen_emit_seq): Pass through info.
3801 (gen_insn): Check for CLOBBER_HIGH.
3802 (gen_expand): Pass through info.
3803 (gen_split): Likewise.
3804 (output_add_clobbers): Likewise.
3805 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
3806 (remove_clobbers): Likewise.
3807 * rtl.h (gen_hard_reg_clobber_high): New declaration.
3809 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3811 * doc/rtl.texi (clobber_high): Add.
3812 (parallel): Add in clobber high
3813 * rtl.c (rtl_check_failed_code3): Add function.
3814 * rtl.def (CLOBBER_HIGH): Add expression.
3815 * rtl.h (RTL_CHECKC3): Add macro.
3816 (rtl_check_failed_code3): Add declaration.
3817 (XC3EXP): Add macro.
3819 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
3822 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3823 cfun->machine->max_used_stack_alignment if needed.
3825 2018-08-04 Martin Sebor <msebor@redhat.com>
3827 PR tree-optimization/86571
3828 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
3831 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
3834 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3837 2018-08-03 Jeff Law <law@redhat.com>
3840 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3841 Define to speculation_safe_value_not_needed.
3843 2018-08-03 David Malcolm <dmalcolm@redhat.com>
3845 * doc/gcov.texi (-x): Remove duplicate "to".
3846 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3847 (-Wif-not-aligned): Remove duplicate "is".
3848 (-flto): Remove duplicate "the".
3849 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3850 duplicate "v5.00.b".
3851 (MSP430 Options): Remove duplicate "and" from the description
3852 of "-mgprel-sec=regexp".
3853 (x86 Options): Remove duplicate copies of "vmldLog102" and
3854 vmlsLog104 from description of "-mveclibabi=type".
3856 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
3858 * internal-fn.h (first_commutative_argument): Declare.
3859 * internal-fn.c (first_commutative_argument): New function.
3860 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3861 restrictions for pattern statements. Use first_commutative_argument
3862 to look for commutative operands in calls to internal functions.
3864 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
3866 * Makefile.in (wide-int-range.o): New.
3867 * tree-vrp.c: Move all the wide_int_* functions to...
3868 * wide-int-range.cc: ...here.
3869 * tree-vrp.h: Move all the wide_int_* prototypes to...
3870 * wide-int-range.h: ...here.
3872 2018-08-03 Tom de Vries <tdevries@suse.de>
3874 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3876 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3877 * except.c (output_function_exception_table): Do early exit if
3878 targetm_common.except_unwind_info (&global_options) == UI_NONE.
3880 2018-08-03 Martin Liska <mliska@suse.cz>
3882 * predict.c (dump_prediction): Change to 2 digits
3885 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
3887 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3889 (falkor_am_1_gtov_gtov): ... a new insn reservation.
3891 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
3893 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3894 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3895 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3896 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3897 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3899 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3901 * diagnostic-show-locus.c (diagnostic_show_locus): Use
3902 pp_take_prefix when saving the existing prefix.
3903 * diagnostic.c (diagnostic_append_note): Likewise.
3904 * langhooks.c (lhd_print_error_function): Likewise.
3905 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3906 param's type. Free the existing prefix.
3907 (pp_take_prefix): New function.
3908 (pretty_printer::pretty_printer): Drop the prefix parameter.
3909 Rename the length parameter to match the comment.
3910 (pretty_printer::~pretty_printer): Free the prefix.
3911 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3913 (struct pretty_printer): Drop the "const" from "prefix" field's
3914 type and clarify memory management.
3915 (pp_set_prefix): Drop the "const" from the 2nd param.
3916 (pp_take_prefix): New decl.
3918 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3920 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3921 for word_mode_ok here instead of passing as argument.
3922 (expand_block_compare): Change select_block_compare_mode() call.
3923 (expand_strncmp_gpr_sequence): New function.
3924 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3926 2018-08-02 Jeff Law <law@redhat.com>
3929 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3930 Define to speculation_safe_value_not_needed.
3933 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3934 Define to speculation_safe_value_not_needed.
3936 2018-08-02 Tom de Vries <tdevries@suse.de>
3939 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3940 function. Return UI_TARGET unconditionally.
3941 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3942 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3944 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3946 * genemit.c (print_overload_test): Fix typo.
3948 2018-08-02 Richard Biener <rguenther@suse.de>
3950 PR tree-optimization/86816
3951 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3952 which checks for value availability before querying it.
3953 (gvn_uses_equal): Use it.
3954 (same_succ_hash): Likewise.
3955 (gimple_equal_p): Likewise.
3957 2018-08-02 Nick Clifton <nickc@redhat.com>
3960 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3961 Define to speculation_safe_value_not_needed.
3964 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3965 Define to speculation_safe_value_not_needed.
3968 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3969 Define to speculation_safe_value_not_needed.
3972 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3973 Define to speculation_safe_value_not_needed.
3976 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3977 Define to speculation_safe_value_not_needed.
3980 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3981 Define to speculation_safe_value_not_needed.
3984 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3985 Define to speculation_safe_value_not_needed.
3988 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3989 Define to speculation_safe_value_not_needed.
3992 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3993 speculation_safe_value_not_needed.
3996 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3997 to speculation_safe_value_not_needed.
3999 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
4001 * doc/md.texi: Expand the documentation of instruction names
4002 to mention port-local uses. Document '@' in pattern names.
4003 * read-md.h (overloaded_instance, overloaded_name): New structs.
4005 (md_reader::handle_overloaded_name): New member function.
4006 (md_reader::get_overloads): Likewise.
4007 (md_reader::m_first_overload): New member variable.
4008 (md_reader::m_next_overload_ptr): Likewise.
4009 (md_reader::m_overloads_htab): Likewise.
4010 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
4011 m_next_overload_ptr and m_overloads_htab.
4012 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
4013 (get_mode_token, get_code_token, get_int_token): New functions.
4014 (map_attr_string): Add an optional argument that passes back
4015 the associated iterator.
4016 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
4017 (md_reader::handle_overloaded_name, add_overload_instance): New
4019 (apply_iterators): Handle '@' names. Report an error if '@'
4020 is used without iterators.
4021 (initialize_iterators): Initialize the new iterator_group fields.
4022 * genopinit.c (handle_overloaded_code_for)
4023 (handle_overloaded_gen): New functions.
4024 (main): Use them to print declarations of maybe_code_for_* and
4025 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
4026 * genemit.c (print_overload_arguments, print_overload_test)
4027 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
4028 (main): Use it to print definitions of maybe_code_for_* and
4029 maybe_gen_* functions.
4030 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
4031 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
4032 instead of explicit mode checks.
4033 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
4034 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
4035 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
4036 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
4037 (aarch64_expand_compare_and_swap): Likewise
4038 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
4039 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
4040 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
4041 (aarch64_constant_pool_reload_icode): Delete.
4042 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
4043 instead of aarch64_constant_pool_reload_icode. Use
4044 code_for_aarch64_reload_mov instead of explicit mode checks.
4045 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
4046 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
4047 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
4048 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
4049 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
4050 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
4051 (aarch64_atomic_load_op_code): Delete.
4052 (aarch64_emit_atomic_load_op): Likewise.
4053 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
4054 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
4055 instead of aarch64_emit_atomic_load_op.
4056 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
4057 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
4058 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
4059 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
4060 character before the pattern name.
4061 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
4062 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
4063 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
4064 (aarch64_frecps<mode>): Likewise.
4065 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
4066 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
4067 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
4068 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
4069 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
4071 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
4073 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
4074 Allow HFmode constants if TARGET_FP_F16INST.
4076 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
4079 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
4080 No longer check last store for clobber of address register.
4082 2018-08-02 Martin Liska <mliska@suse.cz>
4084 PR gcov-profile/86817
4085 * gcov.c (process_all_functions): New function.
4087 (process_file): Move functions processing to
4088 process_all_functions.
4090 2018-08-02 David Malcolm <dmalcolm@redhat.com>
4092 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
4093 "const" to the "gimple *" and "rtx_insn *" parameters.
4094 * dumpfile.h (dump_user_location_t::dump_user_location_t):
4096 (dump_location_t::dump_location_t): Likewise.
4098 2018-08-01 Martin Sebor <msebor@redhat.com>
4100 PR tree-optimization/86650
4101 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
4102 rather than a "gcall *". Directly pass the data of interest
4103 to percent_K_format, rather than building a temporary CALL_EXPR
4105 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
4106 (gimple_fold_builtin_strncat): Adjust.
4107 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
4108 gcall* argument with gimple*.
4109 * gimple-ssa-warn-restrict.c (check_call): Same.
4110 (wrestrict_dom_walker::before_dom_children): Same.
4111 (builtin_access::builtin_access): Same.
4112 (check_bounds_or_overlap): Same
4113 (maybe_diag_overlap): Same.
4114 (maybe_diag_offset_bounds): Same.
4115 * tree-diagnostic.c (default_tree_printer): Move usage of
4116 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
4118 * tree-pretty-print.c (percent_K_format): Add argument.
4119 * tree-pretty-print.h: Add argument.
4120 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
4121 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
4122 (maybe_diag_stxncpy_trunc): Same.
4123 (handle_builtin_stxncpy): Same.
4124 (handle_builtin_strcat): Same.
4126 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4128 * match.pd: Optimise pointer range checks.
4130 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4132 PR tree-optimization/86758
4133 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
4134 to remove pattern statements.
4136 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4138 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
4139 result of dfs_enumerate_from when constructing stmt_vec_infos,
4140 instead of additionally calling get_loop_body.
4142 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4144 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
4146 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
4147 When creating an iv, assert that the step is not known to be zero.
4148 (vect_setup_realignment): Update call accordingly.
4149 * tree-vect-stmts.c (vectorizable_store): Likewise.
4150 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
4152 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4154 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
4155 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
4156 (vectorizable_reduction): Likewise.
4157 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4158 (vect_detect_hybrid_slp_stmts): Likewise.
4159 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4161 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
4163 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
4164 (wide_int_set_zero_nonzero_bits): ...this.
4165 (zero_nonzero_bits_from_vr): Rename to...
4166 (vrp_set_zero_nonzero_bits): ...this.
4167 (extract_range_from_multiplicative_op_1): Abstract wide int
4169 (wide_int_range_multiplicative_op): ...here.
4170 (extract_range_from_binary_expr_1): Extract wide int binary
4171 operations into their own functions.
4172 (wide_int_range_lshift): New.
4173 (wide_int_range_can_optimize_bit_op): New.
4174 (wide_int_range_shift_undefined_p): New.
4175 (wide_int_range_bit_xor): New.
4176 (wide_int_range_bit_ior): New.
4177 (wide_int_range_bit_and): New.
4178 (wide_int_range_trunc_mod): New.
4179 (extract_range_into_wide_ints): New.
4180 (vrp_shift_undefined_p): New.
4181 (extract_range_from_multiplicative_op): New.
4182 (vrp_can_optimize_bit_op): New.
4183 * tree-vrp.h (value_range::dump): New.
4184 (wide_int_range_multiplicative_op): New.
4185 (wide_int_range_lshift):New.
4186 (wide_int_range_shift_undefined_p): New.
4187 (wide_int_range_bit_xor): New.
4188 (wide_int_range_bit_ior): New.
4189 (wide_int_range_bit_and): New.
4190 (wide_int_range_trunc_mod): New.
4191 (zero_nonzero_bits_from_bounds): Rename to...
4192 (wide_int_set_zero_nonzero_bits): ...this.
4193 (zero_nonzero_bits_from_vr): Rename to...
4194 (vrp_set_zero_nonzero_bits): ...this.
4195 (range_easy_mask_min_max): Rename to...
4196 (wide_int_range_can_optimize_bit_op): this.
4197 * vr-values.c (simplify_bit_ops_using_ranges): Rename
4198 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
4200 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4202 * tree-vectorizer.h (vect_orig_stmt): New function.
4203 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
4204 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
4205 (vect_create_epilog_for_reduction): Likewise.
4206 (vectorizable_live_operation): Likewise.
4207 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4208 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
4209 * tree-vect-stmts.c (vectorizable_call): Likewise.
4210 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
4212 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4214 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
4216 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
4217 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
4218 (vect_transform_loop): Likewise.
4219 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
4221 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4223 * tree-vectorizer.h (vect_schedule_slp): Return void.
4224 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
4225 (vect_schedule_slp): Likewise.
4227 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4229 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
4231 (vect_transform_loop): Update calls accordingly. Schedule SLP
4232 instances before the main loop, if any exist.
4234 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4236 PR tree-optimization/86749
4237 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
4238 If the lhs is used in a COND_EXPR, check that it is being used
4239 as the "then" or "else" value.
4241 2018-08-01 Tom de Vries <tdevries@suse.de>
4244 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
4245 speculation_safe_value_not_needed.
4247 2018-08-01 Richard Biener <rguenther@suse.de>
4249 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
4252 2018-08-01 Martin Liska <mliska@suse.cz>
4254 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
4255 format how successful transformation is dumped.
4256 (gimple_mod_pow2_value_transform): Likewise.
4257 (gimple_mod_subtract_transform): Likewise.
4258 (gimple_stringops_transform): Likewise.
4260 2018-08-01 Martin Liska <mliska@suse.cz>
4263 * value-prof.c (interesting_stringop_to_profile_p):
4264 Simplify the code and add BUILT_IN_MEMMOVE.
4265 (gimple_stringops_transform): Likewise.
4267 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
4269 * config/aarch64/aarch64-simd.md
4270 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
4271 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
4272 use GPI iterator instead of SI mode.
4274 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
4276 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
4277 rs6000_speculation_barrier.
4278 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
4279 new barrier pattern name.
4281 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
4283 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
4284 (speculation_barrier): New insn.
4286 2018-08-01 Richard Biener <rguenther@suse.de>
4289 * graphite.h: Include isl/id.h and isl/space.h to allow build
4292 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
4295 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
4296 mode for COFF targets.
4297 * defaults.h (TARGET_COFF): Define.
4298 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
4299 TARGET_COFF): Define.
4300 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
4301 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
4302 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
4304 2018-07-31 Alexandre Oliva <oliva@adacore.com>
4306 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
4307 * gimple-streamer-out.c (output_bb): Save it.
4308 * lto-streamer-in.c (input_struct_function_base): Restore
4309 instance discriminator if available. Create map on demand.
4310 * lto-streamer-out.c (output_struct_function_base): Save it if
4312 * final.c (decl_to_instance_map): Document LTO strategy.
4314 2018-07-31 Alexandre Oliva <oliva@adacore.com>
4315 Olivier Hainque <hainque@adacore.com>
4317 * debug.h (decl_to_instance_map_t): New type.
4318 (decl_to_instance_map): Declare.
4319 (maybe_create_decl_to_instance_map): New inline function.
4320 * final.c (bb_discriminator, last_bb_discriminator): New statics,
4321 to track basic block discriminators.
4322 (final_start_function_1): Initialize them.
4323 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
4325 (decl_to_instance_map): New variable.
4326 (map_decl_to_instance, maybe_set_discriminator): New functions.
4327 (notice_source_line): Set discriminator.
4329 2018-07-31 Ian Lance Taylor <iant@golang.org>
4331 * targhooks.c (default_have_speculation_safe_value): Add
4334 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4336 * dump-context.h: Include "pretty-print.h".
4337 (dump_context::refresh_dumps_are_enabled): New decl.
4338 (dump_context::emit_item): New decl.
4339 (class dump_context): Add fields "m_test_pp" and
4341 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
4342 (temp_dump_context::get_dumped_text): New decl.
4343 (class temp_dump_context): Add field "m_pp".
4344 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
4345 (dump_context::refresh_dumps_are_enabled): ...and add a test for
4347 (set_dump_file): Update for above change.
4348 (set_alt_dump_file): Likewise.
4349 (dump_loc): New overload, taking a pretty_printer *.
4350 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
4351 to any test pretty-printer.
4352 (make_item_for_dump_gimple_stmt): New function, adapted from
4353 optinfo::add_gimple_stmt.
4354 (dump_context::dump_gimple_stmt): Call it, and use the result,
4355 eliminating the direct usage of dump_file and alt_dump_file in
4356 favor of indirectly using them via emit_item.
4357 (make_item_for_dump_gimple_expr): New function, adapted from
4358 optinfo::add_gimple_expr.
4359 (dump_context::dump_gimple_expr): Call it, and use the result,
4360 eliminating the direct usage of dump_file and alt_dump_file in
4361 favor of indirectly using them via emit_item.
4362 (make_item_for_dump_generic_expr): New function, adapted from
4364 (dump_context::dump_generic_expr): Call it, and use the result,
4365 eliminating the direct usage of dump_file and alt_dump_file in
4366 favor of indirectly using them via emit_item.
4367 (make_item_for_dump_printf_va): New function, adapted from
4368 optinfo::add_printf_va.
4369 (make_item_for_dump_printf): New function.
4370 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
4371 and use the result, eliminating the direct usage of dump_file and
4372 alt_dump_file in favor of indirectly using them via emit_item.
4373 (make_item_for_dump_dec): New function.
4374 (dump_context::dump_dec): Call it, and use the result,
4375 eliminating the direct usage of dump_file and alt_dump_file in
4376 favor of indirectly using them via emit_item.
4377 (make_item_for_dump_symtab_node): New function, adapted from
4378 optinfo::add_symtab_node.
4379 (dump_context::dump_symtab_node): Call it, and use the result,
4380 eliminating the direct usage of dump_file and alt_dump_file in
4381 favor of indirectly using them via emit_item.
4382 (dump_context::begin_scope): Reimplement, avoiding direct usage
4383 of dump_file and alt_dump_file in favor of indirectly using them
4385 (dump_context::emit_item): New member function.
4386 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
4387 Set up test pretty-printer on the underlying context. Call
4388 refresh_dumps_are_enabled.
4389 (temp_dump_context::~temp_dump_context): Call
4390 refresh_dumps_are_enabled.
4391 (temp_dump_context::get_dumped_text): New member function.
4392 (selftest::verify_dumped_text): New function.
4393 (ASSERT_DUMPED_TEXT_EQ): New macro.
4394 (selftest::test_capture_of_dump_calls): Run all tests twice, with
4395 and then without optinfo enabled. Add uses of
4396 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
4397 * dumpfile.h: Update comment for the dump_* API.
4398 * optinfo-emit-json.cc
4399 (selftest::test_building_json_from_dump_calls): Update for new
4400 param for temp_dump_context ctor.
4401 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
4402 and "m_owned" field.
4403 (optinfo_item::~optinfo_item): Likewise.
4404 (optinfo::add_item): New member function.
4405 (optinfo::emit): Update comment.
4406 (optinfo::add_string): Delete.
4407 (optinfo::add_printf): Delete.
4408 (optinfo::add_printf_va): Delete.
4409 (optinfo::add_gimple_stmt): Delete.
4410 (optinfo::add_gimple_expr): Delete.
4411 (optinfo::add_tree): Delete.
4412 (optinfo::add_symtab_node): Delete.
4413 (optinfo::add_dec): Delete.
4414 * optinfo.h (class dump_context): New forward decl.
4415 (optinfo::add_item): New decl.
4416 (optinfo::add_string): Delete.
4417 (optinfo::add_printf): Delete.
4418 (optinfo::add_printf_va): Delete.
4419 (optinfo::add_gimple_stmt): Delete.
4420 (optinfo::add_gimple_expr): Delete.
4421 (optinfo::add_tree): Delete.
4422 (optinfo::add_symtab_node): Delete.
4423 (optinfo::add_dec): Delete.
4424 (optinfo::add_poly_int): Delete.
4425 (optinfo_item::optinfo_item): Remove "owned" param.
4426 (class optinfo_item): Remove field "m_owned".
4428 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4431 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
4432 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
4433 requested variable alignment.
4434 (expand_one_ssa_partition): Likewise.
4435 (expand_one_var): Likewise.
4437 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4439 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4440 to speculation_safe_value_not_needed.
4442 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4444 * targhooks.h (speculation_safe_value_not_needed): New prototype.
4445 * targhooks.c (speculation_safe_value_not_needed): New function.
4446 * target.def (have_speculation_safe_value): Update documentation.
4447 * doc/tm.texi: Regenerated.
4449 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4451 * config/aarch64/iterators.md (ALLI_TI): New iterator.
4452 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
4454 (despeculate_copy<ALLI:mode>_insn): New insn.
4455 (despeculate_copyti_insn): New insn.
4456 (despeculate_simple<ALLI:mode>): New insn
4457 (despeculate_simpleti): New insn.
4458 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
4460 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
4461 aarch64_speculation_safe_value.
4462 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
4464 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4466 * config/aarch64/aarch64-speculation.cc: New file.
4467 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
4468 before pass_reorder_blocks.
4469 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
4471 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
4472 X14 and X15 when tracking speculation.
4473 * config/aarch64/aarch64.md (register name constants): Add
4474 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
4475 (unspec): Add UNSPEC_SPECULATION_TRACKER.
4476 (speculation_barrier): New insn attribute.
4477 (cmp<mode>): Allow SP in comparisons.
4478 (speculation_tracker): New insn.
4479 (speculation_barrier): Add speculation_barrier attribute.
4480 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
4481 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
4482 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
4484 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4486 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
4487 aarch64_track_speculation is true.
4488 (tb<optab><mode>1): Likewise.
4489 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
4490 generate CB[N]Z when tracking speculation.
4491 (aarch64_split_compare_and_swap): Likewise.
4492 (aarch64_split_atomic_op): Likewise.
4494 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4496 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
4498 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4500 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
4501 (speculation_barrier): New insn.
4503 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4505 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
4506 * config/arm/arm.md (speculation_barrier): New expand.
4507 (speculation_barrier_insn): New pattern.
4509 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4511 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
4512 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
4513 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
4514 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
4516 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
4517 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
4518 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
4519 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
4520 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
4521 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
4522 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
4523 * builtins.c (expand_speculation_safe_value): New function.
4524 (expand_builtin): Call it.
4525 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
4526 * doc/extend.texi: Document __builtin_speculation_safe_value.
4527 * doc/md.texi: Document "speculation_barrier" pattern.
4528 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
4529 TARGET_HAVE_SPECULATION_SAFE_VALUE.
4530 * doc/tm.texi: Regenerated.
4531 * target.def (have_speculation_safe_value, speculation_safe_value): New
4533 * targhooks.c (default_have_speculation_safe_value): New function.
4534 (default_speculation_safe_value): New function.
4535 * targhooks.h (default_have_speculation_safe_value): Add prototype.
4536 (default_speculation_safe_value): Add prototype.
4538 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4540 * dump-context.h (dump_context::dump_loc): New decl.
4541 * dumpfile.c (dump_context::dump_loc): New member function.
4542 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
4543 and dump_gimple_stmt.
4544 (dump_context::dump_gimple_expr_loc): Likewise, using
4546 (dump_context::dump_generic_expr_loc): Likewise, using
4548 (dump_context::dump_printf_loc_va): Likewise, using
4550 (dump_context::begin_scope): Explicitly using the global function
4551 "dump_loc", rather than the member function.
4553 2018-07-31 Martin Sebor <msebor@redhat.com>
4555 PR tree-optimization/86741
4556 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
4558 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
4560 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
4561 depend on whether prefetch instructions will be emitted or not.
4562 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
4563 will be emitted or not.
4564 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
4565 (TARGET_SETMEM_PFD): New macros.
4567 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4569 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
4570 (NULL_STMT_VEC_INFO): Delete.
4571 (stmt_vec_info::operator*): Likewise.
4572 (stmt_vec_info::operator gimple *): Likewise.
4573 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
4574 of NULL_STMT_VEC_INFO.
4575 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4576 (vect_reassociating_reduction_p): Likewise.
4577 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4578 (vectorizable_store): Likewise.
4579 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
4580 (vec_info::free_stmt_vec_infos): Likewise.
4582 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4584 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
4585 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
4587 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4589 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
4590 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4591 (vec_info::free_stmt_vec_info): New private member functions.
4592 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
4593 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
4594 * tree-parloops.c (gather_scalar_reductions): Remove calls to
4595 set_stmt_vec_info_vec and free_stmt_vec_infos.
4596 * tree-vect-loop.c (_loop_vec_info): Remove call to
4597 set_stmt_vec_info_vec.
4598 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
4599 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
4600 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
4601 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4602 (vec_info::free_stmt_vec_info): ...these new functions. Remove
4603 assignments in {vec_info::,}new_stmt_vec_info that are redundant
4604 with the clearing in the xcalloc.
4605 (stmt_vec_info_vec): Delete.
4606 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
4607 (vectorize_loops): Likewise.
4608 (vec_info::~vec_info): Remove argument from call to
4609 free_stmt_vec_infos.
4610 (vec_info::add_stmt): Remove vinfo argument from call to
4613 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4615 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
4616 rather than a gimple stmt.
4617 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
4618 information for pattern statements when passed the original
4619 statement; instead wait to be passed the pattern statement itself.
4620 Don't call set_vinfo_for_stmt here.
4621 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
4622 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
4623 stmt_vec_infos here.
4624 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
4625 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
4626 stmt_vec_infos entry.
4628 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4630 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
4631 * tree-vectorizer.c (vec_info::replace_stmt): New function.
4632 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
4633 * tree-vect-stmts.c (vectorizable_call): Likewise.
4634 (vectorizable_simd_clone_call): Likewise.
4636 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4638 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
4639 * tree-vectorizer.c (vec_info::remove_stmt): New function.
4640 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
4641 * tree-vect-loop.c (vect_transform_loop): Likewise.
4642 * tree-vect-slp.c (vect_schedule_slp): Likewise.
4643 * tree-vect-stmts.c (vect_remove_stores): Likewise.
4645 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4647 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
4648 (vect_dr_stmt): Delete.
4649 * tree-vectorizer.c (vec_info::lookup_dr): New function.
4650 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
4652 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
4653 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
4654 (vect_verify_datarefs_alignment, vect_peeling_supportable)
4655 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4656 (vect_analyze_data_refs): Likewise.
4657 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
4659 (vect_find_same_alignment_drs): Likewise.
4660 (vect_slp_analyze_node_dependences): Update calls accordingly.
4661 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4662 instead of DR_VECT_AUX.
4663 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
4664 of a vector data references. Use vec_info::lookup_dr instead of
4666 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
4667 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4668 instead of DR_VECT_AUX.
4670 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4672 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
4674 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4676 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4677 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4678 (vect_gen_prolog_loop_niters): Likewise.
4680 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4682 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
4683 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
4684 (vect_known_alignment_in_bytes, vect_dr_behavior)
4685 (vect_get_scalar_dr_size): Take references as dr_vec_infos
4686 instead of data_references. Update calls to other routines for
4687 which the same change has been made.
4688 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
4689 dr_vec_infos instead of stmt_vec_infos.
4690 (vect_analyze_data_ref_dependence): Update call accordingly.
4691 (vect_slp_analyze_data_ref_dependence)
4692 (vect_record_base_alignments): Use DR_VECT_AUX.
4693 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
4694 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
4695 (vector_alignment_reachable_p, vect_get_data_access_cost)
4696 (vect_peeling_supportable, vect_analyze_group_access_1)
4697 (vect_analyze_group_access, vect_analyze_data_ref_access)
4698 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
4699 (vect_compile_time_alias, vect_small_gap_p)
4700 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
4701 (vect_supportable_dr_alignment): Take references as dr_vec_infos
4702 instead of data_references. Update calls to other routines for
4703 which the same change has been made.
4704 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
4705 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4706 (vect_slp_analyze_and_verify_node_alignment)
4707 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4708 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4709 (vect_setup_realignment): Use dr_vec_infos. Update calls after
4711 (_vect_peel_info::dr): Replace with...
4712 (_vect_peel_info::dr_info): ...this new field.
4713 (vect_peeling_hash_get_most_frequent)
4714 (vect_peeling_hash_choose_best_peeling): Update accordingly.
4715 (vect_peeling_hash_get_lowest_cost):
4716 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
4717 routines for which the same change has been made.
4718 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
4720 * tree-vect-loop-manip.c (get_misalign_in_elems)
4721 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
4723 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4724 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
4725 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
4726 (get_group_load_store_type, get_negative_load_store_type)
4727 (vect_get_data_ptr_increment, vectorizable_store)
4728 (vectorizable_load): Likewise.
4729 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
4730 Update calls to other routines for which the same change has been made.
4732 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4734 * tree-vectorizer.h (vec_info::move_dr): New member function.
4735 (dataref_aux): Rename to...
4736 (dr_vec_info): ...this and add "dr" and "stmt" fields.
4737 (_stmt_vec_info::dr_aux): Update accordingly.
4738 (_stmt_vec_info::data_ref_info): Delete.
4739 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
4740 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
4741 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
4742 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
4744 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
4745 (STMT_VINFO_DR_INFO): New macro.
4746 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
4747 (set_dr_misalignment): Update after rename of dataref_aux.
4748 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
4749 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
4750 initialization of STMT_VINFO_DATA_REF.
4751 * tree-vectorizer.c (vec_info::move_dr): New function.
4752 * tree-vect-patterns.c (vect_recog_bool_pattern)
4753 (vect_recog_mask_conversion_pattern)
4754 (vect_recog_gather_scatter_pattern): Use it.
4755 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
4756 the "dr" and "stmt" fields of dr_vec_info instead of
4757 STMT_VINFO_DATA_REF.
4759 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4761 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
4762 (is_pattern_stmt_p): Use it.
4763 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
4764 on pattern statements.
4766 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4768 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
4769 original stmt as a stmt_vec_info rather than a gimple stmt.
4770 (vect_pattern_recog_1): Take the statement directly as a
4771 stmt_vec_info, rather than via a gimple_stmt_iterator.
4772 Update call to vect_mark_pattern_stmts.
4773 (vect_pattern_recog): Update calls accordingly.
4775 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4777 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
4778 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
4779 a vect_def_type for the first argument.
4780 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
4781 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
4782 operand if it isn't defined by a vectorized statement.
4783 (vect_build_gather_load_calls): Remove the mask_dt argument and
4784 update calls to vect_get_vec_def_for_stmt_copy.
4785 (vectorizable_bswap): Likewise the dt argument.
4786 (vectorizable_call): Update calls to vectorizable_bswap and
4787 vect_get_vec_def_for_stmt_copy.
4788 (vectorizable_simd_clone_call, vectorizable_assignment)
4789 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
4790 (vectorizable_comparison): Update calls to
4791 vect_get_vec_def_for_stmt_copy.
4792 (vectorizable_store): Likewise. Remove now-unnecessary calls to
4794 (vect_get_loop_based_defs): Remove dt argument and update call
4795 to vect_get_vec_def_for_stmt_copy.
4796 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
4797 and vect_get_vec_def_for_stmt_copy.
4798 (vectorizable_load): Update calls to vect_build_gather_load_calls
4799 and vect_get_vec_def_for_stmt_copy.
4800 * tree-vect-loop.c (vect_create_epilog_for_reduction)
4801 (vectorizable_reduction, vectorizable_live_operation): Update calls
4802 to vect_get_vec_def_for_stmt_copy.
4804 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4806 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
4807 and gimple stmt arguments with a stmt_vec_info.
4808 (vect_record_base_alignments): Update calls accordingly.
4809 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
4810 and gimple stmt arguments with a stmt_vec_info.
4811 (vect_build_slp_tree_1): Remove vinfo argument and update call
4812 to vect_record_max_nunits.
4813 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
4814 and vect_record_max_nunits.
4816 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4818 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
4819 file and take a stmt_vec_info instead of a gimple stmt.
4820 (supportable_widening_operation, vect_finish_replace_stmt)
4821 (vect_finish_stmt_generation, vect_get_store_rhs)
4822 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
4823 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
4824 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
4825 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
4826 (vect_create_data_ref_ptr, bump_vector_ptr)
4827 (vect_permute_store_chain, vect_setup_realignment)
4828 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
4829 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
4830 (vectorizable_reduction, vectorizable_induction)
4831 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4832 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4833 than gimple stmts as arguments.
4834 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4835 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4836 (can_group_stmts_p, vect_check_gather_scatter)
4837 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4838 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4839 (vect_permute_load_chain, vect_shift_permute_load_chain)
4840 (vect_transform_grouped_load)
4841 (vect_record_grouped_load_vectors): Likewise.
4842 * tree-vect-loop.c (vect_fixup_reduc_chain)
4843 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4844 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4845 (vectorizable_reduction, vectorizable_induction)
4846 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4847 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4848 (vect_get_load_store_mask): Likewise.
4849 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4850 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4851 * tree-vect-stmts.c (vect_mark_relevant)
4852 (is_simple_and_all_uses_invariant)
4853 (exist_non_indexing_operands_for_use_p, process_use)
4854 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4855 (vect_get_vec_def_for_operand, vect_get_vec_defs)
4856 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4857 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4858 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4859 (get_negative_load_store_type, get_load_store_type)
4860 (vect_check_load_store_mask, vect_check_store_rhs)
4861 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4862 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4863 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4864 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4865 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4866 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4867 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4868 (supportable_widening_operation): Likewise.
4870 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4872 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4873 a stmt_vec_info instead of a gcall.
4874 (vect_check_gather_scatter): Update call accordingly.
4875 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4877 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4878 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4879 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4880 instead of a gimple stmt.
4881 (vect_transform_loop): Update calls accordingly.
4882 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4883 stmt_vec_infos instead of gimple stmts.
4884 (vect_analyze_slp_instance): Update use accordingly.
4885 * tree-vect-stmts.c (read_vector_array, write_vector_array)
4886 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4887 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4888 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4889 (vect_gen_widened_results_half, vect_get_loop_based_defs)
4890 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4891 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4892 down to subroutines.
4894 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4896 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4897 of the worklist from a vector of gimple stmts to a vector of
4899 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4900 (vect_mark_stmts_to_be_vectorized): Likewise
4902 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4904 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4905 statement before passing it to vect_analyze_stmt.
4906 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4907 the chain of phi vector definitions. Track the exit phi via its
4909 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4910 STMT_VINFO_REDUC_DEF.
4911 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4912 stmt_vec_infos to handle the statement chains.
4913 (vect_get_slp_defs): Record the first statement in the node
4914 using a stmt_vec_info.
4915 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4916 statements here and pass their stmt_vec_info down to subroutines.
4917 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4918 down to vect_finish_stmt_generation.
4919 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4920 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4921 stmt_vec_infos to subroutines.
4922 (vect_remove_stores): Use stmt_vec_infos to handle the statement
4925 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4927 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4928 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4929 (vect_permute_store_chain, vect_setup_realignment)
4930 (vect_permute_load_chain, vect_shift_permute_load_chain)
4931 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4932 stmts internally, and when passing values to other vectorizer routines.
4933 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4934 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4935 (vect_analyze_loop_operations, get_initial_def_for_reduction)
4936 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4937 (vectorizable_reduction, vectorizable_induction)
4938 (vectorizable_live_operation, vect_transform_loop_stmt)
4939 (vect_transform_loop): Likewise.
4940 * tree-vect-patterns.c (vect_reassociating_reduction_p)
4941 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4942 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4943 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4944 (vect_slp_analyze_node_operations_1): Likewise.
4945 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4946 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4947 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4948 (vect_finish_stmt_generation_1, get_group_load_store_type)
4949 (get_load_store_type, vect_build_gather_load_calls)
4950 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4951 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4952 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4953 (vectorizable_store, vectorizable_load, vectorizable_condition)
4954 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4955 (supportable_widening_operation): Likewise.
4956 (vect_get_vector_types_for_stmt): Likewise.
4957 * tree-vectorizer.h (vect_dr_behavior): Likewise.
4959 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4961 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4962 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4963 (vect_permute_store_chain, vect_permute_load_chain)
4964 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4965 repeated stmt_vec_info lookups.
4966 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4967 (vect_update_ivs_after_vectorizer): Likewise.
4968 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4969 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4970 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4971 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4972 (vect_bb_slp_scalar_cost): Likewise.
4973 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4975 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4977 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4978 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4979 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4980 to get gassigns and gcalls, rather than operating on generc gimple
4982 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4983 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4984 (vectorizable_load, vect_analyze_stmt): Likewise.
4985 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4987 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4989 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4990 return stmt_vec_infos rather than gimple stmts. Do not accept
4992 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4994 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4995 Update use of get_later_stmt.
4996 (vect_get_constant_vectors): Update call accordingly.
4997 (vect_schedule_slp_instance): Likewise
4998 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4999 (vect_slp_analyze_instance_dependence): Likewise.
5000 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
5002 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5004 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
5005 (stmt_info_for_cost::stmt_info): ...this new field.
5006 (add_stmt_costs): Update accordingly.
5007 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
5008 (vect_get_known_peeling_cost): Likewise.
5009 (vect_estimate_min_profitable_iters): Likewise.
5010 * tree-vect-stmts.c (record_stmt_cost): Likewise.
5012 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5014 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
5015 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5016 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
5018 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
5020 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5022 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
5023 a gimple stmt to a stmt_vec_info.
5024 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
5026 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5028 * tree-vectorizer.h (vec_info::grouped_stores): Change from
5029 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5030 (_loop_vec_info::reduction_chains): Likewise.
5031 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
5033 * tree-vect-slp.c (vect_analyze_slp): Likewise.
5035 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5037 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
5038 a gimple stmt to a stmt_vec_info.
5039 (_stmt_vec_info::next_element): Likewise.
5040 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
5041 (vect_slp_analyze_and_verify_node_alignment)
5042 (vect_analyze_group_access_1, vect_analyze_group_access)
5043 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
5044 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
5045 (vect_supportable_dr_alignment): Update accordingly.
5046 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
5047 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
5048 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
5049 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
5050 * tree-vect-slp.c (vect_build_slp_tree_1)
5051 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
5052 (vect_split_slp_store_group, vect_analyze_slp_instance)
5053 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
5054 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
5055 (get_group_load_store_type, get_load_store_type)
5056 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
5057 (vect_transform_stmt, vect_remove_stores): Likewise.
5059 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5061 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
5063 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
5064 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
5065 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
5066 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
5067 (vector_alignment_reachable_p, vect_get_data_access_cost)
5068 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
5069 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
5070 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
5071 (vect_analyze_group_access_1, vect_analyze_group_access)
5072 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
5073 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
5074 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
5075 result of vect_dr_stmt and use the stmt_vec_info instead of
5076 the associated gimple stmt.
5077 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5078 (vect_gen_prolog_loop_niters): Likewise.
5079 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5081 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5083 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
5084 to a vec<stmt_vec_info>.
5085 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
5086 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
5088 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
5089 to a vec<stmt_vec_info>.
5090 (bst_traits::value_type, bst_traits::value_type): Likewise.
5091 (bst_traits::hash): Update accordingly.
5092 (vect_get_and_check_slp_defs): Change the stmts parameter from
5093 a vec<gimple *> to a vec<stmt_vec_info>.
5094 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
5095 (vect_build_slp_tree): Likewise.
5096 (vect_build_slp_tree_2): Likewise. Update uses of
5097 SLP_TREE_SCALAR_STMTS.
5098 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
5099 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
5100 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
5101 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
5102 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
5103 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
5104 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
5105 (vect_get_constant_vectors, vect_get_slp_defs)
5106 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
5107 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
5108 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
5109 instead of gimple stmts.
5110 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
5111 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
5112 (vect_slp_analyze_instance_dependence): Update uses of
5113 SLP_TREE_SCALAR_STMTS.
5114 (vect_slp_analyze_and_verify_node_alignment): Likewise.
5115 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
5116 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
5117 (get_initial_defs_for_reduction): Likewise.
5118 (vect_create_epilog_for_reduction): Likewise.
5119 (vectorize_fold_left_reduction): Likewise.
5120 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
5121 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
5122 (can_vectorize_live_stmts): Likewise.
5124 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5126 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
5127 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5128 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
5130 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
5132 (gather_scalar_reductions): Update after above interface changes.
5133 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
5134 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
5136 (vect_force_simple_reduction): Likewise.
5137 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
5138 LOOP_VINFO_REDUCTIONS.
5139 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5141 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5143 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
5144 a gimple stmt to a stmt_vec_info.
5145 * tree-vect-loop.c (vect_active_double_reduction_p)
5146 (vect_force_simple_reduction, vectorizable_reduction): Update
5149 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5151 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
5152 vec<gimple *> to a vec<stmt_vec_info>.
5153 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
5154 the reduction_phis argument from a vec<gimple *> to a
5156 (vectorizable_reduction): Likewise the phis local variable that
5157 is passed to vect_create_epilog_for_reduction. Update for new type
5158 of SLP_TREE_VEC_STMTS.
5159 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
5160 (vectorizable_live_operation): Likewise.
5161 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
5162 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
5164 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5166 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
5167 a gimple stmt to a stmt_vec_info.
5168 (vectorizable_condition, vectorizable_live_operation)
5169 (vectorizable_reduction, vectorizable_induction): Pass back the
5170 vectorized statement as a stmt_vec_info.
5171 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
5172 use of STMT_VINFO_VEC_STMT.
5173 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
5174 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
5175 as stmt_vec_infos rather than gimple stmts.
5176 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
5178 (vectorizable_live_operation): Likewise.
5179 (vectorizable_reduction, vectorizable_induction): Likewise,
5180 updating use of STMT_VINFO_VEC_STMT.
5181 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
5182 of STMT_VINFO_VEC_STMT.
5183 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
5184 (vectorizable_simd_clone_call, vectorizable_conversion)
5185 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5186 (vectorizable_store, vectorizable_load, vectorizable_condition)
5187 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
5188 from a gimple stmt to a stmt_vec_info.
5189 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
5190 pointer to a stmt_vec_info to the vectorizable_* routines.
5192 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5194 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
5195 a gimple stmt to a stmt_vec_info.
5196 (is_pattern_stmt_p): Update accordingly.
5197 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
5198 (vect_record_grouped_load_vectors): Likewise.
5199 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
5200 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
5201 (vect_model_reduction_cost): Likewise.
5202 (vect_create_epilog_for_reduction): Likewise.
5203 (vectorizable_reduction, vectorizable_induction): Likewise.
5204 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5205 Return the stmt_vec_info for the pattern statement.
5206 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
5207 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
5208 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
5209 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
5210 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
5211 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
5212 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
5213 (free_stmt_vec_info, vect_is_simple_use): Likewise.
5215 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5217 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
5218 (vect_finish_stmt_generation): Likewise.
5219 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5220 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
5221 (vect_build_gather_load_calls): Use the return value of the above
5222 functions instead of a separate call to vinfo_for_stmt. Use narrow
5223 scopes for the input gimple stmt and wider scopes for the associated
5224 stmt_vec_info. Use vec_info::lookup_def when setting these
5225 stmt_vec_infos from an SSA_NAME definition.
5226 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
5227 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
5228 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5229 (vectorizable_store, vectorizable_load, vectorizable_condition)
5230 (vectorizable_comparison): Likewise.
5231 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
5232 (vectorizable_reduction): Likewise.
5234 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5236 * tree-vectorizer.h (vect_is_simple_use): Add an optional
5237 stmt_vec_info * parameter before the optional gimple **.
5238 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5239 (process_use, vect_get_vec_def_for_operand_1): Update callers.
5240 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
5241 * tree-vect-loop.c (vectorizable_reduction): Likewise.
5242 (vectorizable_live_operation): Likewise.
5243 * tree-vect-patterns.c (type_conversion_p): Likewise.
5244 (vect_look_through_possible_promotion): Likewise.
5245 (vect_recog_rotate_pattern): Likewise.
5246 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5248 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5250 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
5251 a typedef to a wrapper class.
5252 (NULL_STMT_VEC_INFO): New macro.
5253 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
5254 (stmt_vec_info::operator*): New function.
5255 (stmt_vec_info::operator gimple *): Likewise.
5256 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
5257 (add_stmt_costs): Likewise.
5258 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
5259 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
5260 (vect_get_known_peeling_cost): Likewise.
5261 (vect_estimate_min_profitable_iters): Likewise.
5262 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5263 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
5264 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
5265 (vectorizable_store, free_stmt_vec_infos): Likewise.
5266 (new_stmt_vec_info): Change return type of xcalloc to
5269 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5271 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
5272 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
5273 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
5274 a single_imm_use-based sequence.
5275 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
5277 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5279 * tree-vectorizer.h (vec_info::lookup_def): Declare.
5280 * tree-vectorizer.c (vec_info::lookup_def): New function.
5281 * tree-vect-patterns.c (vect_get_internal_def): Use it.
5282 (vect_widened_op_tree): Likewise.
5283 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5284 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
5285 (vectorizable_reduction): Likewise.
5286 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
5288 (vect_is_slp_reduction): Update calls accordingly. Use
5289 vec_info::lookup_def.
5290 (vect_is_simple_reduction): Likewise
5291 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
5293 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5295 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
5296 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
5297 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
5299 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
5300 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
5301 (vect_update_vf_for_slp, vect_analyze_loop_operations)
5302 (vect_is_slp_reduction, vectorizable_induction)
5303 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
5304 * tree-vect-patterns.c (vect_init_pattern_stmt):
5305 (vect_determine_min_output_precision_1, vect_determine_precisions)
5306 (vect_pattern_recog): Likewise.
5307 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
5308 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
5309 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
5310 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
5311 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
5312 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
5313 info field from a loop to a loop_vec_info.
5315 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5317 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
5318 (vec_info::add_stmt): Declare.
5319 * tree-vectorizer.c (vec_info::add_stmt): New function.
5320 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
5321 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
5322 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
5323 (vectorizable_induction): Likewise.
5324 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
5325 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5326 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
5327 (vectorizable_load): Likewise.
5328 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5329 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
5330 (vect_recog_gather_scatter_pattern): Likewise.
5331 (append_pattern_def_seq): Likewise. Remove a check that is
5332 performed by add_stmt itself.
5334 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5336 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
5337 which make_ssa_name was called with new_stmt before new_stmt
5340 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5342 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
5344 (vect_is_slp_reduction): ...here...
5345 (vect_is_simple_reduction): ...and here. Remove repetition of tests
5346 that are already known to be false.
5348 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5350 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
5351 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
5352 STMT_VINFO_NUM_SLP_USES when it's true.
5353 (vect_free_slp_instance): Add a final_p parameter and pass it to
5355 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
5356 (vect_analyze_slp_instance): Likewise.
5357 (vect_slp_analyze_operations): Likewise.
5358 (vect_slp_analyze_bb_1): Likewise.
5359 * tree-vectorizer.c (vec_info): Likewise.
5360 * tree-vect-loop.c (vect_transform_loop): Likewise.
5362 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5364 * tree-vect-loop.c (vectorizable_reduction): Assert that the
5365 function is not called for second and subsequent members of
5368 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5370 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
5371 cases for nested loops from here to ...
5372 (vect_create_epilog_for_reduction): ...here. Only call
5373 vect_is_simple_use for inner-loop reductions.
5375 2018-07-31 Martin Liska <mliska@suse.cz>
5377 PR gcov-profile/85338
5378 PR gcov-profile/85350
5379 PR gcov-profile/85372
5380 * profile.c (struct location_triplet): New.
5381 (struct location_triplet_hash): Likewise.
5382 (output_location): Do not output a BB that
5383 is already recorded for a line.
5384 (branch_prob): Use streamed_locations.
5386 2018-07-31 Martin Liska <mliska@suse.cz>
5388 PR gcov-profile/85370
5389 * coverage.c (coverage_begin_function): Do not mark target
5390 clones as artificial functions.
5392 2018-07-31 Martin Liska <mliska@suse.cz>
5394 PR gcov-profile/83813
5395 PR gcov-profile/84758
5396 PR gcov-profile/85217
5397 PR gcov-profile/85332
5398 * profile.c (branch_prob): Do not record GOTO expressions
5399 for GIMPLE statements which locations are already streamed.
5401 2018-07-31 Olivier Hainque <hainque@adacore.com>
5403 * gcc.c (handle_spec_function): Accept a soft_matched_part
5404 argument, as do_spec_1. Pass it down to ...
5405 (eval_spec_function): Accept a soft_matched_part argument,
5406 and pass it down to ...
5407 (do_spec_2): Accept a soft_matched_part argument, and pass
5408 it down to do_spec_1.
5409 (do_spec_1): Pass soft_matched_part to handle_spec_function.
5410 (handle_braces): Update call to handle_spec_function.
5411 (driver::set_up_specs): Update calls to do_spec_2.
5412 (compare_debug_dump_opt_spec_function): Likewise.
5413 (compare_debug_self_opt_spec_function): Likewise.
5415 2018-07-31 Olivier Hainque <hainque@adacore.com>
5417 * common.opt (nolibc): New option.
5418 * doc/invoke.texi (Link Options): Document it.
5419 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
5420 * config/alpha/linux.h: Likewise.
5421 * config/arc/elf.h: Likewise.
5422 * config/arm/uclinux-elf.h: Likewise.
5423 * config/arm/unknown-elf.h: Likewise.
5424 * config/avr/avrlibc.h: Likewise.
5425 * config/bfin/bfin.h: Likewise.
5426 * config/bfin/linux.h: Likewise.
5427 * config/bfin/uclinux.h: Likewise.
5428 * config/darwin.h: Likewise.
5429 * config/darwin10.h: Likewise.
5430 * config/darwin12.h: Likewise.
5431 * config/gnu-user.h: Likewise.
5432 * config/lm32/uclinux-elf.h: Likewise.
5433 * config/pa/pa-hpux11.h: Likewise.
5434 * config/pa/pa64-hpux.h: Likewise.
5435 * config/sparc/sparc.h: Likewise.
5437 2018-07-31 Olivier Hainque <hainque@adacore.com>
5439 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
5440 undefined variables.
5442 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
5445 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
5448 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
5450 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
5451 terminated string literal.
5453 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
5455 PR rtl-optimization/85160
5456 * combine.c (is_just_move): New function.
5457 (try_combine): Allow combining two instructions into two if neither of
5458 the original instructions was a move.
5460 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
5463 * doc/extend.texi (Global Register Variables): Discourage use of type
5465 (Local Register Variables): Likewise.
5467 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
5469 PR tree-optimization/86506
5470 * hwint.h (ceil_log2): Resync with hwint.c implementation.
5472 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
5475 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
5476 hard_regno, make sure no insn between `from` and `to` clobbers it.
5478 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
5479 Tom de Vries <tdevries@suse.de>
5481 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
5482 (PTX_DEFAULT_RUNTIME_DIM): ... this.
5483 (nvptx_goacc_validate_dims): Set default worker and gang dims to
5484 PTX_DEFAULT_RUNTIME_DIM.
5485 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
5487 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
5489 * config/pa/pa.c (pa_output_addr_vec): Align address table.
5490 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
5491 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
5493 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
5495 * config/rs6000/constraints.md (wG constraint): Delete, no longer
5497 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
5498 predicate to reflect toc fusion has been deleted.
5499 (toc_fusion_mem_raw): Delete, no longer used.
5500 (toc_fusion_mem_wrapped): Likewise.
5501 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
5503 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
5504 Delete, no longer used.
5505 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
5506 meant to be used for toc fusion.
5507 (rs6000_debug_print_mode): Delete toc fusion debugging.
5508 (rs6000_debug_reg_global): Likewise.
5509 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
5510 fusion and secondary reload support that were never used.
5511 (rs6000_option_override_internal): Delete TOC fusion, that was only
5512 partially defined, and it did not work unless you also used the
5514 (rs6000_legitimate_address_p): Delete TOC fusion support.
5515 (rs6000_opt_masks): Likewise.
5516 (fusion_wrap_memory_address): Delete function, no longer used.
5517 (fusion_split_address); Delete TOC fusion support.
5518 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
5519 longer used with toc fusion being deleted.
5520 (TARGET_TOC_FUSION_FP): Likewise.
5521 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
5523 (toc fusion spliter): Delete TOC fusion support.
5524 (toc_fusionload_<mode>): Likewise.
5525 (toc_fusionload_di): Likewise.
5526 (fusion_gpr_load_<mode>): Delete generator function, this insn no
5527 longer needs to be named. Rename predicate to delete TOC fusion.
5528 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5529 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5530 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5531 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5532 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
5534 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
5536 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
5537 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
5538 __int128 in built-in function prototypes.
5539 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
5540 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
5542 2018-07-27 Martin Sebor <msebor@redhat.com>
5544 PR tree-optimization/86696
5545 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
5546 types, including enums.
5547 (handle_char_store): Be prepared for the above function to fail.
5549 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
5551 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
5552 when optimization level is lower than 2 or optimize for size.
5554 2018-07-26 Martin Sebor <msebor@redhat.com>
5556 PR tree-optimization/86043
5557 PR tree-optimization/86042
5558 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
5559 (get_string_cst_length): Rename...
5560 (get_min_string_length): ...to this. Add argument.
5561 (handle_char_store): Extend to handle multi-character stores by
5563 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
5564 * tree.h (initializer_zerop): Add argument.
5566 2018-07-26 Jakub Jelinek <jakub@redhat.com>
5569 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
5570 declare target to variables if they have always,{to,from,tofrom} map
5573 2018-07-26 Martin Liska <mliska@suse.cz>
5576 * lto-wrapper.c: Add linker_output as prefix
5577 for ltrans_output_file.
5579 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
5581 PR rtl-optimization/85805
5582 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
5583 value for hard registers if that was written in the same mode.
5585 2018-07-26 Martin Liska <mliska@suse.cz>
5587 PR gcov-profile/86536
5588 * gcov.c (format_gcov): Use printf format %.*f directly
5589 and do not handle special values.
5591 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5593 * common/config/arc/arc-common.c (arc_option_optimization_table):
5594 Update default optimizations for size.
5596 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5598 * config/arc/arc.md (movsf_insn): Add short instruction selection.
5599 * config/arc/constraints.md (CfZ): New constraint.
5600 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
5601 (subsf3_fpu): Likewise.
5602 (cmpsf_fpu): Likewise.
5603 (cmpsf_fpu_uneq): Likewise.
5605 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5607 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
5609 (arc_is_uncached_mem_p): uncached applies to both the variable and
5612 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5614 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
5617 2018-07-25 David Malcolm <dmalcolm@redhat.com>
5619 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
5620 field "m_scopes" from vec to auto_vec.
5622 2018-07-25 Martin Liska <mliska@suse.cz>
5624 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
5627 2018-07-25 Richard Biener <rguenther@suse.de>
5630 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
5631 special wrt context_die late.
5632 (gen_subprogram_die): Re-use DIEs in local scope.
5634 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
5636 PR tree-optimization/86644
5637 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
5639 2018-07-25 Martin Liska <mliska@suse.cz>
5642 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
5643 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
5645 2018-07-25 Martin Liska <mliska@suse.cz>
5648 * params.def: Explain ASan abbreviation and provide
5649 a documentation link.
5651 2018-07-24 Martin Sebor <msebor@redhat.com>
5653 PR tree-optimization/86622
5654 PR tree-optimization/86532
5655 * builtins.h (string_length): Declare.
5656 * builtins.c (c_strlen): Correct handling of non-constant offsets.
5657 (check_access): Be prepared for non-constant length ranges.
5658 (string_length): Make extern.
5659 * expr.c (string_constant): Only handle the minor non-constant
5660 array index. Use string_constant to compute the length of
5661 a generic string constant.
5663 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
5665 PR tree-optimization/86618
5666 * tree-vect-stmts.c (vectorizable_call): Don't take the address
5667 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
5669 2018-07-24 David Malcolm <dmalcolm@redhat.com>
5671 PR tree-optimization/86636
5672 * json.cc (json::object::set): Fix comment. Add assertions.
5673 (json::array::append): Move here from json.h. Add comment and an
5675 (json::string::string): Likewise.
5676 * json.h (json::array::append): Move to json.cc.
5677 (json::string::string): Likewise.
5678 * optinfo-emit-json.cc
5679 (optrecord_json_writer::impl_location_to_json): Assert that we
5680 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
5681 wrapper around it. Expand the location once, rather than three
5683 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
5684 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
5686 (optrecord_json_writer::optinfo_to_json): Likewise, in four
5687 places. Fix some overlong lines.
5689 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
5691 * config/aarch64/aarch64-simd.md
5692 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
5693 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
5694 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
5695 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
5696 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
5697 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
5698 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
5699 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
5700 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
5702 2018-07-24 Jakub Jelinek <jakub@redhat.com>
5705 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
5706 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
5707 and abs_d == d, do the power of two handling if profitable.
5709 2018-07-24 Richard Biener <rguenther@suse.de>
5711 * match.pd: Add BIT_FIELD_REF canonicalizations.
5713 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5716 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
5718 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5720 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
5721 terminated STRING_CST object.
5723 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5725 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
5727 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5729 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
5730 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
5731 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
5732 the elements into a register.
5733 (rs6000_split_v4si_init_di_reg): Delete.
5734 (rs6000_split_v4si_init): Delete.
5735 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
5736 (vsx_init_v4si): Rewrite as a define_expand.
5738 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5740 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
5741 zero_extend argument from memory): New.
5743 2018-07-22 Martin Sebor <msebor@redhat.com>
5746 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
5747 diagnosing calls with unknown arguments unless -Walloca-larger-than
5748 is restricted to less than PTRDIFF_MAX bytes.
5750 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
5752 * doc/gcov.texi (Invoking Gcov): Editorial changes.
5754 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5756 * pretty-print.c (text_info::set_location): Remove redundant
5757 "line_table" parameter from call to rich_location::set_range.
5759 2018-07-20 Martin Sebor <msebor@redhat.com>
5762 * builtins.c (expand_builtin_alloca): Adjust.
5763 * calls.c (alloc_max_size): Simplify.
5764 * cgraphunit.c (cgraph_node::expand): Adjust.
5765 * common.opt (larger_than_size, warn_frame_larger_than): Remove
5767 (frame_larger_than_size): Same.
5768 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
5769 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
5771 * doc/invoke.texi (GCC Command Options): Document option arguments.
5772 Explain byte-size arguments and suffixes.
5773 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
5774 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
5775 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
5776 * doc/options.texi (UInteger): Expand.
5777 (Host_Wide_Int, ByteSize): Document new properties.
5778 * final.c (final_start_function_1): Include sizes in an error message.
5779 * function.c (frame_offset_overflow): Same.
5780 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
5781 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
5782 Diagnose unbounded alloca calls only for limits of less than
5784 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
5785 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
5787 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
5788 only for limits of less than PTRDIFF_MAX.
5789 * langhooks-def.h (lhd_handle_option): Change function argument
5791 * langhooks.c (lhd_handle_option): Same.
5792 * langhooks.h (handle_option): Same.
5793 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
5795 (var_type, var_type_struct): Same.
5796 (var_set): Handle ByteSize flag.
5797 * optc-gen.awk: Add comments to output to ease debugging. Make
5798 use of HOST_WIDE_INT where appropriate.
5799 * opts-gen-save.awk: Use %lx to format unsigned long.
5800 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
5801 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
5802 arguments. Parse bytes-size suffixes.
5803 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
5804 (enum_value_to_arg): Same.
5805 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
5806 (handle_option): Adjust.
5807 (generate_option): Change function argument to HOST_WIDE_INT.
5808 (cmdline_handle_error): Adjust.
5809 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
5810 (set_option): Change function argument to HOST_WIDE_INT.
5811 (option_enabled): Handle cl_host_wide_int.
5812 (get_option_state): Handle CLVC_SIZE.
5813 (control_warning_option): Same.
5814 * opts.c (common_handle_option): Change function argument to
5815 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
5816 OPT_Wvla_larger_than_.
5817 * opts.h (enum cl_var_type): Add an enumerator.
5818 * stor-layout.c (layout_decl): Print a more meaningful warning.
5819 * toplev.c (output_stack_usage): Adjust.
5821 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
5823 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
5824 call to inline_expand_builtin_string_cmp.
5825 (expand_builtin_strcmp): Likewise.
5826 (expand_builtin_strncmp): Likewise.
5827 (inline_string_cmp): Delete the last parameter, change char_type_node
5828 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
5830 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5831 the inlining expansion on target where the type of the call has same or
5832 narrower precision than unsigned char.
5834 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5836 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5837 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5838 * common.opt (fsave-optimization-record): New option.
5839 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5840 * doc/invoke.texi (-fsave-optimization-record): New option.
5841 * dumpfile.c: Include "optinfo-emit-json.h".
5842 (struct kv_pair): Move to coretypes.h.
5843 (optgroup_options): Make non-static.
5844 (dump_context::end_scope): Call
5845 optimization_records_maybe_pop_dump_scope.
5846 * dumpfile.h (optgroup_options): New decl.
5847 * json.cc: New file.
5849 * optinfo-emit-json.cc: New file.
5850 * optinfo-emit-json.h: New file.
5851 * optinfo.cc: Include "optinfo-emit-json.h".
5852 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5853 (optinfo_enabled_p): Check optimization_records_enabled_p.
5854 (optinfo_wants_inlining_info_p): Likewise.
5855 * optinfo.h: Update comment.
5856 * profile-count.c (profile_quality_as_string): New function.
5857 * profile-count.h (profile_quality_as_string): New decl.
5858 (profile_count::quality): New accessor.
5859 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5860 and optinfo_emit_json_cc_tests.
5861 * selftest.h (selftest::json_cc_tests): New decl.
5862 (selftest::optinfo_emit_json_cc_tests): New decl.
5863 * toplev.c: Include "optinfo-emit-json.h".
5864 (compile_file): Call optimization_records_finish.
5865 (do_compile): Call optimization_records_start.
5866 * tree-ssa-live.c: Include optinfo.h.
5867 (remove_unused_scope_block_p): Retain inlining information if
5868 optinfo_wants_inlining_info_p returns true.
5870 2018-07-20 Richard Biener <rguenther@suse.de>
5873 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5874 to cover -flto-partition=none.
5876 2018-07-20 Martin Liska <mliska@suse.cz>
5878 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5879 (get_decl_source_range): Remove unused function.
5881 2018-07-20 Richard Biener <rguenther@suse.de>
5883 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5884 (struct vn_phi_s): Likewise.
5885 (struct vn_reference_s): Likewise.
5886 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5887 for searching the slot of an entry known to be in the hash itself.
5888 (vn_phi_hasher::equal): Likewise.
5889 (vn_reference_hasher::equal): Likewise.
5890 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5892 (optimistic_info, current_info): Remove, keeping only valid_info.
5893 (vn_reference_lookup_1): Remove fallback lookup.
5894 (vn_reference_lookup_2): Likewise.
5895 (vn_nary_op_lookup_1): Likewise.
5896 (vn_phi_lookup): Likewise.
5897 (vn_nary_build_or_lookup_1): Make sure to not chain the built
5899 (vn_reference_insert): Adjust, chain the inserted hash element
5900 at last_inserted_ref.
5901 (vn_reference_insert_pieces): Likewise.
5902 (visit_reference_op_call): Likewise.
5903 (vn_nary_op_insert_into): Chain the inserted hash element at
5905 (vn_nary_op_insert_pieces): Adjust.
5906 (vn_nary_op_insert): Likewise.
5907 (vn_nary_op_insert_stmt): Likewise.
5908 (vn_phi_insert): Adjust, chain the inserted hash element at
5910 (process_scc): Remove clearing and copying the optimistic
5911 table. Instead remove elements inserted during an optimistic
5912 iteration from the single table we maintain.
5913 (init_scc_vn): Adjust.
5914 (free_scc_vn): Likewise.
5915 (sccvn_dom_walker::record_cond): Likewise.
5916 (sccvn_dom_walker::after_dom_children): Likewise.
5918 2018-07-19 Martin Sebor <msebor@redhat.com>
5920 PR tree-optimization/84047
5921 PR tree-optimization/83776
5922 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5923 (check_array_bounds): Call it.
5925 2018-07-19 Martin Sebor <msebor@redhat.com>
5927 * align.h (align_flags): Use member initialization.
5929 2018-07-19 David Malcolm <dmalcolm@redhat.com>
5931 * Makefile.in (OBJS): Add optinfo.o.
5932 * coretypes.h (class symtab_node): New forward decl.
5933 (struct cgraph_node): New forward decl.
5934 (class varpool_node): New forward decl.
5935 * dump-context.h: New file.
5936 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5938 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5939 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5940 (set_alt_dump_file): Likewise.
5941 (dump_context::~dump_context): New dtor.
5942 (dump_gimple_stmt): Move implementation to...
5943 (dump_context::dump_gimple_stmt): ...this new member function.
5944 Add the stmt to any pending optinfo, creating one if need be.
5945 (dump_gimple_stmt_loc): Move implementation to...
5946 (dump_context::dump_gimple_stmt_loc): ...this new member function.
5947 Start a new optinfo and add the stmt to it.
5948 (dump_gimple_expr): Move implementation to...
5949 (dump_context::dump_gimple_expr): ...this new member function.
5950 Add the stmt to any pending optinfo, creating one if need be.
5951 (dump_gimple_expr_loc): Move implementation to...
5952 (dump_context::dump_gimple_expr_loc): ...this new member function.
5953 Start a new optinfo and add the stmt to it.
5954 (dump_generic_expr): Move implementation to...
5955 (dump_context::dump_generic_expr): ...this new member function.
5956 Add the tree to any pending optinfo, creating one if need be.
5957 (dump_generic_expr_loc): Move implementation to...
5958 (dump_context::dump_generic_expr_loc): ...this new member
5959 function. Add the tree to any pending optinfo, creating one if
5961 (dump_printf): Move implementation to...
5962 (dump_context::dump_printf_va): ...this new member function. Add
5963 the text to any pending optinfo, creating one if need be.
5964 (dump_printf_loc): Move implementation to...
5965 (dump_context::dump_printf_loc_va): ...this new member function.
5966 Start a new optinfo and add the stmt to it.
5967 (dump_dec): Move implementation to...
5968 (dump_context::dump_dec): ...this new member function. Add the
5969 value to any pending optinfo, creating one if need be.
5970 (dump_context::dump_symtab_node): New member function.
5971 (dump_context::get_scope_depth): New member function.
5972 (dump_context::begin_scope): New member function.
5973 (dump_context::end_scope): New member function.
5974 (dump_context::ensure_pending_optinfo): New member function.
5975 (dump_context::begin_next_optinfo): New member function.
5976 (dump_context::end_any_optinfo): New member function.
5977 (dump_context::s_current): New global.
5978 (dump_context::s_default): New global.
5979 (dump_scope_depth): Delete global.
5980 (dumpfile_ensure_any_optinfo_are_flushed): New function.
5981 (dump_symtab_node): New function.
5982 (get_dump_scope_depth): Reimplement in terms of dump_context.
5983 (dump_begin_scope): Likewise.
5984 (dump_end_scope): Likewise.
5985 (selftest::temp_dump_context::temp_dump_context): New ctor.
5986 (selftest::temp_dump_context::~temp_dump_context): New dtor.
5987 (selftest::verify_item): New function.
5988 (ASSERT_IS_TEXT): New macro.
5989 (ASSERT_IS_TREE): New macro.
5990 (ASSERT_IS_GIMPLE): New macro.
5991 (selftest::test_capture_of_dump_calls): New test.
5992 (selftest::dumpfile_c_tests): Call it.
5993 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5994 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5995 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5996 descriptive comment.
5997 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5998 (dump_node, dump_bb): Move these unrelated decls.
5999 (class dump_manager): Add leading comment.
6000 * optinfo.cc: New file.
6001 * optinfo.h: New file.
6003 2018-07-19 Michael Collison <michael.collison@arm.com>
6004 Richard Henderson <rth@redhat.com>
6006 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
6007 (subti): Handle op1 zero.
6008 (subvti4, usub4ti4): New.
6009 (*sub<GPI>3_compare1_imm): New.
6010 (sub<GPI>3_carryinCV): New.
6011 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
6012 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
6014 2018-07-19 Michael Collison <michael.collison@arm.com>
6015 Richard Henderson <rth@redhat.com>
6017 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
6018 (addti3): Create simpler code if low part is already known to be 0.
6019 (addvti4, uaddvti4): New.
6020 (*add<GPI>3_compareC_cconly_imm): New.
6021 (*add<GPI>3_compareC_cconly): New.
6022 (*add<GPI>3_compareC_imm): New.
6023 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
6024 handle constants within this pattern..
6025 (*add<GPI>3_compareV_cconly_imm): New.
6026 (*add<GPI>3_compareV_cconly): New.
6027 (*add<GPI>3_compareV_imm): New.
6028 (add<GPI>3_compareV): New.
6029 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
6030 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
6031 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
6032 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
6033 with 'comparison' operator.
6034 (*add<GPI>3_compareV_cconly_imm): Ditto.
6035 (*add<GPI>3_compareV_cconly): Ditto.
6036 (*add<GPI>3_compareV_imm): Ditto.
6037 (add<GPI>3_compareV): Ditto.
6038 (add<mode>3_carryinC): Ditto.
6039 (*add<mode>3_carryinC_zero): Ditto.
6040 (*add<mode>3_carryinC): Ditto.
6041 (add<mode>3_carryinV): Ditto.
6042 (*add<mode>3_carryinV_zero): Ditto.
6043 (*add<mode>3_carryinV): Ditto.
6045 2018-07-19 Michael Collison <michael.collison@arm.com>
6046 Richard Henderson <rth@redhat.com>
6048 * config/aarch64/aarch64-modes.def (CC_V): New.
6049 * config/aarch64/aarch64-protos.h
6050 (aarch64_addti_scratch_regs): Declare
6051 (aarch64_subvti_scratch_regs): Declare.
6052 (aarch64_expand_subvti): Declare.
6053 (aarch64_gen_unlikely_cbranch): Declare
6054 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
6055 for signed overflow using CC_Vmode.
6056 (aarch64_get_condition_code_1): Handle CC_Vmode.
6057 (aarch64_gen_unlikely_cbranch): New function.
6058 (aarch64_addti_scratch_regs): New function.
6059 (aarch64_subvti_scratch_regs): New function.
6060 (aarch64_expand_subvti): New function.
6062 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
6064 * config/aarch64/aarch64-option-extensions.def: New entry for profile
6066 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
6067 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
6070 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
6073 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6074 address check not strict.
6076 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
6078 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
6080 (store_pair_lanes<mode>): Likewise.
6081 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
6082 enum value 'ADDR_QUERY_LDP_STP_N'.
6083 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
6084 (aarch64_print_address_internal): Add declaration.
6085 (aarch64_print_ldpstp_address): Remove.
6086 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
6087 (aarch64_print_operand): Change printing of 'y'.
6088 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
6089 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
6090 'true' rather than '1'.
6091 * config/aarch64/constraints.md (Uml): Likewise.
6092 (Uml): Rename to Umn.
6095 2018-07-19 Richard Biener <rguenther@suse.de>
6097 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
6099 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
6100 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
6101 (vn_reference_hasher): Likewise.
6102 (struct vn_tables_s): Remove obstack and alloc-pool members.
6103 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
6104 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
6105 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
6106 (vn_reference_insert_pieces): Likewise.
6107 (alloc_vn_nary_op_noinit): Adjust.
6108 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
6109 (vn_phi_eq): Adjust.
6110 (shared_lookup_phiargs): Remove.
6111 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
6112 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
6113 (visit_reference_op_call): Likewise.
6114 (copy_nary, copy_phi, copy_reference): Remove.
6115 (process_scc): Rewind the obstack when iterating. Do not
6116 copy the elements to valid_info but just move them from one
6117 hashtable to the other.
6118 (allocate_vn_table): Adjust.
6119 (free_vn_table): Likewise.
6120 (init_scc_vn): Likewise.
6121 (free_scc_vn): Likewise.
6123 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
6126 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
6127 indirect_return as function type attribute.
6128 (ix86_attribute_table): Change indirect_return to function
6130 * doc/extend.texi: Update indirect_return attribute.
6132 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
6134 * wide-int.h (widest2_int): New.
6135 * gimple-fold.c (arith_overflowed_p): Use it.
6136 * tree.h (widest2_int_cst): New.
6137 * tree-vrp.c (wide_int_binop_overflow): Rename from
6138 vrp_int_const_binop.
6139 Rewrite to work on trees.
6140 (extract_range_from_multiplicative_op_1): Abstract code to...
6141 (wide_int_range_min_max): ...here.
6142 (wide_int_range_cross_product): ...and here.
6143 (extract_range_from_binary_expr_1): Abstract overflow code to...
6144 (wide_int_range_mult_wrapping): ...here.
6145 * tree-vrp.h (wide_int_range_cross_product): New.
6146 (wide_int_range_mult_wrapping): New.
6148 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
6149 Julia Koval <julia.koval@intel.com>
6151 * config/i386/x86-tune-costs.h (skylake_memcpy,
6152 skylake_memset): Replace rep_prefix with unrolling for size 512.
6154 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
6157 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
6158 comparision with EQ_EXPR in last stmt.
6160 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
6162 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
6163 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
6164 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
6165 previously known as "PowerPC AltiVec Built-in Functions". Move
6166 some material to new subsubsections "PowerPC AltiVec Built-in
6167 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
6169 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
6170 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
6171 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
6172 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
6174 2018-07-18 Richard Biener <rguenther@suse.de>
6176 PR tree-optimization/86557
6177 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
6180 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
6182 * config/s390/s390.c (s390_function_profiler): Generate CFI.
6184 2018-07-17 Jeff Law <law@redhat.com>
6186 * config/arm/arm.c (get_label_padding): Update for recent
6187 changes to label_to_alignment.
6189 PR tree-optimization/86010
6190 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
6192 * config/mips/mips.c (vr4130_align_insns): Update for recent
6193 changes to label_to_alignment.
6195 * config/frv/frv.c (frv_label_align): Update for recent changes
6196 to label_to_alignment.
6198 * config/nios2/nios2.c (nios2_label_align): Update for recent
6199 changes which dropped ALIGN_LABELS_LOG.
6201 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
6203 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
6204 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
6206 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
6208 * config/arc/arc.c (arc_label_align): Use align_labels instead of
6209 deprecated align_labels_log.
6211 2018-07-17 Richard Biener <rguenther@suse.de>
6214 * dwarf2out.c (init_sections_and_labels): Always generate
6215 a debug_line_str_section for early LTO debug.
6216 (dwarf2out_finish): Reset debug_line_str_hash output early.
6217 Bump counter for extra dwarf5 .debug_loc labels to not conflict
6219 (dwarf2out_early_finish): Output debug_line_str.
6221 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
6223 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
6224 index register on z196 or later.
6226 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
6228 * config/s390/s390.c (s390_default_align): Set default function
6230 (s390_override_options_after_change): Call s390_default align.
6231 (s390_option_override_internal): Call s390_default_align.
6232 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
6234 2018-07-17 Jakub Jelinek <jakub@redhat.com>
6237 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
6238 to _looptemp_ clauses, other than the first two.
6240 2018-07-17 Martin Liska <mliska@suse.cz>
6242 * opts.c: Do not enable OPT_falign_* for -Os.
6244 2018-07-17 Martin Liska <mliska@suse.cz>
6246 * align.h (MAX_CODE_ALIGN): New.
6247 (MAX_CODE_ALIGN_VALUE): New.
6248 * common/config/i386/i386-common.c (ix86_handle_option):
6249 (MAX_CODE_ALIGN): Moved to align.h.
6250 * final.c (MAX_CODE_ALIGN): Likewise.
6251 * opts.c (parse_and_check_align_values):
6252 (MAX_CODE_ALIGN): Likewise.
6253 (MAX_CODE_ALIGN_VALUE): Likewise.
6255 2018-07-17 Martin Liska <mliska@suse.cz>
6257 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
6258 in order to fulfil coding style.
6259 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
6260 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6261 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6262 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
6263 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
6264 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
6265 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
6266 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
6267 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6269 2018-07-17 Martin Liska <mliska@suse.cz>
6271 * align.h: New file.
6272 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
6274 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
6275 align_flags of label_to_alignment.
6276 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
6278 * config/m68k/m68k.c: Do not use removed align_labels_value and
6280 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
6281 (LOOP_ALIGN): Likewise.
6282 (LABEL_ALIGN): Likewise.
6283 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
6284 Remove not used macro.
6285 (rs6000_loop_align): Change return type to align_flags.
6286 (rs6000_loop_align_max_skip): Remove.
6287 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
6288 Change return type to align_flags.
6289 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
6290 Remove not used macro.
6291 (rs6000_loop_align): Change return type to align_flags.
6292 (rs6000_loop_align_max_skip): Remove.
6293 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
6294 * config/rx/rx-protos.h (rx_align_for_label): Make it
6296 * config/rx/rx.c (rx_align_for_label): Change return type
6298 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
6300 into align_flags class.
6301 (LABEL_ALIGN): Likewise.
6302 (LOOP_ALIGN): Likewise.
6303 * config/s390/s390.c (s390_label_align): Use align_flags
6305 (s390_asm_output_function_label): Likewise.
6306 * config/sh/sh.c (sh_override_options_after_change):
6307 Use align_flags class directly without macros.
6308 (find_barrier): Likewise.
6309 (barrier_align): Likewise.
6310 (sh_loop_align): Likewise.
6311 * config/spu/spu.c (spu_option_override):
6312 Use align_flags_tuple::get_value instead of removed macros.
6313 (spu_sched_init): Likewise.
6314 * config/spu/spu.h (GTY): Likewise.
6315 * config/visium/visium.c (visium_option_override):
6316 Set "8" as default secondary alignment.
6317 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
6318 in order to guarantee secondary alignment of 8.
6319 * coretypes.h: Include align.h header file.
6320 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
6321 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
6322 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
6323 * doc/tm.texi.in: Likewise.
6324 * final.c (struct label_alignment): Remove not used structure.
6325 (LABEL_ALIGN): Change type to align_flags.
6326 (LOOP_ALIGN): Likewise.
6327 (JUMP_ALIGN): Likewise.
6328 (default_loop_align_max_skip): Remove.
6329 (default_label_align_max_skip): Likewise.
6330 (default_jump_align_max_skip): Likewise.
6331 (default_label_align_after_barrier_max_skip):
6332 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
6333 (LABEL_TO_MAX_SKIP): Remove.
6334 (label_to_alignment): Return align_flags type instead of integer.
6335 (label_to_max_skip): Remove.
6336 (align_fuzz): Use align_flags type.
6337 (compute_alignments): Use align_flags type and use align_flags::max
6338 to combine multiple alignments.
6339 (grow_label_align): Grow vec instead of C array.
6340 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
6341 (shorten_branches): Use align_flags type and use align_flags::max
6342 to combine multiple alignments.
6343 (final_scan_insn_1): Remove usage of secondary alignment that comes
6344 from label alignment, but instead use proper secondary alignment
6345 which is computed in grow_label_align.
6346 * flags.h (struct align_flags_tuple): Move to align.h.
6347 (struct align_flags): Likewise.
6348 (state_align_loops): Rename to align_loops.
6349 (state_align_jumps): Rename to align_jumps.
6350 (state_align_labels): Rename to align_labels.
6351 (state_align_functions): Rename to align_functions.
6352 (align_loops_log): Remove.
6353 (align_jumps_log): Remove.
6354 (align_labels_log): Remove.
6355 (align_functions_log): Remove.
6356 (align_loops_max_skip): Remove.
6357 (align_jumps_max_skip): Remove.
6358 (align_labels_max_skip): Remove.
6359 (align_functions_max_skip): Remove.
6360 (align_loops_value): Remove.
6361 (align_jumps_value): Remove.
6362 (align_labels_value): Remove.
6363 (align_functions_value): Remove.
6364 * output.h (label_to_alignment): Change return type to align_flags.
6365 (label_to_max_skip): Remove.
6366 * target.def: Remove loop_align_max_skip, label_align_max_skip,
6367 jump_align_max_skip macros.
6368 * targhooks.h (default_loop_align_max_skip): Remove.
6369 (default_label_align_max_skip): Likewise.
6370 (default_jump_align_max_skip): Likewise.
6371 (default_label_align_after_barrier_max_skip): Remove.
6372 * toplev.c (read_log_maxskip): Use ::normalize function.
6373 (parse_N_M): Remove not used argument and also call ::normalize.
6374 (parse_alignment_opts): Do not pass unused arguments.
6375 * varasm.c (assemble_start_function): Use directly align_functions
6376 instead of removed macros.
6377 * system.h: Do not poison removed macros.
6379 2018-07-17 Jakub Jelinek <jakub@redhat.com>
6382 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
6383 and cond temporaries don't have reference type if iterator has
6384 pointer type. For init use &for_pre_body instead of pre_p if
6385 for_pre_body is non-empty.
6387 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6389 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
6390 double-double modes to SFmode directly directly.
6391 (trunc<mode>sf2_fprs): Delete.
6393 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6395 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
6396 for conversions between IFmode and the decimal floating point modes.
6397 (init_float128_ieee): Use the correct names for conversions between
6398 KFmode and the decimal floating point modes.
6400 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6402 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
6403 for the conversions between TDmode and IFmode.
6404 (init_float128_ieee): Use more correct names for the conversions
6405 between TDmode and KFmode.
6407 2018-07-16 Jakub Jelinek <jakub@redhat.com>
6409 PR tree-optimization/86526
6410 * builtins.c (expand_builtin_memcmp): Formatting fixes.
6411 (inline_expand_builtin_string_cmp): Likewise.
6412 (inline_string_cmp): Likewise. Use c_readstr instead of
6413 builtin_memcpy_read_str. Add unit_mode temporary.
6415 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
6418 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
6419 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
6421 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
6423 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
6424 Alphabetize prototypes of built-in functions, separating out
6425 built-in functions that are listed in this section but should be
6426 described elsewhere.
6428 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
6431 * expmed.c (emit_store_flag): Do not emit setcc followed by a
6432 conditional move when trapping comparison was split to a
6433 non-trapping one (and vice versa).
6435 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6437 * config/s390/s390.c (s390_function_profiler): Generate nops
6438 instead of profiler call sequences.
6439 * config/s390/s390.opt: Add the new option.
6441 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6443 * config/s390/s390.c (s390_function_profiler): Generate
6444 __mcount_loc section.
6445 * config/s390/s390.opt: Add the new option.
6447 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6449 * common.opt: Add the new warning.
6450 * config/s390/s390.c (s390_function_profiler): Emit "brasl
6451 %r0,__fentry__" when -mfentry is specified.
6452 (s390_option_override_internal): Disallow -mfentry for 31-bit
6454 * config/s390/s390.opt: Add the new option.
6456 2018-07-16 Richard Biener <rguenther@suse.de>
6459 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
6460 for function-local FUNCTION_DECL and RESULT_DECL immediately.
6462 2018-07-16 Martin Liska <mliska@suse.cz>
6465 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
6468 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
6470 * config/arc/arcHS.md: Update ARCHS scheduling rules.
6472 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
6474 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
6476 * config/arc/arc-cpus.def (hs4x): New cpu.
6478 * config/arc/arc-tables.opt: Regenerate.
6479 * config/arc/arc.c (arc_sched_issue_rate): New function.
6480 (TARGET_SCHED_ISSUE_RATE): Define.
6481 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
6482 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
6484 (attr tune): Add ARCHS4x tune values.
6485 (attr tune_dspmpy): Define.
6486 (*tst): Correct instruction type.
6487 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
6488 * config/arc/arcHS4x.md: New file.
6489 * config/arc/fpu.md: Update instruction type attributes.
6490 * config/arc/t-multilib: Regenerate.
6492 2018-07-16 Tom de Vries <tdevries@suse.de>
6495 * var-tracking.c (vt_initialize): Fix pre_dec handling.
6497 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6499 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
6502 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
6504 PR tree-optimization/86514
6505 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
6506 conversion to a boolean type from a type with greater precision.
6508 2018-07-16 Tom de Vries <tdevries@suse.de>
6510 * var-tracking.c (vt_initialize): Print adjusted insn slim if
6511 dump_flags request TDF_SLIM.
6513 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
6515 * fold-const.c (int_const_binop_1): Abstract...
6516 (wide_int_binop): ...wide int code here.
6517 (poly_int_binop): ...poly int code here.
6518 Abstract the rest of int_const_binop_1 into int_const_binop.
6519 * fold-const.h (wide_int_binop): New.
6520 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
6521 Remove useless PLUS/MINUS_EXPR case.
6522 (zero_nonzero_bits_from_vr): Move wide int code...
6523 (zero_nonzero_bits_from_bounds): ...here.
6524 (extract_range_from_binary_expr_1): Move mask optimization code...
6525 (range_easy_mask_min_max): ...here.
6526 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
6527 (range_easy_mask_min_max): New.
6529 2018-07-15 Jeff Law <law@redhat.com>
6532 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
6535 2018-07-14 Jim Wilson <jimw@sifive.com>
6537 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
6539 2018-07-14 Paul Koning <ni1d@arrl.net>
6541 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
6543 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
6545 * lto-streamer-out.c (copy_function_or_variable): Dump info about
6548 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
6549 Steve Munroe <munroesj52@gmail.com>
6551 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
6552 (_mm_andnot_si128): Likewise.
6553 (_mm_or_si128): Likewise.
6554 (_mm_xor_si128): Likewise.
6556 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
6559 * builtins.c (expand_builtin_memcmp): Inline the calls first
6560 when result_eq is false.
6561 (expand_builtin_strcmp): Inline the calls first.
6562 (expand_builtin_strncmp): Likewise.
6563 (inline_string_cmp): New routine. Expand a string compare
6564 call by using a sequence of char comparison.
6565 (inline_expand_builtin_string_cmp): New routine. Inline expansion
6566 a call to str(n)cmp/memcmp.
6567 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
6569 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
6571 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
6573 * config/arm/driver-arm.c: Include arm-native.h.
6574 (host_detect_local_cpu): Use auto-generated data tables.
6575 (vendors, arm_cpu_table): Delete. Move part information to ...
6576 * config/arm/arm-cpus.in: ... here.
6577 * config/arm/parsecpu.awk (gen_native): New function.
6578 (vendor, part): New CPU fields.
6579 (END): Add support for building the native CPU detection tables.
6580 * config/arm/t-arm (arm-native.h): Add build rule.
6581 (driver-arm.o): Add dependency on arm-native.h.
6583 2018-07-13 Richard Biener <rguenther@suse.de>
6586 * match.pd (addr1 - addr2): Allow either of the operand to
6589 2018-07-13 Tom de Vries <tdevries@suse.de>
6591 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
6594 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
6596 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
6597 arrays instead of numbered variables.
6599 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
6601 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
6602 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
6604 2018-07-13 Richard Biener <rguenther@suse.de>
6607 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
6608 instead of get_context_die.
6610 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
6611 Richard Biener <rguenther@suse.de>
6614 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
6615 that the loop latch destination where phi is defined.
6617 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
6619 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
6620 (riscv_expand_epilogue): Add assertion to check interrupt mode.
6621 (riscv_set_current_function): Extract getting interrupt type to new
6623 (riscv_get_interrupt_type): New function.
6624 (riscv_merge_decl_attributes): New function, checking interrupt type is
6626 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
6628 2018-07-12 Paul Koning <ni1d@arrl.net>
6630 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
6633 2018-07-12 Paul Koning <ni1d@arrl.net>
6635 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
6636 zero reference, add doloop_end instead.
6637 * doc/md.texi (decrement_and_branch_until_zero): Remove.
6638 (Looping patterns): Remove decrement_and_branch_until_zero. Add
6639 detail for doloop_end.
6641 2018-07-12 Martin Sebor <msebor@redhat.com>
6644 * attribs.c (decl_attributes): Reject conflicting attributes before
6645 calling attribute handlers.
6647 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6649 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
6651 (gcc::dump_manager::get_dump_file_name): likewise.
6652 (dump_begin): Likewise.
6653 * dumpfile.h (dump_begin): Update prototype.
6654 (gcc::dump_manager::get_dump_file_name,
6655 gcc::dump_manager::get_dump_file_name): Update prototype.
6657 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6659 * internal-fn.h (vectorizable_internal_fn_p): New function.
6660 * tree-vect-slp.c (compatible_calls_p): Likewise.
6661 (vect_build_slp_tree_1): Remove nops argument. Handle calls
6662 to internal functions.
6663 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
6665 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6667 * fold-const.h (inverse_conditions_p): Declare.
6668 * fold-const.c (inverse_conditions_p): New function.
6669 * match.pd: Use inverse_conditions_p. Add folds of view_converts
6670 that test the inverse condition of a conditional internal function.
6671 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
6672 * internal-fn.c (internal_fn_mask_index): Handle conditional
6674 (vectorized_internal_fn_supported_p): New function.
6675 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
6676 (any_pred_load_store): Replace with...
6677 (need_to_predicate): ...this new variable.
6678 (redundant_ssa_names): New variable.
6679 (ifcvt_can_use_mask_load_store): Move initial checks to...
6680 (ifcvt_can_predicate): ...this new function. Handle tree codes
6681 for which a conditional internal function exists.
6682 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
6683 instead of ifcvt_can_use_mask_load_store. Update after variable
6685 (predicate_load_or_store): New function, split out from
6686 predicate_mem_writes.
6687 (check_redundant_cond_expr): New function.
6688 (value_available_p): Likewise.
6689 (predicate_rhs_code): Likewise.
6690 (predicate_mem_writes): Rename to...
6691 (predicate_statements): ...this. Use predicate_load_or_store
6692 and predicate_rhs_code.
6693 (combine_blocks, tree_if_conversion): Update after above name changes.
6694 (ifcvt_local_dce): Handle redundant_ssa_names.
6695 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
6696 general conditional functions.
6697 * tree-vect-stmts.c (vectorizable_call): Likewise.
6699 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6700 Alan Hayward <alan.hayward@arm.com>
6701 David Sherwood <david.sherwood@arm.com>
6703 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
6704 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
6705 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
6706 plus and minus and convert them into IFN_COND_FMA-based sequences.
6707 (convert_mult_to_fma): Handle conditional plus and minus.
6709 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6711 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
6712 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
6713 (cond_fnms_optab): New optabs.
6714 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
6716 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
6717 * internal-fn.h (get_conditional_internal_fn): Declare.
6718 (get_unconditional_internal_fn): Likewise.
6719 * internal-fn.c (cond_ternary_direct): New macro.
6720 (expand_cond_ternary_optab_fn): Likewise.
6721 (direct_cond_ternary_optab_supported_p): Likewise.
6722 (FOR_EACH_COND_FN_PAIR): Likewise.
6723 (get_conditional_internal_fn): New function.
6724 (get_unconditional_internal_fn): Likewise.
6725 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
6726 (gimple_match_op::gimple_match_op): Add a new overload for 5
6728 (gimple_match_op::set_op): Likewise.
6729 (gimple_resimplify5): Declare.
6730 * genmatch.c (decision_tree::gen): Generate simplifications for
6732 * gimple-match-head.c (gimple_simplify): Define an overload for
6733 5 operands. Handle calls with 5 arguments in the top-level overload.
6734 (convert_conditional_op): Handle conversions from unconditional
6735 internal functions to conditional ones.
6736 (gimple_resimplify5): New function.
6737 (build_call_internal): Pass a fifth operand.
6738 (maybe_push_res_to_seq): Likewise.
6739 (try_conditional_simplification): Try converting conditional
6740 internal functions to unconditional internal functions.
6741 Handle 3-operand unconditional forms.
6742 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
6743 Define ternary equivalents of the current rules for binary conditional
6745 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
6747 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
6748 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
6749 (optab): Handle them.
6750 (SVE_COND_FP_TERNARY): New int iterator.
6751 (sve_fmla_op, sve_fmad_op): New int attributes.
6752 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
6753 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
6754 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
6756 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6758 * target.def (preferred_else_value): New target hook.
6759 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
6760 * doc/tm.texi: Regenerate.
6761 * targhooks.h (default_preferred_else_value): Declare.
6762 * targhooks.c (default_preferred_else_value): New function.
6763 * internal-fn.h (conditional_internal_fn_code): Declare.
6764 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
6765 (get_conditional_internal_fn): Use it.
6766 (conditional_internal_fn_code): New function.
6767 * gimple-match.h (gimple_match_cond): New struct.
6768 (gimple_match_op): Add a cond member function.
6769 (gimple_match_op::gimple_match_op): Update all forms to take a
6771 * genmatch.c (expr::gen_transform): Use the same condition as res_op
6772 for the suboperation, but don't specify a particular else_value.
6773 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
6774 (visit_nary_op, visit_reference_op_load): Pass
6775 gimple_match_cond::UNCOND to the gimple_match_op constructor.
6776 * gimple-match-head.c: Include tree-eh.h
6777 (convert_conditional_op): New function.
6778 (maybe_resimplify_conditional_op): Likewise.
6779 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
6780 (gimple_resimplify2): Likewise.
6781 (gimple_resimplify3): Likewise.
6782 (gimple_resimplify4): Likewise.
6783 (maybe_push_res_to_seq): Return null for conditional operations.
6784 (try_conditional_simplification): New function.
6785 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
6787 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
6789 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
6791 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
6793 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6795 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6797 (hash_tree): Do not hash DECL_FCONTEXT
6798 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
6799 Do not stream DECL_FCONTEXT.
6800 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
6801 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
6803 2018-07-12 Richard Biener <rguenther@suse.de>
6806 * dwarf2out.c (gen_block_die): Only output blocks when they have
6807 at least one !DECL_IGNORED_P variable.
6809 2018-07-12 Richard Biener <rguenther@suse.de>
6812 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
6813 Remove -mieee-fp handling.
6815 2018-07-12 Richard Biener <rguenther@suse.de>
6817 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
6818 left-over from last patch.
6820 2018-07-12 Jakub Jelinek <jakub@redhat.com>
6822 PR tree-optimization/86492
6823 * gimple-ssa-store-merging.c
6824 (imm_store_chain_info::coalesce_immediate_stores): Call
6825 check_no_overlap even for the merge_overlapping case. Formatting fix.
6827 2018-07-12 Richard Biener <rguenther@suse.de>
6830 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6831 move possibly trapping operations into the conditional.
6833 2018-07-12 Richard Biener <rguenther@suse.de>
6835 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6836 (vn_lookup_simplify_result): Remove recursion limit applied
6838 (vn_nary_build_or_lookup_1): Adjust.
6839 (try_to_simplify): Likewise.
6840 * gimple-match-head.c (gimple_resimplify1): Instead apply one
6842 (gimple_resimplify2): Likewise.
6843 (gimple_resimplify3): Likewise.
6844 (gimple_resimplify4): Likewise.
6846 2018-07-11 Jakub Jelinek <jakub@redhat.com>
6848 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6849 Use __mmask64 type instead of __mmask8 for __M argument.
6850 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6851 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6853 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6854 __mmask16 for __M argument.
6855 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6856 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6857 to __mmask16 instead of __mmask8.
6858 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6859 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6860 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6861 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6862 instead of __mmask16 for __U argument.
6863 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6864 __mmask16 instead of __mmask8 for __U argument.
6865 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6867 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6869 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6871 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6873 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6875 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6877 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6879 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6881 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6883 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6885 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6886 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6887 return type as well as __M argument type and all casts from __mmask8
6889 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6890 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6891 return type as well as __M argument type and all casts from __mmask8
6893 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6894 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6895 return type as well as __M argument type and all casts from __mmask8
6897 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6898 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6899 return type as well as __M argument type and all casts from __mmask8
6901 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6902 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6905 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
6907 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6908 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6911 2018-07-11 Paul Koning <ni1d@arrl.net>
6913 * doc/md.texi (define_subst): Document how multiple occurrences of
6914 the same argument in the replacement pattern are handled.
6916 2018-07-11 Paul Koning <ni1d@arrl.net>
6918 * doc/extend.texi (Common Variable Attributes): Move "mode" into
6920 (Common Type Attributes): Add "mode" attribute.
6922 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
6924 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6925 stream DECL_ORIGINAL_TYPE.
6926 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6927 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6928 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6929 Do not walk original type.
6930 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6932 (write_ts_decl_non_common_tree_pointers): Do not stream
6934 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6935 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6937 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6939 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6940 thread twice from the same starting edge.
6942 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6944 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6945 * gimple.c (gimple_call_nonnull_result_p): ...here...
6946 (gimple_call_nonnull_arg): ...and here.
6947 * gimple.h (gimple_call_nonnull_result_p): New.
6948 (gimple_call_nonnull_arg): New.
6950 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
6952 * config/arm/arm-cpus.in: Move information from fpu field of each
6953 cpu definition to the isa field.
6954 * config/arm/parsecpu.awk (fpu): Delete match rule.
6955 (gen_comm_data): Don't add bits from the CPU's FPU entry.
6957 2018-07-11 Richard Biener <rguenther@suse.de>
6960 * dwarf2out.c (init_sections_and_labels): Use
6961 output_asm_line_debug_info consistently.
6962 (dwarf2out_early_finish): Likewise.
6963 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6966 2018-07-11 Richard Biener <rguenther@suse.de>
6968 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6969 Rework father_bb setting in a way to avoid propagating constants
6970 multiple times on a loop body.
6972 2018-07-10 Mark Wielaard <mark@klomp.org>
6975 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6977 2018-07-10 Richard Biener <rguenther@suse.de>
6979 * hash-map.h (hash_map::iterator::operator*): Return
6980 references to key and value.
6982 2018-07-10 Jakub Jelinek <jakub@redhat.com>
6985 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6986 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6987 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6988 (gimplify_omp_for): For composite loops, move outer
6989 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6990 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
6991 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
6992 TREE_LIST for both the original class iterator and the "last" helper
6993 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
6994 loop, remember has_decl_expr from outer composite loops for the
6995 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6997 2018-07-09 Martin Sebor <msebor@redhat.com>
7001 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
7002 accessing implicitly initialized array elements.
7003 * expr.c (string_constant): Handle string initializers of
7004 character arrays within aggregates.
7005 * gimple-fold.c (fold_array_ctor_reference): Add argument.
7006 Store element offset. As a special case, handle zero size.
7007 (fold_nonarray_ctor_reference): Same.
7008 (fold_ctor_reference): Add argument. Store subobject offset.
7009 * gimple-fold.h (fold_ctor_reference): Add argument.
7011 2018-07-09 Paul Koning <ni1d@arrl.net>
7013 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
7014 (pdp11_insn_cost): New function.
7015 (pdp11_md_asm_adjust): New function.
7016 (TARGET_INVALID_WITHIN_DOLOOP): Define.
7017 (pdp11_rtx_costs): Update to match machine better.
7018 (output_addr_const_pdp11): Correct format mismatch warnings.
7019 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
7020 * config/pdp11/pdp11.md: General change to add base_cost and/or
7021 length attributes for use by new pdp11_insn_cost function.
7022 (MIN_BRANCH): Correct definition.
7024 (doloop_end): Use standard pattern name for looping pattern.
7025 (doloop_end_nocc): New.
7026 (movsf): Add another constraint alternative.
7027 (zero_extendqihi2): Add constraint alternatives for not in place
7029 (zero_extendhisi2): Remove.
7030 (shift patterns): Add CC handling variants.
7034 (define_peephole2): New peephole to recognize mov that sets CC for
7037 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7039 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
7040 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
7043 2018-07-09 Jakub Jelinek <jakub@redhat.com>
7046 * real.c (real_nextafter): Return true if result is denormal.
7048 2018-07-09 Martin Liska <mliska@suse.cz>
7050 * common.opt: Add back wrongly removed attribute.
7052 2018-07-09 Richard Biener <rguenther@suse.de>
7055 * dwarf2out.c (gen_block_die): For an early generated DIE
7056 always output high/low PC attributes.
7058 2018-07-09 Tom de Vries <tdevries@suse.de>
7060 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
7061 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
7062 onto VAR_DECL with abstract origin.
7064 2018-07-07 Jim Wilson <jimw@sifive.com>
7066 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
7068 2018-07-07 Tom de Vries <tdevries@suse.de>
7070 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
7072 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
7074 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
7076 (combine_bound): Use wide-int overflow calculation instead of
7078 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
7080 * fold-const.c (int_const_binop_2): Same.
7081 (extract_muldiv_1): Same.
7082 (fold_div_compare): Same.
7083 (fold_abs_const): Same.
7085 * poly-int.h (add): Same.
7089 * predict.c (predict_iv_comparison): Same.
7090 * profile-count.c (slow_safe_scale_64bit): Same.
7091 * simplify-rtx.c (simplify_const_binary_operation): Same.
7092 * tree-chrec.c (tree_fold_binomial): Same.
7093 * tree-data-ref.c (split_constant_offset_1): Same.
7094 * tree-if-conv.c (idx_within_array_bound): Same.
7095 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
7096 * tree-ssa-phiopt.c (minmax_replacement): Same.
7097 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
7098 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
7099 * vr-values.c (vr_values::adjust_range_with_scev): Same.
7100 * wide-int.cc (wi::add_large): Same.
7101 (wi::mul_internal): Same.
7102 (wi::sub_large): Same.
7103 (wi::divmod_internal): Same.
7104 * wide-int.h: Change overflow type to overflow_type for neg, add,
7105 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
7106 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
7107 mul_internal, divmod_internal.
7108 (overflow_type): New enum.
7109 (accumulate_overflow): New.
7111 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
7113 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
7114 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
7116 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
7118 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
7119 argument is checked for zero before entering loop, avoid checking again.
7121 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
7123 * gimplify.h (generic_expr_could_trap_p): Set as global function.
7124 * gimplify.h (generic_expr_could_trap_p): Likwise.
7125 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
7127 2018-07-06 Jakub Jelinek <jakub@redhat.com>
7129 PR tree-optimization/86401
7130 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
7131 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
7132 (fold_bit_and_mask): ... here. New helper function for match.pd.
7133 * fold-const.h (fold_bit_and_mask): Declare.
7134 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
7136 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
7139 * target.def (translate_mode_attribute): New hook.
7140 * targhooks.h (default_translate_mode_attribute): Declare.
7141 * targhooks.c (default_translate_mode_attribute): New function.
7142 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
7143 * doc/tm.texi: Regenerate.
7144 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
7145 (rs6000_translate_mode_attribute): New function.
7147 2018-07-06 Paul Koning <ni1d@arrl.net>
7149 * doc/md.texi (define_split): Document DONE and FAIL.
7150 (define_peephole2): Ditto.
7152 2018-07-05 Jeff Law <law@redhat.com>
7154 PR tree-optimization/86010
7155 * tree-ssa-dse.c (compute_trims): More aggressively trim at
7156 both the head and tail of mem* and str* calls.
7158 2018-07-05 Jim Wilson <jimw@sifive.com>
7160 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
7162 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
7164 * config/aarch64/aarch64-simd.md: correct flags text for
7165 MIN_EXPR replacement.
7167 2018-07-05 James Clarke <jrtc27@jrtc27.com>
7169 * configure: Regenerated.
7171 2018-07-05 Carl Love <cel@us.ibm.com>
7173 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
7174 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
7175 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
7176 VSX_BUILTIN_DOUBLEL_V4SF.
7178 2018-07-05 Martin Sebor <msebor@redhat.com>
7181 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
7182 than its domain to compute its the upper bound of a char array.
7184 2018-07-05 Nathan Sidwell <nathan@acm.org>
7186 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
7187 * doc/cpp.texi: Update comment.
7188 * doc/tm.texi: Rebuilt.
7189 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
7190 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
7191 * doc/extend.texi (Backwards Compatibility): Clarify it is system
7192 headers affected by extern "C".
7193 * system.h: Poison NO_IMPLICIT_EXTERN_C.
7194 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
7195 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
7196 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
7197 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
7198 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
7199 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
7200 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
7201 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
7202 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
7203 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
7204 config/sparc/sp64-elf.h, config/spu/spu.h,
7205 config/stormy16/stormy16.h, config/v850/v850.h,
7206 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
7207 define NO_IMPLICIT_EXTERN_C.
7208 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
7210 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7213 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
7214 instead of GET_MODE_SIZE when comparing Units.
7216 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7219 * rtlanal.c (set_noop_p): Constrain on mode change,
7220 include hard-reg-set.h
7222 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7224 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
7226 2018-07-05 Jakub Jelinek <jakub@redhat.com>
7229 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
7232 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
7234 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
7236 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
7239 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
7241 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
7243 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
7246 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
7248 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
7250 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
7251 neg_*_op* variables.
7253 2018-07-04 Martin Liska <mliska@suse.cz>
7255 * tree-switch-conversion.c: Define
7256 max_ratio_for_speed and max_ratio_for_size constants.
7258 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
7259 Martin Liska <mliska@suse.cz>
7264 * common.opt: Rename align options with 'str_' prefix.
7265 * common/config/i386/i386-common.c (set_malign_value): New
7267 (ix86_handle_option): Use it to set -falign-* options/
7268 * config/aarch64/aarch64-protos.h (struct tune_params): Change
7269 type from int to string.
7270 * config/aarch64/aarch64.c: Update default values from int
7272 * config/alpha/alpha.c (alpha_override_options_after_change):
7274 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
7275 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7276 max skip conditionally.
7277 * config/i386/freebsd.h (SUBALIGN_LOG): New.
7278 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7279 max skip conditionally.
7280 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7281 max skip conditionally.
7282 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
7283 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7284 max skip conditionally.
7285 * config/i386/i386.c (struct ptt): Change type from int to
7287 (ix86_default_align): Set default values.
7288 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
7289 max skip conditionally.
7290 * config/i386/iamcu.h (SUBALIGN_LOG): New.
7291 (ASM_OUTPUT_MAX_SKIP_ALIGN):
7292 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
7293 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7294 max skip conditionally.
7295 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
7296 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
7297 * config/i386/x86-64.h (SUBALIGN_LOG): New.
7298 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7299 max skip conditionally.
7300 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7301 * config/ia64/ia64.c (ia64_option_override): Set default values
7302 for alignment options.
7303 * config/m68k/m68k.c: Handle new str_align_* options.
7304 * config/mips/mips.c (mips_set_compression_mode): Change
7306 (mips_option_override): Set default values for options.
7307 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
7309 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7311 * config/rx/rx.c (rx_option_override): Likewise.
7312 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
7313 (LABEL_ALIGN): Use align_labels_log.
7314 (LOOP_ALIGN): Use align_loops_align.
7315 * config/s390/s390.c (s390_asm_output_function_label): Use new
7317 * config/sh/sh.c (sh_override_options_after_change):
7318 Change type of constants.
7319 * config/spu/spu.c (spu_sched_init): Likewise.
7320 * config/sparc/sparc.c (sparc_option_override): Set default
7322 * config/visium/visium.c (visium_option_override): Likewise.
7323 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
7324 emit p2align format with last argument if it's not needed.
7325 * doc/invoke.texi: Document extended format of -falign-*.
7326 * final.c: Use align_labels alignment.
7327 * flags.h (struct target_flag_state): Change type to use
7329 (struct align_flags_tuple): New.
7330 (struct align_flags): Likewise.
7331 (align_loops_log): Redefine macro to use new types.
7332 (align_loops_max_skip): Redefine macro to use new types.
7333 (align_jumps_log): Redefine macro to use new types.
7334 (align_jumps_max_skip): Redefine macro to use new types.
7335 (align_labels_log): Redefine macro to use new types.
7336 (align_labels_max_skip): Redefine macro to use new types.
7337 (align_functions_log): Redefine macro to use new types.
7338 (align_loops): Redefine macro to use new types.
7339 (align_jumps): Redefine macro to use new types.
7340 (align_labels): Redefine macro to use new types.
7341 (align_functions): Redefine macro to use new types.
7342 (align_functions_max_skip): Redefine macro to use new types.
7343 (align_loops_value): New macro.
7344 (align_jumps_value): New macro.
7345 (align_labels_value): New macro.
7346 (align_functions_value): New macro.
7347 * function.c (invoke_set_current_function_hook): Propagate
7348 alignment values from flags to global variables default in
7350 * ipa-icf.c (sem_function::equals_wpa): Use
7351 cl_optimization_option_eq instead of memcmp.
7352 * lto-streamer.h (cl_optimization_stream_out): Support streaming
7354 (cl_optimization_stream_in): Likewise.
7355 * optc-save-gen.awk: Support strings in cl_optimization.
7356 * opth-gen.awk: Likewise.
7357 * opts.c (finish_options): Remove error checking of invalid
7359 (MAX_CODE_ALIGN): Remove.
7360 (MAX_CODE_ALIGN_VALUE): Likewise.
7361 (parse_and_check_align_values): New function.
7362 (check_alignment_argument): Likewise.
7363 (common_handle_option): Use check_alignment_argument.
7364 * opts.h (parse_and_check_align_values): Declare.
7365 * toplev.c (init_alignments): Remove.
7366 (read_log_maxskip): New.
7367 (parse_N_M): Likewise.
7368 (parse_alignment_opts): Likewise.
7369 (backend_init_target): Remove usage of init_alignments.
7370 * toplev.h (parse_alignment_opts): Declare.
7371 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
7373 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
7374 * tree.c (cl_option_hasher::equal): New.
7375 * varasm.c: Use new global macros.
7377 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
7379 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
7380 Use a simpler align directive also if MAXSKIP = ALIGN-1.
7381 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7382 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7383 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7384 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7385 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
7386 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
7387 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
7388 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7389 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7390 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7391 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7393 2018-07-04 Martin Liska <mliska@suse.cz>
7394 Jonathan Wakely <jwakely@redhat.com>
7396 * coverage.c: Use correct type.
7397 * doc/invoke.texi: Language correction.
7399 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
7402 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
7403 ENDBRANCH for non-tail call which may return via indirect branch.
7404 * doc/extend.texi: Document indirect_return attribute.
7406 2018-07-03 Martin Sebor <msebor@redhat.com>
7408 PR tree-optimization/86274
7409 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
7411 (format_floating): Correct handling of infinities and NaNs.
7413 2018-07-03 Martin Sebor <msebor@redhat.com>
7415 * print-tree.c (print_real_cst): New function.
7416 (print_node_brief): Call it.
7417 (print_node): Ditto.
7419 2018-07-03 Jeff Law <law@redhat.com>
7421 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
7422 into a single pattern.
7424 * config/h8300/h8300.md (ors code_iterator): New.
7425 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
7426 a single pattern and single splitter.
7427 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
7428 (iorqi3_1, xorqi3_1): Likewise.
7429 (iorqi3, xorqi3 expanders): Similarly.
7431 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
7432 (movmd_internal) into a single pattern using the P mode iterator.
7433 (movmd splitters): Similarly.
7434 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
7435 (movsd splitters): Similarly.
7437 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
7438 ADDB, ADDW and ADDL into a single ADD attribute which selects the
7439 right table based on the size of the operand.
7440 * config/h8300/h8300.md (length_table): Corresponding changes. All
7441 references to "addb", "addw" and "addl" changed to "add".
7442 (btst patterns): Merge two variants into a single pattern.
7443 (tstqi, tsthi): Likewise.
7444 (addhi3_incdec, addsi3_incdec): Likewise.
7445 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
7446 (mulhi3, mulsi3): Likewise.
7447 (udivhi3, udivsi3): Likewise.
7448 (divhi3, divsi3): Likewise.
7449 (andorqi3, andorhi3, andorsi3): Likewise.
7451 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
7454 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
7455 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
7457 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7459 PR tree-optimization/85694
7460 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
7461 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
7463 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
7464 (<u>avg<mode>3_ceil): New patterns.
7466 2018-07-03 David Malcolm <dmalcolm@redhat.com>
7468 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
7469 scan-tree-dump directive.
7470 * gcc.dg/vect/slp-perm-2.c: Likewise.
7471 * gcc.dg/vect/slp-perm-3.c: Likewise.
7472 * gcc.dg/vect/slp-perm-5.c: Likewise.
7473 * gcc.dg/vect/slp-perm-6.c: Likewise.
7474 * gcc.dg/vect/slp-perm-7.c: Likewise.
7475 * gcc.dg/vect/slp-perm-8.c: Likewise.
7477 2018-07-03 Marek Polacek <polacek@redhat.com>
7480 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
7482 2018-07-03 Richard Biener <rguenther@suse.de>
7485 * tree-ssa-structalias.c (find_func_clobbers): Properly
7486 handle indirect calls.
7488 2018-07-03 Jeff Law <law@redhat.com>
7490 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
7491 (shifts): New code iterator.
7492 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
7493 expander. Fix HImode handling on H8/SX.
7494 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
7495 (subqi3, subhi3, subsi3 expanders): Likewise.
7496 (andqi3, andhi3, andsi3 expanders): Likewise.
7497 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
7498 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
7499 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
7500 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
7501 (zero_extendqihi2, zero_extendqisi2): Likewise.
7502 (extendqihi2, extendqisi2): Likewise.
7503 (rotlqi3, rotlhi3, rotlsi3): Likewise.
7504 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
7505 (rotlqi3_1, rotlhi3_1): Likewise.
7506 (logicalhi3_sn, logicalsi3_sn): Likewise.
7507 (logicalhi3, logicalsi3): Likewise.
7509 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7511 * tree-vect-patterns.c (vect_recog_rotate_pattern)
7512 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7513 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
7514 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
7515 type to append_pattern_def_seq instead of creating a stmt_vec_info
7517 (build_mask_conversion): Likewise. Remove vinfo argument.
7518 (vect_add_conversion_to_patterm): Likewise, renaming to...
7519 (vect_add_conversion_to_pattern): ...this.
7520 (vect_recog_mask_conversion_pattern): Update call to
7521 build_mask_conversion. Pass the vector type to
7522 append_pattern_def_seq here too.
7523 (vect_recog_gather_scatter_pattern): Update call to
7524 vect_add_conversion_to_pattern.
7526 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7528 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
7529 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7530 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
7531 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
7532 STMT_VINFO_PATTERN_DEF_SEQ to null here.
7533 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
7534 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
7535 append_pattern_def_seq instead of new_pattern_def_seq.
7536 (vect_recog_divmod_pattern): Do both of the above.
7537 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
7540 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7542 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
7543 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
7544 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
7545 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
7546 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
7547 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7548 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
7549 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7550 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7551 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
7552 parameter with a single stmt_vec_info.
7553 (vect_recog_func_ptr): Likewise.
7554 (vect_recog_gather_scatter_pattern): Likewise, folding in...
7555 (vect_try_gather_scatter_pattern): ...this.
7556 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
7557 the stmt_vec_info of the statement to be matched. Don't clear
7558 STMT_VINFO_RELATED_STMT.
7559 (vect_pattern_recog): Update call accordingly.
7561 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7563 PR tree-optimization/85694
7564 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
7565 (uavgM3_ceil): Document new optabs.
7566 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
7567 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
7569 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
7570 (savg_ceil_optab): New optabs.
7571 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
7572 (vect_vect_recog_func_ptrs): Add it.
7573 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
7574 constant directly from the associated lhs.
7576 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7578 * tree-vect-patterns.c (vect_split_statement): New function.
7579 (vect_convert_input): Use it to try to split an existing cast.
7581 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7583 * poly-int.h (print_hex): New function.
7584 * dumpfile.h (dump_dec, dump_hex): Declare.
7585 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
7586 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
7587 min_input_precision, operation_precision and operation_sign.
7588 * tree-vect-patterns.c (vect_get_range_info): New function.
7589 (vect_same_loop_or_bb_p, vect_single_imm_use)
7590 (vect_operation_fits_smaller_type): Delete.
7591 (vect_look_through_possible_promotion): Add an optional
7592 single_use_p parameter.
7593 (vect_recog_over_widening_pattern): Rewrite to use new
7594 stmt_vec_info infomration. Handle one operation at a time.
7595 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
7596 (vect_truncatable_operation_p, vect_set_operation_type)
7597 (vect_set_min_input_precision): New functions.
7598 (vect_determine_min_output_precision_1): Likewise.
7599 (vect_determine_min_output_precision): Likewise.
7600 (vect_determine_precisions_from_range): Likewise.
7601 (vect_determine_precisions_from_users): Likewise.
7602 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
7603 (vect_vect_recog_func_ptrs): Put over_widening first.
7605 (vect_pattern_recog): Call vect_determine_precisions.
7607 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7609 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
7610 statements that have been replaced by further pattern statements.
7611 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
7613 2018-07-03 Richard Biener <rguenther@suse.de>
7615 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
7616 always set *dt. Dump vectype in vectype overload.
7617 * dumpfile.h (dump_gimple_expr): New function.
7618 (dump_gimple_expr_loc): Likewise.
7619 * dumpfile.c (dump_gimple_expr): New function.
7620 (dump_gimple_expr_loc): Likewise.
7622 2018-07-02 Jeff Law <law@redhat.com>
7624 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
7625 the H8/300, H8/300H and H8/S variants into a single pattern.
7626 (movhi_h8300, movqi_h8300hs): Similarly.
7627 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
7628 (QHI mode iterator): New.
7630 * config/h8300/h8300.md: Remove trailing whitespace.
7632 2018-07-02 Jim Wilson <jimw@sifive.com>
7634 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
7635 instead of emit_insn for interrupt returns.
7636 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
7637 (riscv_sret, riscv_uret): Likewise.
7639 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7641 * pretty-print.c (selftest::test_pp_format): Move save and restore
7642 of quotes to class auto_fix_quotes, and add an instance.
7643 * selftest.c: Include "intl.h".
7644 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
7645 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
7646 * selftest.h (selftest::auto_fix_quotes): New class.
7648 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
7650 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
7651 (aarch64_sve_prepare_conditional_op): Remove.
7652 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
7653 Allow aarch64_simd_reg_or_zero as select operand; remove
7654 the aarch64_sve_prepare_conditional_op call.
7655 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
7656 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7657 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
7658 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
7659 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
7660 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
7661 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
7662 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
7663 and a splitters to match all of the *_any patterns.
7664 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
7666 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
7667 (SVE_COND_FP_BINARY_REV): Remove.
7668 (sve_int_op_rev, sve_fp_op_rev): New.
7669 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
7670 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
7671 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
7672 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
7673 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
7674 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
7675 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
7676 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
7677 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
7679 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
7680 Remove match_dup 1 from the inner unspec.
7681 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7683 * config/aarch64/aarch64.md (movprfx): New attr.
7684 (length): Default movprfx to 8.
7685 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
7686 (*madd<SVE_I>, *msub<SVE_I): Likewise.
7687 (*<su>mul<SVE_I>3_highpart): Likewise.
7688 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
7689 (*v<ASHIFT><SVE_I>3): Likewise.
7690 (*<su><MAXMIN><SVE_I>3): Likewise.
7691 (*<su><MAXMIN><SVE_F>3): Likewise.
7692 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
7693 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
7694 (*div<SVE_F>4): Likewise.
7696 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
7698 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
7701 2018-07-02 Richard Biener <rguenther@suse.de>
7703 PR tree-optimization/86363
7704 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
7705 memset argument refers to a non-variable address.
7707 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7709 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
7710 {PLUS,MINUS}_EXPR code to...
7711 (adjust_symbolic_bound): ...here,
7712 (combine_bound): ...here,
7713 (set_value_range_with_overflow): ...and here.
7715 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7717 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
7719 (extract_range_from_abs_expr): ...here.
7721 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
7723 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
7724 -fno-omit-frame-pointer when not optimizing.
7726 2018-07-02 Martin Liska <mliska@suse.cz>
7729 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
7730 (propagate_nothrow): Likewise.
7732 2018-07-02 Martin Liska <mliska@suse.cz>
7735 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
7737 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7739 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
7740 function in r262149, changing "loc" param from source_location to
7741 const dump_location_t &.
7742 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
7743 declaration, as above.
7745 2018-07-01 Paul Koning <ni1d@arrl.net>
7747 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7748 -munit-asm, -mgnu-asm, -mdec-asm.
7749 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
7750 (pdp11_output_labelref): New.
7751 (pdp11_output_def): New.
7752 (pdp11_output_addr_vec_elt): New.
7753 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
7754 %# and %@ format codes.
7755 (pdp11_option_override): New.
7756 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
7757 (pdp11_output_ident): New.
7758 (pdp11_asm_named_section): New.
7759 (pdp11_asm_init_sections): New.
7760 (pdp11_file_start): New.
7761 (pdp11_file_end): New.
7762 (output_ascii): Use .ascii/.asciz for -mdec-asm.
7763 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
7764 %o, like %c but octal.
7765 (pdp11_option_override): New.
7766 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
7768 (DATA_SECTION_ASM_OP): Ditto.
7769 (READONLY_DATA_SECTION_ASM_OP): New.
7770 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
7771 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
7772 (ASM_OUTPUT_LABELREF): Ditto.
7773 (ASM_OUTPUT_DEF): Ditto.
7774 (ASM_OUTPUT_EXTERNAL): New.
7775 (ASM_OUTPUT_SOURCE_FILENAME): New.
7776 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
7777 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
7778 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
7779 %# and %@ format codes.
7780 * config/pdp11/pdp11.opt (mgnu-asm): New.
7781 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
7782 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
7783 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
7785 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
7787 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
7788 dereferencing path[] beyond its length.
7790 (debug_all_paths): New.
7791 (rewire_first_differing_edge): New.
7792 (adjust_paths_after_duplication): New.
7793 (duplicate_thread_path): Call adjust_paths_after_duplication.
7795 (thread_through_all_blocks): Add new argument to
7796 duplicate_thread_path.
7798 2018-06-30 Jim Wilson <jimw@sifive.com>
7800 * config/riscv/predicates.md (p2m1_shift_operand): New.
7801 (high_mask_shift_operand): New.
7802 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
7803 pattern using p2m1_shift_operand.
7804 (lshsi3_zero_extend_3+2): New combiner pattern using
7805 high_mask_shift_operand.
7807 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7809 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
7811 (vect_recog_rotate_pattern): ...here.
7812 (vect_convert_input): Try to insert casts of invariants in the
7814 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
7815 preheader to be empty.
7817 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7819 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
7820 vector type. If given, install it in the new statement's
7822 (vect_element_precision): New function.
7823 (vect_unpromoted_value): New struct.
7824 (vect_unpromoted_value::vect_unpromoted_value): New function.
7825 (vect_unpromoted_value::set_op): Likewise.
7826 (vect_look_through_possible_promotion): Likewise.
7827 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
7828 (vect_widened_op_tree, vect_convert_input): Likewise.
7829 (vect_convert_inputs, vect_convert_output): Likewise.
7830 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7831 to handle the optional cast of the multiplication result and
7832 vect_widened_op_tree to detect the widened multiplication itself.
7833 Do not require the input and output of promotion casts to have
7834 the same sign, but base the signedness of the operation on the
7835 input rather than the result. If the pattern includes two
7836 promotions, check that those promotions have the same sign.
7837 Do not restrict the MULT_EXPR handling to a double-width result;
7838 handle quadruple-width results and wider. Use vect_convert_inputs
7839 to convert the inputs to the common type.
7840 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
7841 to handle the optional cast of the ABS result. Also allow a sign
7842 change or a sign extension between the ABS and MINUS.
7843 Use vect_widened_op_tree to detect the widened subtraction and use
7844 vect_convert_inputs to convert the inputs to the common type.
7845 (vect_handle_widen_op_by_const): Delete.
7846 (vect_recog_widen_op_pattern): New function.
7847 (vect_recog_widen_mult_pattern): Use it.
7848 (vect_recog_widen_shift_pattern): Likewise.
7849 (vect_recog_widen_sum_pattern): Use
7850 vect_look_through_possible_promotion to handle the promoted
7853 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7855 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7856 the containing gimple_seq *.
7857 * gimple-iterator.h (gsi_for_stmt): Declare it.
7858 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7859 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7860 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7861 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7862 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7864 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7866 (vect_mark_pattern_stmts): ...here. Handle cases in which the
7867 statement being replaced is part of an existing pattern
7868 definition sequence, inserting the new pattern statements before
7870 (vect_pattern_recog_1): Don't return a bool. If the statement
7871 is already part of a pattern, instead apply pattern matching
7872 to the pattern definition statements. Don't clear the
7873 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7874 (vect_pattern_recog): Don't break after the first match;
7875 continue processing the pattern definition statements instead.
7876 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7878 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7880 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7881 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7882 (vect_recog_widen_sum_pattern): Use it.
7884 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7886 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7887 phi is not a pattern statement and has not been replaced by
7888 a pattern statement.
7889 * tree-vect-patterns.c (type_conversion_p): Don't check
7890 STMT_VINFO_IN_PATTERN_P.
7891 (vect_recog_vector_vector_shift_pattern): Likewise.
7892 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7893 the pattern statement rather than the original statement; check
7894 directly for a WIDEN_MULT_EXPR here.
7895 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7896 vect_is_simple_use to return the pattern statement rather
7897 than the original statement; use is_pattern_stmt_p to check
7898 for such a pattern statement.
7899 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7900 to return the pattern statement rather than the original statement;
7901 don't do the same transformation here.
7902 (vect_is_simple_use): If the defining statement has been replaced
7903 by a pattern statement, return the pattern statement instead.
7904 Remove the corresponding (local) transformation from the vectype
7907 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7909 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7910 end and default to null.
7911 * tree-vect-loop.c (vect_create_epilog_for_reduction)
7912 (vectorizable_reduction): Update calls accordingly, dropping the
7913 gimple ** argument if the passed-back statement isn't needed.
7914 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7915 (vect_recog_rotate_pattern): Likewise.
7916 (vect_recog_mask_conversion_pattern): Likewise.
7917 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7918 (vect_mask_constant_operand_p): Likewise.
7919 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7920 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7921 (get_group_load_store_type, get_load_store_type): Likewise.
7922 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7923 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7924 (vectorizable_conversion, vectorizable_assignment): Likewise.
7925 (vectorizable_shift, vectorizable_operation): Likewise.
7926 (vectorizable_store, vect_is_simple_cond): Likewise.
7927 (vectorizable_condition, vectorizable_comparison): Likewise.
7928 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7929 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7930 and move it to the end. Cope with null def_stmt_outs.
7932 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7934 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7936 2018-06-29 Jeff Law <law@redhat.com>
7938 * config/v850/v850.c (v850_legitimate_address_p): Handle large
7939 displacements for TARGET_V850E2V3 and newer.
7940 (TARGET_LRA_P): Remove. Defaults to LRA now.
7941 * config/v850/v850.md (sign23byte_load): Remove.
7942 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7943 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7945 2018-06-29 Martin Liska <mliska@suse.cz>
7948 * coverage.c (coverage_init): Mangle full path name.
7949 * doc/invoke.texi: Document the change.
7950 * gcov-io.c (mangle_path): New.
7951 * gcov-io.h (mangle_path): Likewise.
7952 * gcov.c (mangle_name): Use mangle_path for path mangling.
7954 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7956 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7957 if starting source register is not even.
7959 2018-06-29 Martin Liska <mliska@suse.cz>
7961 PR tree-optimization/86263
7962 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7963 Make edge redirection.
7965 2018-06-29 David Malcolm <dmalcolm@redhat.com>
7967 * dumpfile.c (dump_loc): Add indentation based on scope depth.
7968 (dump_scope_depth): New variable.
7969 (get_dump_scope_depth): New function.
7970 (dump_begin_scope): New function.
7971 (dump_end_scope): New function.
7972 * dumpfile.h (get_dump_scope_depth): New declaration.
7973 (dump_begin_scope): New declaration.
7974 (dump_end_scope): New declaration.
7975 (class auto_dump_scope): New class.
7976 (AUTO_DUMP_SCOPE): New macro.
7977 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7980 2018-06-29 Richard Biener <rguenther@suse.de>
7982 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7983 compute_all_dependences succeeds.
7984 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7985 exceed --param loop-max-datarefs-for-datadeps.
7987 2018-06-29 Jakub Jelinek <jakub@redhat.com>
7989 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7991 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
7994 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7995 alternative 0 in preferred_for_speed attribute.
7997 2018-06-28 Paul Koning <ni1d@arrl.net>
7999 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
8000 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
8001 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
8002 * config/pdp11/pdp11.md: Correct "length" attribute calculation
8003 for shift insn patterns.
8005 2018-06-28 David Malcolm <dmalcolm@redhat.com>
8007 * cgraph.c (cgraph_node::get_body): Replace assignments to
8008 "dump_file" with calls to set_dump_file.
8009 * dumpfile.c (alt_dump_file): Make static, and group with...
8010 (alt_flags): ...this definition.
8011 (dumps_are_enabled): New variable.
8012 (refresh_dumps_are_enabled): New function.
8013 (set_dump_file): New function.
8014 (set_alt_dump_file): New function.
8015 (gcc::dump_manager::dump_start): Replace assignments to
8016 "dump_file" and "alt_dump_file" with calls to set_dump_file and
8018 (gcc::dump_manager::dump_finish): Likewise.
8019 * dumpfile.h (alt_dump_file): Delete decl.
8020 (dumps_are_enabled): New variable decl.
8021 (set_dump_file): New function decl.
8022 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
8024 * tree-nested.c (lower_nested_functions): Replace assignments to
8025 "dump_file" with calls to set_dump_file.
8027 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
8029 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
8030 goto_locus of each outgoing edge of each basic block.
8032 2018-06-28 Richard Biener <rguenther@suse.de>
8034 * dwarf2out.c (decl_scope_table): Remove.
8035 (push_decl_scope): Likewise.
8036 (pop_decl_scope): Likewise.
8037 (gen_type_die_for_member): Do not call push/pop_decl_scope.
8038 (gen_struct_or_union_type_die): Likewise.
8039 (gen_tagged_type_die): Likewise.
8040 (dwarf2out_init): Do not initialize decl_scope_table.
8041 (dwarf2out_c_finalize): Do not free it.
8043 2018-06-28 Richard Biener <rguenther@suse.de>
8045 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
8046 deciding whether to not re-use a DIE.
8048 2018-06-28 Richard Biener <rguenther@suse.de>
8050 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
8051 DW_AT_abstract_origin attribute.
8053 2018-06-28 Martin Liska <mliska@suse.cz>
8055 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8056 Use newly introduced constants.
8057 * tree-switch-conversion.h (struct jump_table_cluster):
8058 Define max_ratio_for_size and max_ratio_for_speed.
8060 2018-06-28 Martin Liska <mliska@suse.cz>
8062 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8063 Add new checking assert to catch invalid state.
8064 (jump_table_cluster::can_be_handled): Handle single case
8066 (jump_table_cluster::is_beneficial): Bail out for such case.
8067 (bit_test_cluster::find_bit_tests):
8068 Add new checking assert to catch invalid state.
8069 (bit_test_cluster::can_be_handled): Handle single case
8071 (bit_test_cluster::is_beneficial): Bail out for such case.
8072 (switch_decision_tree::analyze_switch_statement):
8075 2018-06-28 Martin Liska <mliska@suse.cz>
8077 * common.opt: Introduce -completion option.
8078 * gcc.c (driver_handle_option): Handle it.
8079 (driver::main): Print completions if completion
8081 * opt-suggestions.c (option_proposer::get_completions):
8083 (option_proposer::suggest_completion): Likewise.
8084 (option_proposer::find_param_completions): Likewise.
8085 (verify_autocompletions): Likewise.
8086 (test_completion_valid_options): Likewise.
8087 (test_completion_valid_params): Likewise.
8088 (in_completion_p): Likewise.
8089 (empty_completion_p): Likewise.
8090 (test_completion_partial_match): Likewise.
8091 (test_completion_garbage): Likewise.
8092 (opt_proposer_c_tests): Likewise.
8093 * opt-suggestions.h: Declare new functions.
8094 * opts.c (common_handle_option): Handle OPT__completion_.
8095 * selftest-run-tests.c (selftest::run_tests): Add
8096 opt_proposer_c_tests.
8097 * selftest.c (assert_str_startswith): New.
8098 * selftest.h (assert_str_startswith): Likewise.
8099 (opt_proposer_c_tests): New.
8100 (ASSERT_STR_STARTSWITH): Likewise.
8102 2018-06-28 Martin Liska <mliska@suse.cz>
8104 * Makefile.in: Add opt-suggestions.o.
8105 * gcc-main.c: Include opt-suggestions.h.
8106 * gcc.c (driver::driver): Likewise.
8107 (driver::~driver): Remove m_option_suggestions.
8108 (driver::build_option_suggestions): Moved to option_proposer.
8109 (driver::suggest_option): Likewise.
8110 (driver::handle_unrecognized_options): Use option_proposer.
8111 * gcc.h (class driver): Add new memver m_option_proposer.
8112 * opt-suggestions.c: New file.
8113 * opt-suggestions.h: New file.
8115 2018-06-28 Martin Liska <mliska@suse.cz>
8117 * vec.h (class auto_string_vec): New (moved from auto_argvec).
8118 (auto_string_vec::~auto_string_vec): Likewise.
8120 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
8122 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
8123 prevent_decl_creation_for_types fields up and add reset_location field.
8124 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
8125 statement if id->reset_location is true.
8126 (copy_edges_for_bb): Do not set goto_locus on the new edges if
8127 id->reset_location is true.
8128 (copy_phis_for_bb): Force input_location on the arguments if
8129 id->reset_location is true.
8130 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
8131 is set on the function to be inlined.
8133 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
8135 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
8137 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
8139 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
8140 registers for Pmode.
8141 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
8142 hard registers for the clobbered pseudo.
8144 2018-06-27 Paul Koning <ni1d@arrl.net>
8146 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
8147 mutually exclusive options.
8148 * config/pdp11/constraints.md (h): New constraint.
8149 (O): Update definition to match shift code generation.
8150 (D): New constraint.
8151 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
8153 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
8155 (output_jump): Change arguments.
8156 (pdp11_fixed_cc_regs): New function.
8157 (pdp11_cc_mode): Ditto.
8158 (pdp11_expand_shift): Ditto.
8159 (pdp11_assemble_shift): Ditto.
8160 (pdp11_small_shift): Ditto.
8161 (pdp11_branch_cost): Remove.
8162 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
8164 (pdp11_register_move_cost): Update for CC registers.
8165 (pdp11_rtx_costs): Add case for LSHIFTRT.
8166 (pdp11_output_jump): Add CCNZ mode conditional branches.
8167 (notice_update_cc_on_set): Remove.
8168 (pdp11_cc_mode): New function.
8169 (simple_memory_operand): Correct pre/post decrement case.
8170 (no_side_effect_operand): New function.
8171 (pdp11_regno_reg_class): Add CC_REGS class.
8172 (pdp11_fixed_cc_regs): New function.
8173 (pdp11_small_shift): New function.
8174 (pdp11_expand_shift): New function to expand shift insns.
8175 (pdp11_assemble_shift): New function to output shifts.
8176 (pdp11_branch_cost): Remove.
8177 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
8178 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
8179 (WCHAR_TYPE): Ditto.
8180 (PTRDIFF_TYPE): Ditto.
8181 (ADJUST_INSN_LENGTH): New macro.
8182 (FIXED_REGISTERS): Add CC registers.
8183 (CALL_USED_REGISTERS): Ditto.
8185 (REG_CLASS_NAMES): Ditto.
8186 (REG_CLASS_CONTENTS): Ditto.
8187 (SELECT_CC_MODE): Use new function.
8188 (TARGET_FLAGS_REGNUM): New macro.
8189 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
8190 (cc0_reg_rtx): Remove.
8191 (CC_STATUS_MDEP): Remove.
8192 (CC_STATUS_MDEFP_INIT): Remove.
8193 (CC_IN_FPU): Remove.
8194 (NOTICE_UPDATE_CC): Remove.
8195 (REGISTER_NAMES): Add CC registers.
8196 (BRANCH_COST): Change to constant 1.
8197 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
8199 * config/pdp11/pdp11.opt (mbcopy): Remove.
8200 (mbcopy-builtin): Remove.
8201 (mbranch-cheap): Remove.
8202 (mbranch-expensive): Remove.
8203 * config/pdp11/predicates.md (expand_shift_operand): Update to
8204 match shift code generation.
8205 (ccnz_operator): New predicate.
8206 * doc/invoke.texi (PDP-11 Options): Remove deleted options
8207 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
8208 Remove non-existent option -mabshi, -mno-abshi. Document mutually
8210 * doc/md.texi (PDP-11): Document new D and h constraints. Update
8211 description of O constraint.
8213 2018-06-27 Jeff Law <law@redhat.com>
8214 Austin Law <austinklaw@gmail.com>
8216 * config/v850/v850.md (addsi3_set_flags): New pattern.
8217 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
8218 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
8219 (zero_extendhisi2_v850_set_flags): Likewise.
8220 (zero_extendqisi2_v850_set_flags): Likewise.
8221 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
8222 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
8223 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
8225 * config/v850/v850-protos.h (notice_update_cc): Remove.
8226 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
8227 (v850_print_operand): Handle 'D' and "d".
8228 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
8229 Add handling of arithmetic/logical operations compared against zero.
8230 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
8231 Do not look at v850_compare_op, instead get mode from last argument.
8232 (v850_gen_compare): Remove
8233 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
8234 after reload for prologue insns.
8235 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
8237 (construct_save_jarl): Likewise.
8238 (TARGET_FLAGS_REGNUM): Define.
8239 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
8240 (NOTICE_UPDATE_CC): Remove.
8241 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
8242 than cc0. Conditionalize on reload_completed.
8243 (cmpsi_insn, setfcc_insn): Likewise.
8244 (tst1 splitter): Turn into define_and_split which sets the flags
8246 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
8247 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
8248 (cstoresf4, cstoredf4): Clobber the flags.
8249 (cmpsi, cmpsf, cmpdf): Remove expanders.
8250 (setf_insn): Remove pattern.
8251 (addsi3): Turn into define_and_split which clobbers the flags after
8252 reload and a suitable pattern (addsi3_clobber_flags) for use after
8254 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
8255 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
8256 (ashrsi3, ashrsi3_v850e2): Likewise.
8257 (bins): Clobber the flags.
8258 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
8259 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
8260 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
8261 (call_value_internal_short, call_value_internal_long): Likewise.
8262 (callt_save_interrupt, callt_return_interrupt): Likewise.
8263 (save_interrupt, return_interrupt): Likewise.
8264 (callt_save_all_interrupt, save_all_interrupt): Likewise.
8265 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
8266 (restore_all_interrupt, _restore_all_interrupt): Likewise.
8267 (All FP comparisons): Only allow after reload has completed.
8269 (divh, divhu): Tweak output template.
8270 (branch_z_normal, branch_z_invert): Remove
8271 (branch_nz_normal, branch_nz_invert): Likewise.
8272 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
8274 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
8275 * config/v850/v850.c (notice_update_cc): Remove.
8276 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
8277 (CC_NO_CARRY): Likewise.
8278 (NOTICE_UPDATE_CC): Define to nothing.
8279 * config/v850/v850.md: Remove block comment on cc0 handling
8280 Remove "cc" attribute from all patterns. Remove cc_status handling
8281 from all patterns. Minor formatting fixes.
8283 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8285 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
8286 (cortex-a76.cortex-a55): Likewise.
8287 * config/aarch64/aarch64-tune.md: Regenerate.
8288 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
8289 cortex-a76.cortex-a55.
8291 2018-06-27 Jeff Law <law@redhat.com>
8293 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
8294 (MULTILIB_DIRNAMES): Similarly.
8296 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
8298 * gimple.h (gimple_return_retbnd): Delete.
8299 (gimple_return_set_retbnd): Likewise.
8300 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
8301 gimple_return_set_retbnd.
8302 * gimple-pretty-print.c (dump_gimple_return): Remove call to
8303 gimple_return_retbnd and adjust.
8304 * tree-inline.h (struct copy_body_data): Remove retbnd field.
8305 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
8306 Explicitly return NULL in a couple more cases. Move assertion
8307 on debug statements and remove unreachable code.
8308 (reset_debug_binding): Do not test id->retbnd.
8309 (expand_call_inline): Do not set it.
8311 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8313 * configure.ac: Add --disable-gcov option.
8314 * configure: Regenerate.
8315 * Makefile.in: Honour @enable_gcov@.
8316 * doc/install.texi: Document --disable-gcov.
8318 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8320 * config/arm/arm-cpus.in (cortex-a76): New entry.
8321 (cortex-a76.cortex-a55): Likewise.
8322 * config/arm/arm-tables.opt: Regenerate.
8323 * config/arm/arm-tune.md: Likewise.
8324 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
8325 * doc/invoke.texi (ARM Options): Document cortex-a76 and
8326 cortex-a76.cortex-a55.
8328 2018-06-27 Tamar Christina <tamar.christina@arm.com>
8331 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
8333 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
8335 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
8337 (EPILOGUE_USES): Likewise.
8339 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
8341 * tree-inline.c (remap_location): New function extracted from...
8342 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
8343 (copy_phis_for_bb): ...here. Call remap_location.
8344 (copy_cfg_body): Adjust call to copy_edges_for_bb.
8346 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
8348 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
8349 unaligned vsx for 16B memset.
8351 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
8354 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
8355 ieee128_float_type_node to long_double_type_node unless
8356 TARGET_LONG_DOUBLE_128 is set.
8358 2018-06-26 David Malcolm <dmalcolm@redhat.com>
8360 * cfgloop.c (get_loop_location): Convert return type from
8361 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
8362 by implicit construction from rtx_insn *, and using
8363 dump_user_location_t::from_function_decl for the fallback case.
8364 * cfgloop.h (get_loop_location): Convert return type from
8365 location_t to dump_user_location_t.
8366 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
8367 dump_printf_loc to pass in a dump_location_t rather than a
8368 location_t, via the gimple stmt.
8369 * coverage.c (get_coverage_counts): Update calls to
8370 dump_printf_loc to pass in dump_location_t rather than a
8372 * doc/optinfo.texi (Dump types): Convert example of
8373 dump_printf_loc from taking "locus" to taking "insn". Update
8374 description of the "_loc" calls to cover dump_location_t.
8375 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
8377 (dump_user_location_t::dump_user_location_t): New constructors,
8378 from gimple *stmt and rtx_insn *.
8379 (dump_user_location_t::from_function_decl): New function.
8380 (dump_loc): Make static.
8381 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
8382 const dump_location_t &.
8383 (dump_generic_expr_loc): Delete.
8384 (dump_printf_loc): Convert param "loc" from location_t to
8385 const dump_location_t &.
8386 (selftest::test_impl_location): New function.
8387 (selftest::dumpfile_c_tests): New function.
8388 * dumpfile.h: Include "profile-count.h".
8389 (class dump_user_location_t): New class.
8390 (struct dump_impl_location_t): New struct.
8391 (class dump_location_t): New class.
8392 (dump_printf_loc): Convert 2nd param from source_location to
8393 const dump_location_t &.
8394 (dump_generic_expr_loc): Delete.
8395 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
8396 const dump_location_t &.
8397 * gimple-fold.c (fold_gimple_assign): Update call to
8398 dump_printf_loc to pass in a dump_location_t rather than a
8399 location_t, via the gimple stmt.
8400 (gimple_fold_call): Likewise.
8401 * gimple-loop-interchange.cc
8402 (loop_cand::analyze_iloop_reduction_var): Update for change to
8403 check_reduction_path.
8404 (tree_loop_interchange::interchange): Update for change to
8406 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
8407 change in return-type of find_loop_location.
8408 (graphite_regenerate_ast_isl): Likewise.
8409 * graphite-optimize-isl.c (optimize_isl): Likewise.
8410 * graphite.c (graphite_transform_loops): Likewise.
8411 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
8412 pass in a dump_location_t rather than a location_t, via the
8414 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8415 * ipa.c (walk_polymorphic_call_targets): Likewise.
8416 * loop-unroll.c (report_unroll): Convert "locus" param from
8417 location_t to dump_location_t.
8418 (decide_unrolling): Update for change to get_loop_location's
8420 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
8421 location_t to dump_user_location_t.
8422 (grid_find_single_omp_among_assignments_1): Updates calls to
8423 dump_printf_loc to pass in a dump_location_t rather than a
8424 location_t, via the gimple stmt.
8425 (grid_parallel_clauses_gridifiable): Convert "tloc" from
8426 location_t to dump_location_t. Updates calls to dump_printf_loc
8427 to pass in a dump_location_t rather than a location_t, via the
8429 (grid_inner_loop_gridifiable_p): Likewise.
8430 (grid_dist_follows_simple_pattern): Likewise.
8431 (grid_gfor_follows_tiling_pattern): Likewise.
8432 (grid_target_follows_gridifiable_pattern): Likewise.
8433 (grid_attempt_target_gridification): Convert initialization
8434 of local "grid" from memset to zero-initialization; FIXME: does
8435 this require C++11? Update call to dump_printf_loc to pass in a
8436 optinfo_location rather than a location_t, via the gimple stmt.
8437 * profile.c (read_profile_edge_counts): Updates call to
8438 dump_printf_loc to pass in a dump_location_t rather than a
8440 (compute_branch_probabilities): Likewise.
8441 * selftest-run-tests.c (selftest::run_tests): Call
8443 * selftest.h (dumpfile_c_tests): New decl.
8444 * tree-loop-distribution.c (pass_loop_distribution::execute):
8445 Update for change in return type of find_loop_location.
8446 * tree-parloops.c (parallelize_loops): Likewise.
8447 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
8448 "locus" from location_t to dump_user_location_t.
8449 (canonicalize_loop_induction_variables): Likewise.
8450 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
8451 for change in return type of find_loop_location.
8452 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
8453 to dump_printf_loc to pass in a dump_location_t rather than a
8454 location_t, via the stmt.
8455 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
8457 * tree-vect-loop-manip.c (find_loop_location): Convert return
8458 type from source_location to dump_user_location_t.
8459 (vect_do_peeling): Update for above change.
8460 (vect_loop_versioning): Update for change in type of
8462 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
8463 from location_t to dump_user_location_t.
8464 (vect_estimate_min_profitable_iters): Update for change in type
8466 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
8467 location_t to dump_location_t.
8468 (vect_slp_bb): Update for change in type of vect_location.
8469 * tree-vectorizer.c (vect_location): Convert from source_location
8470 to dump_user_location_t.
8471 (try_vectorize_loop_1): Update for change in vect_location's type.
8472 (vectorize_loops): Likewise.
8473 (increase_alignment): Likewise.
8474 * tree-vectorizer.h (vect_location): Convert from source_location
8475 to dump_user_location_t.
8476 (find_loop_location): Convert return type from source_location to
8477 dump_user_location_t.
8478 (check_reduction_path): Convert 1st param from location_t to
8479 dump_user_location_t.
8480 * value-prof.c (check_counter): Update call to dump_printf_loc to
8481 pass in a dump_user_location_t rather than a location_t; update
8482 call to error_at for change in type of "locus".
8483 (check_ic_target): Update call to dump_printf_loc to
8484 pass in a dump_user_location_t rather than a location_t, via the
8487 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
8489 * config/s390/s390.h (enum processor_flags): Do not use
8490 default tune parameter when -march was specified.
8492 2018-06-26 Jakub Jelinek <jakub@redhat.com>
8495 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
8496 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
8499 2018-06-26 Richard Biener <rguenther@suse.de>
8501 PR tree-optimization/86287
8503 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
8504 (vect_analyze_loop): Initialize n_stmts.
8506 2018-06-26 Richard Biener <rguenther@suse.de>
8509 * fold-const.c (fold_convertible_p): Pointer extension
8512 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
8515 * dwarf2out.c (loc_list_has_views): Adjust comments.
8516 (dw_loc_list): Split single cross-partition range with
8519 2018-06-25 Jeff Law <law@redhat.com>
8521 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
8522 on -mbig-switch by default.
8524 * config/v850/predicates.md (const_float_1_operand): Fix match_code
8526 (const_float_0_operand): Remove unused predicate.
8527 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
8528 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
8529 (recipsf2): New expander. Original pattern now called
8531 (recipdf2, recipdf2_insn): Similarly.
8532 (rsqrtsf2, rsqrtsf2_insn): Similarly
8533 (rsqrtdf2, rsqrtdf2_insn): Similarly
8535 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
8537 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
8538 Simplify logic for FreeBSD (twice).
8540 2018-06-25 Martin Sebor <msebor@redhat.com>
8542 PR tree-optimization/86204
8543 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
8544 a strnlen result if it's less than the length of the string.
8546 2018-06-25 Martin Sebor <msebor@redhat.com>
8548 PR tree-optimization/85700
8549 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
8550 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
8551 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
8553 2018-06-25 Martin Sebor <msebor@redhat.com>
8555 * doc/extend.texi (Zero-length arrays): Update and clarify.
8557 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
8559 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
8560 added IEEE/IBM long double multilib support on PowerPC little
8561 endian Linux systems.
8562 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
8563 (MULTILIB_DEFAULTS): Likewise.
8564 * config/rs6000/rs6000.c (rs6000_option_override_internal):
8566 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
8567 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
8568 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
8570 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
8573 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
8574 (REORDER_45): Likewise.
8576 2018-06-25 Jeff Law <law@redhat.com>
8578 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
8579 dividend to 32 bits. Adjust length.
8580 (udivmodhi4): Cleanup output template. Fix length.
8582 2018-06-25 Carl Love <cel@us.ibm.com>
8584 * config/rs6000/vsx.md: Change word selector to prefered location.
8586 2018-06-25 Richard Biener <rguenther@suse.de>
8588 PR tree-optimization/86304
8589 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
8590 epilogue-if-converted loops as well.
8592 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
8594 * lto-section-out.c (lto_begin_section): Do not print section
8595 name for noaddr and unnumbered dumps.
8597 2018-06-25 Richard Biener <rguenther@suse.de>
8599 * tree-vectorizer.h (struct vec_info_shared): New structure
8600 with parts split out from struct vec_info and loop_nest from
8601 struct _loop_vec_info.
8602 (struct vec_info): Adjust accordingly.
8603 (struct _loop_vec_info): Likewise.
8604 (LOOP_VINFO_LOOP_NEST): Adjust.
8605 (LOOP_VINFO_DATAREFS): Likewise.
8606 (LOOP_VINFO_DDRS): Likewise.
8607 (struct _bb_vec_info): Likewise.
8608 (BB_VINFO_DATAREFS): Likewise.
8609 (BB_VINFO_DDRS): Likewise.
8610 (struct _stmt_vec_info): Add dr_aux member.
8611 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
8612 (DR_MISALIGNMENT_UNINITIALIZED): New.
8613 (set_dr_misalignment): Adjust.
8614 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
8615 (vect_analyze_loop): Adjust prototype.
8616 (vect_analyze_loop_form): Likewise.
8617 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8618 Compute dependences lazily.
8619 (vect_record_base_alignments): Use shared datarefs/ddrs.
8620 (vect_verify_datarefs_alignment): Likewise.
8621 (vect_analyze_data_refs_alignment): Likewise.
8622 (vect_analyze_data_ref_accesses): Likewise.
8623 (vect_analyze_data_refs): Likewise.
8624 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
8625 constructor parameter for shared part.
8626 (vect_analyze_loop_form): Pass in shared part and adjust.
8627 (vect_analyze_loop_2): Pass in storage for the number of
8628 stmts. Move loop nest finding to the caller. Compute
8630 (vect_analyze_loop): Pass in shared part.
8631 (vect_transform_loop): Verify shared datarefs are unchanged.
8632 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
8633 constructor parameter for shared part.
8634 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
8635 (vect_slp_bb): Verify shared datarefs are unchanged before
8637 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
8639 (new_stmt_vec_info): Initialize DR_AUX misalignment to
8640 DR_MISALIGNMENT_UNINITIALIZED.
8641 * tree-vectorizer.c (vec_info::vec_info): Add constructor
8642 parameter for shared part.
8643 (vec_info::~vec_info): Adjust.
8644 (vec_info_shared::vec_info_shared): New.
8645 (vec_info_shared::~vec_info_shared): Likewise.
8646 (vec_info_shared::save_datarefs): Likewise.
8647 (vec_info_shared::check_datarefs): Likewise.
8648 (try_vectorize_loop_1): Construct shared part live for analyses
8649 of a single loop for multiple vector sizes.
8650 * tree-parloops.c (gather_scalar_reductions): Adjust.
8652 2018-06-25 Richard Biener <rguenther@suse.de>
8654 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
8655 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
8656 (vect_analyze_data_refs): Remove similar code from here and
8657 simplify accordingly.
8659 2018-06-25 Richard Biener <rguenther@suse.de>
8661 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
8662 for reverse storage order accesses rather than asserting
8663 they cannot happen here.
8665 2018-06-25 Tom de Vries <tdevries@suse.de>
8668 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
8669 Use data16 instead of .byte for insn prefix.
8671 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
8674 * parser.c (make_char_string_pack): Pass this literal chars
8675 through cpp_interpret_string.
8676 (cp_parser_userdef_numeric_literal): Check the result of
8677 make_char_string_pack.
8679 2018-06-24 Maya Rashish <coypu@sdf.org>
8681 * ginclude/stddef.h: Simplify conditions around avoiding
8682 re-definition of __size_t.
8684 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8686 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
8687 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
8689 2018-06-22 Maya Rashish <coypu@sdf.org>
8691 * doc/invoke.texi (mno-fancy-math-387): Update for changes
8692 made to OpenBSD and NetBSD through the years.
8694 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
8696 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8697 behavior of vec_pack (vector double, vector double) to match
8698 behavior of vec_float2 (vector double, vector double).
8700 2018-06-22 Olivier Hainque <hainque@adacore.com>
8702 * gimplify.c (gimplify_function_tree): Prevent creation
8703 of a trampoline for the address of the current function
8704 passed to entry/exit instrumentation hooks.
8706 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
8709 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
8712 2018-06-22 Martin Liska <mliska@suse.cz>
8714 PR tree-optimization/86263
8715 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8716 Bail out if is_enabled is false.
8717 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
8719 (jump_table_cluster::is_enabled): New function.
8721 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8723 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8724 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
8725 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
8726 (lto_input_ts_binfo_tree_pointers): Likewise.
8727 * tree-streamer-out.c (streamer_write_tree_bitfields,
8728 write_ts_binfo_tree_pointers): Likewise.
8729 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
8731 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8733 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
8735 2018-06-22 Martin Liska <mliska@suse.cz>
8737 * symbol-summary.h (get): Make it pure and inline move
8738 functionality from ::get function.
8739 (get): Remove and inline into ::get and ::get_create.
8740 (get_create): Move code from ::get function.
8742 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8745 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
8746 -x assembler-with-cpp.
8748 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8750 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
8751 _FILE_OFFSET_BITS=64 for C++.
8753 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
8755 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
8756 conversion insn that shows up when pr85657-3.c is compiled using
8757 IEEE 128-bit long double.
8758 (neg<mode>2_internal): Use the correct mode to check whether the
8759 mode is IBM extended.
8760 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
8761 multiply and divide external functions from being created more
8764 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8766 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
8768 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
8769 the edge can be forwarded.
8770 (cfg_layout_merge_blocks): Likewise.
8772 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8774 * except.c (finish_eh_generation): Commit edge insertions only after
8775 the EH edges have been redirected from post-landing to landing pads.
8777 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8779 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
8780 create_tmp_var_for to create the FRAME decl.
8781 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
8783 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8785 * tree-inline.c (copy_edges_for_bb): Minor tweak.
8786 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
8787 debug statement when resetting its value.
8788 (expand_call_inline): Copy the locus of the call onto the assignment
8789 of the return value, if any. Use local variable in more cases.
8791 2018-06-21 Martin Liska <mliska@suse.cz>
8793 * ipa-pure-const.c (propagate_nothrow): Use
8794 funct_state_summaries->get.
8795 (dump_malloc_lattice): Likewise.
8796 (propagate_malloc): Likewise.
8798 2018-06-21 Richard Biener <rguenther@suse.de>
8800 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
8801 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
8802 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
8804 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
8805 BLOCK_ABSTRACT_ORIGIN unconditionally.
8807 2018-06-21 David Malcolm <dmalcolm@redhat.com>
8809 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
8811 * ipa-reference.c (ipa_reference_c_finalize): Delete
8812 ipa_ref_opt_sum_summaries and set it to NULL.
8814 2018-06-21 Tom de Vries <tdevries@suse.de>
8816 PR tree-optimization/85859
8817 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
8818 test with comment from bb_no_side_effects_p.
8820 2018-06-21 Richard Biener <rguenther@suse.de>
8822 PR tree-optimization/86232
8823 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
8824 max for constant niter.
8826 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8828 * config/aarch64/aarch64-simd.md
8829 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
8831 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8833 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8834 Make opernads of the unspec commutative.
8836 2018-06-21 Richard Biener <rguenther@suse.de>
8838 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8839 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8840 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8841 (vect_analyze_data_ref_dependence): Re-order checks to deal with
8843 (vect_record_base_alignments): Do not record base alignment
8844 for gathers or scatters.
8845 (vect_compute_data_ref_alignment): Drop return value that is always
8846 true. Bail out early for gathers or scatters.
8847 (vect_enhance_data_refs_alignment): Bail out early for gathers
8849 (vect_find_same_alignment_drs): Likewise.
8850 (vect_analyze_data_refs_alignment): Remove dead code.
8851 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8852 (vect_analyze_data_refs): For possible gathers or scatters do
8853 not create an alternate DR, just check their possible validity
8854 and mark them. Adjust DECL_NONALIASED handling to not rely
8856 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8857 update inits of gathers or scatters.
8858 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8859 Also copy gather/scatter flag to pattern vinfo.
8861 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
8863 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8864 behavior of vec_packsu (vector unsigned long long, vector unsigned
8865 long long) to match behavior of vec_packs with same signature.
8867 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
8868 Thomas Schwinge <thomas@codesourcery.com>
8869 Cesar Philippidis <cesar@codesourcery.com>
8871 * gimplify.c (gimplify_scan_omp_clauses): Add support for
8872 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8873 (gimplify_adjust_omp_clauses): Likewise.
8874 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8875 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8876 (gimplify_omp_target_update): Update handling of acc update and
8878 * omp-low.c (install_var_field): Remove unused parameter
8879 base_pointers_restrict.
8880 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8881 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8883 (omp_target_base_pointers_restrict_p): Delete.
8884 (scan_omp_target): Update call to scan_sharing_clauses.
8885 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8887 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8888 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8889 (convert_local_omp_clauses): Likewise.
8890 * tree-pretty-print.c (dump_omp_clause): Likewise.
8891 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
8893 (omp_clause_code_name): Likewise.
8895 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8898 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8901 PR tree-optimization/86231
8902 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
8903 anti-range don't overwrite *vr0min before using it to compute *vr0max.
8905 2018-06-20 Tom de Vries <tdevries@suse.de>
8907 PR tree-optimization/86097
8908 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8909 iv type if signedness of iv type is not the same as that of *nit.
8911 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8913 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
8914 EDGE_EH edges, verify they are all EDGE_EH.
8916 2018-06-20 Maya Rashish <coypu@sdf.org>
8918 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8920 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8922 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8923 * config/aarch64/aarch64.c (xgene1_tunings): Add
8924 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8925 (aarch64_mode_valid_for_sched_fusion_p):
8926 Allow 16-byte modes.
8927 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8928 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8930 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8932 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8933 * config/aarch64/iterators.md (VQ2): New mode iterator.
8935 2018-06-20 Martin Liska <mliska@suse.cz>
8937 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8938 Change default ratio from 10 to 8.
8940 2018-06-20 Martin Liska <mliska@suse.cz>
8942 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8944 (bit_test_cluster::find_bit_tests): Likewise.
8945 (switch_decision_tree::analyze_switch_statement): Find clusters.
8946 * tree-switch-conversion.h (struct jump_table_cluster): Document
8949 2018-06-20 Martin Liska <mliska@suse.cz>
8951 * tree-switch-conversion.c (switch_conversion::collect):
8952 Record m_uniq property.
8953 (switch_conversion::expand): Bail out for special conditions.
8954 (group_cluster::~group_cluster): New.
8955 (group_cluster::group_cluster): Likewise.
8956 (group_cluster::dump): Likewise.
8957 (jump_table_cluster::emit): New.
8958 (switch_decision_tree::fix_phi_operands_for_edges): New.
8959 (struct case_node): Remove struct.
8960 (jump_table_cluster::can_be_handled): New.
8961 (case_values_threshold): Moved to header.
8962 (reset_out_edges_aux): Likewise.
8963 (jump_table_cluster::is_beneficial): New.
8964 (bit_test_cluster::can_be_handled): Likewise.
8965 (add_case_node): Remove.
8966 (bit_test_cluster::is_beneficial): New.
8967 (case_bit_test::cmp): New.
8968 (bit_test_cluster::emit): New.
8969 (expand_switch_as_decision_tree_p): Remove.
8970 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8971 (fix_phi_operands_for_edge): Likewise.
8972 (switch_decision_tree::analyze_switch_statement): New.
8973 (compute_cases_per_edge): Move ...
8974 (switch_decision_tree::compute_cases_per_edge): ... here.
8975 (try_switch_expansion): Likewise.
8976 (switch_decision_tree::try_switch_expansion): Likewise.
8977 (record_phi_operand_mapping): Likewise.
8978 (switch_decision_tree::record_phi_operand_mapping): Likewise.
8979 (emit_case_decision_tree): Likewise.
8980 (switch_decision_tree::emit): Likewise.
8981 (balance_case_nodes): Likewise.
8982 (switch_decision_tree::balance_case_nodes): Likewise.
8983 (dump_case_nodes): Likewise.
8984 (switch_decision_tree::dump_case_nodes): Likewise.
8985 (emit_jump): Likewise.
8986 (switch_decision_tree::emit_jump): Likewise.
8987 (emit_cmp_and_jump_insns): Likewise.
8988 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8989 (emit_case_nodes): Likewise.
8990 (switch_decision_tree::emit_case_nodes): Likewise.
8991 (conditional_probability): Remove.
8992 * tree-switch-conversion.h (enum cluster_type): New.
8994 (struct cluster): Likewise.
8995 (cluster::cluster): Likewise.
8996 (struct simple_cluster): Likewise.
8997 (simple_cluster::simple_cluster): Likewise.
8998 (struct group_cluster): Likewise.
8999 (struct jump_table_cluster): Likewise.
9000 (struct bit_test_cluster): Likewise.
9001 (struct min_cluster_item): Likewise.
9002 (struct case_tree_node): Likewise.
9003 (case_tree_node::case_tree_node): Likewise.
9004 (jump_table_cluster::case_values_threshold): Likewise.
9005 (struct case_bit_test): Likewise.
9006 (struct switch_decision_tree): Likewise.
9007 (struct switch_conversion): Likewise.
9008 (switch_decision_tree::reset_out_edges_aux): Likewise.
9010 2018-06-20 Martin Liska <mliska@suse.cz>
9012 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
9013 (hoist_edge_and_branch_if_true): Likewise.
9014 (expand_switch_using_bit_tests_p): Likewise.
9015 (struct case_bit_test): Likewise.
9016 (case_bit_test_cmp): Likewise.
9017 (emit_case_bit_tests): Likewise.
9018 (switch_conversion::switch_conversion): New class.
9019 (struct switch_conv_info): Remove old struct.
9020 (collect_switch_conv_info): More to ...
9021 (switch_conversion::collect): ... this.
9022 (check_range): Likewise.
9023 (switch_conversion::check_range): Likewise.
9024 (check_all_empty_except_final): Likewise.
9025 (switch_conversion::check_all_empty_except_final): Likewise.
9026 (check_final_bb): Likewise.
9027 (switch_conversion::check_final_bb): Likewise.
9028 (create_temp_arrays): Likewise.
9029 (switch_conversion::create_temp_arrays): Likewise.
9030 (free_temp_arrays): Likewise.
9031 (gather_default_values): Likewise.
9032 (switch_conversion::gather_default_values): Likewise.
9033 (build_constructors): Likewise.
9034 (switch_conversion::build_constructors): Likewise.
9035 (constructor_contains_same_values_p): Likewise.
9036 (switch_conversion::contains_same_values_p): Likewise.
9037 (array_value_type): Likewise.
9038 (switch_conversion::array_value_type): Likewise.
9039 (build_one_array): Likewise.
9040 (switch_conversion::build_one_array): Likewise.
9041 (build_arrays): Likewise.
9042 (switch_conversion::build_arrays): Likewise.
9043 (gen_def_assigns): Likewise.
9044 (switch_conversion::gen_def_assigns): Likewise.
9045 (prune_bbs): Likewise.
9046 (switch_conversion::prune_bbs): Likewise.
9047 (fix_phi_nodes): Likewise.
9048 (switch_conversion::fix_phi_nodes): Likewise.
9049 (gen_inbound_check): Likewise.
9050 (switch_conversion::gen_inbound_check): Likewise.
9051 (process_switch): Use the newly created class.
9052 (switch_conversion::expand): New.
9053 (switch_conversion::~switch_conversion): New.
9054 * tree-switch-conversion.h: New file.
9056 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9058 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
9059 tree-vect-patterns.c.
9060 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
9061 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
9062 (vect_recog_sad_pattern): Likewise.
9063 (vect_recog_widen_sum_pattern): Likewise.
9064 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
9065 (vect_recog_widen_shift_pattern): Remove the type_in argument.
9066 (vect_recog_rotate_pattern): Likewise.
9067 (vect_recog_mult_pattern): Likewise.
9068 (vect_recog_vector_vector_shift_pattern): Likewise.
9069 (vect_recog_divmod_pattern): Likewise.
9070 (vect_recog_mixed_size_cond_pattern): Likewise.
9071 (vect_recog_bool_pattern): Likewise.
9072 (vect_recog_mask_conversion_pattern): Likewise.
9073 (vect_try_gather_scatter_pattern): Likewise.
9074 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
9075 (vect_recog_over_widening_pattern): Likewise.
9076 (vect_recog_gather_scatter_pattern): Likewise.
9077 (vect_recog_func_ptr): Move from tree-vectorizer.h
9078 (vect_vect_recog_func_ptrs): Move further down the file.
9079 (vect_recog_func): Likewise. Remove the third argument.
9080 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
9081 (vect_pattern_recog_1): Expect the pattern function to do any
9082 necessary target tests. Also expect it to provide a vector type.
9083 Remove the type_in handling.
9085 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9087 * tree-vect-patterns.c (vect_pattern_detected): New function.
9088 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
9089 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
9090 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
9091 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
9092 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9093 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9094 (vect_recog_mask_conversion_pattern)
9095 (vect_try_gather_scatter_pattern): Likewise.
9097 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9099 * tree-vect-patterns.c (vect_get_internal_def): New function.
9100 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9101 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
9102 (search_type_for_mask_1): Use it.
9104 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9106 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
9107 redundant WIDEN_SUM_EXPR handling.
9108 (vect_recog_sad_pattern): Likewise.
9110 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9112 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
9113 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
9114 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
9115 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
9116 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
9118 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9120 * tree-vect-stmts.c (vectorizable_call): Make sure that we
9121 use the stmt_vec_info of the original bb statement for the
9122 new zero assignment, even if the call is part of a pattern.
9124 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9126 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
9127 that the sequence is attached to the original statement rather
9128 than the pattern statement.
9129 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
9130 PATTERN_DEF_SEQ from the original statement rather than
9131 the main pattern statement.
9132 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
9133 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
9134 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
9136 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9138 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
9139 definition statements before the early exit for statements that aren't
9141 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
9143 (vect_transform_loop): ...here. Process pattern definition
9144 statements without first checking whether the main pattern
9145 statement is live or relevant.
9147 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
9149 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
9150 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
9152 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
9154 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
9155 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
9156 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
9157 (expand_block_compare): Change select_block_compare_mode call.
9158 (expand_strncmp_align_check): Use new functions, fix comment.
9159 (emit_final_str_compare_gpr): New function.
9160 (expand_strn_compare): Refactor and clean up code.
9161 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
9163 2018-06-19 Tony Reix <tony.reix@atos.com>
9164 Damien Bergamini <damien.bergamini@atos.com>
9165 David Edelsohn <dje.gcc@gmail.com>
9167 * collect2.c (static_obj): New variable.
9168 (static_libs): New variable.
9169 (is_in_list): Uncomment declaration.
9170 (main): Track AIX libraries linked statically.
9171 (is_in_list): Uncomment definition.
9172 (scan_prog_file): Don't add AIX shared libraries initializer
9173 to constructor list if linking statically.
9175 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
9177 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
9179 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
9181 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
9183 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
9186 2018-06-19 Martin Liska <mliska@suse.cz>
9188 * config/i386/i386.c (ix86_can_inline_p): Do not use
9189 ipa_fn_summaries::get_create.
9190 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
9192 (devirtualization_time_bonus): Likewise.
9193 (ipcp_propagate_stage): Likewise.
9194 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9195 (edge_set_predicate): Likewise.
9196 (evaluate_conditions_for_known_args): Likewise.
9197 (evaluate_properties_for_edge): Likewise.
9198 (ipa_call_summary::reset): Tranform to ...
9199 (ipa_call_summary::~ipa_call_summary): ... this.
9200 (ipa_fn_summary::reset): Transform to ...
9201 (ipa_fn_summary::~ipa_fn_summary): ... this.
9202 (ipa_fn_summary_t::remove): Rename to ...
9203 (ipa_fn_summary_t::remove_callees): ... this.
9204 (ipa_fn_summary_t::duplicate): Use placement new
9205 instead of memory copy.
9206 (ipa_call_summary_t::duplicate): Likewise.
9207 (ipa_call_summary_t::remove): Remove.
9208 (dump_ipa_call_summary): Change get_create to get.
9209 (ipa_dump_fn_summary): Dump only when summary exists.
9210 (analyze_function_body): Use symbol_summary::get instead
9212 (compute_fn_summary): Likewise.
9213 (estimate_edge_devirt_benefit): Likewise.
9214 (estimate_edge_size_and_time): Likewise.
9215 (inline_update_callee_summaries): Likewise.
9216 (remap_edge_change_prob): Likewise.
9217 (remap_edge_summaries): Likewise.
9218 (ipa_merge_fn_summary_after_inlining): Likewise.
9219 (write_ipa_call_summary): Likewise.
9220 (ipa_fn_summary_write): Likewise.
9221 (ipa_free_fn_summary): Likewise.
9222 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
9223 (struct ipa_call_summary): Likewise.
9224 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
9226 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
9227 (estimate_size_after_inlining): Likewise.
9228 (estimate_growth): Likewise.
9229 (growth_likely_positive): Likewise.
9230 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9231 (inline_call): Likewise.
9232 * ipa-inline.c (caller_growth_limits): Likewise.
9233 (can_inline_edge_p): Likewise.
9234 (can_inline_edge_by_limits_p): Likewise.
9235 (compute_uninlined_call_time): Likewise.
9236 (compute_inlined_call_time): Likewise.
9237 (want_inline_small_function_p): Likewise.
9238 (edge_badness): Likewise.
9239 (update_caller_keys): Likewise.
9240 (update_callee_keys): Likewise.
9241 (inline_small_functions): Likewise.
9242 (inline_to_all_callers_1): Likewise.
9243 (dump_overall_stats): Likewise.
9244 (early_inline_small_functions): Likewise.
9245 (early_inliner): Likewise.
9246 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9247 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9248 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9249 * ipa-split.c (execute_split_functions): Likewise.
9250 * symbol-summary.h: Likewise.
9251 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9253 2018-06-19 Richard Biener <rguenther@suse.de>
9255 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
9256 (vectorize_loops): ... here. Fix dbgcnt handling.
9257 (try_vectorize_loop): Wrap try_vectorize_loop_1.
9259 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
9262 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
9263 ieee128 argument takes up only one (vector) register, not two (floating
9266 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
9268 * gimplify.c (gimplify_init_constructor): Really never clear for an
9269 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
9271 2018-06-19 Richard Biener <rguenther@suse.de>
9273 PR tree-optimization/86179
9274 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
9275 after failed recognition.
9277 2018-06-18 Martin Sebor <msebor@redhat.com>
9280 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
9281 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
9282 Handle integer subtraction.
9283 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
9284 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
9286 2018-06-18 David Malcolm <dmalcolm@redhat.com>
9288 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
9289 param from rtx to rtx_insn *.
9290 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
9292 (frv_ifcvt_modify_insn): Likwise.
9293 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
9294 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
9295 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
9296 as_a <rtx_insn *> cast to local "unprotected_region" once
9297 it's been established that it's not NULL or pc_rtx.
9298 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
9299 param "sethi" from rtx to rtx_insn *.
9300 (nds32_group_float_insns): Likewise for param "insn".
9301 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
9303 (vax_output_int_subtract): Likewise.
9304 * config/vax/vax.c (vax_output_int_add): Likewise for param
9306 (vax_output_int_subtract): Likewise.
9307 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
9308 (emit_pattern_after): Likewise for param "after".
9309 (emit_insn_after): Likewise.
9310 (emit_jump_insn_after): Likewise.
9311 (emit_call_insn_after): Likewise.
9312 (emit_debug_insn_after): Likewise.
9313 (emit_pattern_before): Likewise for param "before".
9314 (emit_insn_before): Likewise.
9315 (emit_jump_insn_before): Likewise.
9316 * final.c (get_insn_template): Likewise for param "insn", removing
9318 * output.h (get_insn_template): Likewise for 2nd param.
9319 * rtl.h (emit_insn_before): Likewise.
9320 (emit_jump_insn_before): Likewise.
9321 (emit_debug_insn_before_noloc): Likewise.
9322 (emit_insn_after): Likewise.
9323 (emit_jump_insn_after): Likewise.
9324 (emit_call_insn_after): Likewise.
9325 (emit_debug_insn_after): Likewise.
9326 (set_insn_deleted): Likewise for param.
9328 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
9331 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
9332 floating point modes, so that IFmode is numerically greater than
9333 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
9334 to declare the ordering. This prevents IFmode from being
9335 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
9336 machine. Include rs6000-modes.h to share the fractional values
9337 between genmodes* and the rest of the compiler.
9341 * config/rs6000/rs6000-modes.h: New file.
9342 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
9343 meaning of rs6000_long_double_size so that 126..128 selects an
9344 appropriate 128-bit floating point type.
9345 (rs6000_option_override_internal): Likewise.
9346 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
9347 (TARGET_LONG_DOUBLE_128): Change the meaning of
9348 rs6000_long_double_size so that 126..128 selects an appropriate
9349 128-bit floating point type.
9350 (LONG_DOUBLE_TYPE_SIZE): Update comment.
9351 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
9352 source and destination to match the standard usage.
9353 (truncifkf2): Likewise.
9354 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
9355 ISA 2.07 to use an explicit clobber, instead of passing in a
9357 (copysign<mode>3_soft): Likewise.
9359 2018-06-18 David Malcolm <dmalcolm@redhat.com>
9361 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
9362 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
9363 (vect_slp_analyze_instance_dependence): Likewise.
9364 (vect_enhance_data_refs_alignment): Likewise.
9365 (vect_analyze_data_refs_alignment): Likewise.
9366 (vect_slp_analyze_and_verify_instance_alignment
9367 (vect_analyze_data_ref_accesses): Likewise.
9368 (vect_prune_runtime_alias_test_list): Likewise.
9369 (vect_analyze_data_refs): Likewise.
9370 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
9371 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
9372 (vect_analyze_scalar_cycles_1): Likewise.
9373 (vect_get_loop_niters): Likewise.
9374 (vect_analyze_loop_form_1): Likewise.
9375 (vect_update_vf_for_slp): Likewise.
9376 (vect_analyze_loop_operations): Likewise.
9377 (vect_analyze_loop): Likewise.
9378 (vectorizable_induction): Likewise.
9379 (vect_transform_loop): Likewise.
9380 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
9381 * tree-vect-slp.c (vect_analyze_slp): Likewise.
9382 (vect_make_slp_decision): Likewise.
9383 (vect_detect_hybrid_slp): Likewise.
9384 (vect_slp_analyze_operations): Likewise.
9385 (vect_slp_bb): Likewise.
9386 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
9387 (vectorizable_bswap): Likewise.
9388 (vectorizable_call): Likewise.
9389 (vectorizable_simd_clone_call): Likewise.
9390 (vectorizable_conversion): Likewise.
9391 (vectorizable_assignment): Likewise.
9392 (vectorizable_shift): Likewise.
9393 (vectorizable_operation): Likewise.
9394 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
9396 2018-06-18 Martin Sebor <msebor@redhat.com>
9398 PR tree-optimization/81384
9399 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
9400 * builtins.c (expand_builtin_strnlen): New function.
9401 (expand_builtin): Call it.
9402 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
9403 * builtins.def (BUILT_IN_STRNLEN): New.
9404 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
9405 Warn for bounds in excess of maximum object size.
9406 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
9407 single-value ranges. Handle strnlen.
9408 (handle_builtin_strlen): Handle strnlen.
9409 (strlen_check_and_optimize_stmt): Same.
9410 * doc/extend.texi (Other Builtins): Document strnlen.
9412 2018-06-18 Maya Rashish <coypu@sdf.org>
9414 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
9415 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
9416 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
9418 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
9420 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
9422 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9424 * tree.c (escaped_string::escape): Replace cast to char * by
9425 const_cast<char *> (unescaped).
9427 2018-06-18 Nick Clifton <nickc@redhat.com>
9430 * tree.c (escaped_string): New class. Converts an unescaped
9431 string into its escaped equivalent.
9432 (warn_deprecated_use): Use the new class to convert the
9433 deprecation message, if present.
9434 (test_escaped_strings): New self test.
9435 (test_c_tests): Add test_escaped_strings.
9436 * doc/extend.texi (deprecated): Add a note that the
9437 deprecation message is affected by the -fmessage-length
9438 option, and that control characters will be escaped.
9439 (#pragma GCC error): Document this pragma.
9440 (#pragma GCC warning): Likewise.
9441 * doc/invoke.texi (-fmessage-length): Document this option's
9442 effect on the #warning and #error preprocessor directives and
9443 the deprecated attribute.
9445 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
9447 * tree.c (decl_value_expr_lookup): Revert latest change.
9448 (decl_value_expr_insert): Likewise.
9450 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
9452 * gimplify.c (nonlocal_vlas): Delete.
9453 (nonlocal_vla_vars): Likewise.
9454 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
9456 (gimplify_body): Do not create and destroy nonlocal_vlas.
9457 * tree-nested.c: Include diagnostic.h.
9458 (use_pointer_in_frame): Tweak.
9459 (lookup_field_for_decl): Add assertion and declare the transformation.
9460 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
9461 internal error when the reference is in a wrong context. Do not
9462 create a debug decl by default.
9463 (note_nonlocal_block_vlas): Delete.
9464 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
9465 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
9466 create a debug decl by default.
9467 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
9468 call is in a wrong context.
9469 (fixup_vla_decls): New function.
9470 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
9471 debug variables were created.
9472 * tree.c (decl_value_expr_lookup): Add checking assertion.
9473 (decl_value_expr_insert): Likewise.
9475 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
9478 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
9479 * tree-scalar-evolution.c (interpret_expr): Likewise.
9480 (expression_expensive_p): Likewise.
9481 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
9482 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
9483 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
9484 (ssa_defined_by_minus_one_stmt_p): New.
9486 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
9489 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
9490 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
9491 * dojump.c (do_jump): Likewise.
9492 * expr.c (expand_expr_real_2): Check operand type's sign.
9493 * fold-const.c (const_unop): Handle ABSU_EXPR.
9494 (fold_abs_const): Likewise.
9495 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
9496 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
9497 (strip_sign_op_1): Likesise.
9498 * match.pd: Add new pattern to generate ABSU_EXPR.
9499 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
9500 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9501 * tree-eh.c (operation_could_trap_helper_p): Likewise.
9502 * tree-inline.c (estimate_operator_cost): Likewise.
9503 * tree-pretty-print.c (dump_generic_node): Likewise.
9504 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
9505 * tree.def (ABSU_EXPR): New.
9507 2018-06-16 Jakub Jelinek <jakub@redhat.com>
9510 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
9511 documented as preserved for backward compatibility only.
9512 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
9514 PR rtl-optimization/86108
9515 * bb-reorder.c (create_forwarder_block): Renamed to ...
9516 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
9517 jump from new landing pad to the second part.
9518 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
9521 2018-06-15 Jakub Jelinek <jakub@redhat.com>
9524 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
9525 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
9526 Only call store_expr for halves if the mode is the same.
9529 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
9530 Fix up comment formatting.
9532 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
9534 * typed-splay-tree.h (typed_splay_tree::remove): New function.
9535 (typed_splay_tree::closure,
9536 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
9537 (typed_splay_tree::typed_splay_tree,
9538 typed_splay_tree::operator =): Declared private.
9539 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
9540 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
9541 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
9542 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
9543 typed_splay_tree::splay_tree_splay,
9544 typed_splay_tree::splay_tree_foreach_helper,
9545 typed_splay_tree::splay_tree_insert,
9546 typed_splay_tree::splay_tree_remove,
9547 typed_splay_tree::splay_tree_lookup,
9548 typed_splay_tree::splay_tree_predecessor,
9549 typed_splay_tree::splay_tree_successor,
9550 typed_splay_tree::splay_tree_min,
9551 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
9552 (typed_splay_tree::root, typed_splay_tree::comp,
9553 typed_splay_tree::delete_key,
9554 typed_splay_tree::delete_value): New data members.
9555 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
9556 typed_splay_tree::remove.
9558 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
9560 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
9561 -mginv and -mno-ginv to the assembler.
9562 * config/mips/mips.opt (-mcrc): New option.
9564 * doc/invoke.text (-mcrc): Document.
9567 2018-06-15 Nick Clifton <nickc@redhat.com>
9570 * tree.c (escaped_string): New class. Converts an unescaped
9571 string into its escaped equivalent.
9572 (warn_deprecated_use): Use the new class to convert the
9573 deprecation message, if present.
9574 (test_escaped_strings): New self test.
9575 (test_c_tests): Add test_escaped_strings.
9576 * doc/extend.texi (deprecated): Add a note that the
9577 deprecation message is affected by the -fmessage-length
9578 option, and that control characters will be escaped.
9579 (#pragma GCC error): Document this pragma.
9580 (#pragma GCC warning): Likewise.
9581 * doc/invoke.texi (-fmessage-length): Document this option's
9582 effect on the #warning and #error preprocessor directives and
9583 the deprecated attribute.
9585 2018-06-15 Richard Biener <rguenther@suse.de>
9587 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
9588 here, also noting vector size used.
9589 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
9590 size used in MSG_OPTIMIZED_LOCATIONS dump.
9591 (pass_slp_vectorize::execute): Adjust.
9593 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
9596 * config/arc/arc.c (arc_return_address_register): Fix
9599 2018-06-15 Richard Biener <rguenther@suse.de>
9602 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
9603 leave useless conversion stripping to force_gimple_operand_gsi.
9604 (gimplify_build2): Likewise.
9605 (gimplify_build1): Likewise.
9607 2018-06-15 Richard Biener <rguenther@suse.de>
9610 * tree-cfg.c (move_stmt_op): unshare invariant addresses
9611 before adjusting their block.
9613 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
9615 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
9616 multilibs for *-*-rtems*.
9617 * config/riscv/t-rtems: New file.
9619 2018-06-14 Jakub Jelinek <jakub@redhat.com>
9622 * match.pd ((A +- CST1) +- CST2): Punt if last resort
9623 unsigned_type_for returns NULL.
9626 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
9627 subregs of multi-word pseudos unless the float mode has word size.
9629 2018-06-14 Richard Biener <rguenther@suse.de>
9632 * tree-vect-generic.c (build_word_mode_vector_type): Remove
9633 duplicate and harmful type_hash_canon.
9634 * tree.c (type_hash_canon): Assert we didn't find ourselves.
9636 2018-06-14 Richard Biener <rguenther@suse.de>
9639 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
9642 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
9644 * config/rtems.h (STDINT_LONG32): Define.
9646 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
9647 Prachi Godbole <prachi.godbole@imgtec.com>
9649 * config/mips/mips-cpus.def: Define P6600.
9650 * config/mips/mips-tables.opt: Regenerate.
9651 * config/mips/mips.c (mips_ucbranch_type): New enum.
9652 (mips_rtx_cost_data): Add support for P6600.
9653 (mips_issue_rate): Likewise.
9654 (mips_multipass_dfa_lookahead): Likewise.
9655 (mips_avoid_hazard): Likewise.
9656 (mips_reorg_process_insns): Likewise.
9657 (mips_classify_branch_p6600): New function.
9658 * config/mips/mips.h (TUNE_P6600): New define.
9659 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
9660 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
9661 * config/mips/mips.md: Include p6600.md.
9662 (processor): Add p6600.
9663 * config/mips/p6600.md: New file.
9664 * doc/invoke.texi: Add p6600 to supported architectures.
9666 2018-06-13 Martin Sebor <msebor@redhat.com>
9668 PR tree-optimization/86114
9669 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
9671 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
9673 2018-06-13 Richard Biener <rguenther@suse.de>
9675 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
9676 Properly set vector type of the intermediate stmt.
9677 * tree-vect-stmts.c (vectorizable_operation): The destination
9678 var always has vectype_out type.
9680 2018-06-13 Jeff Law <law@redhat.com>
9682 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
9683 integer 0 for argument to print_rtl_with_bb.
9684 (rl78_reorg): Likewise.
9686 2018-06-13 David Malcolm <dmalcolm@redhat.com>
9688 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
9689 from rtx to rtx_insn *.
9690 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
9692 (add_sched_insns_for_speculation): Likewise for local "target",
9693 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9694 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
9695 from rtx_insn ** to rtx_code_label **.
9696 (reorg_emit_nops): Likewise.
9697 (c6x_reorg): Likewise for local "call_labels".
9698 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
9700 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
9701 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
9702 the loops over LABEL_REFS.
9703 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
9705 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9706 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
9707 (split_branches): Strengthen local "olabel" from rtx to
9708 rtx_insn *, adding a safe_as_a cast.
9709 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
9711 (add_insn_after): Likewise for first two params.
9712 (add_insn_before): Likewise.
9713 (remove_insn): Likewise for param.
9714 (emit_pattern_before_noloc): Likewise for second and third params.
9715 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
9716 (emit_call_insn_before_noloc): Likewise.
9717 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
9719 (emit_barrier_before): Likewise.
9720 (emit_label_before): Strengthen "label" param from "rtx" to
9721 "rtx_code_label *". Strengthen "before" param from "rtx" to
9723 (emit_insn_after_1): Strengthen "after" param from "rtx" to
9725 (emit_pattern_after_noloc): Likewise.
9726 (emit_insn_after_noloc): Likewise.
9727 (emit_jump_insn_after_noloc): Likewise.
9728 (emit_call_insn_after_noloc): Likewise.
9729 (emit_debug_insn_after_noloc): Likewise.
9730 (emit_barrier_after): Likewise.
9731 (emit_label_after): Likewise for both params.
9732 (emit_pattern_after_setloc): Likewise for "after" param. Convert
9733 "loc" param from "int" to "location_t".
9734 (emit_insn_after_setloc): Likewise.
9735 (emit_jump_insn_after_setloc): Likewise.
9736 (emit_call_insn_after_setloc): Likewise.
9737 (emit_debug_insn_after_setloc): Likewise.
9738 (emit_pattern_before_setloc): Likewise for "before" param. Convert
9739 "loc" param from "int" to "location_t".
9740 (emit_pattern_before): Convert NULL_RTX to NULL.
9741 (emit_insn_before_setloc): Convert "loc" param from "int" to
9743 (emit_jump_insn_before_setloc): Likewise.
9744 (emit_call_insn_before_setloc): Likewise.
9745 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
9746 rtx_insn *. Convert "loc" param from "int" to "location_t".
9747 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
9748 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
9749 Convert 3rd param from "int" to "location_t".
9750 (emit_barrier_before, emit_barrier_after, next_real_insn):
9751 Strengthen param from rtx to rtx_insn *.
9752 (emit_label_before): Strengthen 1st param from "rtx" to
9753 "rtx_code_label *". Strengthen 2nd param from "rtx" to
9755 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
9756 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
9757 Strengthen 2nd param from "rtx" to "rtx_insn *".
9758 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
9759 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
9760 Likewise. Convert 3rd param from "int" to "location_t".
9761 (emit_label_after): Strengthen 1st param from "rtx" to
9763 (next_real_insn, remove_insn): Strengthen param from "rtx" to
9765 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
9766 from "rtx" to "rtx_insn *".
9768 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
9770 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
9771 bodies streamed in with -Q.
9772 * dumpfile.c (dump_files): Add lto-stream-out dump file.
9773 * dumpfile.h (tree_dump_index): Add lto_stream_out.
9774 * gimple-streamer-out.c: Include gimple-pretty-print.h
9775 (output_bb): Dump stmts streamed.
9776 * lto-section-out.c: Include print-tree.h
9777 (lto_begin_section): Dump sections created.
9778 (lto_output_decl_index): Dump decl encoded.
9779 * lto-streamer-out.c: Include print-tree.h
9780 (create_output_block): Dump output block created.
9781 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
9782 (output_function): Dump function output.
9783 (output_constructor): Dump constructor streamed.
9784 (write_global_stream): Output indexes encoded.
9785 (produce_asm_for_decls): Dump streams encoded.
9786 * lto-streamer.c (streamer_dump_file): New global var.
9787 * lto-streamer.h (streamer_dump_file): Declare.
9788 * passes.c (ipa_write_summaries): Initialize streamer dump.
9789 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
9792 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
9795 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
9796 offsets for register save directives. Emit a second batch of save
9797 directives, if need be, when the function accesses prior frames.
9799 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9801 * config/arc/fpu.md (fmasf4): Force operand to register.
9802 (fnmasf4): Likewise.
9804 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9806 * config/arc/arc-protos.h (arc_pad_return): Remove.
9807 * config/arc/arc.c (machine_function): Remove force_short_suffix
9809 (arc_print_operand): Adjust printing of '&'.
9810 (arc_verify_short): Remove conditional printing of short suffix.
9811 (arc_final_prescan_insn): Remove reference to size_reason.
9812 (pad_return): New function.
9813 (arc_reorg): Call pad_return.
9814 (arc_pad_return): Remove.
9815 (arc_init_machine_status): Remove reference to force_short_suffix.
9816 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
9817 (attr length): When attribute iscompact is true force to 2
9818 regardless; in the case of maybe check if we want to force the
9819 instruction to have 4 bytes length.
9820 (nopv): Change it to generate 4 byte long nop as well.
9821 (blockage): New pattern.
9822 (simple_return): Remove call to arc_pad_return.
9823 (p_return_i): Likewise.
9825 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9827 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
9829 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9831 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9834 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9836 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9837 for ARC700 and ARCv2.
9839 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
9842 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9843 operands[2] instead of operands[1].
9846 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9848 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9849 case, check whether the outer register overlaps an unallocatable
9850 register, not just whether it fits the required class.
9852 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9854 * poly-int.h (can_div_trunc_p): Add new overload in which all values
9856 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9857 (memrefs_conflict_p): Likewise.
9858 (init_alias_analysis): Likewise.
9859 * cfgexpand.c (expand_debug_expr): Likewise.
9860 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9861 * cse.c (fold_rtx): Likewise.
9862 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9863 * expr.c (emit_block_move_hints): Likewise.
9864 (clear_storage_hints, push_block, emit_push_insn): Likewise.
9865 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9866 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9867 (emit_group_store): Likewise.
9868 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
9869 to read the PRE/POST_MODIFY increment.
9870 * calls.c (store_one_arg): Use strip_offset.
9871 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9873 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9875 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9876 (simplify_binary_operation_1): Extend CONST_INT handling to
9878 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9879 than a HOST_WIDE_INT.
9880 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9882 (adjust_mems, add_stores): Update accodingly.
9883 (vt_canonicalize_addr): Track polynomial offsets.
9884 (emit_note_insn_var_location): Likewise.
9885 (vt_add_function_parameter): Likewise.
9886 (vt_initialize): Likewise.
9888 2018-06-12 Jeff Law <law@redhat.com>
9890 * config.gcc (alpha*-*-freebsd*): Remove.
9891 * config/alpha/freebsd.h: Remove.
9893 2018-06-12 David Malcolm <dmalcolm@redhat.com>
9896 * spellcheck-tree.c (levenshtein_distance): Rename to...
9897 (get_edit_distance): ...this, and update for underlying renaming.
9898 * spellcheck-tree.h (levenshtein_distance): Rename to...
9899 (get_edit_distance): ...this.
9900 * spellcheck.c (levenshtein_distance): Rename to...
9901 (get_edit_distance): ...this. Convert from Levenshtein distance
9902 to Damerau-Levenshtein distance by supporting transpositions of
9903 adjacent characters. Rename "v1" to "v_next" and "v0" to
9905 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9906 (selftest::test_edit_distance_unit_test_oneway): ...this, and
9907 update for underlying renaming.
9908 (selftest::levenshtein_distance_unit_test): Rename to...
9909 (selftest::test_get_edit_distance_unit): ...this, and update for
9910 underlying renaming.
9911 (selftest::test_find_closest_string): Add example from PR 69968
9912 where transposition helps
9913 (selftest::test_metric_conditions): Update for renaming.
9914 (selftest::test_metric_conditions): Likewise.
9915 (selftest::spellcheck_c_tests): Likewise.
9916 * spellcheck.h (levenshtein_distance): Rename both overloads to...
9917 (get_edit_distance): ...this.
9918 (best_match::consider): Update for renaming.
9920 2018-06-12 Martin Sebor <msebor@redhat.com>
9922 PR tree-optimization/85259
9923 * builtins.c (compute_objsize): Handle constant offsets.
9924 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9925 true iff a warning has been issued.
9926 * gimple.h (gimple_nonartificial_location): New function.
9927 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9928 gimple_nonartificial_location and handle -Wno-system-headers.
9929 (handle_builtin_stxncpy): Same.
9931 2018-06-12 Martin Sebor <msebor@redhat.com>
9934 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9936 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
9938 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9939 BUILTIN_VEC_XST entries for pointer to double and long long.
9941 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
9944 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9946 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9949 2018-06-12 Martin Liska <mliska@suse.cz>
9951 * doc/options.texi: Document IntegerRange.
9953 2018-06-12 Martin Liska <mliska@suse.cz>
9955 * config/i386/i386.opt: Make MPX-related options as Deprecated.
9956 * opt-functions.awk: Handle Deprecated flag.
9957 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9959 (read_cmdline_option): Report warning for a deprecated option.
9960 * opts.h (struct cl_option): Add new field cl_deprecated.
9961 (CL_ERR_DEPRECATED): New.
9963 2018-06-12 Martin Liska <mliska@suse.cz>
9965 * doc/options.texi: Document Deprecated option flag.
9967 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9969 * config/arc/arc-arch.h (arc_extras): New enum.
9970 (arc_cpu_t):Add field extra.
9971 (arc_cpu_types): Consider the extras.
9972 * config/arc/arc-cpus.def: Add extras info.
9973 * config/arc/arc-opts.h (processor_type): Consider extra field.
9974 * config/arc/arc.c (arc_override_options): Handle extra field.
9976 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9978 * config/arc/arc-arch.h: Update ARC_OPTX macro.
9979 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9981 * config/arc/arc.c (arc_init): Update pic warning.
9982 (irq_range): Update irq range parsing warnings.
9983 (arc_override_options): Update various warning messages.
9984 (arc_handle_aux_attribute): Likewise.
9986 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
9988 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9990 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9992 * doc/sourcebuild.texi: Document usage of line number 0 in verify
9993 compiler messages directives.
9995 2018-06-12 Matthew Fortune <mfortune@gmail.com>
9997 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9998 * config/mips/mips-tables.opt: Regenerate.
9999 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
10001 * doc/invoke.texi: Document -march=i6500.
10003 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
10005 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
10006 (i6400_gpmul): Add cpu_unit.
10007 (i6400_gpdiv): Likewise.
10008 (i6400_msa_add_d): Update reservations.
10009 (i6400_msa_int_add) Likewise.
10010 (i6400_msa_short_logic3) Likewise.
10011 (i6400_msa_short_logic2) Likewise.
10012 (i6400_msa_short_logic) Likewise.
10013 (i6400_msa_move) Likewise.
10014 (i6400_msa_cmp) Likewise.
10015 (i6400_msa_short_float2) Likewise.
10016 (i6400_msa_div_d) Likewise.
10017 (i6400_msa_long_logic1) Likewise.
10018 (i6400_msa_long_logic2) Likewise.
10019 (i6400_msa_mult) Likewise.
10020 (i6400_msa_long_float2) Likewise.
10021 (i6400_msa_long_float4) Likewise.
10022 (i6400_msa_long_float5) Likewise.
10023 (i6400_msa_long_float8) Likewise.
10024 (i6400_fpu_fadd): Include frint type.
10025 (i6400_fpu_store): New define_insn_reservation.
10026 (i6400_fpu_load): Likewise.
10027 (i6400_fpu_move): Likewise.
10028 (i6400_fpu_fcmp): Likewise.
10029 (i6400_fpu_fmadd): Likewise.
10030 (i6400_int_mult): Include imul3nc type and update reservation.
10031 (i6400_int_div): Include idiv3 type and update reservation.
10032 (i6400_int_load): Update to check type not move_type.
10033 (i6400_int_store): Likewise.
10034 (i6400_int_prefetch): Set zero latency.
10036 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
10038 * gcc.c: Document new %@{...} sequence.
10039 (LINK_COMMAND_SPEC): Use it for the -L switches.
10040 (cpp_unique_options): Use it for the -I switches.
10041 (at_file_argbuf): New global variable.
10042 (in_at_file): Likewise.
10043 (alloc_args): Create at_file_argbuf.
10044 (clear_args): Truncate at_file_argbuf.
10045 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
10046 (open_at_file): New function.
10047 (close_at_file): Likewise.
10048 (create_at_file): Delete.
10049 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
10052 (validate_switches_from_spec): Deal with %@{...} sequence.
10053 (validate_switches): Likewise.
10054 (driver::finalize): Call clear_args.
10056 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
10058 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
10060 2018-06-11 Martin Sebor <msebor@redhat.com>
10062 * doc/invoke.texi (-Wall): List -Wc++17-compat.
10063 (Wno-class-memaccess): Add @opindex.
10064 (Wno-templates, Wno-multiple-inheritance): Same.
10065 (Wno-virtual-inheritance, Wno-namespaces): Same.
10066 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
10067 (Wno-format-overflow, Wno-format-truncation): Same.
10068 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
10069 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
10070 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
10071 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
10072 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
10073 (Wno-misspelled-isr): Same.
10075 2018-06-11 Martin Sebor <msebor@redhat.com>
10077 * PR tree-optimization/86083
10078 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
10080 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
10082 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
10084 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
10087 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
10088 on the correct operand.
10089 (*movdi_internal64): Ditto.
10091 2018-06-11 Martin Liska <mliska@suse.cz>
10093 PR tree-optimization/86089
10094 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
10096 2018-06-11 Julia Koval <julia.koval@intel.com>
10098 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
10099 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
10100 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
10102 2018-06-11 Olivier Hainque <hainque@adacore.com>
10104 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
10105 for Ada with strict dwarf2.
10107 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
10110 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
10113 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
10115 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
10117 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
10119 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
10122 2018-06-08 Martin Liska <mliska@suse.cz>
10124 * tree-cfg.h (debug_function): Fix argument type to match
10127 2018-06-08 Martin Liska <mliska@suse.cz>
10129 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
10130 Remove usage of MPX-related (and removed) fields.
10131 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
10133 2018-06-08 David Malcolm <dmalcolm@redhat.com>
10135 * cfg.c (debug): Use TDF_NONE rather than 0.
10136 * cfghooks.c (debug): Likewise.
10137 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
10138 (struct dump_option_value_info): Convert to...
10139 (struct kv_pair): ...this template type.
10140 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
10142 (optinfo_verbosity_options): Likewise.
10143 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
10145 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
10146 than int for "optgroup_flags" param.
10147 (dump_generic_expr_loc): Use dump_flags_t rather than int for
10149 (dump_dec): Likewise.
10150 (dump_finish): Use TDF_NONE rather than 0.
10151 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
10152 rather than int for "optgroup_flags" param. Use TDF_NONE rather
10153 than 0. Update for change to option_ptr.
10154 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
10155 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
10156 0. Update for changes to optinfo_verbosity_options and
10158 (opt_info_switch_p): Convert optgroup_flags from int to
10160 (dump_basic_block): Use dump_flags_t rather than int
10161 for "dump_kind" param.
10162 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
10163 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
10164 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
10165 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
10166 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
10167 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
10168 TDF_NONE): Convert from macros to...
10169 (enum dump_flag): ...this new enum.
10170 (dump_flags_t): Update to use enum.
10171 (operator|, operator&, operator~, operator|=, operator&=):
10172 Implement for dump_flags_t.
10173 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
10174 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
10175 Convert from macros to...
10176 (enum optgroup_flag): ...this new enum.
10177 (optgroup_flags_t): New typedef.
10178 (operator|, operator|=): Implement for optgroup_flags_t.
10179 (struct dump_file_info): Convert field "alt_flags" to
10180 dump_flags_t. Convert field "optgroup_flags" to
10182 (dump_basic_block): Use dump_flags_t rather than int for param.
10183 (dump_generic_expr_loc): Likewise.
10184 (dump_dec): Likewise.
10185 (dump_register): Convert param "optgroup_flags" to
10187 (opt_info_enable_passes): Likewise.
10188 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
10190 * gimple-pretty-print.c (debug): Likewise.
10191 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
10192 (merged_store_group::apply_stores): Likewise.
10193 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
10194 * gimple.c (verify_gimple_pp): Likewise.
10195 * graphite-poly.c (print_pbb_body): Likewise.
10196 * passes.c (pass_manager::register_one_dump_file): Convert
10197 local "optgroup_flags" to optgroup_flags_t.
10198 * print-tree.c (print_node): Use TDF_NONE rather than 0.
10200 (debug_body): Likewise.
10201 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
10202 to optgroup_flags_t.
10203 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
10205 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
10206 (convert_mult_to_fma): Likewise.
10207 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
10208 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
10209 * tree-vect-data-refs.c (dump_lower_bound): Convert param
10210 "dump_kind" to dump_flags_t.
10212 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
10214 * config/rs6000/rs6000.c (min, max): Delete.
10216 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
10218 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
10219 -mabi=spe and -mabi=no-spe.
10221 2018-06-08 Martin Liska <mliska@suse.cz>
10223 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
10224 where we expect an existing summary.
10226 2018-06-08 Martin Liska <mliska@suse.cz>
10228 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
10229 * ipa-inline.h (estimate_edge_growth): Likewise.
10231 2018-06-08 Martin Liska <mliska@suse.cz>
10233 * cgraph.c (function_version_hasher::hash): Use
10234 cgraph_node::get_uid ().
10235 (function_version_hasher::equal):
10236 * cgraph.h (cgraph_node::get_uid): New method.
10237 * ipa-inline.c (update_caller_keys): Use
10238 cgraph_node::get_uid ().
10239 (update_callee_keys): Likewise.
10240 * ipa-utils.c (searchc): Likewise.
10241 (ipa_reduced_postorder): Likewise.
10242 * lto-cgraph.c (input_node): Likewise.
10243 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
10244 * symbol-summary.h (symtab_insertion): Likewise.
10245 (symtab_removal): Likewise.
10246 (symtab_duplication): Likewise.
10247 * tree-pretty-print.c (dump_function_header): Likewise.
10248 * tree-sra.c (convert_callers_for_node): Likewise.
10250 2018-06-08 Martin Liska <mliska@suse.cz>
10252 * cgraph.c (symbol_table::create_edge): Always assign a new
10254 (symbol_table::free_edge): Do not recycle numbers.
10255 * cgraph.h (cgraph_edge::get): New method.
10256 * symbol-summary.h (symtab_removal): Use it.
10257 (symtab_duplication): Likewise.
10258 (call_summary::hashable_uid): Remove.
10260 2018-06-08 Martin Liska <mliska@suse.cz>
10262 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
10263 (initialize_growth_caches): Remove.
10264 (free_growth_caches): Likewise.
10265 (do_estimate_edge_time): Use edge_growth_cache.
10266 (do_estimate_edge_size): Likewise.
10267 (do_estimate_edge_hints): Likewise.
10268 * ipa-inline.c (reset_edge_caches): Likewise.
10269 (recursive_inlining): Likewise.
10270 (inline_small_functions): Likewise.
10271 * ipa-inline.h (initialize_growth_caches): Remove.
10272 (estimate_edge_size): Likewise.
10273 (estimate_edge_time): Likewise.
10274 (estimate_edge_hints): Likewise.
10275 (reset_edge_growth_cache): Likewise.
10276 * symbol-summary.h (call_summary::remove): New method.
10278 2018-06-08 Martin Liska <mliska@suse.cz>
10280 * ipa-cp.c (class edge_clone_summary): New summary.
10281 (grow_edge_clone_vectors): Remove.
10282 (ipcp_edge_duplication_hook): Remove.
10283 (class edge_clone_summary_t): New call_summary class.
10284 (ipcp_edge_removal_hook): Remove.
10285 (edge_clone_summary_t::duplicate): New function.
10286 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
10287 (create_specialized_node): Likewise.
10288 (ipcp_driver): Initialize edge_clone_summaries and do not
10291 2018-06-08 Martin Liska <mliska@suse.cz>
10293 * symbol-summary.h (get): New function.
10294 (call_summary::m_initialize_when_cloning): New class member.
10296 2018-06-08 Martin Liska <mliska@suse.cz>
10298 * cgraph.c (cgraph_node::remove): Do not recycle uid.
10299 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
10300 (symbol_table::allocate_cgraph_symbol): Do not set uid.
10301 * passes.c (uid_hash_t): Record removed_nodes by their uids.
10302 (remove_cgraph_node_from_order): Use the removed_nodes set.
10303 (do_per_function_toporder): Likwise.
10304 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
10305 instead of summary_uid.
10306 (symtab_removal): Likewise.
10307 (symtab_duplication): Likewise.
10309 2018-06-08 Martin Liska <mliska@suse.cz>
10311 * ipa-cp.c (ipcp_store_bits_results): Use
10312 ipcp_transformation_sum.
10313 (ipcp_store_vr_results): Likewise.
10314 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
10316 (ipcp_transformation_initialize): ... this.
10317 (ipa_set_node_agg_value_chain):
10318 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
10319 (write_ipcp_transformation_info): Likewise.
10320 (read_ipcp_transformation_info): Likewise.
10321 (ipcp_update_bits): Likewise.
10322 (ipcp_update_vr): Likewise.
10323 (ipcp_transform_function): Likewise.
10324 * ipa-prop.h: Rename ipcp_transformation_summary to
10325 ipcp_transformation.
10326 (class ipcp_transformation_t): New function summary.
10327 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
10328 (ipa_get_agg_replacements_for_node): Likewise.
10330 2018-06-08 Martin Liska <mliska@suse.cz>
10332 * ipa-pure-const.c (struct funct_state_d): Do it class instead
10334 (class funct_state_summary_t): New function_summary class.
10335 (has_function_state): Remove.
10336 (get_function_state): Likewise.
10337 (set_function_state): Likewise.
10338 (add_new_function): Likewise.
10339 (funct_state_summary_t::insert): New function.
10340 (duplicate_node_data): Remove.
10341 (remove_node_data): Remove.
10342 (funct_state_summary_t::duplicate): New function.
10343 (register_hooks): Create new funct_state_summaries.
10344 (pure_const_generate_summary): Use it.
10345 (pure_const_write_summary): Likewise.
10346 (pure_const_read_summary): Likewise.
10347 (propagate_pure_const): Likewise.
10348 (propagate_nothrow): Likewise.
10349 (dump_malloc_lattice): Likewise.
10350 (propagate_malloc): Likewise.
10351 (execute): Do not register hooks, just remove summary
10353 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
10356 2018-06-08 Martin Liska <mliska@suse.cz>
10358 * ipa-reference.c (remove_node_data): Remove.
10359 (duplicate_node_data): Likewise.
10360 (class ipa_ref_var_info_summary_t): New class.
10361 (class ipa_ref_opt_summary_t): Likewise.
10362 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
10363 (get_reference_optimization_summary): Use
10364 ipa_ref_opt_sum_summaries.
10365 (set_reference_vars_info): Remove.
10366 (set_reference_optimization_summary): Likewise.
10367 (ipa_init): Create summaries.
10368 (init_function_info): Use function summary.
10369 (ipa_ref_opt_summary_t::duplicate): New function.
10370 (ipa_ref_opt_summary_t::remove): New function.
10371 (get_read_write_all_from_node): Fix GNU coding style.
10372 (propagate): Use function summary.
10373 (write_node_summary_p): Fix GNU coding style.
10374 (stream_out_bitmap): Likewise.
10375 (ipa_reference_read_optimization_summary): Use function summary.
10376 (ipa_reference_c_finalize): Do not release hooks.
10378 2018-06-08 Martin Liska <mliska@suse.cz>
10380 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
10381 (analyze_function_body): Extract multiple calls of get_create.
10382 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
10383 * ipa-inline.c (recursive_inlining): Use ::get method.
10384 * ipa-inline.h (estimate_edge_growth): Likewise.
10386 2018-06-08 Martin Liska <mliska@suse.cz>
10388 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
10390 (hsa_function_summary::hsa_function_summary): Use the new enum
10392 (hsa_gpu_implementation_p): Use hsa_summaries::get.
10393 * hsa-gen.c (hsa_get_host_function): Likewise.
10394 (get_brig_function_name): Likewise.
10395 * ipa-hsa.c (process_hsa_functions): Likewise.
10396 (ipa_hsa_write_summary): Likewise.
10397 * symbol-summary.h (symtab_duplication): Use ::get function/
10398 (get): New function.
10400 2018-06-08 Martin Liska <mliska@suse.cz>
10402 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
10404 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
10405 (hsa_register_kernel): Likewise.
10406 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
10407 * hsa-gen.c (hsa_get_host_function): Likewise.
10408 (get_brig_function_name): Likewise.
10409 (generate_hsa): Likewise.
10410 (pass_gen_hsail::execute): Likewise.
10411 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
10412 (devirtualization_time_bonus): Likewise.
10413 (ipcp_propagate_stage): Likewise.
10414 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10415 (edge_set_predicate): Likewise.
10416 (evaluate_conditions_for_known_args): Likewise.
10417 (evaluate_properties_for_edge): Likewise.
10418 (ipa_fn_summary::reset): Likewise.
10419 (ipa_fn_summary_t::duplicate): Likewise.
10420 (dump_ipa_call_summary): Likewise.
10421 (ipa_dump_fn_summary): Likewise.
10422 (analyze_function_body): Likewise.
10423 (compute_fn_summary): Likewise.
10424 (estimate_edge_devirt_benefit): Likewise.
10425 (estimate_edge_size_and_time): Likewise.
10426 (estimate_calls_size_and_time): Likewise.
10427 (estimate_node_size_and_time): Likewise.
10428 (inline_update_callee_summaries): Likewise.
10429 (remap_edge_change_prob): Likewise.
10430 (remap_edge_summaries): Likewise.
10431 (ipa_merge_fn_summary_after_inlining): Likewise.
10432 (ipa_update_overall_fn_summary): Likewise.
10433 (read_ipa_call_summary): Likewise.
10434 (inline_read_section): Likewise.
10435 (write_ipa_call_summary): Likewise.
10436 (ipa_fn_summary_write): Likewise.
10437 (ipa_free_fn_summary): Likewise.
10438 * ipa-hsa.c (process_hsa_functions): Likewise.
10439 (ipa_hsa_write_summary): Likewise.
10440 (ipa_hsa_read_section): Likewise.
10441 * ipa-icf.c (sem_function::merge): Likewise.
10442 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
10443 (do_estimate_edge_time): Likewise.
10444 (estimate_size_after_inlining): Likewise.
10445 (estimate_growth): Likewise.
10446 (growth_likely_positive): Likewise.
10447 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
10448 (inline_call): Likewise.
10449 * ipa-inline.c (caller_growth_limits): Likewise.
10450 (can_inline_edge_p): Likewise.
10451 (can_inline_edge_by_limits_p): Likewise.
10452 (compute_uninlined_call_time): Likewise.
10453 (compute_inlined_call_time): Likewise.
10454 (want_inline_small_function_p): Likewise.
10455 (edge_badness): Likewise.
10456 (update_caller_keys): Likewise.
10457 (update_callee_keys): Likewise.
10458 (recursive_inlining): Likewise.
10459 (inline_small_functions): Likewise.
10460 (inline_to_all_callers_1): Likewise.
10461 (dump_overall_stats): Likewise.
10462 (early_inline_small_functions): Likewise.
10463 (early_inliner): Likewise.
10464 * ipa-inline.h (estimate_edge_growth): Likewise.
10465 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
10466 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10467 * ipa-prop.h (IPA_NODE_REF): Likewise.
10468 (IPA_EDGE_REF): Likewise.
10469 * ipa-pure-const.c (malloc_candidate_p): Likewise.
10470 (propagate_malloc): Likewise.
10471 * ipa-split.c (execute_split_functions): Likewise.
10472 * symbol-summary.h: Rename get to get_create.
10474 (get_create): Likewise.
10475 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
10477 2018-06-08 Martin Liska <mliska@suse.cz>
10479 * symbol-summary.h (release): Move definition out of class
10481 (symtab_removal): Likewise.
10482 (symtab_duplication): Likewise.
10484 2018-06-08 Martin Liska <mliska@suse.cz>
10486 * symbol-summary.h (function_summary): Move constructor
10487 implementation out of class declaration.
10488 (release): Likewise.
10489 (symtab_insertion): Likewise.
10490 (symtab_removal): Likewise.
10491 (symtab_duplication): Likewise.
10494 2018-06-08 Martin Liska <mliska@suse.cz>
10496 * Makefile.in: Remove support for MPX (macros, related functions,
10497 fields in cgraph_node, ...).
10498 * builtin-types.def (BT_BND): Likewise.
10499 (BT_FN_BND_CONST_PTR): Likewise.
10500 (BT_FN_CONST_PTR_BND): Likewise.
10501 (BT_FN_VOID_PTR_BND): Likewise.
10502 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
10503 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
10504 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
10505 (expand_builtin_mempcpy_with_bounds): Likewise.
10506 (expand_builtin_memset_with_bounds): Likewise.
10507 (expand_builtin_memset_args): Likewise.
10508 (std_expand_builtin_va_start): Likewise.
10509 (expand_builtin): Likewise.
10510 (expand_builtin_with_bounds): Likewise.
10511 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
10512 (DEF_LIB_BUILTIN_CHKP): Likewise.
10513 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
10514 (DEF_CHKP_BUILTIN): Likewise.
10515 (BUILT_IN_MEMCPY): Likewise.
10516 (BUILT_IN_MEMMOVE): Likewise.
10517 (BUILT_IN_MEMPCPY): Likewise.
10518 (BUILT_IN_MEMSET): Likewise.
10519 (BUILT_IN_STPCPY): Likewise.
10520 (BUILT_IN_STRCAT): Likewise.
10521 (BUILT_IN_STRCHR): Likewise.
10522 (BUILT_IN_STRCPY): Likewise.
10523 (BUILT_IN_STRLEN): Likewise.
10524 (BUILT_IN_MEMCPY_CHK): Likewise.
10525 (BUILT_IN_MEMMOVE_CHK): Likewise.
10526 (BUILT_IN_MEMPCPY_CHK): Likewise.
10527 (BUILT_IN_MEMSET_CHK): Likewise.
10528 (BUILT_IN_STPCPY_CHK): Likewise.
10529 (BUILT_IN_STRCAT_CHK): Likewise.
10530 (BUILT_IN_STRCPY_CHK): Likewise.
10531 * calls.c (store_bounds): Likewise.
10532 (emit_call_1): Likewise.
10533 (special_function_p): Likewise.
10534 (maybe_warn_nonstring_arg): Likewise.
10535 (initialize_argument_information): Likewise.
10536 (finalize_must_preallocate): Likewise.
10537 (compute_argument_addresses): Likewise.
10538 (expand_call): Likewise.
10539 * cfgexpand.c (expand_call_stmt): Likewise.
10540 (expand_return): Likewise.
10541 (expand_gimple_stmt_1): Likewise.
10542 (pass_expand::execute): Likewise.
10543 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
10544 (cgraph_node::remove): Likewise.
10545 (cgraph_node::dump): Likewise.
10546 (cgraph_node::verify_node): Likewise.
10547 * cgraph.h (chkp_function_instrumented_p): Likewise.
10548 (symtab_node::get_alias_target): Likewise.
10549 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
10550 (cgraph_local_p): Likewise.
10551 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
10552 (cgraph_edge::rebuild_references): Likewise.
10553 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
10554 (walk_polymorphic_call_targets): Likewise.
10555 (cgraph_node::expand_thunk): Likewise.
10556 (symbol_table::output_weakrefs): Likewise.
10557 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
10558 (ix86_handle_option): Likewise.
10559 * config/i386/constraints.md: Likewise.
10560 * config/i386/i386-builtin-types.def (BND): Likewise.
10564 * config/i386/i386-builtin.def (BDESC_END): Likewise.
10565 (BDESC_FIRST): Likewise.
10567 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
10568 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
10569 * config/i386/i386.c (enum reg_class): Likewise.
10570 (ix86_target_string): Likewise.
10571 (ix86_option_override_internal): Likewise.
10572 (ix86_conditional_register_usage): Likewise.
10573 (ix86_valid_target_attribute_inner_p): Likewise.
10574 (ix86_set_indirect_branch_type): Likewise.
10575 (ix86_set_current_function): Likewise.
10576 (ix86_function_arg_regno_p): Likewise.
10577 (init_cumulative_args): Likewise.
10578 (ix86_function_arg_advance): Likewise.
10579 (ix86_function_arg): Likewise.
10580 (ix86_pass_by_reference): Likewise.
10581 (ix86_function_value_regno_p): Likewise.
10582 (ix86_function_value_1): Likewise.
10583 (ix86_function_value_bounds): Likewise.
10584 (ix86_return_in_memory): Likewise.
10585 (ix86_setup_incoming_vararg_bounds): Likewise.
10586 (ix86_va_start): Likewise.
10587 (indirect_thunk_need_prefix): Likewise.
10588 (print_reg): Likewise.
10589 (ix86_print_operand): Likewise.
10590 (ix86_expand_call): Likewise.
10591 (ix86_output_function_return): Likewise.
10592 (reg_encoded_number): Likewise.
10593 (BDESC_VERIFYS): Likewise.
10594 (ix86_init_mpx_builtins): Likewise.
10595 (ix86_init_builtins): Likewise.
10596 (ix86_emit_cmove): Likewise.
10597 (ix86_emit_move_max): Likewise.
10598 (ix86_expand_builtin): Likewise.
10599 (ix86_builtin_mpx_function): Likewise.
10600 (ix86_get_arg_address_for_bt): Likewise.
10601 (ix86_load_bounds): Likewise.
10602 (ix86_store_bounds): Likewise.
10603 (ix86_load_returned_bounds): Likewise.
10604 (ix86_store_returned_bounds): Likewise.
10605 (ix86_class_likely_spilled_p): Likewise.
10606 (ix86_hard_regno_mode_ok): Likewise.
10607 (x86_order_regs_for_local_alloc): Likewise.
10608 (ix86_mitigate_rop): Likewise.
10609 (ix86_bnd_prefixed_insn_p): Likewise.
10610 (ix86_mpx_bound_mode): Likewise.
10611 (ix86_make_bounds_constant): Likewise.
10612 (ix86_initialize_bounds): Likewise.
10613 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
10614 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
10615 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
10616 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
10617 (TARGET_CHKP_BOUND_MODE): Likewise.
10618 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
10619 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
10620 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
10621 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
10622 * config/i386/i386.h (TARGET_MPX): Likewise.
10623 (TARGET_MPX_P): Likewise.
10624 (VALID_BND_REG_MODE): Likewise.
10625 (FIRST_BND_REG): Likewise.
10626 (LAST_BND_REG): Likewise.
10627 (enum reg_class): Likewise.
10628 (BND_REG_P): Likewise.
10629 (BND_REGNO_P): Likewise.
10630 (BNDmode): Likewise.
10631 (ADJUST_INSN_LENGTH): Likewise.
10632 * config/i386/i386.md: Likewise.
10633 * config/i386/i386.opt: Likewise.
10634 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
10635 (defined): Likewise.
10636 (LINK_MPX): Likewise.
10637 (MPX_SPEC): Likewise.
10638 (LIBMPX_SPEC): Likewise.
10639 (LIBMPXWRAPPERS_SPEC): Likewise.
10640 (CHKP_SPEC): Likewise.
10641 * config/i386/predicates.md: Likewise.
10642 * dbxout.c (dbxout_type): Likewise.
10643 * doc/extend.texi: Likewise.
10644 * doc/invoke.texi: Likewise.
10645 * doc/md.texi: Likewise.
10646 * doc/tm.texi: Likewise.
10647 * doc/tm.texi.in: Likewise.
10648 * dwarf2out.c (is_base_type): Likewise.
10649 (gen_formal_types_die): Likewise.
10650 (gen_subprogram_die): Likewise.
10651 (gen_type_die_with_usage): Likewise.
10652 (gen_decl_die): Likewise.
10653 (dwarf2out_late_global_decl): Likewise.
10654 * expr.c (expand_assignment): Likewise.
10655 (emit_storent_insn): Likewise.
10656 (store_expr_with_bounds): Likewise.
10657 (store_expr): Likewise.
10658 (expand_expr_real_1): Likewise.
10659 * expr.h (store_expr_with_bounds): Likewise.
10660 * function.c (use_register_for_decl): Likewise.
10661 (struct bounds_parm_data): Likewise.
10662 (assign_parms_augmented_arg_list): Likewise.
10663 (assign_parm_find_entry_rtl): Likewise.
10664 (assign_parm_is_stack_parm): Likewise.
10665 (assign_parm_load_bounds): Likewise.
10666 (assign_bounds): Likewise.
10667 (assign_parms): Likewise.
10668 (expand_function_start): Likewise.
10669 * gcc.c (CHKP_SPEC): Likewise.
10670 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
10671 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
10672 (wrestrict_dom_walker::check_call): Likewise.
10673 * gimple.c (gimple_build_call_from_tree): Likewise.
10674 * gimple.h (enum gf_mask): Likewise.
10675 (gimple_call_with_bounds_p): Likewise.
10676 (gimple_call_set_with_bounds): Likewise.
10677 * gimplify.c (gimplify_init_constructor): Likewise.
10678 * ipa-cp.c (initialize_node_lattices): Likewise.
10679 (propagate_constants_across_call): Likewise.
10680 (find_more_scalar_values_for_callers_subset): Likewise.
10681 * ipa-hsa.c (process_hsa_functions): Likewise.
10682 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
10683 * ipa-icf.c (sem_function::merge): Likewise.
10684 * ipa-inline.c (early_inliner): Likewise.
10685 * ipa-pure-const.c (warn_function_noreturn): Likewise.
10686 (warn_function_cold): Likewise.
10687 (propagate_pure_const): Likewise.
10688 * ipa-ref.h (enum GTY): Likewise.
10689 * ipa-split.c (find_retbnd): Likewise.
10690 (consider_split): Likewise.
10691 (split_function): Likewise.
10692 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
10693 * ipa.c (walk_polymorphic_call_targets): Likewise.
10694 (symbol_table::remove_unreachable_nodes): Likewise.
10695 (process_references): Likewise.
10696 (cgraph_build_static_cdtor_1): Likewise.
10697 * lto-cgraph.c (lto_output_node): Likewise.
10698 (output_refs): Likewise.
10699 (compute_ltrans_boundary): Likewise.
10700 (input_overwrite_node): Likewise.
10701 (input_node): Likewise.
10702 (input_cgraph_1): Likewise.
10703 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
10704 * passes.c (pass_manager::execute_early_local_passes): Likewise.
10705 (class pass_chkp_instrumentation_passes): Likewise.
10706 (make_pass_chkp_instrumentation_passes): Likewise.
10707 * passes.def: Likewise.
10708 * rtl.h (struct GTY): Likewise.
10709 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
10710 * stor-layout.c (layout_type): Likewise.
10711 * symtab.c: Likewise.
10712 * target.def: Likewise.
10713 * targhooks.c (default_chkp_bound_type): Likewise.
10714 (default_chkp_bound_mode): Likewise.
10715 (default_builtin_chkp_function): Likewise.
10716 (default_chkp_function_value_bounds): Likewise.
10717 (default_chkp_make_bounds_constant): Likewise.
10718 (default_chkp_initialize_bounds): Likewise.
10719 * targhooks.h (default_chkp_bound_type): Likewise.
10720 (default_chkp_bound_mode): Likewise.
10721 (default_builtin_chkp_function): Likewise.
10722 (default_chkp_function_value_bounds): Likewise.
10723 (default_chkp_make_bounds_constant): Likewise.
10724 (default_chkp_initialize_bounds): Likewise.
10725 * toplev.c (compile_file): Likewise.
10726 (process_options): Likewise.
10727 * tree-core.h (DEF_BUILTIN): Likewise.
10728 (DEF_BUILTIN_CHKP): Likewise.
10729 * tree-inline.c (declare_return_variable): Likewise.
10730 (remap_gimple_stmt): Likewise.
10731 (copy_bb): Likewise.
10732 (initialize_inlined_parameters): Likewise.
10733 (expand_call_inline): Likewise.
10734 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
10735 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
10736 (make_pass_ipa_chkp_produce_thunks): Likewise.
10737 (make_pass_chkp): Likewise.
10738 (make_pass_chkp_opt): Likewise.
10739 (make_pass_chkp_instrumentation_passes): Likewise.
10740 * tree-pretty-print.c (dump_generic_node): Likewise.
10741 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
10742 * tree-ssa-dce.c (propagate_necessity): Likewise.
10743 (eliminate_unnecessary_stmts): Likewise.
10744 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
10745 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
10746 * tree-ssa-sccvn.h: Likewise.
10747 * tree-ssa-strlen.c (get_string_length): Likewise.
10748 (valid_builtin_call): Likewise.
10749 (adjust_last_stmt): Likewise.
10750 (handle_builtin_strchr): Likewise.
10751 (handle_builtin_strcpy): Likewise.
10752 (handle_builtin_stxncpy): Likewise.
10753 (handle_builtin_memcpy): Likewise.
10754 (handle_builtin_strcat): Likewise.
10755 (strlen_check_and_optimize_stmt): Likewise.
10756 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
10757 * tree-streamer-in.c: Likewise.
10758 * tree-streamer.c (record_common_node): Likewise.
10759 * tree.c (tree_code_size): Likewise.
10760 (wide_int_to_tree_1): Likewise.
10761 (type_contains_placeholder_1): Likewise.
10762 (build_common_tree_nodes): Likewise.
10763 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
10764 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
10765 (POINTER_BOUNDS_P): Likewise.
10766 (BOUNDED_TYPE_P): Likewise.
10767 (BOUNDED_P): Likewise.
10768 (CALL_WITH_BOUNDS_P): Likewise.
10769 (pointer_bounds_type_node): Likewise.
10770 * value-prof.c (gimple_ic): Likewise.
10771 * var-tracking.c (vt_add_function_parameters): Likewise.
10772 * varasm.c (make_decl_rtl): Likewise.
10773 (assemble_start_function): Likewise.
10774 (output_constant): Likewise.
10775 (maybe_assemble_visibility): Likewise.
10776 * varpool.c (ctor_for_folding): Likewise.
10777 * chkp-builtins.def: Remove.
10778 * ipa-chkp.c: Remove.
10779 * ipa-chkp.h: Remove.
10780 * rtl-chkp.c: Remove.
10781 * rtl-chkp.h: Remove.
10782 * tree-chkp-opt.c: Remove.
10783 * tree-chkp.c: Remove.
10784 * tree-chkp.h: Remove.
10786 2018-06-07 Carl Love <cel@us.ibm.com>
10788 * config/rs6000/vsx.md (vextract_fp_from_shorth,
10789 vextract_fp_from_shortl): Add BE support.
10791 2018-06-07 Paul Koning <ni1d@arrl.net>
10793 * compare-elim.c (try_merge_compare): Don't merge compare if
10794 address contains a side effect.
10795 (try_eliminate_compare): Likewise.
10797 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
10799 * config.gcc: Support "tremont".
10800 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
10801 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10803 * config/i386/i386.c (m_TREMONT): Define.
10804 (processor_target_table): Add "tremont".
10805 (PTA_TREMONT): Define.
10806 (ix86_lea_outperforms): Add TARGET_TREMONT.
10807 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
10808 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
10809 and M_INTEL_GOLDMONT_PLUS.
10810 (fold_builtin_cpu): Add "tremont".
10811 (ix86_add_stmt_cost): Add TARGET_TREMONT.
10812 (ix86_option_override_internal): Add "tremont".
10813 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
10814 (processor_type): Add PROCESSOR_TREMONT.
10815 * config/i386/x86-tune.def: Add m_TREMONT.
10816 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
10818 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10820 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
10821 symbol defined for msp430i* devices to be lower case.
10823 2018-06-07 Richard Biener <rguenther@suse.de>
10825 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
10826 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
10827 Properly wrap signed arithmetic if overflow wraps.
10829 2018-06-07 Jakub Jelinek <jakub@redhat.com>
10831 PR tree-optimization/69615
10832 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10833 of a cast from a same precision integral SSA_NAME in a bb dominated
10834 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
10835 cast to utype if rhs2 has already a compatible type.
10837 2018-06-07 Richard Biener <rguenther@suse.de>
10839 PR tree-optimization/85935
10840 * graphite-scop-detection.c (find_params_in_bb): Analyze
10841 condition operands with respect to the correct loop. Assert
10842 the analysis doesn't fail.
10844 2018-06-04 Carl Love <cel@us.ibm.com>
10846 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10847 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
10848 as it is slightly cheaper.
10849 (first_match_or_eos_index_<mode>):
10850 Calculate index using natural element order.
10851 (first_match_index_<mode>):
10852 Calculate index using natural element order.
10853 (first_match_or_eos_index_<mode>):
10854 Calculate index using natural order.
10855 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10856 for BE and LE modes.
10857 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10858 P9V_BUILTIN_VCLZLSBB_V16QI.
10859 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10862 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10864 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10865 indentation and line wrap for many prototypes. Add missing
10866 @smallexample directives around block of prototypes for vec_xl and
10869 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
10871 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10872 track if we pass or return IEEE 128-bit floating point.
10873 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10874 C++ mangling that is compatible with GCC 8.1.
10875 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10876 (init_cumulative_args): Note if we pass or return IEEE 128-bit
10877 floating point types.
10878 (rs6000_function_arg_advance_1): Likewise.
10879 (rs6000_mangle_type): Optionally generate mangled names that match
10880 what GCC 8.1 generated for IEEE 128-bit floating point types.
10881 (rs6000_globalize_decl_name): If we have an external function that
10882 passes or returns IEEE 128-bit types, generate a weak reference
10883 from the mangled name used in GCC 8.1 to the current mangled
10885 (rs6000_init_builtins): Make __ibm128 use the long double type if
10886 long double is IBM extended double. Make __float128 use the long
10887 double type if long double is IEEE 128-bit.
10890 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10891 macro for __ibm128 built-in functions.
10892 (PACK_IF): Add __ibm128 pack/unpack functions.
10893 (UNPACK_IF): Likewise.
10894 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10895 enable long double built-in functions if long double is IEEE
10896 128-bit floating point.
10897 (rs6000_invalid_builtin): Update long double built-in function
10899 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10900 functions, adjust the built-in function to use the long double
10901 built-in function if __ibm128 and long double are the same type.
10902 * doc/extend.texi (PowerPC builtins): Update documention for
10903 __builtin_{,un}pack_longdouble. Add documentation for
10904 __builtin_{,un}pack_ibm128.
10906 2018-06-06 Jim Wilson <jimw@sifive.com>
10908 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10909 (struct machine_function): New field interrupt_mode.
10910 (riscv_handle_type_attribute): New function. Add forward declaration.
10911 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10912 (riscv_expand_epilogue): Check interrupt_mode field.
10913 (riscv_set_current_function): Check interrupt attribute args and
10914 set interrupt_mode field.
10915 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10916 (riscv_sret, riscv_uret): New.
10917 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10918 new arguments to interrupt attribute.
10920 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
10923 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10924 Don't handle -mcpu=power8 if -mpower9-vector is also used.
10926 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10928 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10929 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10930 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10931 several redundant entries.
10933 2018-06-06 David Malcolm <dmalcolm@redhat.com>
10935 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10936 type from "rtx" to "rtx_insn *".
10937 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10938 for local "call_insn", removing cast.
10939 (ix86_expand_call): Likewise, introducing a "call_insn" local.
10941 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
10943 PR tree-optimization/86066
10944 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10945 for BIT_INSERT_EXPR stores.
10947 2018-06-06 Richard Biener <rguenther@suse.de>
10949 PR tree-optimization/86062
10950 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10951 component refs ontop
10952 of to be offsetted base.
10954 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10956 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10957 to be static and remove check on interrupt attribute name.
10959 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
10961 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10962 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10964 2018-06-05 Steve Ellcey <sellcey@cavium.com>
10967 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10969 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10970 Remove second argument, change how error is called.
10971 (aarch64_layout_arg): Remove second argument from
10972 aarch64_err_no_fpadvsimd call.
10973 (aarch64_init_cumulative_args): Ditto.
10974 (aarch64_gimplify_va_arg_expr): Ditto.
10975 * config/aarch64/aarch64.md (mov<mode>): Ditto.
10977 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
10979 * config/i386/i386.md (simple_return_indirect_internal): New expander.
10980 (*simple_return_indirect_internal<mode>): Rename from
10981 simple_return_indirect_internal. Use W mode iterator.
10982 (rstorssp): New expander.
10983 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
10984 (clrssbsy): New expander.
10985 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
10987 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
10989 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10991 (cmse_check_pointed_object): Likewise.
10993 2018-06-05 Martin Liska <mliska@suse.cz>
10995 PR gcov-profile/47618
10996 * doc/invoke.texi: Document how -fprofile-dir format
10999 2018-06-05 Richard Biener <rguenther@suse.de>
11001 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
11002 removal pretend DOM info isn't available so we do not update
11003 it and only remove edges, not dominated blocks. Actually free
11004 DOM info in case we removed something. Remove unreachable blocks.
11005 (mfb_keep_latches): Work with either DOM info or marked backedges.
11006 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
11007 first. Mark backedges if DOM info isn't available.
11008 (Re-)compute DOM info after cleanup_control_flow_pre.
11010 2018-06-05 Richard Biener <rguenther@suse.de>
11012 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
11013 (locus_discrim_hasher::hash): Adjust.
11014 (locus_discrim_hasher::equal): Likewise.
11015 (next_discriminator_for_locus): Work on line directly.
11016 (same_line_p): Pass in expanded locus1 as well.
11017 (assign_discriminators): Avoid redundant location expansions.
11019 2018-06-05 Richard Biener <rguenther@suse.de>
11021 PR tree-optimization/86046
11022 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
11023 if required after clearing TREE_ADDRESSABLE.
11025 2018-06-05 Richard Biener <rguenther@suse.de>
11027 PR tree-optimization/86047
11028 * tree-ssa-loop.c (for_each_index): Glob handling of all
11029 decls and constants and really handle all of them.
11031 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11034 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
11035 qualifier_void_pointer and qualifier_const_void_pointer.
11036 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
11037 (arm_init_builtins): Handle the above.
11038 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
11039 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
11040 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
11043 2018-06-05 Martin Liska <mliska@suse.cz>
11045 * auto-profile.c (read_autofdo_file): Do not use
11046 gcov_ctr_summary struct.
11047 (afdo_callsite_hot_enough_for_early_inline): Likewise.
11048 * coverage.c (struct counts_entry): Likewise.
11049 (read_counts_file): Read just single summary entry.
11050 (get_coverage_counts): Use gcov_summary struct.
11051 * coverage.h (get_coverage_counts): Likewise.
11052 * gcov-dump.c (dump_working_sets): Likewise.
11053 (tag_summary): Dump just single summary.
11054 * gcov-io.c (gcov_write_summary): Write just histogram
11056 (gcov_read_summary): Read just single summary.
11057 (compute_working_sets): Use gcov_summary struct.
11058 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
11059 of GCOV_COUNTERS_SUMMABLE.
11060 (GCOV_COUNTERS_SUMMABLE): Remove.
11061 (GCOV_FIRST_VALUE_COUNTER): Replace with
11062 GCOV_COUNTER_V_INTERVAL.
11063 (struct gcov_ctr_summary): Remove.
11064 (struct gcov_summary): Directly use fields of former
11066 (compute_working_sets): Use gcov_summary struct.
11067 * gcov.c (read_count_file): Do not use ctrs fields.
11068 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
11070 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
11072 * profile.c: Likewise.
11073 * profile.h: Likewise.
11075 2018-06-05 Martin Liska <mliska@suse.cz>
11077 PR gcov-profile/84846
11078 * gcov.c (output_lines): Print working directory only
11079 in intermediate format.
11081 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
11083 * config/s390/s390-builtin-types.def: Add void function type.
11084 * config/s390/s390-builtins.def: Use the function type for the
11087 2018-06-04 Jim Wilson <jimw@sifive.com>
11089 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
11091 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
11092 and maybe_eh_return. Change regno to unsigned int. Use new args to
11093 handle EH_RETURN_DATA_REGNO registers properly.
11094 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
11095 (riscv_expand_epilogue): Update comment. Change argument name and
11096 type. Update code to use new name and type. Pass new args to
11097 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
11099 * config/riscv/riscv.md (NORMAL_RETURN): New.
11100 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
11101 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
11102 (eh_return): Call gen_eh_return_internal and emit barrier.
11103 (eh_return_internal): Call riscv_expand_epilogue.
11105 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
11107 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
11108 bit_insertion field and declare can_be_merged_into method.
11109 (merged_store_group::can_be_merged_into): New method.
11110 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
11111 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
11112 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
11114 2018-06-04 Richard Biener <rguenther@suse.de>
11116 PR tree-optimization/85955
11117 * builtins.c (fold_builtin_sincos): Convert pointers to
11118 destination to appropriate type before dereferencing.
11120 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
11122 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
11124 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
11126 * expr.c (expand_expr_real_1): Force the operand into memory if
11127 its TYPE_MODE is BLKmode and if there is no integer mode for
11128 the number of bits being extracted.
11130 2018-06-04 Jakub Jelinek <jakub@redhat.com>
11134 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11135 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
11137 2018-06-04 Richard Biener <rguenther@suse.de>
11139 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
11140 (cleanup_tree_cfg_noloop): ... single caller. Do
11141 start_recording_case_labels later.
11143 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
11145 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
11146 to _IMMINTRIN_H_INCLUDED.
11147 * config/i386/pconfigintrin.h: Ditto.
11148 * config/i386/waitpkgintrin.h: Ditto.
11149 * config/i386/immintrin.h: Add includes for sgxintrin.h,
11150 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
11151 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
11152 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
11153 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
11154 waitpkgintrin.h and cldemoteintrin.h.
11156 2018-06-04 Richard Biener <rguenther@suse.de>
11158 PR tree-optimization/86038
11159 * tracer.c (find_best_successor): Check probability for
11160 being initialized, bail out if not.
11162 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
11165 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
11166 of bits to ignore when comparing architectures.
11168 2018-06-04 Jakub Jelinek <jakub@redhat.com>
11170 PR tree-optimization/69615
11171 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
11172 maximum or minimum of the type, try to merge it also as if
11173 range1 is + [-, x - 1] or + [x + 1, -].
11176 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
11178 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
11180 PR tree-optimization/86034
11181 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
11182 the unsigned bitfield type in a bit insertion sequence if it does not
11183 have a larger precision than the bitfield size.
11184 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
11186 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
11188 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
11190 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
11192 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
11193 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
11194 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
11195 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
11197 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
11199 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
11200 Disable -fdelete-null-pointer-checks for ELF toolchain.
11202 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
11203 Kito Cheng <kito.cheng@gmail.com>
11205 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
11206 (nds32le-*-*, nds32be-*-*): Integrate checking process.
11207 (nds32*-*-*): Add glibc and uclibc conditions.
11208 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
11209 (TARGET_EXCEPT_UNWIND_INFO): Define.
11210 * config/nds32/elf.h: New file.
11211 * config/nds32/linux.h: New file.
11212 * config/nds32/nds32-elf.opt: New file.
11213 * config/nds32/nds32-linux.opt: New file.
11214 * config/nds32/nds32-fp-as-gp.c
11215 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
11216 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
11218 (nds32_asm_file_end): Ditto.
11219 (nds32_print_operand): Ditto.
11220 (nds32_insert_attributes): Ditto.
11221 (nds32_init_libfuncs): New function.
11222 (TARGET_HAVE_TLS): Define.
11223 (TARGET_INIT_LIBFUNCS): Define.
11224 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
11226 (TARGET_ELF): Apply different mcmodel setting.
11227 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
11228 been migrated into elf.h and linux.h files.
11229 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
11230 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
11231 (mcmodel): The content has been migrated into nds32-elf.opt and
11232 nds32-linux.opt files.
11233 * config/nds32/t-elf: New file.
11234 * config/nds32/t-linux: New file.
11236 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
11237 Shiva Chen <shiva0217@gmail.com>
11239 * config/nds32/constants.md (unspec_volatile_element): Add
11240 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
11241 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
11243 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
11244 (make_pass_nds32_fp_as_gp): Declare.
11245 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
11247 (nds32_asm_function_end_prologue): Remove unused asm output.
11248 (nds32_asm_function_begin_epilogue): Remove unused asm output.
11249 (nds32_asm_file_start): Output necessary fp_as_gp information.
11250 (nds32_option_override): Adjust register usage.
11251 (nds32_expand_prologue): Consider fp_as_gp situation.
11252 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
11253 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
11256 (simple_return): Ditto.
11257 (omit_fp_begin): Output special directive for fp_as_gp.
11258 (omit_fp_end): Output special directive for fp_as_gp.
11259 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
11260 mforbid-fp-as-gp): New options.
11262 2018-06-01 Mark Wielaard <mark@klomp.org>
11264 * dwarf2out.c (dwarf2out_finish): Remove generation of
11265 DW_AT_loclists_base.
11267 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
11269 * gimple-ssa-store-merging.c: Include gimple-fold.h.
11270 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
11271 (struct merged_store_group): Add bit_insertion field.
11272 (dump_char_array): Use standard hexadecimal format.
11273 (merged_store_group::merged_store_group): Set bit_insertion to false.
11274 (merged_store_group::apply_stores): Use optimal buffer size. Deal
11275 with BIT_INSERT_EXPR stores. Move up code updating the mask and
11276 also print the mask in the dump file.
11277 (pass_store_merging::gate): Minor tweak.
11278 (imm_store_chain_info::coalesce_immediate): Fix wrong association
11279 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
11280 stores with INTEGER_CST stores.
11281 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
11282 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
11283 and use it throughout. Generate bit insertion sequences if need be.
11284 (pass_store_merging::process_store): Remove redundant condition.
11285 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
11287 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
11289 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
11290 the 128-bit floating point types. Fix function comment.
11292 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11294 * config/aarch64/aarch64-simd.md
11295 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
11297 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
11300 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
11302 PR tree-optimization/85989
11303 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
11305 (backprop::intersect_uses): Check it when deciding whether this
11306 is a backedge reference.
11307 (backprop::process_block): Add each phi to m_visited_phis
11308 after visiting it, then clear it at the end.
11310 2018-06-01 Richard Biener <rguenther@suse.de>
11312 * tree-vectorizer.h (vect_dr_stmt): New function.
11313 (vect_get_load_cost): Adjust.
11314 (vect_get_store_cost): Likewise.
11315 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
11316 Use vect_dr_stmt instead of DR_SMTT.
11317 (vect_record_base_alignments): Likewise.
11318 (vect_calculate_target_alignment): Likewise.
11319 (vect_compute_data_ref_alignment): Likewise and make static.
11320 (vect_update_misalignment_for_peel): Likewise.
11321 (vect_verify_datarefs_alignment): Likewise.
11322 (vector_alignment_reachable_p): Likewise.
11323 (vect_get_data_access_cost): Likewise. Pass down
11324 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
11325 (vect_get_peeling_costs_all_drs): Likewise.
11326 (vect_peeling_hash_get_lowest_cost): Likewise.
11327 (vect_enhance_data_refs_alignment): Likewise.
11328 (vect_find_same_alignment_drs): Likewise.
11329 (vect_analyze_data_refs_alignment): Likewise.
11330 (vect_analyze_group_access_1): Likewise.
11331 (vect_analyze_group_access): Likewise.
11332 (vect_analyze_data_ref_access): Likewise.
11333 (vect_analyze_data_ref_accesses): Likewise.
11334 (vect_vfa_segment_size): Likewise.
11335 (vect_small_gap_p): Likewise.
11336 (vectorizable_with_step_bound_p): Likewise.
11337 (vect_prune_runtime_alias_test_list): Likewise.
11338 (vect_analyze_data_refs): Likewise.
11339 (vect_supportable_dr_alignment): Likewise.
11340 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11341 (vect_gen_prolog_loop_niters): Likewise.
11342 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11343 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
11345 (vect_recog_mask_conversion_pattern): Likewise.
11346 (vect_try_gather_scatter_pattern): Likewise.
11347 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
11348 to vect_get_store_cost.
11349 (vect_get_store_cost): Get stmt_info instead of DR.
11350 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
11351 (vect_get_load_cost): Get stmt_info instead of DR.
11353 2018-06-01 Richard Biener <rguenther@suse.de>
11355 PR middle-end/86017
11356 * gimple-fold.c (var_decl_component_p): Also allow offsetted
11357 vars wrapped in MEM_REFs.
11359 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
11361 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11362 Fix subreg tests so that we only return a choice between
11363 GENERAL_REGS and FP_REGS if the original classes included both.
11365 2018-06-01 Richard Biener <rguenther@suse.de>
11368 * tree-ssa-structalias.c (get_function_part_constraint):
11369 Handle NULL fi->decl.
11370 (find_func_aliases_for_call): Properly handle indirect
11371 fi from direct call.
11372 (find_func_clobbers): Likewise.
11373 (ipa_pta_execute): Likewise.
11374 (create_variable_info_for): For functions that are ifunc_resolver
11375 resolve to a varinfo that contains the result of the resolver call.
11376 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
11379 2018-05-31 Michael Collison <michael.collison@arm.com>
11381 * config/aarch64/aarch64.md:
11382 (*fix_to_zero_extenddfdi2): New pattern.
11383 * gcc.target/aarch64/fix_extend1.c: New testcase.
11385 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
11387 PR middle-end/78809
11388 PR middle-end/83026
11389 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
11390 and BUILT_IN_STRNCMP_EQ.
11391 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
11392 BUILT_IN_STRNCMP_EQ.
11393 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
11394 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
11395 (gimple_fold_builtin): Likewise.
11396 * tree-ssa-strlen.c (compute_string_length): New function.
11397 (determine_min_obsize): New function.
11398 (handle_builtin_string_cmp): New function to handle calls to
11399 string compare functions.
11400 (strlen_optimize_stmt): Add handling to builtin string compare
11402 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
11403 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
11404 * tree.c (build_common_builtin_nodes): Add new defines of
11405 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
11407 2018-05-31 Jakub Jelinek <jakub@redhat.com>
11410 * bb-reorder.c (pass_partition_blocks::gate): Return false for
11411 functions with naked attribute.
11413 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
11415 * config/i386/sse.md (avx_vec_concat<mode>):
11416 Substitute concat_tg_mode mode attribute with xtg_mode.
11417 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
11418 (concat_tg_mode): Remove mode attribute.
11420 2018-05-31 Martin Sebor <msebor@redhat.com>
11423 * calls.c (alloc_max_size): Correct a logic error/typo.
11424 Treat excessive arguments as infinite. Warn for invalid arguments.
11425 * doc/invoke.texi (-Walloc-size-larger-than): Update.
11427 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
11430 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
11431 and movx for Haswell.
11433 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
11434 Cesar Philippidis <cesar@codesourcery.com>
11436 PR middle-end/85879
11437 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
11438 when emitting error on private/firstprivate reductions.
11439 * omp-low.c (lower_omp_target): Avoid reference-type processing
11440 on pointers for firstprivate clause.
11442 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
11444 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
11447 * config/aarch64/aarch64-simd.md
11448 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
11449 (aarch64_ld1_x3_<mode>): Likewise
11450 (aarch64_st1x2<VALLDIF:mode>): Likewise
11451 (aarch64_st1_x2_<mode>): Likewise
11452 (aarch64_st1x3<VALLDIF:mode>): Likewise
11453 (aarch64_st1_x3_<mode>): Likewise
11454 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
11455 (vld1_s8_x3): Likewise.
11456 (vld1_u16_x3): Likewise.
11457 (vld1_s16_x3): Likewise.
11458 (vld1_u32_x3): Likewise.
11459 (vld1_s32_x3): Likewise.
11460 (vld1_u64_x3): Likewise.
11461 (vld1_s64_x3): Likewise.
11462 (vld1_f16_x3): Likewise.
11463 (vld1_f32_x3): Likewise.
11464 (vld1_f64_x3): Likewise.
11465 (vld1_p8_x3): Likewise.
11466 (vld1_p16_x3): Likewise.
11467 (vld1_p64_x3): Likewise.
11468 (vld1q_u8_x3): Likewise.
11469 (vld1q_s8_x3): Likewise.
11470 (vld1q_u16_x3): Likewise.
11471 (vld1q_s16_x3): Likewise.
11472 (vld1q_u32_x3): Likewise.
11473 (vld1q_s32_x3): Likewise.
11474 (vld1q_u64_x3): Likewise.
11475 (vld1q_s64_x3): Likewise.
11476 (vld1q_f16_x3): Likewise.
11477 (vld1q_f32_x3): Likewise.
11478 (vld1q_f64_x3): Likewise.
11479 (vld1q_p8_x3): Likewise.
11480 (vld1q_p16_x3): Likewise.
11481 (vld1q_p64_x3): Likewise.
11482 (vst1_s64_x2): Likewise.
11483 (vst1_u64_x2): Likewise.
11484 (vst1_f64_x2): Likewise.
11485 (vst1_s8_x2): Likewise.
11486 (vst1_p8_x2): Likewise.
11487 (vst1_s16_x2): Likewise.
11488 (vst1_p16_x2): Likewise.
11489 (vst1_s32_x2): Likewise.
11490 (vst1_u8_x2): Likewise.
11491 (vst1_u16_x2): Likewise.
11492 (vst1_u32_x2): Likewise.
11493 (vst1_f16_x2): Likewise.
11494 (vst1_f32_x2): Likewise.
11495 (vst1_p64_x2): Likewise.
11496 (vst1q_s8_x2): Likewise.
11497 (vst1q_p8_x2): Likewise.
11498 (vst1q_s16_x2): Likewise.
11499 (vst1q_p16_x2): Likewise.
11500 (vst1q_s32_x2): Likewise.
11501 (vst1q_s64_x2): Likewise.
11502 (vst1q_u8_x2): Likewise.
11503 (vst1q_u16_x2): Likewise.
11504 (vst1q_u32_x2): Likewise.
11505 (vst1q_u64_x2): Likewise.
11506 (vst1q_f16_x2): Likewise.
11507 (vst1q_f32_x2): Likewise.
11508 (vst1q_f64_x2): Likewise.
11509 (vst1q_p64_x2): Likewise.
11510 (vst1_s64_x3): Likewise.
11511 (vst1_u64_x3): Likewise.
11512 (vst1_f64_x3): Likewise.
11513 (vst1_s8_x3): Likewise.
11514 (vst1_p8_x3): Likewise.
11515 (vst1_s16_x3): Likewise.
11516 (vst1_p16_x3): Likewise.
11517 (vst1_s32_x3): Likewise.
11518 (vst1_u8_x3): Likewise.
11519 (vst1_u16_x3): Likewise.
11520 (vst1_u32_x3): Likewise.
11521 (vst1_f16_x3): Likewise.
11522 (vst1_f32_x3): Likewise.
11523 (vst1_p64_x3): Likewise.
11524 (vst1q_s8_x3): Likewise.
11525 (vst1q_p8_x3): Likewise.
11526 (vst1q_s16_x3): Likewise.
11527 (vst1q_p16_x3): Likewise.
11528 (vst1q_s32_x3): Likewise.
11529 (vst1q_s64_x3): Likewise.
11530 (vst1q_u8_x3): Likewise.
11531 (vst1q_u16_x3): Likewise.
11532 (vst1q_u32_x3): Likewise.
11533 (vst1q_u64_x3): Likewise.
11534 (vst1q_f16_x3): Likewise.
11535 (vst1q_f32_x3): Likewise.
11536 (vst1q_f64_x3): Likewise.
11537 (vst1q_p64_x3): Likewise.
11539 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11541 * config/msp430/msp430.c (msp430_output_labelref): Prepend
11542 user_label_prefix to name.
11544 * tree-core.h: Update comment about the format of NAME string
11545 passed to handler in attribute_spec.
11547 * config/msp430/msp430.md: Remove erroneous subreg expression from
11548 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
11549 zero_extend{q,h}isi2.
11551 2018-05-30 Borislav Petkov <bp@suse.de>
11553 * doc/extend.texi: Document some architecture specific
11554 constraints and sort entries.
11556 2018-05-30 Martin Sebor <msebor@redhat.com>
11558 PR middle-end/85369
11559 * builtins.c (expand_builtin_stpcpy_1): New function.
11560 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
11561 only if the former succeeds.
11563 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
11565 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
11568 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11570 * doc/invoke.texi (-flinker-output): Document
11572 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11574 * passes.c (ipa_write_summaries): Only modify statements if body
11576 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
11577 incrementally linking.
11578 (ipa_passes): Likewise.
11579 * lto-cgraph.c (lto_output_node): When incrementally linking do not
11580 pass down resolution info.
11581 * common.opt (flag_incremental_link): Update info.
11582 * gcc.c (plugin specs): Turn flinker-output=* to
11583 -plugin-opt=-linker-output-known
11584 * toplev.c (compile_file): Also cut compilation when doing incremental
11586 * flag-types. (enum lto_partition_model): Add
11587 LTO_LINKER_OUTPUT_NOLTOREL.
11588 (invoke.texi): Add -flinker-output docs.
11589 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
11590 link same way as WPA; do not stream in dead initializers.
11592 * dwarf2out.c (dwarf2out_die_ref_for_decl,
11593 darf2out_register_external_decl): Support incremental link.
11595 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11597 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
11599 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11601 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
11602 it down to simple_object_copy_lto_debug_sections.
11603 (run_gcc): Determine incremental LTO link time and configure
11604 lto1 into non-wpa mode, disable renaming of debug sections.
11606 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
11608 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
11609 descriptions of various incorrectly documented functions.
11611 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
11614 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11615 address check not strict.
11617 2018-05-30 Richard Biener <rguenther@suse.de>
11619 PR tree-optimization/85964
11620 * tracer.c (better_p): Drop initialized count check, we only
11621 call the function with initialized counts now.
11622 (find_best_successor): Do find a best edge if one
11623 has uninitialized count.
11624 (find_best_predecessor): Likewise. Do BB frequency check only
11625 if count is initialized.
11627 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
11629 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
11630 (aarch64_ldrstr_offset_compare): New.
11631 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
11632 load/store orderings.
11633 (aarch64_gen_adjusted_ldpstp): Likewise.
11635 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
11637 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11638 Check for subset of GENERAL_REGS and FP_REGS.
11639 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
11642 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
11644 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
11645 and wi::to_poly_offset. Add the current offset and then check
11646 whether the sum fits, rather than using an unchecked addition of
11647 a checked term. Check for a shwi rather than a uhwi.
11648 * expr.c (get_bit_range): Use tree_to_poly_uint64.
11649 (store_constructor): Use poly_int_tree_p.
11650 (expand_expr_real_1): Likewise.
11651 * function.c (assign_temp): Likewise.
11652 * fold-const.c (const_binop): Use poly_int_tree_p and
11653 wi::to_poly_offset.
11654 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
11656 * ipa-icf-gimple.c (func_checker::compare_operand): Use
11657 to_poly_offset for MEM offsets.
11658 * ipa-icf.c (sem_variable::equals): Likewise.
11659 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
11660 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
11661 wi::to_poly_offset for BIT_FIELD_REF offsets.
11662 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
11663 wi::to_poly_offset.
11664 * var-tracking.c (emit_note_insn_var_location): Use
11665 tree_to_poly_uint64.
11667 2018-05-29 Jim Wilson <jimw@sifive.com>
11669 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
11671 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
11674 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
11675 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
11677 (sse4_1_round<mode>2): Use nonimmediate_operand
11678 for operand 1 predicate.
11680 2018-05-29 Martin Sebor <msebor@redhat.com>
11681 Richard Biener <rguenther@suse.de>
11684 * calls.c (get_size_range): Call determine_value_range instead
11685 of get_value_range..
11686 * tree-vrp.h (determine_value_range): Declared new function.
11687 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
11689 2018-05-29 Richard Biener <rguenther@suse.de>
11691 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
11692 sure to use non-pattern stmts for get_earlier_stmt arguments.
11693 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
11694 called on pattern stmts.
11695 (get_later_stmt): Likewise.
11697 2018-05-29 Martin Liska <mliska@suse.cz>
11699 PR gcov-profile/85759
11700 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
11703 2018-05-29 Jakub Jelinek <jakub@redhat.com>
11705 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
11707 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
11711 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11712 VEC_PACK_FLOAT_EXPR): New tree codes.
11713 * tree-pretty-print.c (op_code_prio): Handle
11714 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11715 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11716 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11717 * tree-inline.c (estimate_operator_cost): Likewise.
11718 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
11719 * fold-const.c (const_binop): Likewise.
11720 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
11721 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11722 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11723 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
11724 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11725 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11726 * expr.c (expand_expr_real_2): Likewise.
11727 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
11728 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
11729 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
11731 * optabs.c (expand_widen_pattern_expr): For
11732 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
11733 sign from result type rather than operand's type.
11734 (expand_binop_directly): For vec_packu_float_optab and
11735 vec_packs_float_optab allow result type to be different from operand's
11737 * optabs-tree.c (optab_for_tree_code): Handle
11738 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11739 VEC_PACK_FLOAT_EXPR. Formatting fixes.
11740 * tree-vect-generic.c (expand_vector_operations_1): Handle
11741 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11742 VEC_PACK_FLOAT_EXPR.
11743 * tree-vect-stmts.c (supportable_widening_operation): Handle
11745 (supportable_narrowing_operation): Handle FLOAT_EXPR.
11746 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
11747 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
11748 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
11749 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
11751 (vec_pack<floatprefix>_float_<mode>): New expander.
11752 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
11754 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
11755 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
11756 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
11757 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
11758 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
11760 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
11761 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
11762 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11763 VEC_PACK_FLOAT_EXPR): Document.
11765 2018-05-29 Richard Biener <rguenther@suse.de>
11767 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
11769 (stmt_vec_info_vec): Make pointer.
11770 (init_stmt_vec_info_vec): Remove.
11771 (free_stmt_vec_info_vec): Likewise.
11772 (set_stmt_vec_info_vec): New function.
11773 (free_stmt_vec_infos): Likewise.
11774 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
11775 (set_vinfo_for_stmt): Likewise.
11776 (get_earlier_stmt): Likewise.
11777 (get_later_stmt): Likewise.
11778 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
11779 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
11780 (vec_info::~vec_info): Free stmt_vec_infos.
11781 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
11782 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
11783 (pass_slp_vectorize::execute): Likewise.
11784 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
11785 (free_stmt_vec_info_vec): Likewise.
11786 (set_stmt_vec_info_vec): New function.
11787 (free_stmt_vec_infos): Likewise.
11788 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
11789 the global stmt_vec_info_vec.
11790 * tree-parloops.c (gather_scalar_reductions): Use
11791 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
11794 2018-05-29 Richard Biener <rguenther@suse.de>
11796 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
11798 2018-05-29 Martin Liska <mliska@suse.cz>
11799 David Malcolm <dmalcolm@redhat.com>
11801 * vec.c (test_reverse): New.
11802 (vec_c_tests): Add new test.
11803 * vec.h (vl_ptr>::reverse): New function.
11805 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
11807 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
11809 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
11812 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
11814 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
11816 2018-05-28 Richard Biener <rguenther@suse.de>
11818 PR tree-optimization/85933
11819 * tree-vect-data-refs.c (vect_record_base_alignments): Only
11820 look at stmts marked as vectorizable.
11822 2018-05-28 Richard Biener <rguenther@suse.de>
11824 PR tree-optimization/85934
11825 * tree-vect-generic.c (expand_vector_operations_1): Hoist
11826 vector boolean check before scalar optimization.
11828 2018-05-28 Jakub Jelinek <jakub@redhat.com>
11830 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11833 2018-05-28 Mark Wielaard <mark@klomp.org>
11835 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11836 if it is an expression containing a minus sign.
11838 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
11840 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11842 2018-05-27 Paul Koning <ni1d@arrl.net>
11844 * config/pdp11/pdp11.md (truncsihi2): Remove.
11846 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
11847 Chung-Ju Wu <jasonwucj@gmail.com>
11849 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11851 (unaligned_store_dw): Ditto.
11852 * config/nds32/nds32-memory-manipulation.c
11853 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11854 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11855 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11856 (emit_setmem_word_loop): Rename to ...
11857 (emit_setmem_doubleword_loop): ... this.
11858 (nds32_gen_dup_4_byte_to_word_value): New function.
11859 (nds32_gen_dup_8_byte_to_double_word_value): New function.
11860 (nds32_expand_setmem_loop): Refine implementation.
11861 (nds32_expand_setmem_loop_v3m): Ditto.
11862 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11865 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11867 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11869 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11871 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11872 (nds32_init_machine_status): Initialize machine->attr_naked_p and
11873 machine->attr_no_prologue_p.
11874 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11875 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11876 (nds32_expand_epilogue): Consider attr_naked_p.
11877 (nds32_expand_epilogue_v3pop): Likewise.
11878 (nds32_can_use_return_insn): Likewise.
11879 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11880 attr_no_prologue_p fields.
11881 * config/nds32/nds32.opt (mret-in-naked-func): New option.
11883 2018-05-27 Jakub Jelinek <jakub@redhat.com>
11886 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11888 * config/i386/sse.md
11889 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11891 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11893 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11895 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11897 (*<floatsuffix>floatv2div2sf2): Rename to ...
11898 (*float<floatunssuffix>v2div2sf2): ... this.
11899 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11900 (float<floatunssuffix>v2div2sf2_mask): ... this.
11901 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11902 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11903 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11905 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11907 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11909 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11911 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11913 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11915 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11916 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11917 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11918 gen_ufix_truncv8dfv8si2.
11919 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11920 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11921 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11922 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11923 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11924 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11925 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11926 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11928 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11932 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11934 2018-05-25 Jim Wilson <jimw@sifive.com>
11936 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11937 * config/riscv/riscv.c (struct machine_function): Add
11938 interrupt_handler_p and attribute_checked_p fields.
11939 (riscv_attribute_table): Add interrupt.
11940 (riscv_interrupt_type_p): New.
11941 (riscv_save_reg_p): Save extra regs for interrupt handler.
11942 (riscv_use_save_libcall): Return false for interrupt handler.
11943 (riscv_first_stack_step): Add forward declaration.
11944 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
11945 for interrupt handler with large frame. Use it for saved reg list.
11946 (riscv_expand_prologue): Move flag_stack_usage_info support to
11947 eliminate duplication.
11948 (riscv_expand_epilogue): Generate mret for interrupt handler.
11949 (riscv_epilogue_uses): New.
11950 (riscv_can_use_return_insn): Return false for interrupt handler.
11951 (riscv_function_ok_for_sibcall): Likewise.
11952 (riscv_set_current_function): Add interrupt handler support.
11953 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11954 * config/riscv/riscv.md (UNSPECV_MRET): New.
11956 (riscv_frflags, riscv_fsflags): Use tab after opcode.
11958 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11960 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
11962 PR tree-optimization/85712
11963 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11964 this candidate has already been replaced in-situ by a copy.
11966 2018-05-25 Jason Merrill <jason@redhat.com>
11968 PR c++/80485 - inline function non-zero address.
11969 * symtab.c (nonzero_address): Check DECL_COMDAT.
11971 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
11974 * config/alpha/alpha.md (ashlsi3): New insn pattern.
11975 (*ashlsi_se): Rename from *ashldi_se. Define as sign
11976 extension of SImode operation. Use const123_operand predicate.
11977 (*saddsi_1): Remove.
11978 (*saddl_se_1): Ditto.
11979 (*ssubsi_1): Ditto.
11980 (*ssubl_se_1): Ditto.
11981 * config/alpha/predicates.md (const123_operand): New predicate.
11982 * config/alpha/constraints.md (P): Use IN_RANGE.
11984 2018-05-25 Richard Biener <rguenther@suse.de>
11986 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11988 (ref_maybe_used_by_stmt_p): Likewise.
11989 (stmt_may_clobber_ref_p): Likewise.
11990 (stmt_may_clobber_ref_p_1): Likewise.
11991 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11993 (ref_maybe_used_by_stmt_p): Likewise.
11994 (stmt_may_clobber_ref_p): Likewise.
11995 (stmt_may_clobber_ref_p_1): Likewise.
11996 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11997 the alias oracle to disambiguate DRs with stmts DR analysis
11999 (vect_analyze_data_refs): Do not give up on not analyzable
12000 DRs for BB vectorization. Remove code truncating the dataref
12003 2018-05-25 Jakub Jelinek <jakub@redhat.com>
12006 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
12007 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
12008 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
12010 2018-05-25 Richard Biener <rguenther@suse.de>
12012 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
12013 function, combining stmt data ref gathering and fatal analysis
12015 (vect_analyze_data_refs): Remove now redudnant code and simplify.
12016 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
12017 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
12018 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
12019 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
12021 2018-05-25 Bin Cheng <bin.cheng@arm.com>
12023 PR tree-optimization/85720
12024 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
12025 SCC if all partitions are builtins.
12026 (version_loop_by_alias_check): New parameter. Generate cancelable
12027 runtime alias check if all partitions are builtins.
12028 (distribute_loop): Update call to above function.
12030 2018-05-25 Bin Cheng <bin.cheng@arm.com>
12032 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
12033 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
12034 (parm_default_def_partition_arg): Ditto.
12035 (set_parm_default_def_partition): Ditto.
12036 (get_parm_default_def_partitions): Ditto and make it static.
12037 (get_undefined_value_partitions): Ditto and make it static.
12038 (remove_ssa_form): Refactor call to init_var_map here.
12039 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
12040 computation for loop region.
12041 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
12042 (register_default_def): Delete.
12043 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
12044 (parm_default_def_partition_arg): Ditto.
12045 (set_parm_default_def_partition): Ditto.
12046 (get_parm_default_def_partitions): Ditto and make it static.
12047 (get_undefined_value_partitions): Ditto and make it static.
12048 (coalesce_with_default, coalesce_with_default): Update comment.
12049 (create_coalesce_list_for_region): New func factored out from
12050 create_outofssa_var_map.
12051 (populate_coalesce_list_for_outofssa): New func factored out from
12052 create_outofssa_var_map and coalesce_ssa_name.
12053 (create_outofssa_var_map): Delete.
12054 (coalesce_ssa_name): Refactor to support live range computation.
12055 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
12056 (get_parm_default_def_partitions): Delete.
12057 (get_undefined_value_partitions): Ditto.
12058 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
12059 computation for loop region.
12060 (new_tree_live_info, loe_visit_block): Ditto.
12061 (live_worklist, set_var_live_on_entry): Ditto.
12062 (calculate_live_on_exit, verify_live_on_entry): Ditto.
12063 * tree-ssa-live.h (struct _var_map): New fields.
12064 (init_var_map): Change decl.
12065 (region_contains_p): New.
12067 2018-05-25 Bin Cheng <bin.cheng@arm.com>
12069 * tree-ssa-live.h (live_merge_and_clear): Delete.
12071 2018-05-25 Richard Biener <rguenther@suse.de>
12074 * tree-dump.c (dequeue_and_dump): Remove access to removed
12075 operand 2 of a SWITCH_EXPR.
12077 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12079 * doc/sourcebuild.texi (vect_double_cond_arith): Include
12080 multiplication and division.
12081 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
12082 (cond_udiv@var{m}, cond_umod@var{m}): Document.
12083 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
12084 (cond_udiv_optab, cond_umod_optab): New optabs.
12085 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
12086 (IFN_COND_RDIV): New internal functions.
12087 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
12088 TRUNC_MOD_EXPR and RDIV_EXPR.
12089 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
12090 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
12092 (SVE_INT_BINARY): Include mult.
12093 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
12094 (optab, sve_int_op): Handle mult.
12095 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
12097 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
12098 for SVE_INT_BINARY_SD.
12100 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12102 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
12103 (optab, sve_int_op): Handle div and udiv.
12104 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
12105 for SVE_INT_BINARY_SD.
12106 (*<optab><mode>3): New insn for the same.
12108 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12110 * tree-vect-patterns.c: Include predict.h.
12111 (vect_recog_divmod_pattern): Restrict check for division support
12112 to when optimizing for size.
12114 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12116 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
12117 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
12118 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
12119 (gimple_match_op::set_op): Likewise.
12120 (gimple_resimplify4): Declare.
12121 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
12122 (expr::gen_transform): Likewise.
12123 (decision_tree::gen): Generate a simplification routine for 4 operands.
12124 * gimple-match-head.c (gimple_simplify): Add an overload for
12125 4 operands. In the top-level function, handle up to 4 call
12126 arguments and call gimple_resimplify4.
12127 (gimple_resimplify4): New function.
12128 (build_call_internal): Pass a fourth operand.
12129 (maybe_push_to_seq): Likewise.
12130 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
12131 Fold VEC_COND_EXPRs of an operation and a default value into
12132 an IFN_COND_* function if possible.
12133 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
12135 (SVE_COND_FP_BINARY): Include them.
12136 (optab, sve_fp_op): Handle them.
12137 (SVE_INT_BINARY_REV): New code iterator.
12138 (SVE_COND_FP_BINARY_REV): New int iterator.
12139 (commutative): New int attribute.
12140 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
12142 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
12144 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
12145 (*cond_<optab><mode>): New patterns for reversed operands.
12147 2018-05-25 Richard Biener <rguenther@suse.de>
12149 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
12150 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
12151 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
12152 (STMT_VINFO_GROUPED_ACCESS): Adjust.
12153 * tree-vect-data-refs.c (everywhere): Adjust users.
12154 * tree-vect-loop.c (everywhere): Likewise.
12155 * tree-vect-slp.c (everywhere): Likewise.
12156 * tree-vect-stmts.c (everywhere): Likewise.
12157 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
12159 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12161 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
12163 (gcc_cv_as_section_exclude): ... this.
12164 Try Solaris as #exclude syntax.
12165 * configure: Regenerate.
12166 * config.in: Regenerate.
12167 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
12169 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
12170 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
12172 * varasm.c (default_elf_asm_named_section): Don't check if
12173 HAVE_GAS_SECTION_EXCLUDE is defined.
12175 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12177 * doc/md.texi: Update the documentation of the cond_* optabs
12178 to mention the new final operand. Fix GET_MODE_NUNITS call.
12179 Describe the scalar case too.
12180 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
12181 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
12183 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
12184 (get_conditional_internal_fn): Update comment.
12185 * tree-vect-loop.c (vectorizable_reduction): Pass the original
12186 accumulator value as a final argument to conditional functions.
12187 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
12188 a define_expand and add an "else" operand. Assert for now that
12189 the else operand is equal to operand 2. Use SVE_INT_BINARY and
12190 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
12191 (*cond_<optab><mode>): New patterns.
12192 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
12193 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
12194 (UNSPEC_COND_EOR): Delete.
12195 (optab): Remove associated mappings.
12196 (SVE_INT_BINARY): New code iterator.
12197 (sve_int_op): Remove int attribute and add "minus" to the code
12199 (SVE_COND_INT_OP): Delete.
12200 (SVE_COND_FP_OP): Rename to...
12201 (SVE_COND_FP_BINARY): ...this.
12203 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12205 * optabs.c (can_reuse_operands_p): New function.
12206 (maybe_legitimize_operands): Try to reuse the results for
12209 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
12211 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
12212 Add {q} suffix to insn mnemonic.
12214 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12216 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
12217 (msp430_warn_func_return): New.
12219 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
12221 * fold-const.c (tree_nonzero_bits): New function.
12222 * fold-const.h (tree_nonzero_bits): Likewise.
12223 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
12224 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
12226 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
12230 * varasm.c (assemble_alias): Check ifunc_resolver only on
12233 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
12236 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
12237 when memory input operand is handled.
12239 2018-05-24 Luis Machado <luis.machado@linaro.org>
12241 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
12243 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
12245 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
12247 * match.pd: Delay FMA folds until after vectorization.
12249 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
12252 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12253 address check not strict.
12255 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
12257 * gimple-match.h (gimple_match_op): New class.
12258 (mprts_hook): Replace parameters with a gimple_match_op *.
12259 (maybe_build_generic_op): Likewise.
12260 (gimple_simplified_result_is_gimple_val): Replace parameters with
12261 a const gimple_match_op *.
12262 (gimple_simplify): Replace code_helper * and tree * parameters with
12263 a gimple_match_op * parameter.
12264 (gimple_resimplify1): Replace code_helper *, tree and tree *
12265 parameters with a gimple_match_op * parameter.
12266 (gimple_resimplify2): Likewise.
12267 (gimple_resimplify3): Likewise.
12268 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
12269 parameters with a gimple_match_op * parameter.
12270 * gimple-match-head.c (gimple_simplify): Change prototypes of
12271 auto-generated functions to take a gimple_match_op * instead of
12272 separate code_helper * and tree * parameters. Make the same
12273 change in the top-level overload and update calls to the
12274 gimple_resimplify routines. Update calls to the auto-generated
12275 functions and to maybe_push_res_to_seq in the publicly-facing
12276 operation-specific gimple_simplify overloads.
12277 (gimple_match_op::MAX_NUM_OPS): Define.
12278 (gimple_resimplify1): Replace rcode and ops with a single res_op
12279 parameter. Update call to gimple_simplify.
12280 (gimple_resimplify2): Likewise.
12281 (gimple_resimplify3): Likewise.
12282 (mprts_hook): Replace parameters with a gimple_match_op *.
12283 (maybe_build_generic_op): Likewise.
12284 (build_call_internal): Replace type, nargs and ops with
12285 a gimple_match_op *.
12286 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
12287 with a single gimple_match_op *. Update calls to mprts_hook,
12288 build_call_internal and gimple_simplified_result_is_gimple_val.
12289 Factor out code that is common to the tree_code and combined_fn cases.
12290 * genmatch.c (expr::gen_transform): Replace tem_code and
12291 tem_ops with a gimple_match_op called tem_op. Update calls
12292 to the gimple_resimplify functions and maybe_push_res_to_seq.
12293 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
12294 res_ops. Update call to the gimple_resimplify functions.
12295 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
12296 (decision_tree::gen): Make the functions take a gimple_match_op *
12297 called res_op instead of separate res_code and res_ops parameters.
12298 Update call accordingly.
12299 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
12300 and ops with a single res_op parameter. Update calls to
12301 maybe_build_generic_op and maybe_push_res_to_seq.
12302 (fold_stmt_1): Update calls to gimple_simplify and
12303 replace_stmt_with_simplification.
12304 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
12305 and gimple_simplified_result_is_gimple_val.
12306 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
12308 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
12309 with a gimple_match_op *.
12310 (vn_nary_build_or_lookup): Likewise. Update call to
12311 vn_nary_build_or_lookup_1.
12312 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
12313 gimple_match_op *. Update calls to the gimple_resimplify routines
12314 and to gimple_simplified_result_is_gimple_val.
12315 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
12316 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
12317 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
12318 (visit_nary_op): Likewise.
12319 (visit_reference_op_load): Likewise.
12321 2018-05-23 Luis Machado <luis.machado@linaro.org>
12323 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
12324 modifier for printing the step amount.
12326 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
12329 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
12332 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
12334 * doc/sourcebuild.texi (Endianness): New subsubsection.
12336 2018-05-23 Luis Machado <luis.machado@linaro.org>
12338 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12339 <prefetch_dynamic_strides>: New const bool field.
12340 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12341 prefetch_dynamic_strides.
12342 (exynosm1_prefetch_tune): Likewise.
12343 (thunderxt88_prefetch_tune): Likewise.
12344 (thunderx_prefetch_tune): Likewise.
12345 (thunderx2t99_prefetch_tune): Likewise.
12346 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
12348 (aarch64_override_options_internal): Update to set
12349 PARAM_PREFETCH_DYNAMIC_STRIDES.
12350 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12351 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12352 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12353 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12354 prefetch-dynamic-strides setting.
12356 2018-05-23 Luis Machado <luis.machado@linaro.org>
12358 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12359 <minimum_stride>: New const int field.
12360 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12361 minimum_stride field defaulting to -1.
12362 (exynosm1_prefetch_tune): Likewise.
12363 (thunderxt88_prefetch_tune): Likewise.
12364 (thunderx_prefetch_tune): Likewise.
12365 (thunderx2t99_prefetch_tune): Likewise.
12366 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
12367 <default_opt_level>: Set to 3.
12368 (aarch64_override_options_internal): Update to set
12369 PARAM_PREFETCH_MINIMUM_STRIDE.
12370 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12371 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12372 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12373 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12374 stride is constant and is below the minimum stride threshold.
12376 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12378 * config/arm/arm-cpus.in (mode26): Delete.
12379 (armv4): Delete mode26 reference.
12380 * config/arm/arm.c (arm_configure_build_target): Delete use of
12383 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
12385 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
12387 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
12388 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
12390 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
12391 (floatunsdidf2): Ditto.
12393 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
12395 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
12396 (fixuns_trunc<mode>si2_avx512f): Ditto.
12397 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
12398 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
12399 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
12401 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
12403 PR rtl-optimization/79985
12404 * df-scan.c (df_insn_refs_collect): Remove special case for
12405 global registers and asm statements.
12407 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
12409 * extend.texi (Global Register Variables): Rewrite the bullet list.
12410 Note that the register is available for allocation. Note that access
12411 via inline asm must use constraints. Add note about async-signal
12412 handlers. Remove paragraph about automagic register selection.
12414 2018-05-23 Richard Biener <rguenther@suse.de>
12416 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
12417 of fixed offset from memset VN.
12419 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
12421 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
12422 first_interp field.
12423 (alloc_cand_and_find_basis): Initialize first_interp field.
12424 (slsr_process_mul): Modify first_interp field.
12425 (slsr_process_add): Likewise.
12426 (slsr_process_cast): Modify first_interp field for each new
12428 (slsr_process_copy): Likewise.
12429 (dump_candidate): Dump first_interp field.
12430 (replace_mult_candidate): Process all interpretations, not just
12432 (replace_rhs_if_not_dup): Likewise.
12433 (replace_one_candidate): Likewise.
12435 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
12437 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
12439 (aarch64_needs_frame_chain): New function.
12440 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
12442 2018-05-23 Sudakshina Das <sudi.das@arm.com>
12445 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
12446 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
12447 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
12448 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
12449 as true for strict-align.
12450 (aarch64_can_inline_p): Perform checks even when callee has no
12451 attributes to check for strict alignment.
12452 * doc/extend.texi (AArch64 Function Attributes): Document
12454 * doc/invoke.texi: (AArch64 Options): Likewise.
12456 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
12458 PR tree-optimization/85853
12459 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
12460 the handling of the root of the node to...
12461 (vect_slp_analyze_node_operations_1): ...this new function,
12462 and run the whole thing with the child nodes' def types
12463 set according to their SLP node's def type.
12465 2018-05-23 Richard Biener <rguenther@suse.de>
12467 PR middle-end/85874
12468 * tree-data-ref.c (create_runtime_alias_checks): Defer
12469 and ignore overflow warnings.
12471 2018-05-23 Yury Gribov <tetra2005@gmail.com>
12473 PR tree-optimization/85822
12474 * tree-vrp.c (is_masked_range_test): Fix handling of negative
12477 2018-05-23 Richard Biener <rguenther@suse.de>
12479 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12480 memset constants via native_interpret_expr.
12482 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
12485 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
12487 (cgraph_node::create_alias): Likewise.
12488 (cgraph_node::get_availability): Check ifunc_resolver instead
12489 of looking up ifunc attribute.
12490 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
12491 * varasm.c (do_assemble_alias): Likewise.
12492 (assemble_alias): Likewise.
12493 (default_binds_local_p_3): Likewise.
12494 * cgraph.h (cgraph_node): Add ifunc_resolver.
12495 (cgraph_node::only_called_directly_or_aliased_p): Return false
12496 for IFUNC resolver.
12497 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
12499 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
12500 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
12501 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
12502 instead of looking up ifunc attribute.
12504 2018-05-22 Luis Machado <luis.machado@linaro.org>
12506 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
12508 2018-05-22 Martin Sebor <msebor@redhat.com>
12510 PR middle-end/85359
12511 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
12512 only when expasion succeeds.
12513 (expand_builtin_strcmp): Same.
12514 (expand_builtin_strncmp): Same.
12516 2018-05-22 Martin Sebor <msebor@redhat.com>
12518 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
12520 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
12521 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12523 * config/aarch64/aarch64-ldpstp.md: Replace uses of
12524 aarch64_mem_pair_operand with memory_operand and delete operand swapping
12526 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12527 Add check for legitimate_address.
12528 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
12529 (aarch64_swap_ldrstr_operands): New.
12530 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
12533 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
12534 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12536 * config/aarch64/aarch64.md: New patterns to generate stp
12538 (store_pair_sw, store_pair_dw): New patterns to generate stp for
12539 single words and double words.
12540 (load_pair_sw, load_pair_dw): Likewise.
12541 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
12543 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
12545 * config/aarch64/aarch64-ldpstp.md: Modify peephole
12546 for different mode ldpstp and add peephole for merged zero stores.
12547 Likewise for loads.
12548 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12550 (aarch64_gen_store_pair): Rename calls to match new patterns.
12551 (aarch64_gen_load_pair): Rename calls to match new patterns.
12552 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
12553 (load_pair<DREG:mode><DREG2:mode>): ... This.
12554 (store_pair<mode>): Rename to...
12555 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
12556 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
12557 New mode iterators.
12558 (V_INT_EQUIV): Handle SImode.
12559 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
12562 2018-05-22 Martin Sebor <msebor@redhat.com>
12565 * calls.c (maybe_warn_nonstring_arg): Use string length to set
12566 or ajust the presumed bound on an operation to avoid unnecessary
12569 2018-05-22 Martin Sebor <msebor@redhat.com>
12571 PR tree-optimization/85826
12572 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
12573 assuming that a DECL necesarily has a constant size.
12575 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
12577 PR middle-end/85862
12578 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
12580 2018-05-22 Richard Biener <rguenther@suse.de>
12582 PR tree-optimization/85834
12583 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
12584 non-constant and non-zero memset arguments.
12586 2018-05-22 Martin Liska <mliska@suse.cz>
12589 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
12591 2018-05-22 Richard Biener <rguenther@suse.de>
12593 PR tree-optimization/85863
12594 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
12595 comparisons when vectype is specified.
12596 (vectorizable_condition): Do not specify vectype for
12597 vect_is_simple_cond when SLP vectorizing.
12599 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
12602 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
12603 define __ibm128 as long double.
12604 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
12605 as a distinct type when IEEE 128-bit support is enabled.
12606 (init_float128_ieee): Fix up conversions between IFmode and IEEE
12607 128-bit types to use the correct functions.
12608 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
12609 convert between 128-bit floating point types that have different
12610 modes but the same representation, instead of using gen_lowpart to
12612 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
12614 (IFKF_reg): New attributes to give the register constraints for
12616 (extend<mode>tf2_internal): New insns to mark an explicit
12617 conversion between 128-bit floating point types that have a
12618 different mode but share the same representation.
12620 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
12622 PR tree-optimization/85814
12623 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
12624 a null return from get_strinfo when unsharing the next
12625 strinfo in the chain.
12627 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12630 * varasm.c (weak_finish): Clean up weak_decls.
12632 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12634 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
12635 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
12636 UNSPEC_UADALP values.
12637 * config/aarch64/iterators.md (ABAL): New int iterator.
12640 (sur): Add mappings for the above.
12641 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
12643 (aarch64_<sur>abal<mode>_4): Likewise.
12644 (aarch64_<sur>adalp<mode>_3): Likewise.
12645 (<sur>sadv16qi): New define_expand.
12647 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
12649 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
12650 (*movdf_internal): Ditto.
12651 (*rcpsf2_sse): Ditto.
12652 (*rsqrtsf2_sse): Ditto.
12653 (*sqrt<mode>2_sse): Ditto.
12655 2018-05-21 Tamar Christina <tamar.christina@arm.com>
12657 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
12659 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
12660 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
12661 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
12662 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
12664 * config/aarch64/arm_neon.h: Likewise.
12665 * config/aarch64/iterators.md (VQ_I): New.
12667 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
12669 * config.gcc: Add arc/t-multilib-linux to tmake_file for
12671 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
12674 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12676 * config/nds32/constraints.md (S): New constraint.
12677 * config/nds32/nds32.md (call_internal): Use constraint S.
12678 (call_value_internal): Likewise.
12679 (sibcall_internal): Likewise.
12680 (sibcall_value_internal): Likewise.
12682 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12683 Chung-Ju Wu <jasonwucj@gmail.com>
12685 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
12686 into consideration.
12688 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12689 Chung-Ju Wu <jasonwucj@gmail.com>
12691 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
12692 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
12693 (nds32_rtx_costs_impl): Simplify.
12694 (nds32_address_cost_impl): Simplify.
12695 (nds32_init_rtx_costs): New function.
12696 (nds32_rtx_costs_speed_prefer): Likewise.
12697 (nds32_rtx_costs_size_prefer): Likewise.
12698 (nds32_address_cost_speed_prefer): Likewise.
12699 (nds32_address_cost_speed_fwprop): Likewise.
12700 (nds32_address_cost_size_prefer): Likewise.
12701 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
12702 * config/nds32/nds32.c (nds32_option_override): Use
12703 nds32_init_rtx_costs function.
12705 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12707 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
12708 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
12709 (TARGET_PIPELINE_N8): Likewise.
12710 (TARGET_PIPELINE_N10): Likewise.
12711 (TARGET_PIPELINE_N13): Likewise.
12712 (TARGET_PIPELINE_GRAYWOLF): Likewise.
12714 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
12716 * config/nds32/nds32-fpu.md: Update copyright year.
12718 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12720 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
12722 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12724 * config/nds32/nds32.c
12725 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
12726 * config/nds32/nds32.opt (minline-asm-r15): New option.
12728 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12730 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
12732 * config/nds32/nds32.md (abssi2): New pattern.
12734 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
12736 * config/i386/i386.md (rex64namesuffix): New mode attribute.
12737 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
12738 Merge insn pattern from sse_cvtsi2ss<round_name> and
12739 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
12740 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
12741 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
12742 using SWI48 mode iterator.
12743 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
12744 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
12745 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
12746 pattern from sse_cvttss2si<round_saeonly_name>
12747 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
12748 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
12749 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
12750 using SWI48 mode iterator.
12751 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
12752 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
12753 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
12754 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
12755 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
12756 using SWI48 mode iterator.
12757 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
12758 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
12759 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
12760 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
12761 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
12762 SWI48 mode iterator.
12763 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
12764 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
12765 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
12766 pattern from sse_cvttsd2si<round_saeonly_name>
12767 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
12769 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12771 * config/nds32/nds32-md-auxiliary.c
12772 (nds32_valid_smw_lwm_base_p): Refine.
12773 (nds32_output_smw_single_word): Refine.
12774 (nds32_output_smw_double_word): New.
12775 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
12777 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12779 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
12780 (nds32_output_stack_pop): Refine.
12781 (nds32_expand_unaligned_load): Refine.
12782 (nds32_expand_unaligned_store): Refine.
12784 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12785 Chung-Ju Wu <jasonwucj@gmail.com>
12787 * config/nds32/constants.md: Add TP_REGNUM constant.
12788 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
12789 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
12791 * config/nds32/nds32-doubleword.md: Consider flag_pic.
12792 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
12793 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
12794 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
12795 and PIC code generation.
12796 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
12798 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
12800 * config/nds32/nds32.md: Support TLS and PIC.
12801 * config/nds32/nds32.c: Support TLS and PIC.
12802 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
12803 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
12806 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12808 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
12809 mode with E_ prefix.
12811 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12812 Chung-Ju Wu <jasonwucj@gmail.com>
12814 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
12815 * config/nds32/nds32-md-auxiliary.c
12816 (symbolic_reference_mentioned_p): New.
12817 (nds32_legitimize_ict_address): New.
12818 (nds32_expand_ict_move): New.
12819 (nds32_indirect_call_referenced_p): New.
12820 (nds32_symbol_binds_local_p): Delete.
12821 (nds32_long_call_p): Modify.
12822 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
12823 * config/nds32/nds32-protos.h
12824 (symbolic_reference_mentioned_p): Declare.
12825 (nds32_legitimize_ict_address): Declare.
12826 (nds32_expand_ict_move): Declare.
12827 (nds32_indirect_call_referenced_p): Declare.
12828 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
12829 (nds32_relax_group): Use nds32_ict_const_p as condition.
12830 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12831 (nds32_asm_file_start): Output ict_model directive in asm code.
12832 (nds32_legitimate_address_p): Consider indirect call.
12833 (nds32_print_operand): Consider indirect call.
12834 (nds32_print_operand_address): Consider indirect call.
12835 (nds32_insert_attributes): Handle "indirect_call" attribute.
12836 (TARGET_LEGITIMATE_ADDRESS_P): Define.
12837 (TARGET_LEGITIMATE_CONSTANT_P): Define.
12838 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12839 (TARGET_DELEGITIMIZE_ADDRESS): Define.
12840 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12841 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12842 (TARGET_ICT_MODEL_SMALL): Define.
12843 (TARGET_ICT_MODEL_LARGE): Define.
12844 * config/nds32/nds32.md (movsi): Consider ict model.
12845 (call, call_value): Consider ict model.
12846 (sibcall, sibcall_value): Consider ict model.
12847 * config/nds32/nds32.opt (mict-model): New option.
12848 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12851 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
12852 Monk Chiang <sh.chiang04@gmail.com>
12853 Jim Wilson <jimw@sifive.com>
12855 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12856 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
12857 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12858 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12859 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
12860 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12861 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12862 compute save_libcall_adjustment properly.
12863 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12864 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12865 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12866 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12867 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12868 (ABI_SPEC): Handle mabi=ilp32e.
12869 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12870 (RVE): Add RVE mask.
12871 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12872 <-march>: Add rv32e as an example.
12874 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
12877 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12878 (intra_create_variable_infos): Handle C++ constructors.
12880 2018-05-18 Martin Liska <mliska@suse.cz>
12882 * passes.def: Remove a redundant pass.
12884 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
12887 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12889 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12891 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12893 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12895 (armv2, armv2a, armv3, armv3m): Delete architectures.
12896 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12897 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12898 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12900 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12901 (*mulsidi3adddi): Likewise.
12902 (mulsidi3): Likewise.
12903 (*mulsidi3_nov6): Likewise.
12904 (umulsidi3): Likewise.
12905 (umulsidi3_nov6): Likewise.
12906 (umaddsidi4): Likewise.
12907 (*umulsidi3adddi): Likewise.
12908 (smulsi3_highpart): Likewise.
12909 (*smulsi3_highpart_nov6): Likewise.
12910 (umulsi3_highpart): Likewise.
12911 (*umulsi3_highpart_nov6): Likewise.
12912 * config/arm/arm.h (arm_arch3m): Delete.
12913 * config/arm/arm.c (arm_arch3m): Delete.
12914 (arm_option_override_internal): Update armv3-related comment.
12915 (arm_configure_build_target): Delete use of isa_bit_mode32.
12916 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12917 (arm_rtx_costs_internal): Delete check of arm_arch3m.
12918 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12919 (mulsa3): Likewise.
12920 (mulusa3): Likewise.
12921 * config/arm/arm-protos.h (arm_arch3m): Delete.
12922 * config/arm/arm-tables.opt: Regenerate.
12923 * config/arm/arm-tune.md: Likewise.
12924 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12925 deleted architectures.
12927 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12929 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12930 (armv5t, armv5te): New features.
12931 (ARMv5, ARMv5e): Delete fgroups.
12932 (ARMv5t, ARMv5te): Adjust for above changes.
12933 (ARMv6m): Likewise.
12934 (armv5, armv5e): Delete arches.
12935 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12937 (*call_reg_arm): Likewise.
12938 (*call_value_reg_armv5): Likewise.
12939 (*call_value_reg_arm): Likewise.
12940 (*call_symbol): Likewise.
12941 (*call_value_symbol): Likewise.
12942 (*sibcall_insn): Likewise.
12943 (*sibcall_value_insn): Likewise.
12944 (clzsi2): Likewise.
12945 (prefetch): Likewise.
12946 (define_split and define_peephole2 dependent on arm_arch5):
12948 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12950 (TARGET_ARM_QBIT): Likewise.
12951 (TARGET_DSP_MULTIPLY): Likewise.
12952 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12953 (arm_arch5, arm_arch5e): Delete.
12954 (arm_arch5t, arm_arch5te): Declare.
12955 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12956 (arm_arch5t): Declare.
12957 (arm_option_reconfigure_globals): Update for the above.
12958 (arm_options_perform_arch_sanity_checks): Update comment, replace
12959 use of arm_arch5 with arm_arch5t.
12960 (use_return_insn): Likewise.
12961 (arm_emit_call_insn): Likewise.
12962 (output_return_instruction): Likewise.
12963 (arm_final_prescan_insn): Likewise.
12964 (arm_coproc_builtin_available): Likewise.
12965 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12966 arm_arch5e with arm_arch5t and arm_arch5te.
12967 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12968 (arm_arch5t, arm_arch5te): Declare.
12969 * config/arm/arm-tables.opt: Regenerate.
12970 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12971 * config/arm/t-multilib: Likewise.
12972 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12973 instead of arm_arch5.
12974 (*call_reg_thumb1): Likewise.
12975 (*call_value_reg_thumb1_v5): Likewise.
12976 (*call_value_reg_thumb1): Likewise.
12977 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12979 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12981 2018-05-18 Martin Liska <mliska@suse.cz>
12983 PR gcov-profile/84846
12984 * doc/gcov.texi: Document -t option of gcov tool.
12986 2018-05-18 Martin Liska <mliska@suse.cz>
12988 PR gcov-profile/84846
12989 * gcov.c (print_usage): Add new -t option.
12990 (process_args): Handle the option.
12991 (generate_results): Use stdout as output when requested by
12994 2018-05-18 Martin Liska <mliska@suse.cz>
12996 PR gcov-profile/84846
12997 * coverage.c (coverage_init): Write PWD to .gcno file.
12998 * doc/gcov.texi: Document how working directory is printed.
12999 * gcov-dump.c (dump_gcov_file): Print PWD.
13000 * gcov.c (output_intermediate_file): Likewise.
13001 (read_graph_file): Read PWD string.
13002 (output_lines): Print PWD.
13004 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13006 PR middle-end/85817
13007 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
13008 for retval and return false if all args to phi are zero.
13010 2018-05-18 Richard Biener <rguenther@suse.de>
13012 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
13014 (evrp_dom_walker::before_dom_children): Call it.
13016 2018-05-18 Richard Biener <rguenther@suse.de>
13018 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
13019 results when processing array refs with variable index.
13021 2018-05-18 Toon Moene <toon@moene.org>
13023 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
13024 directly after that of -floop-interchange. Indicate that both
13025 options are enabled by default when specifying -O3.
13027 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13029 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
13030 iterator. Delete separate integer-mode vec_set<mode> expander.
13031 (aarch64_simd_vec_setv2di): Delete.
13032 (vec_setv2di): Delete.
13033 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
13034 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
13035 the "w, r" alternative.
13037 2018-05-18 Martin Liska <mliska@suse.cz>
13039 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
13040 * tree-pass.h (make_pass_lower_switch_O0): New function.
13041 * tree-switch-conversion.c (node_has_low_bound): Remove.
13042 (node_has_high_bound): Likewise.
13043 (node_is_bounded): Likewise.
13044 (class pass_lower_switch): Make it a template type and create
13046 (pass_lower_switch::execute): Add template argument.
13047 (make_pass_lower_switch): New function.
13048 (make_pass_lower_switch_O0): New function.
13049 (do_jump_if_equal): Remove.
13050 (emit_case_nodes): Simplify to just handle all 3 cases and leave
13051 all the hard work to tree optimization passes.
13053 2018-05-18 Martin Liska <mliska@suse.cz>
13055 * dbgcnt.c (limit_low): Renamed from limit.
13056 (limit_high): New variable.
13057 (dbg_cnt_is_enabled): Check for upper limit.
13058 (dbg_cnt): Adjust dumping.
13059 (dbg_cnt_set_limit_by_index): Add new argument for high
13061 (dbg_cnt_set_limit_by_name): Likewise.
13062 (dbg_cnt_process_single_pair): Parse new format.
13063 (dbg_cnt_process_opt): Use strtok.
13064 (dbg_cnt_list_all_counters): Remove 'value' and add
13066 * doc/invoke.texi: Document changes.
13068 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
13070 * doc/sourcebuild.texi (scalar_all_fma): Document.
13071 * tree.def (FMA_EXPR): Delete.
13072 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
13073 * internal-fn.c (ternary_direct): New macro.
13074 (expand_ternary_optab_fn): Likewise.
13075 (direct_ternary_optab_supported_p): Likewise.
13076 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
13077 * builtins.c (fold_builtin_fma): Delete.
13078 (fold_builtin_3): Don't call it.
13079 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
13080 * expr.c (expand_expr_real_2): Likewise.
13081 * fold-const.c (operand_equal_p): Likewise.
13082 (fold_ternary_loc): Likewise.
13083 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
13084 * gimple.c (DEFTREECODE): Likewise.
13085 * gimplify.c (gimplify_expr): Likewise.
13086 * optabs-tree.c (optab_for_tree_code): Likewise.
13087 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
13088 * tree-eh.c (operation_could_trap_p): Likewise.
13089 (stmt_could_throw_1_p): Likewise.
13090 * tree-inline.c (estimate_operator_cost): Likewise.
13091 * tree-pretty-print.c (dump_generic_node): Likewise.
13092 (op_code_prio): Likewise.
13093 * tree-ssa-loop-im.c (stmt_cost): Likewise.
13094 * tree-ssa-operands.c (get_expr_operands): Likewise.
13095 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
13096 * fold-const-call.h (fold_fma): Delete.
13097 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
13098 CFN_FNMA and CFN_FNMS.
13099 (fold_fma): Delete.
13100 * genmatch.c (combined_fn): New enum.
13101 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
13102 (commutative_op): New function.
13103 (commutate): Use it. Handle more than 2 operands.
13104 (dt_operand::gen_gimple_expr): Use commutative_op.
13105 (parser::parse_expr): Allow :c to be used with non-binary
13106 operators if the commutative operand is known.
13107 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
13108 CFN_FMS, CFN_FNMA and CFN_FNMS.
13109 (backprop::process_assign_use): Remove FMA_EXPR handling.
13110 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
13111 (gen_hsa_fma): New function.
13112 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
13113 IFN_FNMA and IFN_FNMS.
13114 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
13115 * gimple-fold.h (follow_all_ssa_edges): Declare.
13116 * gimple-fold.c (follow_all_ssa_edges): New function.
13117 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
13118 gimple_build interface and use follow_all_ssa_edges to fold the result.
13119 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
13120 instead of checking for optabs directly.
13121 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
13122 rather than FMA_EXPRs.
13123 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
13124 call to IFN_FMA instead of an FMA_EXPR.
13126 2018-05-17 Jim Wilson <jimw@sifive.com>
13128 * expr.c (do_tablejump): When converting index to Pmode, if we have a
13129 sign extended promoted subreg, and the range does not have the sign bit
13130 set, then do a sign extend.
13132 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
13133 test, check for sign extended subreg and/or constant operands, and
13134 do a sign extend in that case.
13136 2018-05-17 Steve Ellcey <sellcey@cavium.com>
13138 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
13139 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
13141 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
13142 Change logics_shift_reg to logics_shift_imm.
13143 (thunderx2t99_fp_loadpair_basic): Delete.
13144 (thunderx2t99_fp_storepair_basic): Delete.
13145 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
13146 (thunderx2t99_asimd_polynomial): Delete.
13147 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
13148 and neon_fp_mul_d_scalar_q.
13149 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
13150 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
13151 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
13152 (thunderx2t99_asimd_lut): Add missing tbl types.
13153 (thunderx2t99_asimd_ext): Delete.
13154 (thunderx2t99_asimd_load1_1_mult): Delete.
13155 (thunderx2t99_asimd_load1_2_mult): Delete.
13156 (thunderx2t99_asimd_load1_ldp): New.
13157 (thunderx2t99_asimd_load1): New.
13158 (thunderx2t99_asimd_load2): Add missing *load2* types.
13159 (thunderx2t99_asimd_load3): New.
13160 (thunderx2t99_asimd_load4): New.
13161 (thunderx2t99_asimd_store1_1_mult): Delete.
13162 (thunderx2t99_asimd_store1_2_mult): Delete.
13163 (thunderx2t99_asimd_store2_mult): Delete.
13164 (thunderx2t99_asimd_store2_onelane): Delete.
13165 (thunderx2t99_asimd_store_stp): New.
13166 (thunderx2t99_asimd_store1): New.
13167 (thunderx2t99_asimd_store2): New.
13168 (thunderx2t99_asimd_store3): New.
13169 (thunderx2t99_asimd_store4): New.
13171 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
13173 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
13174 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
13176 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
13177 Segher Boessenkool <segher@kernel.crashing.org>
13180 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
13183 2018-05-17 Richard Biener <rguenther@suse.de>
13185 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
13186 for pruning loop and prune defs feeding only already visited PHIs.
13188 2018-05-17 Richard Biener <rguenther@suse.de>
13190 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
13192 2018-05-17 Bin Cheng <bin.cheng@arm.com>
13193 Richard Biener <rguenther@suse.de>
13195 PR tree-optimization/85793
13196 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
13197 for VMAT_ELEMENTWISE.
13199 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
13201 * internal-fn.h (lookup_internal_fn): Declare
13202 * internal-fn.c (lookup_internal_fn): New function.
13203 * gimple.c (gimple_build_call_from_tree): Handle calls to
13204 internal functions.
13205 * gimple-pretty-print.c (dump_gimple_call): Print "." before
13206 internal function names.
13207 * tree-pretty-print.c (dump_generic_node): Likewise.
13208 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
13210 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
13212 * gimple-fold.h (gimple_build): Make the function forms take
13213 combined_fn rather than built_in_function.
13214 (gimple_simplify): Likewise.
13215 * gimple-match-head.c (gimple_simplify): Likewise.
13216 * gimple-fold.c (gimple_build): Likewise.
13217 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
13218 rather than gimple_build_call_internal.
13219 (get_initial_defs_for_reduction): Likewise.
13220 (vect_create_epilog_for_reduction): Likewise.
13221 (vectorizable_live_operation): Likewise.
13223 2018-05-17 Martin Liska <mliska@suse.cz>
13225 * gimple-ssa-sprintf.c (format_directive): Do not use
13226 space in between 'G_' and '('.
13228 2018-05-17 Jakub Jelinek <jakub@redhat.com>
13231 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
13232 even if the mask is not all ones.
13235 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
13237 (ix86_gimple_fold_builtin): Likewise.
13240 * config/i386/i386.c: Include tree-vector-builder.h.
13241 (ix86_vector_shift_count): New function.
13242 (ix86_fold_builtin): Fold shift builtins by scalar count.
13243 (ix86_gimple_fold_builtin): Likewise.
13245 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
13246 _mm512_setzero): New intrinsics.
13248 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
13249 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13251 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
13252 code generation for cases where splatting a value is not useful.
13253 * simplify-rtx.c (simplify_ternary_operation): Simplify
13254 vec_merge across a vec_duplicate and a paradoxical subreg forming
13255 a vector mode to a vec_concat.
13257 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
13259 * config.gcc: Support "goldmont-plus".
13260 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13262 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13263 PROCESSOR_GOLDMONT_PLUS.
13264 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
13265 (processor_target_table): Add "goldmont-plus".
13266 (PTA_GOLDMONT_PLUS): Define.
13267 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
13268 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
13269 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
13270 (fold_builtin_cpu): Add "goldmont-plus".
13271 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
13272 (ix86_option_override_internal): Add "goldmont-plus".
13273 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
13274 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
13275 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
13276 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
13278 2018-05-17 Richard Biener <rguenther@suse.de>
13280 PR tree-optimization/85757
13281 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
13282 remove defs that only feed that PHI from further processing.
13284 2018-05-16 Jim Wilson <jimw@sifive.com>
13286 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
13288 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
13290 2018-05-16 Mark Wielaard <mark@klomp.org>
13292 * dwarf2out.c (count_index_strings): New function.
13293 (output_indirect_strings): Call count_index_strings and generate
13294 header for dwarf_version >= 5.
13296 2018-05-16 Mark Wielaard <mark@klomp.org>
13298 * dwarf2out.c (dwarf_FORM): New function.
13299 (set_indirect_string): Use dwarf_FORM.
13300 (reset_indirect_string): Likewise.
13301 (size_of_die): Likewise.
13302 (value_format): Likewise.
13303 (output_die): Likewise.
13304 (add_skeleton_AT_string): Likewise.
13305 (output_macinfo_op): Likewise.
13306 (index_string): Likewise.
13307 (output_index_string_offset): Likewise.
13308 (output_index_string): Likewise.
13309 (count_index_strings): Likewise.
13311 2018-05-16 Carl Love <cel@us.ibm.com>
13313 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13314 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
13316 2018-05-16 Martin Jambor <mjambor@suse.cz>
13318 * ipa-prop.c (ipa_free_all_edge_args): Remove.
13319 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
13321 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
13323 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
13324 (fnma<mode>4): Likewise.
13325 (fms<mode>4): Likewise.
13326 (fnms<mode>4): Likewise.
13327 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
13328 (aarch64_fnma<mode>4): Likewise.
13329 (aarch64_fms<mode>4): Likewise.
13330 (aarch64_fnms<mode>4): Likewise.
13331 (aarch64_fnmadd<mode>4): Likewise.
13333 2018-05-16 Jason Merrill <jason@redhat.com>
13335 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
13337 2018-05-16 Richard Biener <rguenther@suse.de>
13339 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
13340 (dump_stmt_cost): Declare.
13341 (add_stmt_cost): Dump cost we add.
13342 (add_stmt_costs): New function.
13343 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
13344 No longer exported.
13345 (vect_analyze_stmt): Adjust prototype.
13346 (vectorizable_condition): Likewise.
13347 (vectorizable_live_operation): Likewise.
13348 (vectorizable_reduction): Likewise.
13349 (vectorizable_induction): Likewise.
13350 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
13351 cost vector to pass to vectorizable_ and record afterwards.
13352 (vect_model_reduction_cost): Take cost vector argument and adjust.
13353 (vect_model_induction_cost): Likewise.
13354 (vectorizable_reduction): Likewise.
13355 (vectorizable_induction): Likewise.
13356 (vectorizable_live_operation): Likewise.
13357 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
13358 SLP_TREE_NUMBER_OF_VEC_STMTS.
13359 (vect_analyze_slp_cost_1): Remove.
13360 (vect_analyze_slp_cost): Likewise.
13361 (vect_slp_analyze_node_operations): Take visited args and
13362 a target cost vector. Avoid processing already visited stmt sets.
13363 (vect_slp_analyze_operations): Use a local cost vector to gather
13364 costs and register those of non-discarded instances.
13365 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
13366 (vect_schedule_slp_instance): Remove copying of
13367 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
13369 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
13370 adding cost. Record cost entry location.
13371 (vect_prologue_cost_for_slp_op): Function to compute cost of
13372 a constant or invariant generated for SLP vect in the prologue,
13373 split out from vect_analyze_slp_cost_1.
13374 (vect_model_simple_cost): Make static. Adjust for SLP costing.
13375 (vect_model_promotion_demotion_cost): Likewise.
13376 (vect_model_store_cost): Likewise, make static.
13377 (vect_model_load_cost): Likewise.
13378 (vectorizable_bswap): Add cost vector arg and adjust.
13379 (vectorizable_call): Likewise.
13380 (vectorizable_simd_clone_call): Likewise.
13381 (vectorizable_conversion): Likewise.
13382 (vectorizable_assignment): Likewise.
13383 (vectorizable_shift): Likewise.
13384 (vectorizable_operation): Likewise.
13385 (vectorizable_store): Likewise.
13386 (vectorizable_load): Likewise.
13387 (vectorizable_condition): Likewise.
13388 (vectorizable_comparison): Likewise.
13389 (can_vectorize_live_stmts): Likewise.
13390 (vect_analyze_stmt): Likewise.
13391 (vect_transform_stmt): Adjust calls to vectorizable_*.
13392 * tree-vectorizer.c: Include gimple-pretty-print.h.
13393 (dump_stmt_cost): New function.
13395 2018-05-16 Richard Biener <rguenther@suse.de>
13397 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
13398 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
13399 * tree-ssa-dse.c: Include tree-ssa-loop.h.
13400 (check_name): New callback.
13401 (dse_classify_store): Track cycles via a visited bitmap of PHI
13402 defs and simplify handling of in-loop and across loop dead stores
13403 and properly fail for loop-variant refs. Handle byte-tracking with
13404 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
13407 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
13409 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
13410 (vect_get_mask_type_for_stmt): Likewise.
13411 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
13413 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
13414 to determine the statement's vector type and the vector type that
13415 should be used for calculating nunits. Deal with cases in which
13416 the type has to be deferred.
13417 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
13418 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
13419 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
13420 (vect_determine_vf_for_stmt): New functions, split out from...
13421 (vect_determine_vectorization_factor): ...here.
13422 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
13423 (vect_get_mask_type_for_stmt): New functions, split out from
13424 vect_determine_vectorization_factor.
13426 2018-05-16 Richard Biener <rguenther@suse.de>
13428 * tree-cfg.c (verify_gimple_assign_ternary): Properly
13429 verify the [VEC_]COND_EXPR embedded comparison.
13431 2018-05-15 Martin Sebor <msebor@redhat.com>
13433 PR tree-optimization/85753
13434 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
13435 RECORD_TYPE in addition to ARRAY_TYPE.
13437 2018-05-15 Martin Sebor <msebor@redhat.com>
13439 PR middle-end/85643
13440 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
13442 2018-05-15 Richard Biener <rguenther@suse.de>
13444 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
13445 add by_clobber_p one. Change algorithm to collect all defs
13446 representing uses we need to walk and try reducing them to
13447 a single one before failing.
13448 (dse_dom_walker::dse_optimize_stmt): Adjust.
13450 2018-05-13 Mark Wielaard <mark@klomp.org>
13452 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
13453 (size_of_loc_descr): Likewise.
13454 (output_loc_operands): Likewise.
13455 (output_loc_operands_raw): Likewise.
13456 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
13457 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
13458 (hash_loc_operands): Likewise.
13459 (compare_loc_operands): Likewise.
13461 2018-05-14 Mark Wielaard <mark@klomp.org>
13463 * dwarf2out.c (count_index_addrs): New function.
13464 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
13466 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13468 PR tree-optimization/83648
13469 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
13470 return value as malloc candidate.
13472 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13475 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
13476 param as true in call to suggest_attribute.
13478 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
13480 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
13481 -mreadonly-in-sdata.
13483 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13485 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
13487 (aarch64_crypto_aesd_fused): Likewise.
13489 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
13491 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
13492 (movsi_aarch64): Likewise.
13493 (load_pairsi): Likewise.
13494 (load_pairdi): Likewise.
13495 (store_pairsi): Likewise.
13496 (store_pairdi): Likewise.
13497 (load_pairsf): Likewise.
13498 (load_pairdf): Likewise.
13499 (store_pairsf): Likewise.
13500 (store_pairdf): Likewise.
13501 (zero_extend): Likewise.
13502 (trunc): Swap alternatives.
13503 (fcvt_target): Add '?' to prefer w over r.
13505 2018-05-14 Jakub Jelinek <jakub@redhat.com>
13508 * config/i386/i386.md: Disallow non-commutative arithmetics in
13509 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
13510 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
13511 in the peephole2 before it.
13513 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
13515 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
13516 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
13517 (ix86_handle_option): Handle -mcldemote.
13518 * config.gcc: New header.
13519 * config/i386/cldemoteintrin.h: New file.
13520 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
13521 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13523 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13524 OPTION_MASK_ISA_CLDEMOTE.
13525 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
13526 (ix86_valid_target_attribute_inner_p): Ditto.
13527 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
13528 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
13529 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
13530 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
13531 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
13533 * config/i386/i386.opt: Add -mcldemote.
13534 * config/i386/x86intrin.h: New header.
13535 * doc/invoke.texi: Add -mcldemote.
13537 2018-05-14 Richard Biener <rguenther@suse.de>
13539 * doc/match-and-simplify.texi: Adjust :s documentation.
13541 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
13543 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
13544 intended memcpy size.
13545 (REORDER_45): Likewise.
13547 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
13549 * sort.cc: New file.
13550 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
13551 * vec.c (qsort_chk): Use gcc_qsort.
13552 * Makefile.in (OBJS-libcommon): Add sort.o.
13553 (build/sort.o): New target. Use it...
13554 (BUILD_RTL): ... here, and...
13555 (build/gencfn-macros): ... here, and...
13556 (build/genmatch): ... here.
13558 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13559 Chung-Ju Wu <jasonwucj@gmail.com>
13561 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
13562 * config/nds32/nds32-graywolf.md: New file.
13563 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
13564 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
13566 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
13567 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
13568 * config/nds32/nds32.md (pipeline_model): Add graywolf.
13569 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
13570 * config/nds32/pipelines.md: Include n15 settings.
13572 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13573 Chung-Ju Wu <jasonwucj@gmail.com>
13575 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
13576 * config/nds32/nds32-n13.md: New file.
13577 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
13578 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
13580 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
13581 * config/nds32/nds32.md (pipeline_model): Add n13.
13582 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
13583 * config/nds32/pipelines.md: Include n13 settings.
13585 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13586 Chung-Ju Wu <jasonwucj@gmail.com>
13588 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
13589 * config/nds32/nds32-n10.md: New file.
13590 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
13591 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
13593 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
13594 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
13595 * config/nds32/nds32.md (pipeline_model): Add n10.
13596 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
13597 * config/nds32/pipelines.md: Include n10 settings.
13599 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
13600 Kito Cheng <kito.cheng@gmail.com>
13601 Chung-Ju Wu <jasonwucj@gmail.com>
13603 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
13604 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13605 Add enum values for DSP extension instructions.
13606 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
13608 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
13609 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
13610 New code iterators.
13611 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
13612 * config/nds32/nds32-dspext.md: New file for DSP implementation.
13613 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
13614 * config/nds32/nds32-intrinsic.md: Likewise.
13615 * config/nds32/nds32_intrinsic.h: Likewise.
13616 * config/nds32/nds32-md-auxiliary.c: Likewise.
13617 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
13618 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
13619 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
13620 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
13621 * config/nds32/nds32-protos.h: New declarations for DSP extension.
13622 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
13623 TYPE_DMAC in switch statement.
13624 * config/nds32/nds32.c: New checking and implementation for DSP
13625 extension instructions.
13626 * config/nds32/nds32.h: Likewise.
13627 * config/nds32/nds32.md: Likewise.
13628 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
13629 * config/nds32/predicates.md: Implement new predicates for DSP
13632 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
13634 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
13635 Reformat alternatives and attributes so it is easier to identify
13636 which constraints/attributes go with which instruction.
13637 (mov<mode>_hardfloat32, FMOVE64): Likewise.
13638 (mov<mode>_softfloat32, FMOVE64): Likewise.
13639 (mov<mode>_hardfloat64, FMOVE64): Likewise.
13640 (mov<mode>_softfloat64, FMOVE64): Likewise.
13642 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
13644 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13646 (Basic PowerPC Built-in Functions): The new name of the
13647 subsection previously known as "PowerPC Built-in Functions".
13648 (Basic PowerPC Built-in Functions Available on all Configurations):
13650 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
13651 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
13652 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
13653 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
13655 2018-05-11 Martin Jambor <mjambor@suse.cz>
13658 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
13661 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13664 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
13666 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
13668 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
13669 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
13670 (ix86_handle_option): Handle -mwaitpkg.
13671 * config.gcc: New header.
13672 * config/i386/cpuid.h (bit_WAITPKG): New bit.
13673 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
13674 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
13676 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13677 OPTION_MASK_ISA_WAITPKG.
13678 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
13679 (ix86_option_override_internal): Add PTA_WAITPKG.
13680 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
13681 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
13682 IX86_BUILTIN_TPAUSE.
13683 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
13684 __builtin_ia32_umwait and __builtin_ia32_tpause.
13685 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
13686 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
13687 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
13688 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
13689 UNSPECV_TPAUSE): New.
13690 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
13691 * config/i386/i386.opt: Add -mwaitpkg.
13692 * config/i386/waitpkgintrin.h: New file.
13693 * config/i386/x86intrin.h: New header.
13694 * doc/invoke.texi: Add -mwaitpkg.
13696 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13699 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
13701 (cortex-m0): Use armv6s-m isa.
13702 (cortex-m0plus): Likewise.
13703 (cortex-m1): Likewise.
13704 (cortex-m0.small-multiply): Likewise.
13705 (cortex-m0plus.small-multiply): Likewise.
13706 (cortex-m1.small-multiply): Likewise.
13708 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
13709 Jakub Jelinek <jakub@redhat.com>
13711 PR tree-optimization/85692
13712 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
13713 source permute as well.
13715 2018-05-11 Martin Liska <mliska@suse.cz>
13718 * doc/extend.texi: Document LLVM style format for no_sanitize
13721 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
13723 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
13724 mode_supports_vsx_dform_quad to mode_supports_dq_form.
13725 (mode_supports_vsx_dform_quad): Likewise.
13726 (mode_supports_vmx_dform): Move these functions to be next to the
13727 other mode_supports functions.
13728 (mode_supports_dq_form): Likewise.
13729 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
13730 mode_supports_dq_form.
13731 (reg_offset_addressing_ok_p): Likewise.
13732 (offsettable_ok_by_alignment): Likewise.
13733 (rs6000_legitimate_offset_address_p): Likewise.
13734 (legitimate_lo_sum_address_p): Likewise.
13735 (rs6000_legitimize_address): Likewise.
13736 (rs6000_legitimize_reload_address): Likewise.
13737 (rs6000_secondary_reload_inner): Likewise.
13738 (rs6000_preferred_reload_class): Likewise.
13739 (rs6000_output_move_128bit): Likewise.
13741 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13743 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
13744 Generate SImode target register for null target.
13745 <case IX86_BUILTIN_XGETBV>: Ditto.
13746 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
13747 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
13749 2018-05-10 Carl Love <cel@us.ibm.com>
13751 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13752 dcbtt and dcbtstt if operands[2] is 0.
13754 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13757 * config/i386/sse.md (usadv64qi): New expander.
13759 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
13761 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
13762 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
13763 -maltivec=be support.
13764 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
13765 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
13766 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
13767 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
13768 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
13769 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
13770 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
13771 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
13772 altivec_vsumsws): Adjust.
13773 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
13774 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
13775 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
13777 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
13778 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
13779 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
13780 (altivec_lve<VI_char>x): Delete expand.
13781 (*altivec_lve<VI_char>x_internal): Rename to...
13782 (altivec_lve<VI_char>x): ... this.
13783 (altivec_lvxl_<mode>): Delete expand.
13784 (*altivec_lvxl_<mode>_internal): Rename to ...
13785 (altivec_lvxl_<mode>): ... this.
13786 (altivec_stvxl_<mode>): Delete expand.
13787 (*altivec_stvxl_<mode>_internal): Rename to ...
13788 (altivec_stvxl_<mode>): ... this.
13789 (altivec_stve<VI_char>x): Delete expand.
13790 (*altivec_stve<VI_char>x_internal): Rename to ...
13791 (altivec_stve<VI_char>x): ... this.
13792 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
13793 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
13794 reduc_plus_scal_<mode>): Adjust.
13795 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
13797 (rs6000_cpu_cpp_builtins): Adjust.
13798 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
13799 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
13800 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
13801 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
13802 -maltivec=be support.
13803 (rs6000_split_vec_extract_var): Adjust.
13804 (rs6000_split_v4si_init): Adjust.
13805 (swap_selector_for_mode): Delete.
13806 (altivec_expand_lvx_be, altivec_expand_stvx_be,
13807 altivec_expand_stvex_be): Delete.
13808 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
13809 -maltivec=be support.
13810 (rs6000_gimple_fold_builtin): Ditto.
13811 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
13813 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
13814 (TARGET_DIRECT_MOVE_64BIT): Adjust.
13815 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
13816 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
13817 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
13818 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
13819 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
13820 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
13821 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
13822 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
13823 anonymous split): Adjust.
13824 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
13825 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
13827 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
13829 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
13830 when --with-gxx-include-dir is also specified.
13831 * configure: Regenerate.
13833 2018-05-09 Jim Wilson <jimw@sifive.com>
13836 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13837 * config/riscv/t-withmultilib: New.
13838 * config/riscv/withmultilib.h: New.
13839 * doc/install.texi: Document RISC-V --with-multilib-list support.
13841 2018-05-09 Richard Biener <rguenther@suse.de>
13843 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13845 (vect_bb_vectorization_profitable_p): Adjust. Compute
13846 actual scalar cost using the cost vector and the add_stmt_cost
13849 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13851 PR rtl-optimization/85645
13852 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13853 in the REG_CFA_REGISTER note for LR, don't leave it empty.
13855 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13857 PR rtl-optimization/85645
13858 * shrink-wrap.c (spread_components): Return a boolean saying if
13859 anything was changed.
13860 (try_shrink_wrapping_separate): Iterate spread_components until
13861 nothing changes anymore.
13863 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13865 PR rtl-optimization/85645
13866 * regrename.c (build_def_use): Also kill the chains that include the
13867 destination of a REG_CFA_REGISTER note.
13869 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13871 PR rtl-optimization/85645
13872 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13873 insn that has a REG_CFA_REGISTER note.
13875 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
13877 * cfgexpand.c (expand_clobber): New function.
13878 (expand_gimple_stmt_1): Use it.
13879 * tree-vect-stmts.c (vect_clobber_variable): New function,
13881 (vectorizable_simd_clone_call): ...here.
13882 (vectorizable_store): Emit a clobber either side of an
13883 IFN_STORE_LANES sequence.
13884 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13886 2018-05-09 Tom de Vries <tom@codesourcery.com>
13889 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13890 (define_insn "trap_if_false"): Add exit after trap.
13892 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
13894 PR rtl-optimization/85638
13895 * bb-reorder.c: Include common/common-target.h.
13896 (create_forwarder_block): New function extracted from...
13897 (fix_up_crossing_landing_pad): ...here. Rename into...
13898 (dw2_fix_up_crossing_landing_pad): ...this.
13899 (sjlj_fix_up_crossing_landing_pad): New function.
13900 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13901 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13902 from both partitions and exit the loop after one iteration.
13904 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13907 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13909 (Basic PowerPC Built-in Functions): The new name of the
13910 subsection previously known as "PowerPC Built-in Functions".
13911 (Basic PowerPC Built-in Functions Available on all Configurations):
13913 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13915 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13917 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13919 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13922 2018-05-08 Jim Wilson <jimw@sifive.com>
13924 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13925 (LD_EMUL_SUFFIX): New.
13926 (LINK_SPEC): Use it.
13928 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13930 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13932 (Basic PowerPC Built-in Functions): The new name of the
13933 subsection previously known as "PowerPC Built-in Functions".
13934 (Basic PowerPC Built-in Functions Available on all Configurations):
13936 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13938 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13940 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13942 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13945 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13948 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13949 after cmpelim optimization.
13951 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
13953 * config.gcc: Support "goldmont".
13954 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13955 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13956 PROCESSOR_GOLDMONT.
13957 * config/i386/i386.c (m_GOLDMONT): Define.
13958 (processor_target_table): Add "goldmont".
13959 (PTA_GOLDMONT): Define.
13960 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13961 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13962 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13963 (fold_builtin_cpu): Add "goldmont".
13964 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13965 (ix86_option_override_internal): Add "goldmont".
13966 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13967 (processor_type): Add PROCESSOR_GOLDMONT.
13968 * config/i386/i386.md: Add CPU "glm".
13969 * config/i386/glm.md: New file.
13970 * config/i386/x86-tune.def: Add m_GOLDMONT.
13971 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13973 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13976 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13978 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13979 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
13980 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
13983 * config/i386/i386.c (ix86_fold_builtin): Handle
13984 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13987 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13988 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13990 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
13993 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13994 (check_arch): Likewise.
13995 (check_fpu): Return the result rather than printing it.
13996 (end arch): Fix operator precedence.
13997 (end cpu): Likewise.
13998 (END): Print the result from check_fpu.
14000 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
14001 Alan Hayward <alan.hayward@arm.com>
14002 David Sherwood <david.sherwood@arm.com>
14004 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
14005 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
14006 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
14007 (*fcmuo<mode>_and): New patterns.
14009 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
14011 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
14012 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
14013 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
14014 (cmp_op, sve_imm_con): New code attributes.
14015 (SVE_COND_INT_CMP, imm_con): Delete.
14016 (cmp_op): Remove above unspecs from int attribute.
14017 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
14019 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
14020 comparison-specific unspecs.
14021 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
14022 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
14023 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
14024 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
14025 (*vec_fcm<cmp_op><mode>): Rename to...
14026 (*fcm<cmp_op><mode>): ...this and adjust likewise.
14027 (*vec_fcmuo<mode>): Rename to...
14028 (*fcmuo<mode>): ...this and adjust likewise.
14029 (*pred_fcm<cmp_op><mode>): New pattern.
14030 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
14031 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
14033 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
14035 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
14036 (aarch64_emit_sve_predicated_cond): New function.
14037 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
14038 (aarch64_emit_unspec_cond_or): Replace with...
14039 (aarch64_emit_sve_or_conds): ...this new function. Use
14040 aarch64_emit_sve_ptrue_op for the individual comparisons and
14041 aarch64_emit_binop to OR them together.
14042 (aarch64_emit_inverted_unspec_cond): Replace with...
14043 (aarch64_emit_sve_inverted_cond): ...this new function. Use
14044 aarch64_emit_sve_ptrue_op for the comparison and
14045 aarch64_emit_unop to invert the result.
14046 (aarch64_expand_sve_vec_cmp_float): Update after the above
14047 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
14049 2018-05-07 Nathan Sidwell <nathan@acm.org>
14051 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
14052 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
14053 (Backwards Compatibility): Likewise.
14055 2018-05-07 Luis Machado <luis.machado@linaro.org>
14059 2018-05-07 Luis Machado <luis.machado@linaro.org>
14061 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14062 <prefetch_dynamic_strides>: New const bool field.
14063 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14064 prefetch_dynamic_strides.
14065 (exynosm1_prefetch_tune): Likewise.
14066 (thunderxt88_prefetch_tune): Likewise.
14067 (thunderx_prefetch_tune): Likewise.
14068 (thunderx2t99_prefetch_tune): Likewise.
14069 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
14071 (aarch64_override_options_internal): Update to set
14072 PARAM_PREFETCH_DYNAMIC_STRIDES.
14073 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14074 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14075 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14076 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14077 prefetch-dynamic-strides setting.
14079 2018-05-07 Luis Machado <luis.machado@linaro.org>
14081 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14082 <minimum_stride>: New const int field.
14083 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14084 minimum_stride field.
14085 (exynosm1_prefetch_tune): Likewise.
14086 (thunderxt88_prefetch_tune): Likewise.
14087 (thunderx_prefetch_tune): Likewise.
14088 (thunderx2t99_prefetch_tune): Likewise.
14089 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
14090 (aarch64_override_options_internal): Update to set
14091 PARAM_PREFETCH_MINIMUM_STRIDE.
14092 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14093 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14094 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14095 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14096 stride is constant and is below the minimum stride threshold.
14098 2018-05-07 Luis Machado <luis.machado@linaro.org>
14100 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
14103 2018-05-07 Luis Machado <luis.machado@linaro.org>
14105 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14106 <prefetch_dynamic_strides>: New const bool field.
14107 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14108 prefetch_dynamic_strides.
14109 (exynosm1_prefetch_tune): Likewise.
14110 (thunderxt88_prefetch_tune): Likewise.
14111 (thunderx_prefetch_tune): Likewise.
14112 (thunderx2t99_prefetch_tune): Likewise.
14113 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
14115 (aarch64_override_options_internal): Update to set
14116 PARAM_PREFETCH_DYNAMIC_STRIDES.
14117 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14118 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14119 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14120 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14121 prefetch-dynamic-strides setting.
14123 2018-05-07 Luis Machado <luis.machado@linaro.org>
14125 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14126 <minimum_stride>: New const int field.
14127 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14128 minimum_stride field.
14129 (exynosm1_prefetch_tune): Likewise.
14130 (thunderxt88_prefetch_tune): Likewise.
14131 (thunderx_prefetch_tune): Likewise.
14132 (thunderx2t99_prefetch_tune): Likewise.
14133 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
14134 (aarch64_override_options_internal): Update to set
14135 PARAM_PREFETCH_MINIMUM_STRIDE.
14136 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14137 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14138 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14139 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14140 stride is constant and is below the minimum stride threshold.
14142 2018-05-06 Jakub Jelinek <jakub@redhat.com>
14145 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
14146 the type is addressable. Don't force op into register if it has
14149 2018-05-05 Roland McGrath <mcgrathr@google.com>
14152 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
14153 any section for which we don't know a specific type it should have,
14154 regardless of name. Previously this was done only for the exact
14155 names ".init_array", ".fini_array", and ".preinit_array".
14156 (default_elf_asm_named_section): Add comment about
14157 relationship with default_section_type_flags and SECTION_NOTYPE.
14158 (get_section): Don't consider it a type conflict if one side has
14159 SECTION_NOTYPE and the other doesn't, as long as neither has the
14160 SECTION_BSS et al used in the default_section_type_flags logic.
14162 2018-05-05 Tom de Vries <tom@codesourcery.com>
14165 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
14166 (workaround_barsyncs): New function.
14167 (nvptx_reorg): Use workaround_barsyncs.
14168 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14169 (define_expand "nvptx_membar_cta"): New define_expand.
14170 (define_insn "*nvptx_membar_cta"): New insn.
14172 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
14174 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
14175 To improve optimization opportunities.
14176 * builtin-types.def: The new needed builtin types for the above.
14178 2018-05-04 Richard Biener <rguenther@suse.de>
14180 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
14181 * gimple-ssa-store-merging.c
14182 (imm_store_chain_info::output_merged_store): Remove redundant create,
14183 release split_store vector contents on failure.
14184 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
14185 scalar stmt vector on cache hit.
14187 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
14189 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
14191 * config.gcc (powerpc-xilinx-eabi*): Remove.
14192 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
14194 (fusion_addis_mem_combo_load): Ditto.
14195 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
14197 (rs6000_cpu_cpp_builtins): Ditto.
14198 * config/rs6000/rs6000-linux.c
14199 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
14200 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
14201 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
14203 (rs6000_setup_reg_addr_masks): Ditto.
14204 (rs6000_init_hard_regno_mode_ok): Ditto.
14205 (rs6000_option_override_internal): Ditto.
14206 (legitimate_lo_sum_address_p): Ditto.
14207 (rs6000_legitimize_address): Ditto.
14208 (rs6000_legitimize_reload_address): Ditto.
14209 (rs6000_legitimate_address_p): Ditto.
14210 (abi_v4_pass_in_fpr): Ditto.
14211 (setup_incoming_varargs): Ditto.
14212 (rs6000_gimplify_va_arg): Ditto.
14213 (rs6000_split_multireg_move): Ditto.
14214 (rs6000_savres_strategy): Ditto.
14215 (rs6000_emit_prologue_components): Ditto.
14216 (rs6000_emit_epilogue_components): Ditto.
14217 (rs6000_emit_prologue): Ditto.
14218 (rs6000_emit_epilogue): Ditto.
14219 (rs6000_elf_file_end): Ditto.
14220 (rs6000_function_value): Ditto.
14221 (rs6000_libcall_value): Ditto.
14222 * config/rs6000/rs6000.h: Ditto.
14223 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
14224 (TARGET_MINMAX): ... this. New.
14225 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
14226 * config/rs6000/rs6000.md: Remove Xilinx FP support.
14227 (*movsi_internal1_single): Delete.
14228 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
14229 mfpu=, mxilinx-fpu): Delete.
14230 * config/rs6000/singlefp.h: Delete.
14231 * config/rs6000/sysv4.h: Remove Xilinx FP support.
14232 * config/rs6000/t-rs6000: Ditto.
14233 * config/rs6000/t-xilinx: Delete.
14234 * config/rs6000/titan.md: Adjust for fp_type removal.
14235 * config/rs6000/vsx.md: Remove Xilinx FP support.
14236 (VStype_simple): Delete.
14237 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
14238 * config/rs6000/xfpu.h: Delete.
14239 * config/rs6000/xfpu.md: Delete.
14240 * config/rs6000/xilinx.h: Delete.
14241 * config/rs6000/xilinx.opt: Delete.
14242 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
14243 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
14245 2018-05-04 Tom de Vries <tom@codesourcery.com>
14248 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
14251 2018-05-04 Richard Biener <rguenther@suse.de>
14253 PR middle-end/85627
14254 * tree-complex.c (update_complex_assignment): We are always in SSA form.
14255 (expand_complex_div_wide): Likewise.
14256 (expand_complex_operations_1): Likewise.
14257 (expand_complex_libcall): Preserve EH info of the original stmt.
14258 (tree_lower_complex): Handle removed blocks.
14259 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
14260 on complex multiplication and division libcall builtins.
14262 2018-05-04 Richard Biener <rguenther@suse.de>
14264 PR middle-end/85574
14265 * fold-const.c (negate_expr_p): Restrict negation of operand
14266 zero of a division to when we know that can happen without
14268 (fold_negate_expr_1): Likewise.
14270 2018-05-04 Jakub Jelinek <jakub@redhat.com>
14273 * real.h (real_nextafter): Declare.
14274 * real.c (real_nextafter): New function.
14275 * fold-const-call.c (fold_const_nextafter): New function.
14276 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
14277 CASE_CFN_NEXTTOWARD.
14278 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
14279 even when arg1_mode is different from arg0_mode.
14281 2018-05-03 Nathan Sidwell <nathan@acm.org>
14283 * doc/extend.texi (Deprecated Features): Remove
14284 -ffriend-injection.
14285 (Backwards Compatibility): Likewise.
14286 * doc/invoke.texi (C++ Language Options): Likewise.
14287 (C++ Dialect Options): Likewise.
14289 2018-05-03 Jakub Jelinek <jakub@redhat.com>
14292 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
14293 _mm512_mask_mullox_epi64): New intrinsics.
14295 2018-05-03 Tom de Vries <tom@codesourcery.com>
14298 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14299 dump files): Add offload-tree.
14301 2018-05-03 Richard Biener <rguenther@suse.de>
14303 PR tree-optimization/85615
14304 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
14305 to loops not nested in BBs loop father to avoid creating multi-entry
14308 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14310 PR tree-optimization/70291
14311 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
14312 arguments. Change return type to tree. Emit libcall as a new
14313 statement rather than replacing existing one when inplace_p is true.
14314 (expand_complex_multiplication_components): New function.
14315 (expand_complex_multiplication): Expand floating-point complex
14316 multiplication using the above.
14317 (expand_complex_division): Rename inner_type parameter to type.
14318 Update expand_complex_libcall call-site.
14319 (expand_complex_operations_1): Update expand_complex_multiplication
14320 and expand_complex_division call-sites.
14322 2018-05-02 Jakub Jelinek <jakub@redhat.com>
14325 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
14326 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
14327 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
14328 the highest significant bit of the shift count mask is clear. In
14329 check whether and[sq]i3 is needed verify that all significant bits
14330 of the shift count other than the highest are set.
14332 2018-05-02 Tom de Vries <tom@codesourcery.com>
14335 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
14336 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
14337 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
14338 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
14339 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
14340 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
14341 __builtin_goacc_parlevel_size.
14343 2018-05-02 Richard Biener <rguenther@suse.de>
14345 PR tree-optimization/85597
14346 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
14347 do not use split vect_get_vec_defs call but call vect_get_slp_defs
14350 2018-05-02 Tom de Vries <tom@codesourcery.com>
14353 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14354 dump files): Add ltrans-tree.
14356 2018-05-02 Tom de Vries <tom@codesourcery.com>
14359 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14360 dump files): Add wpa-ipa.
14362 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
14364 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
14365 powerpc*-*-linux*paired* target.
14366 * config/rs6000/750cl.h: Delete.
14367 * config/rs6000/paired.h: Delete.
14368 * config/rs6000/paired.md: Delete.
14369 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
14371 * config/rs6000/rs6000-builtin.def: Remove paired float support.
14372 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
14373 comment. Remove paired float support.
14374 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
14375 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
14377 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
14378 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
14380 * config/rs6000/rs6000.c: Remove paired float support.
14381 (paired_expand_vector_init, paired_expand_vector_move,
14382 paired_emit_vector_compare, paired_emit_vector_cond_expr,
14383 (paired_expand_lv_builtin, paired_expand_stv_builtin,
14384 paired_expand_builtin, paired_expand_predicate_builtin,
14385 paired_init_builtins): Delete.
14386 * config/rs6000/rs6000.h: Remove paired float support.
14387 * config/rs6000/rs6000.md: Remove paired float support.
14388 (move_from_CR_ov_bit): Delete.
14389 * config/rs6000/rs6000.opt (mpaired): Delete.
14390 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
14391 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
14393 2018-05-02 Richard Biener <rguenther@suse.de>
14395 PR middle-end/85567
14396 * gimplify.c (gimplify_save_expr): When in SSA form allow
14397 SAVE_EXPRs to compute to SSA vars.
14399 2018-05-02 Jakub Jelinek <jakub@redhat.com>
14402 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
14403 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
14404 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
14405 clobber operands[2], instead use a new pseudo. Formatting fixes.
14407 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
14409 PR tree-optimization/85586
14410 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
14411 exit early for statements in the same group if the accesses are
14414 2018-05-02 Tom de Vries <tom@codesourcery.com>
14417 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
14420 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
14422 PR tree-optimization/85143
14423 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
14425 2018-05-01 Tom de Vries <tom@codesourcery.com>
14428 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
14429 not found" error message.
14431 2018-05-01 Tom de Vries <tom@codesourcery.com>
14434 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
14435 * vec.c (test_ordered_remove_if): New function.
14436 (vec_c_tests): Call test_ordered_remove_if.
14437 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
14438 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
14439 * tree-vect-patterns.c (vect_pattern_recog_1): Use
14440 VEC_ORDERED_REMOVE_IF.
14442 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14444 PR tree-optimization/82665
14445 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
14446 pointer subtraction where arguments come from a memchr call.
14448 2018-05-01 Jakub Jelinek <jakub@redhat.com>
14450 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
14451 --push-state --as-needed and --pop-state instead of --as-needed and
14452 --no-as-needed if ld supports it.
14453 * configure: Regenerated.
14456 * doc/install.texi2html: Replace _002d with - and _002a with * in
14457 generated html files using sed.
14459 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14462 * gcc-rich-location.c (blank_line_before_p): New function.
14463 (use_new_line): New function.
14464 (gcc_rich_location::add_fixit_insert_formatted): New function.
14465 * gcc-rich-location.h
14466 (gcc_rich_location::add_fixit_insert_formatted): New function.
14468 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14470 * selftest.c (assert_streq): Rename "expected" and "actual" to
14471 "val1" and "val2". Extend NULL-handling to cover both inputs
14472 symmetrically, while still requiring both to be non-NULL for a pass.
14473 * selftest.h (assert_streq): Rename "expected" and "actual" to
14475 (ASSERT_EQ): Likewise.
14476 (ASSERT_EQ_AT): Likewise.
14477 (ASSERT_KNOWN_EQ): Likewise.
14478 (ASSERT_KNOWN_EQ_AT): Likewise.
14479 (ASSERT_NE): Likewise.
14480 (ASSERT_MAYBE_NE): Likewise.
14481 (ASSERT_MAYBE_NE_AT): Likewise.
14482 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
14483 the assertion to pass.
14484 (ASSERT_STREQ_AT): Likewise.
14486 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
14488 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
14489 interaction with -pie.
14491 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14493 * selftest.h: Fix alphabetization of per-source-file selftest
14496 2018-04-30 Jason Merrill <jason@redhat.com>
14498 PR c++/61982 - dead stores to destroyed objects.
14499 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
14502 2018-04-30 Jason Merrill <jason@redhat.com>
14504 * tree.c (build_clobber): New.
14505 * tree.h: Declare it.
14506 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
14508 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14510 * diagnostic-show-locus.c (layout::layout): Update for
14511 location_get_source_line returning a char_span.
14512 (struct char_span): Move to input.h.
14513 (struct correction): Update for fields in char_span becoming
14515 (struct source_line): Update for location_get_source_line
14516 returning a char_span.
14517 (layout::print_line): Likewise.
14518 * edit-context.c (edited_file::print_content): Likewise.
14519 (edited_file::print_diff_hunk): Likewise.
14520 (edited_file::print_run_of_changed_lines): Likewise.
14521 (edited_file::get_num_lines): Likewise.
14522 (edited_line::edited_line): Likewise.
14523 * final.c (asm_show_source): Likewise.
14524 * input.c (location_get_source_line): Convert return type
14525 from const char * to char_span, losing the final "line_len"
14527 (dump_location_info): Update for the above.
14528 (get_substring_ranges_for_loc): Likewise. Use a char_span
14529 when handling the literal within the line.
14530 (test_reading_source_line): Update for location_get_source_line
14531 returning a char_span.
14532 * input.h (class char_span): Move here from
14533 diagnostic-show-locus.c, converting from a struct to a class.
14534 Make data members private.
14535 (char_span::operator bool): New.
14536 (char_span::length): New.
14537 (char_span::get_buffer): New.
14538 (char_span::operator[]): New.
14539 (char_span::subspan): Make const.
14540 (char_span::xstrdup): New.
14541 (location_get_source_line): Convert return type from const char *
14542 to char_span, losing the final "line_size" param.
14544 2018-04-30 Jan Hubicka <jh@suse.cz>
14546 * lto-wrapper.c (ltrans_priorities): New static var.
14547 (cmp_priority): New.
14548 (run_gcc): Read priorities and if doing parallel build order
14549 the Makefile by them.
14551 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14553 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
14555 2018-04-30 Richard Biener <rguenther@suse.de>
14557 * tree-cfg.c (verify_address): Remove base argument, add
14558 flag whether to check TREE_ADDRESSABLE and do that.
14559 (verify_expr): Remove.
14560 (verify_types_in_gimple_reference): Add pieces from verify_expr.
14561 (verify_gimple_assign_single): Likewise.
14562 (verify_gimple_switch): Likewise.
14563 (verify_expr_location_1): Dereference tp once. Add (disabled)
14564 piece from verify_expr.
14565 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
14567 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14569 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
14571 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14573 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
14574 (small_data_pattern): Likewise.
14575 (arc_rewrite_small_data): Likewise.
14576 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
14577 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
14578 (get_symbol_alignment): New function.
14579 (legitimate_small_data_address_p): Likewise.
14580 (legitimate_scaled_address): Update, call
14581 legitimate_small_data_address_p.
14582 (output_sdata): New static variable.
14583 (arc_print_operand): Update how we handle small data operands.
14584 (arc_print_operand_address): Likewise.
14585 (arc_legitimate_address_p): Update, use
14586 legitimate_small_data_address_p.
14587 (arc_rewrite_small_data_p): Remove.
14588 (arc_rewrite_small_data_1): Likewise.
14589 (arc_rewrite_small_data): Likewise.
14590 (small_data_pattern): Likewise.
14591 (compact_sda_memory_operand): Update to use
14592 legitimate_small_data_address_p and get_symbol_alignment.
14593 (prepare_move_operands): Don't rewite sdata pattern.
14594 (prepare_extend_operands): Remove.
14595 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
14597 (zero_extendqisi2): Likewise.
14598 (zero_extendhisi2): Likewise.
14599 (extendqihi2): Likewise.
14600 (extendqisi2): Likewise.
14601 (extendhisi2): Likewise.
14602 (addsi3): Likewise.
14603 (subsi3): Likewise.
14604 (andsi3): Likewise.
14605 * config/arc/constraints.md (Usd): Change it to memory constraint.
14607 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14609 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
14610 as source of std instructions.
14611 * config/arc/arc.md (movsi_insn): Update pattern predicate to
14612 allow 6-bit constants as source for store instructions.
14613 (movdi_insn): Update instruction pattern to allow 6-bit constants
14614 as source for store instructions.
14616 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
14618 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
14620 2018-04-30 Nathan Sidwell <nathan@acm.org>
14621 Sandra Loosemore <sandra@codesourcery.com>
14623 * dumpfile.c (dump_open): Allow '-' for stdout.
14624 * doc/invoke.texi (Developer Options): Document dump filename
14625 determination early. Document stdin/stdout selection.
14627 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
14629 Microblaze Target: PIC data text relative
14631 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
14632 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
14634 * config/microblaze/microblaze.h (microblaze_constant_address_p):
14635 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
14636 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
14637 New addressing mode for data-text relative position indepenedent code.
14638 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
14639 'ADDRESS_SYMBOLIC_TXT_REL'.
14640 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
14641 (microblaze_legitimate_pic_operand): Exclude function calls from
14642 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
14643 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
14645 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14646 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14647 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
14648 for 'address + offset'.
14649 (microblaze_expand_prologue): Add new function prologue call for
14651 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
14652 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
14653 table in case of TARGET_PIC_DATA_TEXT_REL.
14654 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
14655 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
14656 Add new macros 'UNSPEC_TEXT',
14657 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
14658 + exclude function calls from 'UNSPEC_PLT' in case of data text
14660 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14661 new target hook for generating address diff vector tables in case of
14663 * doc/tm.texi : Regenerate.
14664 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
14665 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
14666 of addr diff vector generation.
14667 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14668 target hook definition.
14669 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
14670 Add default function for generate_pic_addr_diff_vec -> flag_pic.
14671 * doc/invoke.texi (Add new pic option): Add new microblaze pic
14672 option for data text relative.
14674 2018-04-30 Richard Biener <rguenther@suse.de>
14676 * tree-chrec.h (evolution_function_is_constant_p): Remove
14678 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
14680 2018-04-30 Richard Biener <rguenther@suse.de>
14683 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
14685 2018-04-30 Richard Biener <rguenther@suse.de>
14687 PR tree-optimization/28364
14688 PR tree-optimization/85275
14689 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
14690 copying first exit test.
14692 2018-04-28 Mark Wielaard <mark@klomp.org>
14694 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
14695 dwarf_version >= 5.
14696 (dwarf_AT): Handle DW_AT_addr_base.
14697 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
14699 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
14702 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
14703 (*ashl<dwi>3_doubleword_mask_1): Ditto.
14704 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
14705 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
14707 2018-04-28 Richard Biener <rguenther@suse.de>
14709 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
14710 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
14711 to reflect use. Only add interesting stmts.
14713 2018-04-27 Martin Jambor <mjambor@suse.cz>
14716 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
14717 the jump function allows for passing through aggregate values.
14719 2018-04-27 David Malcolm <dmalcolm@redhat.com>
14721 * input.h (in_system_header_at): Convert from macro to inline
14723 (from_macro_expansion_at): Likewise.
14724 (from_macro_definition_at): Likewise.
14726 2018-04-27 Jeff Law <law@redhat.com>
14728 * config.gcc: Mark tile* targets as deprecated/obsolete.
14730 2018-04-27 Richard Biener <rguenther@suse.de>
14732 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
14735 2018-04-27 Richard Biener <rguenther@suse.de>
14737 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
14739 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
14741 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
14742 with Yd constraint. Set "preferred_for_speed" attribute from
14743 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
14744 with Yd constraint.
14745 (*movdi_internal): Ditto.
14746 (movti_interunit splitters): Remove
14747 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
14748 (movdi_interunit splitters): Ditto.
14749 * config/i386/constraints.md (Ye): Remove.
14750 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
14752 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14755 * config/aarch64/constraints.md (Usg): Limit to 31.
14756 (Usj): Limit to 63.
14758 2018-04-27 Jakub Jelinek <jakub@redhat.com>
14760 PR tree-optimization/85529
14761 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
14762 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
14763 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
14764 zero extension or masking of the MSB bit.
14765 (optimize_range_tests): Add FIRST_BB argument, pass it through
14766 to optimize_range_tests_var_bound.
14767 (maybe_optimize_range_tests, reassociate_bb): Adjust
14768 optimize_range_tests callers.
14770 2018-04-26 Richard Biener <rguenther@suse.de>
14771 Jakub Jelinek <jakub@redhat.com>
14773 * cgraph.h (symbol_table): Just declare debug method here.
14774 * symtab.c (symbol_table::debug): Define.
14776 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
14778 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
14780 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
14782 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
14783 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
14784 (*movdi_internal): Substitute Yi and Yj constraint with x
14785 and Ym and Yn constraint with y constraint. Update "isa"
14786 attribute and set "preferred_for_speed" attribute from
14787 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
14788 (*movsi_internal): Ditto.
14789 (*movdf_internal): Ditto.
14790 (*movsf_internal): Ditto.
14791 (*zero_extendsidi2): Ditto.
14792 * config/i386/sse.md (vec_set<mode>_0): Ditto.
14793 (sse2_loadld): Ditto.
14794 (*vec_extract<ssevecmodelower>_0): Ditto.
14795 (*vec_extractv4si_0_zext_sse4): Ditto.
14796 (vec_concatv2di): Ditto.
14797 (*vec_dup<mode>): Ditto.
14798 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
14799 * config/i386/constraints.md (Yi): Remove.
14804 2018-04-26 Nathan Sidwell <nathan@acm.org>
14806 * dumpfile.c (dump_open): New.
14807 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
14808 (dump_finish): Detect stdio/stderr by value not name.
14810 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
14812 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
14814 2018-04-26 Tom de Vries <tom@codesourcery.com>
14817 * config/nvptx/nvptx.c (verify_neutering_jumps)
14818 (verify_neutering_labels): New function
14819 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
14821 2018-04-26 Tom de Vries <tom@codesourcery.com>
14824 * config/nvptx/nvptx.c (needs_neutering_p): New function.
14825 (nvptx_single): Use needs_neutering_p to skip over insns that do not
14828 2018-04-26 Richard Biener <rguenther@suse.de>
14829 Tom de Vries <tom@codesourcery.com>
14832 * lto-streamer-out.c (output_function): Fixup loops if required to match
14833 discovery done in the reader.
14835 2018-04-26 Richard Biener <rguenther@suse.de>
14837 PR tree-optimization/85116
14838 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14839 have a loop exit from the single latch predecessor. Remove
14840 case of header with just condition.
14841 (ch_base::copy_headers): Exclude infinite loops from any
14843 (pass_ch::execute): Record exits.
14845 2018-04-26 Richard Biener <rguenther@suse.de>
14847 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14848 prologue cost vector and pass it to vect_get_load_cost.
14849 (vect_get_peeling_costs_all_drs): Likewise.
14850 (vect_peeling_hash_get_lowest_cost): Likewise.
14851 (vect_enhance_data_refs_alignment): Likewise.
14853 2018-04-26 Richard Biener <rguenther@suse.de>
14855 PR middle-end/85450
14856 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14857 checking of integer<->pointer conversions.
14858 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14859 sign-/zero-extending pointer types.
14860 (expand_omp_for_static_chunk): Likewise.
14862 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
14863 Jean Lee <xiaoyur347@gmail.com>
14865 * config/mips/mips.c (mips_asan_shadow_offset): New function.
14866 (TARGET_ASAN_SHADOW_OFFSET): Define.
14867 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14868 true for -fsanitize=address.
14870 2018-04-25 Mark Wielaard <mark@klomp.org>
14872 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14875 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14877 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14878 than "alu", remove explicit "memory" and "imm_disp" attributes.
14879 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14881 PR middle-end/85414
14882 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14883 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14884 gen_lowpart_no_emit.
14886 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
14889 * config/i386/i386.c (ix86_expand_builtin): Change memory
14890 operand to XI, extend p0 to Pmode.
14891 * config/i386/i386.md: Change unspec volatile and operand
14892 1 mode to XI, change operand 0 mode to P.
14894 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14896 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14897 GET_MODE_MASK before any checking.
14898 (nds32_can_use_bset_p): Likewise.
14899 (nds32_can_use_btgl_p): Likewise.
14901 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14903 * config/nds32/nds32-doubleword.md: New define_split pattern for
14904 illegal register number.
14906 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14908 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14910 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14912 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14914 2018-04-25 Richard Biener <rguenther@suse.de>
14916 * lto-streamer.h (LTO_major_version): Bump to 8.
14918 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14920 * BASE-VER: Set to 9.0.0.
14922 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
14924 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14925 in __abskf2 and __powikf2.
14927 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14930 * config/aarch64/constraints.md (Usg, Usj): New constraints.
14931 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14932 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14933 Use the above on operand 2. Reindent.
14934 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14936 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14939 * common/config/i386/i386-common.c (ix86_handle_option): Don't
14941 * config/i386/i386.opt (mcet): Removed.
14942 * doc/install.texi: Remove -mcet documentation.
14943 * doc/invoke.texi: Likewise.
14945 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14948 * doc/install.texi: Remove -mcet from bootstrap-cet.
14950 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14953 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14954 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14958 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14959 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14960 containing a CONST_VECTOR.
14962 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
14964 * doc/install.texi: Update newlib dependency for nvptx.
14966 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14969 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14970 instead of INTVAL when shifting x left.
14972 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
14974 PR tree-optimization/85478
14975 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14976 vect_grouped_store_supported for single element vectors.
14978 2018-04-24 Richard Biener <rguenther@suse.de>
14981 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14982 load cost increase to the case of non-constant step.
14984 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14987 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14988 destination if any_malformed_asm.
14990 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
14992 PR middle-end/85496
14993 * expr.c (store_field): In the bitfield case, if the value comes from
14994 a function call and is returned in registers by means of a PARALLEL,
14995 do not change the mode of the temporary unless BLKmode and VOIDmode.
14997 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
14999 PR rtl-optimization/85423
15000 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
15001 dependencies to debug insns when the previous insn is non-debug.
15003 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
15005 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
15006 enums into a single definition.
15007 (fls): Fix predicates and printing.
15010 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
15012 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
15013 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
15014 and short u6 immediate.
15015 (check_if_valid_sleep_operand): Remove.
15016 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
15018 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15020 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
15021 flag_always_save_lp condition.
15022 * config/nds32/nds32.opt (malways-save-lp): New option.
15024 2018-04-22 Shiva Chen <shiva0217@gmail.com>
15026 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
15027 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
15028 * config/nds32/nds32.h
15029 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
15030 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
15032 2018-04-22 Shiva Chen <shiva0217@gmail.com>
15034 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
15035 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
15037 2018-04-22 Shiva Chen <shiva0217@gmail.com>
15038 Chung-Ju Wu <jasonwucj@gmail.com>
15040 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
15042 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
15043 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
15045 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15047 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
15049 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15051 * config/nds32/nds32-protos.h (nds32_data_alignment,
15052 nds32_local_alignment): Declare.
15053 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
15054 nds32_local_alignment): New functions.
15055 (TARGET_CONSTANT_ALIGNMENT): Define.
15056 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
15058 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15060 * config/nds32/nds32.c
15061 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
15062 (TARGET_MODES_TIEABLE_P): Likewise.
15064 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15066 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
15067 level Ofast and Og.
15069 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
15070 Chung-Ju Wu <jasonwucj@gmail.com>
15072 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15073 for unaligned access.
15074 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15076 * config/nds32/nds32-intrinsic.md: Likewise.
15077 * config/nds32/nds32_intrinsic.h: Likewise.
15078 * config/nds32/nds32.h (nds32_builtins): Likewise.
15079 * config/nds32/nds32.opt (munaligned-access): New option.
15080 * config/nds32/nds32.c (nds32_asm_file_start): Display
15081 flag_unaligned_access status.
15083 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
15085 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
15086 -mno-relax is present.
15087 * config/riscv/linux.h (LINK_SPEC): Ditto.
15089 2018-04-20 Martin Sebor <msebor@redhat.com>
15092 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
15094 (gimple_fold_builtin_stxcpy_chk): Same.
15095 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
15097 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
15100 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
15101 __powikf2 when long double is IEEE 128-bit.
15103 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
15105 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
15106 step to make sure stack always aligned.
15108 2018-04-20 Carl Love <cel@us.ibm.com>
15111 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
15112 size check for arg0.
15114 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
15115 Tom de Vries <tom@codesourcery.com>
15118 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
15119 Emit insns for calls too.
15120 (nvptx_find_par): Always look for worker-level predecessor insn.
15121 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
15123 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
15124 (nvptx_process_pars): Propagate frames for calls.
15126 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
15129 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
15131 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
15132 (ix86_handle_option): Don't handle OPT_mibt.
15133 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
15135 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
15137 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
15138 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
15139 (ix86_target_macros): Define __CET__ with flag_cf_protection
15140 for -fcf-protection.
15141 * config/i386/i386.c (isa2_opts): Remove -mibt.
15142 * config/i386/i386.h (TARGET_IBT): Removed.
15143 (TARGET_IBT_P): Likewise.
15144 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
15145 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
15146 * config/i386/i386.opt (mcet): Update help message.
15147 (mshstk): Likewise.
15149 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
15150 -mcet as an alias for -mshstk.
15152 2018-04-20 Richard Biener <rguenther@suse.de>
15154 PR middle-end/85475
15155 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
15156 complexity by forcing a single use of the multiply operand.
15158 2018-04-20 Martin Jambor <mjambor@suse.cz>
15161 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
15162 recursion dependency to only apply to non-clones.
15164 2018-04-20 Martin Jambor <mjambor@suse.cz>
15167 * ipa-cp.c (create_specialized_node): Check that clones of
15168 self-recursive edges exist during IPA-CP.
15170 2018-04-19 Toon Moene <toon@moene.org>
15172 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
15175 2018-04-19 Jakub Jelinek <jakub@redhat.com>
15177 PR tree-optimization/85467
15178 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
15179 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
15180 VECTOR_CST element to type.
15182 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15185 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
15186 * config/i386/i386.md (builtin_setjmp_setup): Removed.
15187 (builtin_longjmp): Likewise.
15188 (save_stack_nonlocal): New pattern.
15189 (restore_stack_nonlocal): Likewise.
15191 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15194 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
15195 Replace ASM_OUTPUT_LABEL with fprintf.
15197 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15200 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
15201 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
15202 * config/i386/i386-c.c (ix86_target_macros_internal): Also
15203 define __IBT__ and __SHSTK__ for -fcf-protection.
15204 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
15206 (ix86_trampoline_init): Likewise.
15207 (x86_output_mi_thunk): Likewise.
15208 (ix86_notrack_prefixed_insn_p): Likewise.
15209 (ix86_option_override_internal): Don't disallow -fcf-protection.
15210 * config/i386/i386.md (rdssp<mode>): Also enable for
15212 (incssp<mode>): Likewise.
15213 (nop_endbr): Likewise.
15214 * config/i386/i386.opt (mcet): Change help message to built-in
15217 (mshstk): Likewise.
15218 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
15219 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
15220 enable CET built-in functions.
15222 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
15224 * common/config/i386/i386-common.c
15225 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
15226 OPTION_MASK_ISA_MOVDIRI_UNSET,
15227 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
15228 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
15229 * config.gcc (movdirintrin.h): New header.
15230 * config/i386/cpuid.h (bit_MOVDIRI,
15231 bit_MOVDIR64B): New bits.
15232 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
15234 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
15235 (VOID, PVOID, PCVOID)): New function types.
15236 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
15237 __builtin_ia32_directstoreu_u64,
15238 __builtin_ia32_movdir64b): New builtins.
15239 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
15240 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
15242 (ix86_valid_target_attribute_inner_p): Ditto.
15243 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
15244 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
15245 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
15246 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
15247 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
15248 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
15249 (movdiri<mode>, movdir64b_<mode>): New.
15250 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
15251 * config/i386/immintrin.h: Include movdirintrin.h.
15252 * config/i386/movdirintrin.h: New file.
15253 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
15255 2018-04-19 Richard Biener <rguenther@suse.de>
15257 PR middle-end/85455
15258 * cfg.c (clear_bb_flags): When loop state says we have
15259 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
15261 2018-04-19 Richard Biener <rguenther@suse.de>
15263 PR tree-optimization/84737
15264 * tree-vect-data-refs.c (vect_copy_ref_info): New function
15265 copying restrict info.
15266 (vect_setup_realignment): Use it.
15267 * tree-vectorizer.h (vect_copy_ref_info): Declare.
15268 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
15269 the first DR to all generated stores.
15270 (vectorizable_load): Likewise for loads.
15272 2018-04-19 Jakub Jelinek <jakub@redhat.com>
15274 PR tree-optimization/85446
15275 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
15276 the integral and pointer types to have the same precision.
15278 * doc/install.texi: Document --disable-cet being the default and
15281 2018-04-18 Martin Liska <mliska@suse.cz>
15283 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
15286 2018-04-18 Martin Liska <mliska@suse.cz>
15289 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
15292 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15293 arguments if they are comparable.
15295 2018-04-18 Martin Liska <mliska@suse.cz>
15298 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
15301 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15304 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
15307 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
15308 ENDBR after calling __morestack.
15310 2018-04-18 David Malcolm <dmalcolm@redhat.com>
15313 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
15314 by using gcc_base_ver to generate a gcc_driver_version, and use
15315 it when generating GCC_DRIVER_NAME.
15316 * configure: Regenerate.
15318 2018-04-18 Jakub Jelinek <jakub@redhat.com>
15321 * config.gcc: Obsolete powerpc*-*-*spe*.
15323 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15326 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
15327 (stabstr_D): Change type of unum from unsigned int to
15328 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
15331 2018-04-17 Jim Wilson <jimw@sifive.com>
15334 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
15335 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
15336 Set arg_pointer_offset after using pretend_args_size.
15338 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15340 PR rtl-optimization/85431
15341 * dse.c (record_store): Ignore zero width stores.
15344 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
15345 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
15346 __builtin_stack_restore rather than after it.
15347 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
15348 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
15349 argument instead of virtual_dynamic_stack_rtx.
15351 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
15353 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
15355 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
15356 Add note to error message to explain internal mapping of overloaded
15357 built-in function name to non-overloaded built-in function name.
15358 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
15361 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
15364 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
15365 where the inputs overlap with the output.
15367 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15369 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
15370 (=v, v) alternative and explicit "memory" attribute.
15371 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
15372 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15374 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
15375 "sselog1" type instead of "sselog".
15376 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
15377 "sselog". Remove explicit "memory" attribute.
15378 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
15379 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15381 (vec_extract_hi_v32hi): Merge all alternatives into one, use
15382 "sselog1" type instead of "sselog". Remove explicit "memory"
15384 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
15385 use "sselog1" type instead of "sselog". Remove explicit "memory"
15387 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
15388 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15390 (vec_extract_hi_v64qi): Merge all alternatives into one, use
15391 "sselog1" type instead of "sselog". Remove explicit "memory"
15393 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
15394 use "sselog1" type instead of "sselog". Remove explicit "memory"
15398 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
15400 PR middle-end/85414
15401 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
15404 2018-04-17 Martin Jambor <mjambor@suse.cz>
15407 * ipa-cp.c (create_specialized_node): Call
15408 expand_all_artificial_thunks if necessary.
15410 2018-04-17 Martin Liska <mliska@suse.cz>
15413 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
15414 in message, remote space in between '_G' and '('.
15416 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15419 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
15420 avx512f_vmcmp<mode>3<round_saeonly_name>,
15421 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
15422 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
15423 avx512f_rndscale<mode><round_saeonly_name>,
15424 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
15425 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
15426 Use %<iptr>2 instead of %2 for -masm=intel.
15427 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
15428 avx512f_vcvttss2usi<round_saeonly_name>,
15429 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
15431 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
15432 avx512f_vcvttsd2usi<round_saeonly_name>,
15433 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
15434 Use %q1 instead of %1 for -masm=intel.
15435 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
15436 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
15437 of %3 for -masm=intel.
15438 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
15440 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
15442 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
15444 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
15445 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
15447 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
15449 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
15450 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
15451 %g1 and one with %0 and %1.
15452 (avx512er_vmrcp28<mode><round_saeonly_name>,
15453 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
15454 %1 for -masm=intel.
15455 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
15456 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
15457 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
15458 of %0 and %{%4%} for -masm=intel.
15459 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
15460 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
15461 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
15462 order of %0 and %{%5%}%{z%} for -masm=intel.
15464 2018-04-17 Jan Hubicka <jh@suse.cz>
15467 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
15469 2018-04-17 Martin Liska <mliska@suse.cz>
15472 * multiple_target.c (create_dispatcher_calls): Set apostrophes
15473 for target_clone error message. Make default implementation
15474 clone to be a local declaration.
15475 (separate_attrs): Add new argument and check for an empty
15477 (expand_target_clones): Handle it.
15478 (ipa_target_clone): Make redirection just for target_clones
15481 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
15482 Tom de Vries <tom@codesourcery.com>
15484 PR middle-end/84955
15485 * omp-expand.c (expand_oacc_for): Add dummy false branch for
15486 tiled basic blocks without omp continue statements.
15488 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
15491 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
15492 vec_extract expression as having side effects to make sure it gets
15495 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
15498 * config/i386/i386.c (get_builtin_code_for_version): Check
15501 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
15504 * config.gcc: Support "skylake".
15505 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15507 * config/i386/i386.c (m_SKYLAKE): Define.
15508 (processor_target_table): Add "skylake".
15509 (ix86_option_override_internal): Add "skylake".
15510 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
15511 PROCESSOR_CANNONLAKE.
15512 (get_builtin_code_for_version): Fix priority for
15513 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
15514 PROCESSOR_SKYLAKE-AVX512.
15515 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
15516 (processor_type): Add PROCESSOR_SKYLAKE.
15518 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
15519 Jason Merrill <jason@redhat.com>
15522 * convert.c (convert_to_integer_1): Use direct recursion for
15523 enumeral types and types with a precision less than the number
15524 of bits in their mode.
15526 2018-04-16 Julia Koval <julia.koval@intel.com>
15529 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
15530 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
15532 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
15535 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
15536 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
15537 and -mno-direct-move.
15539 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
15542 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
15543 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
15544 Ensure negative shifts result in {0}.
15546 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
15548 PR rtl-optimization/79916
15549 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
15550 regs (if any) to define how to gnerate SD moves when LRA is in
15553 2018-04-13 Jakub Jelinek <jakub@redhat.com>
15555 PR rtl-optimization/85393
15556 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
15557 * except.c (expand_dw2_landing_pad_for_region): Make static.
15558 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
15559 a label and unconditional jump to old_bb, rather than
15560 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
15563 PR rtl-optimization/85376
15564 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
15565 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
15566 instead of a specific value.
15568 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
15569 Bin Cheng <bin.cheng@arm.com>
15571 PR tree-optimization/82965
15572 PR tree-optimization/83991
15573 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
15574 by_profile_only parameter.
15575 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
15576 information if the loop was predicted to iterate too many times.
15577 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
15579 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
15582 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
15585 2018-04-13 Martin Liska <mliska@suse.cz>
15586 Jakub Jelinek <jakub@redhat.com>
15588 PR middle-end/81657
15589 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
15590 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
15591 * builtins.c (expand_builtin_memory_copy_args): Use
15592 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
15593 handle dest_addr == pc_rtx.
15595 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
15598 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
15599 asked to not generate direct moves.
15600 (fix_trunc<mode>si2_stfiwx): Similar.
15601 (fix_trunc<mode>si2_internal): Similar.
15603 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15606 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
15607 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
15608 lookup if dest in some wider mode is known to be const0_rtx and
15609 if so, record permanent equivalence for it to be ZERO_EXTEND of
15610 the narrower mode destination.
15612 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
15614 * lto-streamer-out.c (output_function): Revert 259346.
15615 * omp-expand.c (expand_oacc_for): Likewise.
15617 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
15619 PR rtl-optimization/85354
15620 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
15621 * sel-sched.c (sel_global_init): ... here.
15623 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
15626 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
15627 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
15628 mode for PE-COFF targets.
15629 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
15630 (i386_pe_asm_lto_end): Likewise.
15631 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
15632 (TARGET_ASM_LTO_END): Likewise.
15633 * config/i386/winnt.c (saved_debug_info_level): New static variable.
15634 (i386_pe_asm_lto_start): New function.
15635 (i386_pe_asm_lto_end): Likewise.
15637 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
15638 Richard Biener <rguenther@suse.de>
15640 PR middle-end/84955
15641 * lto-streamer-out.c (output_function): Fix CFG loop state before
15643 * omp-expand.c (expand_oacc_for): Handle calls to internal
15644 functions like regular functions.
15646 2018-04-12 Richard Biener <rguenther@suse.de>
15649 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
15650 for the early LTO debug to properly generate references to it
15651 during DIE emission. Do not re-use that for the skeleton for
15653 (dwarf2out_early_finish): Likewise.
15655 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15658 * config/i386/sse.md
15659 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
15660 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
15661 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
15662 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
15663 and output is a reg, avoid creating invalid lowpart subreg, but
15664 instead split into a 512-bit move. Don't split if not AVX512VL,
15665 input is xmm16+ reg and output is a mem.
15666 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
15667 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
15668 xmm16+ reg and output is a mem.
15670 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15672 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
15673 also for flag_dwarf2_cfi_asm.
15675 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15677 PR rtl-optimization/85342
15678 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
15679 a bool scalar var inside of the loop instead. Don't try to update
15680 recog_data.operand after failed apply_change_group.
15682 2018-04-12 Tom de Vries <tom@codesourcery.com>
15685 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
15686 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
15687 array with flexible array member as array without given dimension.
15688 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
15689 argument for undefined param to true.
15691 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
15694 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15695 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
15696 from PowerPC section.
15697 * config/rs6000/sysv4.opt (mcall-): Improve help text.
15698 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
15699 help text that is too long.
15700 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
15701 help text that is too long.
15702 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
15703 help text that is too long.
15705 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
15707 * config/alpha/alpha.md (stack_probe_internal): Rename
15708 from "probe_stack". Update all callers.
15710 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15712 PR rtl-optimization/84566
15713 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
15714 sched_macro_fuse_insns.
15716 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15719 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
15720 (compute_block_dependences): ... from here.
15722 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15724 PR tree-optimization/85331
15725 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
15726 from int to HOST_WIDE_INT.
15728 2018-04-11 Martin Jambor <mjambor@suse.cz>
15731 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
15732 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
15733 not the same as the source val.
15734 (cgraph_edge_brings_value_p): New parameter.
15735 (gather_edges_for_value): Pass destination value to
15736 cgraph_edge_brings_value_p.
15737 (perhaps_add_new_callers): Likewise.
15738 (get_info_about_necessary_edges): Likewise and exclude values brought
15739 only by self-recursive edges.
15740 (create_specialized_node): Redirect only clones of self-calling edges.
15741 (+self_recursive_pass_through_p): New function.
15742 (find_more_scalar_values_for_callers_subset): Use it.
15743 (find_aggregate_values_for_callers_subset): Likewise.
15744 (known_aggs_to_agg_replacement_list): Removed.
15745 (decide_whether_version_node): Re-calculate known constants for all
15746 remaining context clones.
15748 2018-04-11 Richard Biener <rguenther@suse.de>
15751 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
15752 from early DWARF output.
15753 (dwarf2out_early_finish): Output line info unconditionally into
15754 early DWARF and add reference to it.
15756 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15759 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
15760 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
15761 other than V2DFmode using iptr mode attribute.
15762 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
15764 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15766 PR rtl-optimization/84659
15767 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
15769 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15772 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
15774 (output_loc_list): Pass address of a dummy size variable even in the
15775 locview handling loop.
15776 (index_location_lists): Add comment on why skip_loc_list_entry can't
15779 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
15782 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
15785 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
15788 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15789 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
15790 and -mstring-compare-inline-limit.
15792 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15795 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
15796 for stack clash protection in a register whenever we need it to be in
15799 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15801 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
15802 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
15804 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15807 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
15809 (mlong-double-): Ditto.
15810 * config/rs6000/sysv4.opt (msdata=): Ditto.
15811 (mtls-size=): Ditto.
15813 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
15815 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15816 erroneous entries for
15817 "vector int vec_ldl (int, long int *)", and
15818 "vector unsigned int vec_ldl (int, unsigned long int *)".
15819 Add comments and entries for
15820 "vector bool char vec_ldl (int, bool char *)",
15821 "vector bool short vec_ldl (int, bool short *)",
15822 "vector bool int vec_ldl (int, bool int *)",
15823 "vector bool long long vec_ldl (int, bool long long *)",
15824 "vector pixel vec_ldl (int, pixel *)",
15825 "vector long long vec_ldl (int, long long *)",
15826 "vector unsigned long long vec_ldl (int, unsigned long long *)".
15827 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
15828 type tree bool_long_long_type_node and correct definition of
15829 bool_V2DI_type_node to make reference to this new type tree.
15830 (rs6000_mangle_type): Replace erroneous reference to
15831 bool_long_type_node with bool_long_long_type_node.
15832 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15833 comments to emphasize sign distinctions for char and int types and
15834 replace RS6000_BTI_bool_long constant with
15835 RS6000_BTI_bool_long_long constant. Also add comment to restrict
15836 use of RS6000_BTI_pixel.
15837 (bool_long_type_node): Remove this macro definition.
15838 (bool_long_long_type_node): New macro definition
15840 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15842 PR rtl-optimization/85300
15843 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15844 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15845 simplify_unary_operation fails.
15847 2018-04-10 Martin Liska <mliska@suse.cz>
15849 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15850 cgraph_edge and ipa_ref.
15852 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15856 * config/i386/sse.md
15857 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15858 computation of the VEC_MERGE selector from mask.
15859 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15860 Fix decoding of the VEC_MERGE selector into mask.
15862 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15864 PR tree-optimization/85286
15865 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15867 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15869 * final.c (final_1): Set insn_last_address as well as
15870 insn_current_address.
15872 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15875 * explow.c (emit_stack_probe): Call validize_mem on memory location
15876 before passing it to gen_probe_stack. Create address operand and
15877 legitimize it for the probe_stack_address case.
15879 2018-04-09 Jan Hubicka <jh@suse.cz>
15882 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15883 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15884 * tree.c (free_lang_data_in_type): Fix handling of binfos;
15886 (free_lang_data): Rebuild type inheritance graph.
15888 2018-04-09 Martin Sebor <msebor@redhat.com>
15890 * invoke.texi (-finline-small-functions): Mention other optimization
15892 (-findirect-inlining, -fpartial-inlining): Same.
15893 (-finline-functions-called-once): Same.
15894 (-freorder-blocks-and-partition): Same.
15896 2018-04-09 Jan Hubicka <jh@suse.cz>
15899 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15900 jumps; choose last target that matches the criteria (i.e.
15901 no partition changes for non-crossing jumps).
15902 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15903 support for redirecting crossing jumps to non-crossing.
15905 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
15907 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15908 also for naked functions.
15910 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
15912 * config/arc/arc.md (add_shift): New pattern.
15913 (add_shift2): Likewise.
15914 (sub_shift): Likewise.
15915 (sub_shift_cmp0_noout): Likewise.
15916 (compare_si_ashiftsi): Likewise.
15917 (xbfu_cmp0_noout): New combine pattern.
15918 (xbfu_cmp0"): Likewise.
15919 (movsi_set_cc_insn): Place the predicable variant first.
15920 (commutative_binary_cmp0_noout): Remove clobber.
15921 (commutative_binary_cmp0): New pattern.
15922 (noncommutative_binary_cmp0): Likewise.
15923 (noncommutative_binary_cmp0_noout): Likewise.
15924 (noncommutative_binary_comparison_result_used): Removed.
15925 (rsub_cmp0): New pattern.
15926 (rsub_cmp0_noout): Likewise.
15927 (extzvsi): Changed, keep only meaningful variants.
15928 (SQH, SEZ): New iterators.
15929 (SQH_postfix): New mode attribute.
15930 (SEZ_prefix): New code attribute.
15931 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15932 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15933 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15934 of numerical value.
15935 (noncommutative_operator): Check the availability of barrel
15938 2018-04-09 Richard Biener <rguenther@suse.de>
15940 PR tree-optimization/85284
15941 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15942 Only use the niter constraining form of simple_iv when the exit
15943 is always executed.
15945 2018-04-09 Tom de Vries <tom@codesourcery.com>
15948 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15949 (define_expand "*memory_barrier"): New define_expand.
15950 (define_insn "memory_barrier"): New insn.
15952 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15954 PR rtl-optimization/80463
15955 PR rtl-optimization/83972
15956 PR rtl-optimization/83480
15958 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15959 correct producer for the insn.
15960 (tidy_control_flow): Fixup seqnos in case of debug insns.
15962 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15964 PR rtl-optimization/83913
15966 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15967 different sched-times when merging exprs.
15969 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15971 PR rtl-optimization/83962
15973 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15974 tidy_fallthru_edge and tidy_control_flow.
15976 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15978 PR rtl-optimization/83530
15980 * sel-sched.c (force_next_insn): New global variable.
15981 (remove_insn_for_debug): When force_next_insn is true, also leave only
15982 next insn in the ready list.
15983 (sel_sched_region): When the region wasn't scheduled, make another pass
15984 over it with force_next_insn set to 1.
15986 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15988 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15990 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15991 for interrupt control.
15992 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15993 functions for interrupt control.
15994 * config/nds32/nds32-intrinsic.md: Likewise.
15995 * config/nds32/nds32_intrinsic.h: Likewise.
15996 * config/nds32/nds32.h (nds32_builtins): Likewise.
15998 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
16000 * config/nds32/nds32.c (nds32_init_machine_status,
16001 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
16002 strict_aligned_p field.
16003 (nds32_expand_to_rtl_hook): New function.
16004 (TARGET_EXPAND_TO_RTL_HOOK): Define.
16005 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
16007 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
16008 Chung-Ju Wu <jasonwucj@gmail.com>
16010 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
16011 * config/nds32/nds32-n7.md: New file.
16012 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
16013 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
16015 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
16016 * config/nds32/nds32.md (pipeline_model): Add n7.
16017 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
16018 * config/nds32/pipelines.md: Include n7 settings.
16020 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
16021 Chung-Ju Wu <jasonwucj@gmail.com>
16023 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
16024 * config/nds32/nds32-e8.md: New file.
16025 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
16026 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
16028 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
16029 * config/nds32/nds32.md (pipeline_model): Add e8.
16030 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
16031 * config/nds32/pipelines.md: Include e8 settings.
16033 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
16034 Chung-Ju Wu <jasonwucj@gmail.com>
16036 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
16037 * config/nds32/nds32-n8.md: New file.
16038 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
16039 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
16041 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
16042 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
16043 * config/nds32/nds32.md (pipeline_model): Add n8.
16044 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
16045 * config/nds32/pipelines.md: Include n8 settings.
16047 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
16048 Chung-Ju Wu <jasonwucj@gmail.com>
16050 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
16051 * config/nds32/nds32-n9-2r1w.md: New file.
16052 * config/nds32/nds32-n9-3r2w.md: New file.
16053 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
16054 nds32_register_ports): New or modify for cpu n9.
16055 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
16057 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
16058 * config/nds32/nds32-utils.c: New file.
16059 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
16060 TARGET_MUL_SLOW): Define.
16061 * config/nds32/nds32.md (pipeline_model): New attribute.
16062 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
16063 New options that support cpu n9.
16064 * config/nds32/pipelines.md: Include n9 settings.
16065 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
16067 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
16069 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
16070 information if necessary.
16071 (output_cond_branch_compare_zero): Likewise.
16072 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
16073 (nds32_target_alignment): Refine for alignment.
16074 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
16075 (FUNCTION_BOUNDARY): Modify.
16076 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
16078 * config/nds32/nds32.opt (malways-align, malign-functions): New.
16080 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
16082 * config/nds32/constants.md (unspec_volatile_element): Add values for
16083 TLB operation and data prefetch.
16084 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
16085 functions for TLB operation and data prefetch.
16086 * config/nds32/nds32-intrinsic.md: Likewise.
16087 * config/nds32/nds32_intrinsic.h: Likewise.
16088 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
16089 (nds32_print_operand): Likewise.
16090 * config/nds32/nds32.h (nds32_builtins): Likewise.
16092 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
16093 Andrew Pinski <pinsika@gcc.gnu.org>
16095 PR middle-end/82976
16096 * match.pd: Use constant_boolean_node of correct type instead of
16097 boolean_true_node or boolean_false_node for simplifying
16098 pointer comparisons to zero.
16100 2018-04-07 Jakub Jelinek <jakub@redhat.com>
16102 PR tree-optimization/80021
16103 * tree.c (verify_type_variant): Make error call in verify_variant_match
16104 translatable and remove final full stop.
16106 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16108 * config/nds32/constants.md (unspec_volatile_element): Add
16109 UNSPEC_VOLATILE_EH_RETURN.
16110 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
16111 nds32_output_stack_pop): Support dwarf exception handling process.
16112 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
16113 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
16114 exception handling process.
16115 (nds32_compute_stack_frame): Likewise.
16116 (nds32_return_addr_rtx): Likewise.
16117 (nds32_initial_elimination_offset): Likewise.
16118 (nds32_expand_prologue): Likewise.
16119 (nds32_expand_epilogue): Likewise.
16120 (nds32_dynamic_chain_address): New function.
16121 * config/nds32/nds32.h (machine_function): Add fields for dwarf
16122 exception handling.
16123 (DYNAMIC_CHAIN_ADDRESS): Define.
16124 (EH_RETURN_DATA_REGNO): Define.
16125 (EH_RETURN_STACKADJ_RTX): Define.
16126 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
16127 patterns for dwarf exception handling.
16129 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16131 * config/nds32/nds32.h: Clean up obsolete macros.
16133 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16135 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16136 Add enum values for particular instructions.
16137 * config/nds32/nds32-intrinsic.c: Implementation of expanding
16138 particular intrinsic functions.
16139 * config/nds32/nds32-intrinsic.md: Likewise.
16140 * config/nds32/nds32_intrinsic.h: Likewise.
16141 * config/nds32/nds32.h (nds32_builtins): Likewise.
16142 * config/nds32/nds32.md (type): Add pbsad and pbsada.
16143 (btst, ave): New patterns for particular instructions.
16145 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16147 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16148 Add enum values for atomic load/store and memory sync.
16149 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
16151 * config/nds32/nds32-intrinsic.md: Likewise.
16152 * config/nds32/nds32_intrinsic.h: Likewise.
16153 * config/nds32/nds32.h (nds32_builtins): Likewise.
16155 2018-04-07 Jakub Jelinek <jakub@redhat.com>
16157 PR tree-optimization/85257
16158 * fold-const.c (native_encode_vector): If not all elts could fit
16159 and off is -1, return 0 rather than offset.
16160 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
16161 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
16162 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
16163 adjust buffer in native_interpret_expr call.
16165 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16167 * config/nds32/constants.md (unspec_volatile_element): Add cache
16168 control enum values.
16169 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
16170 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
16171 * config/nds32/nds32.c (nds32_cctl_names): New.
16172 (nds32_print_operand): Handle cache control register names.
16173 * config/nds32/nds32.h (nds32_builtins): New enum values.
16174 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
16176 * config/nds32/nds32.md (type): Add mmu.
16177 * config/nds32/pipelines.md (simple_insn): Add mmu.
16179 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16181 * config/nds32/nds32.md (type): Remove call.
16182 * config/nds32/pipelines.md (simple_insn): Likewise.
16184 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16186 * config/nds32/constants.md (unspec_volatile_element): Add
16187 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
16188 UNSPEC_VOLATILE_FMFCFG.
16189 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
16190 description for fmfcfg and fmfcsr.
16191 (bdesc_1arg): Add fmtcsr.
16192 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
16193 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
16194 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
16195 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
16196 unspec_fmfcfg): New patterns.
16197 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
16198 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
16199 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
16200 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
16201 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
16202 __nds32__fmfcfg): Define.
16204 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16206 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
16207 intrinsic register names.
16208 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
16209 intrinsic register enum values and macros.
16211 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16213 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
16214 for load/store addressing form.
16215 (nds32_print_operand_address): Likewise.
16217 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
16220 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
16221 based on LABEL_REF. Remove useless assertion.
16222 (pic_address_needs_scratch): Fix formatting.
16223 (sparc_legitimize_pic_address): Minor tweaks.
16224 (sparc_delegitimize_address): Adjust assertion accordingly.
16225 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
16226 into symbolic_operand.
16227 (movsi_high_pic_label_ref): Likewise.
16228 (movsi_lo_sum_pic_label_ref): Likewise.
16229 (movdi_pic_label_ref): Likewise.
16230 (movdi_high_pic_label_ref): Likewise.
16231 (movdi_lo_sum_pic_label_ref): Likewise.
16233 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
16235 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
16236 custom LIB_SPEC setup.
16238 2018-04-06 Ruslan Bukin <br@bsdpad.com>
16239 Kito Cheng <kito.cheng@gmail.com>
16241 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
16242 * config/riscv/freebsd.h: New.
16244 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16246 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
16247 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
16250 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16251 Kito Cheng <kito.cheng@gmail.com>
16253 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
16254 nds32_output_call, nds32_symbol_binds_local_p): New functions.
16255 * config/nds32/nds32-protos.h (nds32_output_call,
16256 nds32_output_return): Declare.
16257 * config/nds32/nds32.md: Refine all the call and return patterns.
16259 2018-04-06 Jakub Jelinek <jakub@redhat.com>
16262 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
16263 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
16265 PR rtl-optimization/84872
16266 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
16267 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
16268 EDGE_CROSSING edge.
16270 2018-04-06 Tamar Christina <tamar.christina@arm.com>
16272 * expr.c (copy_blkmode_to_reg): Revert 254862.
16273 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
16275 2018-04-06 Richard Biener <rguenther@suse.de>
16277 PR middle-end/85244
16278 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
16279 after seeing a component reference with an adjacent field. Treat
16280 refs to arrays at struct end of external decls similar to
16281 refs to unconstrained commons.
16283 2018-04-06 Jakub Jelinek <jakub@redhat.com>
16286 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
16287 look through SAVE_EXPRs with non-side-effects argument. Adjust
16289 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
16292 2018-04-06 Richard Biener <rguenther@suse.de>
16294 PR middle-end/85180
16295 * alias.c (find_base_term): New wrapper around find_base_term
16296 unwinding CSELIB_VAL_PTR changes.
16297 (find_base_term): Do not restore CSELIB_VAL_PTR during the
16300 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16302 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
16304 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
16305 constant definitions.
16306 ("nop"): lr 0,0 -> nopr r0
16307 ("nop_lr0", "nop_lr1"): New insn definitions.
16309 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16311 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
16312 NDS32_V3PUSH_AVAILABLE_P macro.
16314 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
16315 Chung-Ju Wu <jasonwucj@gmail.com>
16317 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
16318 (nds32*-*-*): Add float and fpu_config into supported_defaults.
16319 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
16320 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
16321 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
16322 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
16323 * config/nds32/constraints.md: New constraints and checking for hard
16324 float configuration.
16325 * config/nds32/iterators.md: New mode iterator and attribute for hard
16326 float configuration.
16327 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
16329 * config/nds32/nds32-fpu.md: New file.
16330 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
16331 deal with hard float code generation.
16332 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
16334 (abi_type, float_reg_number): New enum type.
16335 * config/nds32/nds32-predicates.c: New predicates for hard float.
16336 * config/nds32/nds32-protos.h: Declare functions for hard float.
16337 * config/nds32/nds32.c: Implementation for hard float configuration.
16338 * config/nds32/nds32.h: Definitions for hard float configuration.
16339 * config/nds32/nds32.md: Include hard float machine description and
16340 modify patterns for hard float configuration.
16341 * config/nds32/nds32.opt: New options for hard float configuration.
16342 * config/nds32/predicates.md: New predicates for hard float
16345 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16347 * common/config/nds32/nds32-common.c
16348 (nds32_option_optimization_table): Enable -mreleax-hint by default.
16350 2018-04-05 Jakub Jelinek <jakub@redhat.com>
16352 PR middle-end/85195
16353 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
16354 CONSTRUCTOR_ELT (ctor, ...)->value.
16356 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
16359 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
16361 2018-04-05 Tom de Vries <tom@codesourcery.com>
16364 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
16367 2018-04-05 Shiva Chen <shiva0217@gmail.com>
16368 Kito Cheng <kito.cheng@gmail.com>
16370 * config/nds32/constraints.md (U33): Fine-tune checking condition.
16371 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
16372 * config/nds32/nds32.h (nds32_16bit_address_type): Add
16373 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
16375 2018-04-05 Shiva Chen <shiva0217@gmail.com>
16376 Kito Cheng <kito.cheng@gmail.com>
16378 * config/nds32/constraints.md (Ufe): New memory constraint.
16379 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
16380 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
16381 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
16383 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
16384 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
16386 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16388 * config/nds32/nds32.md: Use optimize_size in the condition for
16389 alu-shift instructions.
16391 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16393 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
16395 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16397 * config/nds32/nds32.md (negsi2): Refine pattern.
16399 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
16400 Chung-Ju Wu <jasonwucj@gmail.com>
16402 * config/nds32/iterators.md (shift_rotate): New code iterator.
16403 (shift): New code attribute.
16404 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
16405 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
16406 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
16407 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
16408 bit-wise operations.
16409 (andsi3, *andsi3): Ditto.
16410 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
16411 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
16412 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
16413 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
16414 nds32_ior_operand, nds32_xor_operand): New predicates.
16416 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16418 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
16419 (addsi3, subsi3): ... this.
16421 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16423 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
16425 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16427 * config/nds32/nds32.md: Adjust indention.
16429 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
16431 * config/nds32/nds32.md (feature): New attribute.
16433 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16435 * config/nds32/nds32.md (subtype): New attribute.
16437 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
16440 * config/arm/arm-builtins.c (arm_expand_builtin): Change
16441 expansion to perform a bitwise AND of the argument followed by a
16442 boolean negation of the result.
16444 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
16446 PR rtl-optimization/84878
16447 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
16448 the basic block. Assert the use reference is not artificial and that
16449 it has an associated insn.
16451 2018-04-04 Michael Matz <matz@suse.de>
16453 * builtins.c (compute_objsize): Pass correct operand
16454 to array_at_struct_end_p.
16456 2018-04-04 Richard Biener <rguenther@suse.de>
16459 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
16460 from contexts for DINFO_LEVEL_TERSE and below.
16462 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16464 * config/nds32/nds32-doubleword.md (move_<mode>): Require
16465 resiter_operand condition.
16466 * config/nds32/nds32.md (*move<mode>): Ditto.
16468 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16469 Monk Chiang <sh.chiang04@gmail.com>
16471 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
16473 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16475 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
16477 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16478 Kito Cheng <kito.cheng@gmail.com>
16480 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
16481 nds32_cond_code_str, output_cond_branch,
16482 output_cond_branch_compare_zero, nds32_expand_cbranch,
16483 nds32_expand_cstore, nds32_expand_movcc,
16484 nds32_output_cbranchsi4_equality_zero,
16485 nds32_output_cbranchsi4_equality_reg,
16486 nds32_output_cbranchsi4_equality_reg_or_const_int,
16487 nds32_output_cbranchsi4_greater_less_zero: New functions.
16488 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
16489 nds32_expand_cstore, nds32_expand_movcc,
16490 nds32_output_cbranchsi4_equality_zero,
16491 nds32_output_cbranchsi4_equality_reg,
16492 nds32_output_cbranchsi4_equality_reg_or_const_int,
16493 nds32_output_cbranchsi4_greater_less_zero): Declare.
16494 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
16495 nds32_rimm11s_operand): New predicates.
16496 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
16497 * config/nds32/nds32.md: Rewrite all the branch and conditional move
16500 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16502 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
16503 * config/nds32/nds32.md: Ditto.
16504 * config/nds32/pipelines.md: Ditto.
16506 2018-04-04 Richard Biener <rguenther@suse.de>
16508 PR tree-optimization/85168
16509 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
16510 propagating abnormals.
16512 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16514 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
16516 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16517 Kito Cheng <kito.cheng@gmail.com>
16519 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
16520 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
16521 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
16522 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
16523 * config/nds32/nds32.md (sibcall_internal): New.
16524 (sibcall_register): Remove.
16525 (sibcall_immediate): Remove.
16526 (sibcall_value_internal): New.
16527 (sibcall_value_register): Remove.
16528 (sibcall_value_immediate): Remove.
16529 * config/nds32/predicates.md (nds32_general_register_operand): New.
16530 (nds32_call_address_operand): New.
16532 2018-04-03 Jakub Jelinek <jakub@redhat.com>
16534 PR rtl-optimization/85167
16535 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
16536 bb_defs if *split_p, instead preinitialize it to NULL.
16538 PR tree-optimization/85156
16539 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
16540 evaluating the argument multiple times.
16542 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
16544 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
16546 (_mm_cvtpd_ps): Likewise.
16547 (_mm_cvttpd_epi32): Likewise.
16548 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
16549 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
16550 vector, pixel, and bool following altivec.h include.
16552 2018-04-03 Martin Sebor <msebor@redhat.com>
16554 * doc/extend.texi (Common Function Attributes): Clarify.
16555 (const attribute): Likewise.
16556 (pure attribute): Likewise.
16558 2018-04-03 Jakub Jelinek <jakub@redhat.com>
16561 * config/i386/i386.c (ix86_expand_vector_set): Use
16562 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
16564 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
16566 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
16567 instructions when changing rounding bits to preserve precision bits
16568 in the x87 control word.
16570 2018-04-03 Martin Liska <mliska@suse.cz>
16572 PR tree-optimization/82491
16573 * rtl.h (strip_offset_and_add): Replace += suboffset with
16574 poly_uint64 () + suboffset.
16576 2018-03-29 Martin Liska <mliska@suse.cz>
16577 Martin Jambor <mjambor@suse.cz>
16580 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
16581 param_type is not an integral or pointer type.
16583 2018-04-03 Richard Biener <rguenther@suse.de>
16585 * sese.h (recompute_all_dominators): Remove.
16587 2018-04-02 Martin Sebor <msebor@redhat.com>
16589 * doc/invoke.texi (-Wrestrict): Fix typos.
16591 2018-04-02 Jim Wilson <jimw@sifive.com>
16593 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
16594 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
16595 (<optab>di3, <optab>si3_extend): Likewise.
16596 (<optab>si3_mask, <optab>si3_mask_1): New.
16597 (<optab>di3_mask, <optab>di3_mask_1): New.
16598 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
16599 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
16600 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
16602 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
16604 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
16607 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
16609 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
16610 (nds32_canonicalize_comparison): New function.
16612 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16613 Kito Cheng <kito.cheng@gmail.com>
16614 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16616 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
16617 * config/nds32/constants.md (unspec_volatile_element): Add
16618 UNSPEC_VOLATILE_RELAX_GROUP.
16619 * config/nds32/nds32-relax-opt.c: New file.
16620 * config/nds32/nds32-predicates.c
16621 (nds32_symbol_load_store_p): New function.
16622 * config/nds32/nds32-protos.h
16623 (nds32_symbol_load_store_p): Declare function.
16624 (make_pass_nds32_relax_opt): Declare new rtl pass function.
16625 * config/nds32/nds32.c
16626 (nds32_register_pass): New function to register pass.
16627 (nds32_register_passes): New function to register passes.
16628 * config/nds32/nds32.md (relax_group): New pattern.
16629 * config/nds32/nds32.opt (mrelax-hint): New option.
16630 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
16632 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
16634 * config/nds32/t-nds32: Modify files dependency.
16636 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16638 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
16639 (PROFILE_HOOK): Define its implementation.
16641 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16643 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
16644 type and 32-bit size.
16646 2018-04-01 Jakub Jelinek <jakub@redhat.com>
16648 PR middle-end/85090
16649 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
16650 (V_128_256): New mode iterator.
16651 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
16652 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
16653 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
16655 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
16656 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
16658 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
16661 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
16662 NaN inputs correctly.
16664 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
16667 * config/rs6000/vsx.md (??r): New mode attribute.
16668 (*vsx_mov<mode>_64bit): Use it.
16669 (*vsx_mov<mode>_32bit): Likewise.
16671 2018-03-30 Martin Sebor <msebor@redhat.com>
16673 PR tree-optimization/84818
16674 * builtins.c (check_access): Use warning_n.
16676 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16679 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
16681 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
16684 2018-03-30 Julia Koval <julia.koval@intel.com>
16687 * x86-tune.def (movx, partial_reg_dependency): Enable for
16690 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
16692 PR inline-asm/84985
16693 * lra-constraints.c (process_alt_operands): Move setting
16694 this_alternative_matches below.
16696 2018-03-29 Martin Liska <mliska@suse.cz>
16699 * doc/invoke.texi: Document how LTO works with debug info.
16700 Describe auto-load support of binutils. Mention 'x86-64'
16701 as valid option value of -march option.
16703 2018-03-29 Jakub Jelinek <jakub@redhat.com>
16705 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
16708 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
16709 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
16710 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
16713 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16716 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
16717 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
16718 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
16719 for RS6000_BTM_POWERPC64.
16720 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
16721 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
16722 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
16725 (DIVDEU): Likewise.
16727 2018-03-28 Carl Love <cel@us.ibm.com>
16730 2017-09-27 Carl Love <cel@us.ibm.com>
16732 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
16733 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
16734 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
16737 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16739 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
16740 instead of __vector bool.
16741 (_mm_max_pu8): Likewise.
16742 (_mm_min_pi16): Likewise.
16744 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16747 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
16748 (DIVWEUO): Likewise.
16749 (DIVDEO): Likewise.
16750 (DIVDEUO): Likewise.
16751 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
16752 DIVWEUO and DIVDEUO.
16753 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
16754 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
16755 (div_extend): Likewise.
16756 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
16758 (__builtin_divweuo): Likewise.
16759 (__builtin_divdeo): Likewise.
16760 (__builtin_divdeuo): Likewise.
16762 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16765 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
16766 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
16768 PR tree-optimization/82004
16769 * gimple-match-head.c (optimize_pow_to_exp): New function.
16770 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
16771 Don't fold to exp if optimize_pow_to_exp is false.
16773 2018-03-28 Martin Liska <mliska@suse.cz>
16776 * calls.c (initialize_argument_information): Fix trailing space.
16777 * common.opt: Fix typo and provide better explanation for
16778 -fsanitize-coverage option.
16779 * config/i386/i386.opt: Fix typo.
16781 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16782 Martin Liska <mliska@suse.cz>
16785 * gimplify.c (asan_poison_variable): Don't do the check for
16786 gimplify_omp_ctxp here.
16787 (gimplify_decl_expr): Do it here.
16788 (gimplify_target_expr): Likewise.
16790 2018-03-28 Martin Liska <mliska@suse.cz>
16793 * config/i386/i386.c (ix86_function_arg_advance): Do not call
16794 chkp_type_bounds_count if MPX is not enabled.
16796 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
16798 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
16800 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
16803 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
16804 function to create the function decl for complex long double
16805 multiply and divide for -mabi=ieeelongdouble.
16806 (init_float128_ieee): Call it.
16808 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
16811 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
16812 -fcf-protection=branch -mibt.
16813 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
16815 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16818 * config/arm/arm.c (arm_valid_symbolic_address): Handle
16819 arm_word_relocations.
16821 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
16824 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
16825 extern array declarations.
16827 2018-03-27 Richard Biener <rguenther@suse.de>
16829 PR middle-end/84067
16830 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16831 explicit single_use checks.
16833 2018-03-27 Richard Biener <rguenther@suse.de>
16835 PR tree-optimization/85082
16836 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16839 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16841 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16842 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16843 Turn on fasynchronous-unwind-tables and funwind-tables.
16845 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
16848 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16849 (*bmi_blsr_<mode>_ccz): Ditto.
16851 2018-03-26 Tom de Vries <tom@codesourcery.com>
16853 PR tree-optimization/85063
16854 * omp-general.c (offloading_function_p): New function. Factor out
16856 * omp-offload.c (pass_omp_target_link::gate): ... here.
16857 * omp-general.h (offloading_function_p): Declare.
16858 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16859 with attribute omp declare target for offloading functions.
16861 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
16863 PR tree-optimization/84005
16864 * tree-data-ref.h (get_base_for_alignment): Declare.
16865 * tree-data-ref.c (get_base_for_alignment_1): New function.
16866 (get_base_for_alignment): Likewise.
16867 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16868 get_base_for_alignment to find a suitable base object, instead
16869 of always using drb->base_address.
16871 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16873 PR inline-asm/85022
16874 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16875 known size by default.
16877 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
16879 PR inline-asm/85030
16880 * lra-constraints.c (process_alt_operands): Don't match BLKmode
16881 and non BLKmode operands.
16883 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16886 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16887 Clean up attributes.
16889 2018-03-23 Richard Biener <rguenther@suse.de>
16892 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16893 we are going to emit early debug for LTO.
16895 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16897 PR inline-asm/85034
16898 * function.c (match_asm_constraints_1): Don't optimize if input
16899 doesn't satisfy general_operand predicate for output's mode.
16901 PR inline-asm/85022
16902 * alias.c (write_dependence_p): Don't require for x_canonicalized
16903 non-VOIDmode if x has VOIDmode.
16906 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16907 just don't try to optimize it rather than assert it never happens.
16909 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16911 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16912 macro expansions for definition of ST_INTERNAL_<mode> and
16913 LD_INTERNAL_<mode> builtins.
16914 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16916 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16918 (altivec_expand_st_builtin): Likewise.
16919 (altivec_expand_builtin): Remove calls to deleted functions.
16920 (rs6000_address_for_altivec): Delete this function.
16921 * config/rs6000/vector.md: Remove expands for
16922 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16924 2018-03-22 Sudakshina Das <sudi.das@arm.com>
16927 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16928 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16929 re-computing once computed.
16930 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16931 (arm_init_machine_status): Initialize
16932 machine->static_chain_stack_bytes.
16934 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16937 * doc/extend.texi: Add four new prototypes for vec_ld.
16938 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16939 definitions for more logical presentation.
16940 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16941 entries for V1TI variants of __builtin_altivec_ld builtin.
16942 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16943 handling of V1TI variant of LVX icode pattern.
16944 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16945 (rs6000_gimple_fold_builtin): Likewise.
16946 (altivec_init_builtins): Add code to define
16947 __builtin_altivec_lvx_v1ti function.
16949 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16951 PR inline-asm/84941
16952 * function.c (match_asm_constraints_1): Don't do the optimization
16953 if input isn't a REG, SUBREG, MEM or constant.
16955 2018-03-22 Tom de Vries <tom@codesourcery.com>
16957 PR tree-optimization/84956
16958 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16959 bb_has_abnormal_pred.
16961 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16964 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16965 DECL_INITIAL (decl) to decl at the end.
16966 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16967 adjust the comment.
16969 2018-03-21 Joseph Myers <joseph@codesourcery.com>
16971 * doc/extend.texi (__builtin_tgmath): Document when complex
16972 integer types are treated as _Complex _Float64.
16974 2018-03-21 Tom de Vries <tom@codesourcery.com>
16976 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16978 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16980 PR tree-optimization/84960
16981 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16982 if it is ENTRY block, move them into single succ of ENTRY in that case.
16984 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
16986 PR tree-optimization/84811
16987 * poly-int.h (poly_span_traits): Remove the T3 parameter and
16988 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16989 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16990 (known_subrange_p): Update accordingly. Cast each value involved
16991 in the size comparison, rather than casting the result of the
16994 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16996 PR tree-optimization/84982
16997 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16998 by flipping the least significant bit rather than all bits from
16999 bitpos to bitpos + bitsize - 1.
17001 2018-03-21 Nathan Sidwell <nathan@acm.org>
17003 * doc/extend.texi (Deprecated Features): Remove mention of
17004 long-deleted deprecations.
17006 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17009 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
17010 * configure: Regenerate.
17012 2018-03-21 Tom de Vries <tom@codesourcery.com>
17014 PR tree-optimization/83126
17015 * tree-parloops.c (num_phis): New function.
17016 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
17018 2018-03-21 Nathan Sidwell <nathan@acm.org>
17020 * doc/extend.texi (Deprecated Features): Update deprecated flags,
17021 mention anon-struct/union members and trailing attributes.
17023 2018-03-21 Bin Cheng <bin.cheng@arm.com>
17025 PR tree-optimization/84969
17026 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
17027 builtin memset partitions if they set different rhs values.
17029 2018-03-21 Jakub Jelinek <jakub@redhat.com>
17031 PR rtl-optimization/84989
17032 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
17033 VEC_DUPLICATE with scalar result mode.
17035 2018-03-21 Martin Liska <mliska@suse.cz>
17038 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
17039 not intended return statement.
17041 2018-03-21 Martin Liska <mliska@suse.cz>
17044 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
17045 (chkp_find_bound_slots_1): Limit number of iterations.
17047 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
17050 * Minor grammar fixes for x86 options.
17052 2018-03-20 Jakub Jelinek <jakub@redhat.com>
17055 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
17056 holding REG_CFA_RESTORE notes, instead turn them into a USE.
17058 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
17061 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
17062 (altivec_lvx_<mode>_1op): Likewise.
17063 (altivec_stvx_<mode>_2op): Likewise.
17064 (altivec_stvx_<mode>_1op): Likewise.
17065 (altivec_lvx_<VM2:mode>): New define_expand.
17066 (altivec_stvx_<VM2:mode>): Likewise.
17067 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
17068 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
17069 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
17070 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
17071 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
17072 (rs6000_gen_lvx): Likewise.
17073 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
17074 (altivec_expand_stv_builtin): Likewise.
17075 (altivec_expand_builtin): Likewise.
17076 * config/rs6000/vector.md: Likewise.
17078 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17081 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
17084 2018-03-20 Richard Biener <rguenther@suse.de>
17087 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
17088 sign-conversions as zero, fall back to standard scalar_stmt
17091 2018-03-20 Martin Liska <mliska@suse.cz>
17094 * predict.c (rebuild_frequencies): Handle case when we have
17095 PROFILE_ABSENT, but flag_guess_branch_prob is false.
17097 2018-03-20 Jakub Jelinek <jakub@redhat.com>
17100 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
17101 flag_section_anchors.
17102 * varasm.c (use_blocks_for_decl_p): Remove hack for
17103 dw2_force_const_mem.
17106 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
17108 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
17109 be created, use lowpart_subreg of operands[0] rather than operands[0]
17111 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
17112 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
17113 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
17114 and n constraint instead of aarch64_shift_imm_di and Usd.
17115 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
17116 (*aarch64_<optab>_reg_minus<mode>3): ... this.
17118 2018-03-20 Sudakshina Das <sudi.das@arm.com>
17121 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
17122 to favor GPR over NEON registers.
17123 (<shift>di3_neon): Likewise.
17125 2018-03-20 Tom de Vries <tom@codesourcery.com>
17128 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
17129 (nvptx_process_pars): Emit bar.sync asap and alap.
17131 2018-03-20 Tom de Vries <tom@codesourcery.com>
17134 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
17135 seen_label if seen_label is already set.
17137 2018-03-20 Jakub Jelinek <jakub@redhat.com>
17140 * config/i386/i386.c (fold_builtin_cpu): For features above 31
17141 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
17142 Use 1U instead of 1. Formatting fixes.
17145 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
17146 instead of TREE_TYPE (s1) for the return value.
17148 2018-03-19 Jakub Jelinek <jakub@redhat.com>
17150 PR tree-optimization/84946
17151 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
17152 bitsize + bitsize in poly_uint64 rather than poly_int64.
17155 * dwarf2asm.c: Include fold-const.c.
17156 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
17157 of decl rather than decl itself.
17159 PR rtl-optimization/84643
17160 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
17162 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
17165 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
17166 calling assemble_variable.
17168 2018-03-19 Sudakshina Das <sudi.das@arm.com>
17171 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
17172 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
17174 2018-03-19 Jim Wilson <jimw@sifive.com>
17177 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
17178 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
17179 (riscv_first_stack_step): Likewise.
17180 (riscv_option_override): Use STACK_BOUNDARY instead of
17181 MIN_STACK_BOUNDARY.
17182 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
17183 MIN_STACK_BOUNDARY.
17184 (BIGGEST_ALIGNMENT): Set to 128.
17185 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
17186 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
17189 2018-03-19 Richard Biener <rguenther@suse.de>
17191 PR tree-optimization/84933
17192 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
17193 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
17195 2018-03-19 Richard Biener <rguenther@suse.de>
17197 PR tree-optimization/84859
17198 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
17199 (cond_if_else_store_replacement): Perform sinking operation on
17200 single-store BBs regardless of MAX_STORES_TO_SINK setting.
17201 Generalize what a BB with a single eligible store is.
17203 2018-03-19 Richard Biener <rguenther@suse.de>
17205 PR tree-optimization/84929
17206 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
17207 chrec_is_positive against non-chrec arg.
17209 2018-03-19 Tamar Christina <tamar.christina@arm.com>
17212 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
17214 2018-03-18 Martin Liska <mliska@suse.cz>
17216 PR rtl-optimization/84635
17217 * regrename.c (build_def_use): Use matches_mode only when
17220 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
17222 PR tree-optimization/84913
17223 * tree-vect-loop.c (vectorizable_reduction): Don't try to
17224 vectorize chains of COND_EXPRs.
17226 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17228 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
17230 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17232 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
17234 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17236 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
17238 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
17239 Kito Cheng <kito.cheng@gmail.com>
17241 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
17242 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
17243 (nds32_adjust_reg_alloc_order): New function.
17244 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
17246 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
17248 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
17249 nds32_print_operand, nds32_print_operand_address): Use
17250 HOST_WIDE_INT_PRINT_DEC instead.
17252 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
17254 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
17256 2018-03-17 Jakub Jelinek <jakub@redhat.com>
17259 * config/i386/i386.c (initial_ix86_tune_features,
17260 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
17261 unsigned long long.
17262 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
17263 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
17264 rather than 1u << ix86_tune. Formatting fix.
17265 (ix86_option_override_internal): Change ix86_arch_mask from
17266 unsigned int to unsigned HOST_WIDE_INT, initialize to
17267 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
17268 (ix86_function_specific_restore): Likewise.
17270 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17273 * postreload.c (reload_combine_recognize_pattern): Perform
17274 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
17275 truncate_int_for_mode the result for the destination's mode.
17278 * hsa-gen.c (mem_type_for_type): Fix comment typo.
17279 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
17281 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17284 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
17287 * lra-assigns.c (lra_split_hard_reg_for): Don't use
17288 regno_allocno_class_array and sorted_pseudos.
17289 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
17290 insns where regno is used.
17292 2018-03-16 Martin Liska <mliska@suse.cz>
17295 * multiple_target.c (create_dispatcher_calls): Redirect
17296 reference in the symbol table.
17298 2018-03-16 Martin Liska <mliska@suse.cz>
17301 * multiple_target.c (create_dispatcher_calls): Redirect also
17304 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17308 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
17309 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
17310 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
17312 2018-03-16 Julia Koval <julia.koval@intel.com>
17314 * doc/invoke.texi (Skylake Server): Add CLWB.
17315 Cannonlake): Remove CLWB.
17317 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17319 PR tree-optimization/84841
17320 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
17322 (FLOAT_ONE_CONST_TYPE): Define.
17323 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
17324 (sort_by_operand_rank): Put entries with higher constant_type last
17325 rather than first to match comments.
17327 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
17329 * config/nios2/nios2.md (movsi_internal): Fix thinko in
17332 2018-03-15 Jakub Jelinek <jakub@redhat.com>
17335 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
17336 check and use address of target always.
17338 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
17341 * config/i386/i386.c (indirect_thunk_needed): Update comments.
17342 (indirect_thunk_bnd_needed): Likewise.
17343 (indirect_thunks_used): Likewise.
17344 (indirect_thunks_bnd_used): Likewise.
17345 (indirect_return_needed): New.
17346 (indirect_return_bnd_needed): Likewise.
17347 (output_indirect_thunk_function): Add a bool argument for
17349 (output_indirect_thunk_function): Don't generate alias for
17350 function return thunk.
17351 (ix86_code_end): Call output_indirect_thunk_function to generate
17352 function return thunks.
17353 (ix86_output_function_return): Set indirect_return_bnd_needed
17354 and indirect_return_needed instead of indirect_thunk_bnd_needed
17355 and indirect_thunk_needed.
17357 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
17359 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
17360 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
17361 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
17363 2018-03-15 David Malcolm <dmalcolm@redhat.com>
17364 Paul Hua <paul.hua.gm@gmail.com>
17367 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
17369 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
17371 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
17372 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
17373 resp. SFmode cases.
17375 2018-03-15 Tamar Christina <tamar.christina@arm.com>
17378 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
17379 instead of GET_MODE_SIZE when comparing Units.
17381 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
17384 * varasm.c (hash_section): Return an unchangeble hash value
17385 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
17386 Return !aarch64_can_use_per_function_literal_pools_p ().
17388 2018-03-15 Jakub Jelinek <jakub@redhat.com>
17391 * optabs.c (emit_conditional_move): Pass address of cmode's copy
17392 rather than address of cmode as last argument to prepare_cmp_insn.
17394 2018-03-15 Julia Koval <julia.koval@intel.com>
17396 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
17397 F_AVX512VNNI, F_AVX512BITALG): New.
17399 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
17402 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
17403 insn for floating-point loads and stores.
17405 2018-03-14 Carl Love <cel@us.ibm.com>
17407 * config/rs6000/rs6000-c.c: Add macro definitions for
17408 ALTIVEC_BUILTIN_VEC_PERMXOR.
17409 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
17410 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
17411 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
17412 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
17414 * config/doc/extend.texi: Add prototypes for vec_permxor.
17416 2018-03-14 David Malcolm <dmalcolm@redhat.com>
17419 * diagnostic-show-locus.c (class layout_point): Convert m_line
17420 from int to linenum_type.
17421 (line_span::comparator): Use linenum "compare" function when
17422 comparing line numbers.
17423 (test_line_span): New function.
17424 (layout_range::contains_point): Convert param "row" from int to
17426 (layout_range::intersects_line_p): Likewise.
17427 (layout::will_show_line_p): Likewise.
17428 (layout::print_source_line): Likewise.
17429 (layout::should_print_annotation_line_p): Likewise.
17430 (layout::print_annotation_line): Likewise.
17431 (layout::print_leading_fixits): Likewise.
17432 (layout::annotation_line_showed_range_p): Likewise.
17433 (struct line_corrections): Likewise for field m_row.
17434 (line_corrections::line_corrections): Likewise for param "row".
17435 (layout::print_trailing_fixits): Likewise.
17436 (layout::get_state_at_point): Likewise.
17437 (layout::get_x_bound_for_row): Likewise.
17438 (layout::print_line): Likewise.
17439 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
17440 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
17441 * input.c (selftest::test_linenum_comparisons): New function.
17442 (selftest::input_c_tests): Call it.
17443 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
17444 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
17445 * selftest.h (ASSERT_GT): New macro.
17446 (ASSERT_GT_AT): New macro.
17447 (ASSERT_LT): New macro.
17448 (ASSERT_LT_AT): New macro.
17450 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
17452 PR rtl-optimization/84780
17453 * combine.c (distribute_links): Don't make a link based on pc_rtx.
17455 2018-03-14 Martin Liska <mliska@suse.cz>
17457 * tree.c (record_node_allocation_statistics): Use
17458 get_stats_node_kind.
17459 (get_stats_node_kind): New function extracted from
17460 record_node_allocation_statistics.
17461 (free_node): Use get_stats_node_kind.
17463 2018-03-14 Richard Biener <rguenther@suse.de>
17465 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
17466 that the value-set of ANTIC_IN doesn't grow.
17469 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17471 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17472 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17474 2018-03-14 Julia Koval <julia.koval@intel.com>
17476 * config.gcc (icelake-client, icelake-server): New.
17478 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
17479 (initial_ix86_arch_features): Ditto.
17480 (PTA_SKYLAKE): Add SGX.
17481 (PTA_ICELAKE): Remove.
17482 (PTA_ICELAKE_CLIENT): New.
17483 (PTA_ICELAKE_SERVER): New.
17484 (ix86_option_override_internal): Split up icelake on icelake client and
17486 (get_builtin_code_for_version): Ditto.
17487 (fold_builtin_cpu): Ditto.
17488 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
17489 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
17490 * config/i386/i386.h (processor_type): Ditto.
17491 * doc/invoke.texi: Ditto.
17493 2018-03-14 Jakub Jelinek <jakub@redhat.com>
17496 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
17497 INTEGER_CST offset, add it together with bitpos / 8 and
17498 sign extend based on POINTER_SIZE.
17502 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
17505 * config/i386/constraints.md (Yc): New register constraint.
17506 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
17507 Use Yc constraint for alternative 2 of operand 0. Remove
17508 preferred_for_speed attribute.
17510 2018-03-14 Richard Biener <rguenther@suse.de>
17512 PR tree-optimization/84830
17513 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
17514 with the old one to avoid oscillations.
17516 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
17519 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
17521 (assign_by_spills): Return a flag of reload assignment failure.
17522 Do not process the reload assignment failures. Do not spill other
17523 reload pseudos if they has the same reg class. Update n if
17525 (lra_assign): Add a return arg. Set up from the result of
17526 assign_by_spills call.
17527 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17528 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17529 usage_insns if it is not NULL.
17530 (spill_hard_reg_in_range): New function.
17531 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17532 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17533 function prototypes.
17534 (lra_assign): Change prototype.
17535 * lra.c (lra): Add code to deal with fails by splitting hard reg
17538 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
17540 * config/riscv/riscv.opt (mrelax): New option.
17541 * config/riscv/riscv.c (riscv_file_start): Emit ".option
17542 "norelax" when riscv_mrelax is disabled.
17543 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
17545 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17548 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
17549 reassociation for int modes.
17551 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17553 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
17554 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
17556 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
17557 * config/aarch64/aarch64-sve.md
17558 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
17559 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
17560 (*extend<mode><Vwide>2): Rename to...
17561 (aarch64_sve_extend<mode><Vwide>2): ...this.
17562 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
17563 renaming the old pattern to...
17564 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
17566 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
17567 define_expand, renaming the old pattern to...
17568 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
17569 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
17570 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
17571 account when deciding which SVE instruction the optab should use.
17572 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
17574 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17576 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
17577 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
17578 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
17579 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
17580 (tlsdesc_small_<mode>): Turn a define_expand and use
17581 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
17582 (tlsdesc_small_advsimd_<mode>): ...this.
17583 (tlsdesc_small_sve_<mode>): New pattern.
17585 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17587 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
17588 (UNSPEC_UMUL_HIGHPART): New constants.
17589 (MUL_HIGHPART): New int iteraor.
17590 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
17591 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
17593 (*<su>mul<mode>3_highpart): New define_insn.
17595 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
17598 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17601 2018-03-13 Martin Liska <mliska@suse.cz>
17604 * (sem_item_optimizer::sem_item_optimizer): Initialize new
17606 (sem_item_optimizer::~sem_item_optimizer): Release it.
17607 (sem_item_optimizer::merge_classes): Register variable aliases.
17608 (sem_item_optimizer::fixup_pt_set): New function.
17609 (sem_item_optimizer::fixup_points_to_sets): Likewise.
17610 * ipa-icf.h: Declare new variables and functions.
17612 2018-03-13 Jakub Jelinek <jakub@redhat.com>
17614 PR middle-end/84834
17615 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
17616 integer_pow2p@2 and test integer_pow2p in condition.
17617 (A < 0 ? C : 0): Similarly for @1.
17619 PR middle-end/84831
17620 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
17621 characters starting at p contain '\0' character, don't look beyond
17625 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
17626 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
17629 * reg-stack.c (change_stack): Change update_end var from int to
17630 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
17631 also call set_block_for_insn on the newly added insns and rescan.
17634 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
17635 on the last operand.
17638 * tree.c (stabilize_reference_1): Return save_expr (e) for
17639 STATEMENT_LIST even if it doesn't have side-effects.
17641 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
17643 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
17645 2018-03-12 Renlin Li <renlin.li@arm.com>
17647 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
17648 aarch64_output_scalar_simd_mov_immediate.
17650 2018-03-12 Martin Sebor <msebor@redhat.com>
17652 PR tree-optimization/83456
17653 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
17654 for perfectly overlapping calls to memcpy.
17655 (gimple_fold_builtin_memory_chk): Same.
17656 (gimple_fold_builtin_strcpy): Handle no-warning.
17657 (gimple_fold_builtin_stxcpy_chk): Same.
17658 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
17660 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17662 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
17663 parameter. Use it for SFmode.
17664 (rs6000_function_arg_advance_1): Adjust.
17665 (rs6000_function_arg): Adjust.
17666 (rs6000_gimplify_va_arg): Pass false for that new parameter.
17668 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17670 PR rtl-optimization/84169
17671 PR rtl-optimization/84780
17672 * combine.c (can_combine_p): Check for a 2-insn combination whether
17673 the destination register is used between the two insns, too.
17675 2018-03-12 Richard Biener <rguenther@suse.de>
17677 PR tree-optimization/84803
17678 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
17679 for refs DR analysis didn't process.
17681 2018-03-12 Richard Biener <rguenther@suse.de>
17683 PR tree-optimization/84777
17684 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
17685 force-vectorize loops ignore whether we are optimizing for size.
17687 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
17689 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
17690 (TARGET_MD_ASM_ADJUST): Define.
17692 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
17693 Kito Cheng <kito.cheng@gmail.com>
17694 Chung-Ju Wu <jasonwucj@gmail.com>
17696 * config/nds32/nds32.c (nds32_compute_stack_frame,
17697 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
17698 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
17699 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
17700 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
17701 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
17702 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
17703 * config/nds32/nds32.md (prologue, epilogue): Use macro
17704 NDS32_V3PUSH_AVAILABLE_P to do checking.
17706 2018-03-11 Jakub Jelinek <jakub@redhat.com>
17709 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
17710 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
17711 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
17712 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
17713 addition of most attributes on !orig_type_die or the attribute not
17714 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
17716 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17717 Chung-Ju Wu <jasonwucj@gmail.com>
17719 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
17720 __NDS32_VH__ macro.
17721 * config/nds32/nds32.opt (mvh): New option.
17723 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17724 Chung-Ju Wu <jasonwucj@gmail.com>
17726 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
17728 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
17729 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
17732 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17733 Chung-Ju Wu <jasonwucj@gmail.com>
17735 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
17737 * config/nds32/nds32-multiple.md (strlensi): New pattern.
17738 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
17740 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
17741 Kito Cheng <kito.cheng@gmail.com>
17742 Chung-Ju Wu <jasonwucj@gmail.com>
17744 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
17745 UNSPEC_FFMISM and UNSPEC_FLMISM.
17746 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
17747 for ffb, ffmism and flmism.
17748 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
17749 (unspec_ffmism): Ditto.
17750 (unspec_flmism): Ditto.
17751 (nds32_expand_builtin_impl): Check if string extension is available.
17752 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
17753 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
17755 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
17758 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17761 * lra-assigns.c (assign_by_spills): Return a flag of reload
17762 assignment failure. Do not process the reload assignment
17763 failures. Do not spill other reload pseudos if they has the same
17765 (lra_assign): Add a return arg. Set up from the result of
17766 assign_by_spills call.
17767 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17768 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17769 usage_insns if it is not NULL.
17770 (spill_hard_reg_in_range): New function.
17771 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17772 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17773 function prototypes.
17774 (lra_assign): Change prototype.
17775 * lra.c (lra): Add code to deal with fails by splitting hard reg
17778 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
17781 * config/i386/i386.opt: Replace Enforcment with Enforcement.
17783 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
17786 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
17787 (dw_val_node): Add val_symbolic_view.
17788 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
17789 (symview_upper_bound): New.
17790 (new_line_info_table): Initialize symviews_since_reset.
17791 (dwarf2out_source_line): Count symviews_since_reset and set
17792 symview_upper_bound.
17793 (dw_val_equal_p): Handle symview.
17794 (add_AT_symview): New.
17795 (print_dw_val): Handle symview.
17796 (attr_checksum, attr_checksum_ordered): Likewise.
17797 (same_dw_val_p, size_of_die): Likewise.
17798 (value_format, output_die): Likewise.
17799 (add_high_low_attributes): Use add_AT_symview for entry_view.
17800 (dwarf2out_finish): Reset symview_upper_bound, clear
17803 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
17806 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
17807 Add strict argument and use it.
17808 (rs6000_split_multireg_move): Update for new strict argument.
17809 (mem_operand_gpr): Disallow all non-offsettable addresses.
17810 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
17812 2018-03-09 Jakub Jelinek <jakub@redhat.com>
17815 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
17816 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
17817 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
17820 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
17821 decl, use remap_type if we want to use the type.
17823 2018-03-09 Martin Sebor <msebor@redhat.com>
17825 PR tree-optimization/84526
17826 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17828 (builtin_access::generic_overlap): Be prepared to handle non-array
17831 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
17833 PR rtl-optimization/84682
17834 * lra-constraints.c (process_address_1): Check is_address flag
17835 for address constraints.
17836 (process_alt_operands): Likewise.
17837 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17838 preprocess_constraints.
17839 * recog.h (preprocess_constraints): Add oploc parameter.
17841 * recog.c (preprocess_constraints): Test address_operand for
17842 CT_ADDRESS constraints.
17844 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17847 * lra-assigns.c (assign_by_spills): Return a flag of reload
17848 assignment failure. Do not process the reload assignment
17849 failures. Do not spill other reload pseudos if they has the same
17851 (lra_assign): Add a return arg. Set up from the result of
17852 assign_by_spills call.
17853 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17854 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17855 usage_insns if it is not NULL.
17856 (spill_hard_reg_in_range): New function.
17857 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17858 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17859 function prototypes.
17860 (lra_assign): Change prototype.
17861 * lra.c (lra): Add code to deal with fails by splitting hard reg
17864 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17867 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17868 Accept complain bool parameter. Only emit errors if it is true.
17869 (arm_parse_cpu_option_name): Likewise.
17870 (arm_target_thumb_only): Adjust callers of the above.
17871 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17872 prototype to take a default true bool parameter.
17873 (arm_parse_arch_option_name): Likewise.
17875 2018-03-09 David Malcolm <dmalcolm@redhat.com>
17876 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
17880 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17881 * configure: Regenerate.
17882 * configure.ac ("linker --version-script option"): New.
17883 ("linker soname option"): New.
17885 2018-03-09 Richard Biener <rguenther@suse.de>
17887 PR tree-optimization/84775
17888 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17889 immediate uses of predicate stmts and mark them modified.
17892 PR tree-optimization/84178
17893 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17895 (version_loop_for_if_conversion): Delay update_ssa call.
17896 (tree_if_conversion): Delay update_ssa until after predicate
17899 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
17902 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17903 when the function accesses prior frames.
17905 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17908 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17909 gen_llsym, otherwise call maybe_gen_llsym.
17911 PR inline-asm/84742
17912 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17913 has ',' character inside of it.
17915 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17918 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17919 as clobbering CC_REGNUM.
17921 2018-03-08 Richard Biener <rguenther@suse.de>
17923 PR middle-end/84552
17924 * tree-scalar-evolution.c: Include tree-into-ssa.h.
17925 (follow_copies_to_constant): Do not follow SSA names registered
17928 2018-03-08 Richard Biener <rguenther@suse.de>
17930 PR tree-optimization/84178
17931 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17933 (version_loop_for_if_conversion): Delay update_ssa call.
17934 (tree_if_conversion): Delay update_ssa until after predicate
17937 2018-03-08 David Malcolm <dmalcolm@redhat.com>
17939 PR tree-optimization/84178
17940 * tree-if-conv.c (release_bb_predicate): Remove the
17941 the assertion that the stmts have NULL use_ops.
17942 Discard the statements, asserting that they haven't
17943 yet been added to a BB.
17945 2018-03-08 Richard Biener <rguenther@suse.de>
17947 PR tree-optimization/84746
17948 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17949 (phi_translate): Pass in destination ANTIC_OUT set.
17950 (phi_translate_1): Likewise. For a simplified result lookup
17951 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17952 (phi_translate_set): Adjust.
17953 (do_pre_regular_insertion): Likewise.
17954 (do_pre_partial_partial_insertion): Likewise.
17956 2018-03-08 Martin Liska <mliska@suse.cz>
17958 PR gcov-profile/84735
17959 * doc/gcov.texi: Document usage of profile files.
17960 * gcov-io.h: Document changes in the format.
17962 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
17966 * dwarf2out.c (struct dw_line_info_table): Update comments for
17968 (FORCE_RESET_NEXT_VIEW): New.
17969 (FORCE_RESETTING_VIEW_P): New.
17970 (RESETTING_VIEW_P): Check for -1 too.
17971 (ZERO_VIEW_P): Likewise.
17972 (new_line_info_table): Force-reset next view.
17973 (dwarf2out_begin_function): Likewise.
17974 (dwarf2out_source_line): Simplify zero_view_p initialization.
17975 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17976 view directly. Omit view when omitting .loc at line 0.
17978 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17980 PR tree-optimization/84740
17981 * tree-switch-conversion.c (process_switch): Call build_constructors
17982 only if info.phi_count is non-zero.
17984 PR tree-optimization/84739
17985 * tree-tailcall.c (find_tail_calls): Check call arguments against
17986 DECL_ARGUMENTS (current_function_decl) rather than
17987 DECL_ARGUMENTS (func) when checking for tail recursion.
17989 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17991 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17992 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17993 Volker Reichelt's entry and add entries for people that perform
17994 GCC fuzzy testing and report numerous bugs.
17996 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
17999 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
18000 readonly data in sdata, if that is disabled.
18001 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
18002 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
18003 -mreadonly-in-sdata option.
18005 2018-03-07 Martin Sebor <msebor@redhat.com>
18007 PR tree-optimization/84468
18008 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
18009 basic block when looking for nul assignment.
18011 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
18014 * except.h (output_function_exception_table): Adjust prototype.
18015 * except.c (output_function_exception_table): Remove FNNAME parameter
18016 and add SECTION parameter. Ouput one part of the table at a time.
18017 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
18018 the first part of the exception table and emit unwind directives.
18019 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
18020 (i386_pe_seh_cold_init): Likewise.
18021 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
18022 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
18023 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
18024 (ix86_output_call_insn): Emit a nop in one more case for SEH.
18025 * config/i386/winnt.c: Include except.h.
18026 (struct seh_frame_state): Add reg_offset, after_prologue and
18027 in_cold_section fields.
18028 (i386_pe_seh_end_prologue): Set seh->after_prologue.
18029 (i386_pe_seh_cold_init): New function.
18030 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
18031 to seh->in_cold_section.
18032 (seh_emit_push): Record the offset of the push.
18033 (seh_emit_save): Record the offet of the save.
18034 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
18035 Test seh->after_prologue to disregard the epilogue.
18036 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
18037 (i386_pe_end_cold_function): New function.
18039 2018-03-07 Jakub Jelinek <jakub@redhat.com>
18042 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
18043 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
18046 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
18048 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
18049 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
18051 PR middle-end/84723
18052 * multiple_target.c: Include tree-inline.h and intl.h.
18053 (expand_target_clones): Diagnose and fail if node->definition and
18054 !tree_versionable_function_p (node->decl).
18056 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
18058 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
18060 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
18061 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
18062 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
18064 2018-03-06 Jakub Jelinek <jakub@redhat.com>
18067 * combine.c (try_combine): Use reg_or_subregno instead of handling
18068 just paradoxical SUBREGs and REGs.
18070 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
18072 * config/arc/arc.c (arc_finalize_pic): Remove function.
18073 (arc_must_save_register): We use single base PIC register, remove
18074 checks to save/restore the PIC register.
18075 (arc_expand_prologue): Likewise.
18076 * config/arc/arc-protos.h (arc_set_default_type_attributes):
18078 (arc_verify_short): Likewise.
18079 (arc_attr_type): Likewise.
18080 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
18081 (walk_stores): Likewise.
18082 (arc_address_cost): Make it static.
18083 (arc_verify_short): Likewise.
18084 (branch_dest): Likewise.
18085 (arc_attr_type): Likewise.
18086 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
18087 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
18088 (arc_final_prescan_insn): Remove inserting the nops due to
18089 hardware hazards. It is done in reorg step.
18090 (insn_length_variant_t): Remove.
18091 (insn_length_parameters_t): Likewise.
18092 (arc_insn_length_parameters): Likewise.
18093 (arc_get_insn_variants): Likewise.
18094 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
18096 2018-03-06 Jakub Jelinek <jakub@redhat.com>
18098 PR inline-asm/84683
18099 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
18102 PR tree-optimization/84687
18103 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
18105 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
18107 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18109 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
18110 Rename to ppc_speculation_barrier.
18111 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
18112 __builtin_ppc_speculation_barrier.
18114 2018-03-05 Jakub Jelinek <jakub@redhat.com>
18117 * combine.c (combine_simplify_rtx): Don't try to simplify if
18118 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
18121 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
18123 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
18124 to 32 bytes when compiling for POWER9.
18126 2018-03-05 Jakub Jelinek <jakub@redhat.com>
18129 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
18130 regparm >= 3 with no arg reg available also for calls with
18131 flag_force_indirect_call. Pass decl to ix86_function_regparm.
18134 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
18136 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
18138 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
18141 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
18143 2018-03-05 Richard Biener <rguenther@suse.de>
18145 PR tree-optimization/84486
18146 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
18147 When inserting a __builtin_assume_aligned call set the LHS
18148 SSA name alignment info accordingly.
18150 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
18152 PR tree-optimization/84114
18153 * config/aarch64/aarch64.c (aarch64_reassociation_width)
18154 Avoid reassociation of FLOAT_MODE addition.
18156 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
18158 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
18159 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
18160 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
18161 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
18162 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
18163 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
18164 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
18166 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
18167 __builtin_ia32_wbinvd): New builtins.
18168 (SPECIAL_ARGS2): New.
18169 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
18170 (SPECIAL_ARGS2): New.
18171 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
18172 (ix86_valid_target_attribute_inner_p): Ditto.
18173 (ix86_init_mmx_sse_builtins): Add special_args2.
18174 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
18175 TARGET_WBNOINVD_P): New.
18176 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
18177 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
18178 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
18179 * config/i386/immintrin.h (_wbinvd): New intrinsic.
18180 * config/i386/pconfigintrin.h: New file.
18181 * config/i386/wbnoinvdintrin.h: Ditto.
18182 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
18184 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
18186 2018-03-05 Richard Biener <rguenther@suse.de>
18188 PR tree-optimization/84670
18189 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
18191 (BB_VISITED_WITH_VISITED_SUCCS): New define.
18192 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
18193 (compute_antic_aux): Only assert the number of values in ANTIC_IN
18194 doesn't grow if all successors (recursively) were visited at least
18197 2018-03-05 Richard Biener <rguenther@suse.de>
18199 PR tree-optimization/84650
18200 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
18201 if executed in the loop pipeline.
18203 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
18205 * doc/configfiles.texi (Configuration Files): Move info about
18206 conditionalizing $target-protos.h to...
18207 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
18208 differs from $target-protos.h.
18210 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
18211 Chung-Ju Wu <jasonwucj@gmail.com>
18213 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
18214 * config/nds32/nds32-multiple.md (setmemsi): Define.
18215 * config/nds32/nds32-memory-manipulation.c
18216 (nds32_gen_dup_4_byte_to_word_value): New.
18217 (emit_setmem_word_loop): New.
18218 (emit_setmem_byte_loop): New.
18219 (nds32_expand_setmem_loop): New.
18220 (nds32_expand_setmem_loop_v3m): New.
18221 (nds32_expand_setmem_unroll): New.
18222 (nds32_expand_setmem): New.
18224 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18225 Chung-Ju Wu <jasonwucj@gmail.com>
18227 * config/nds32/nds32-memory-manipulation.c
18228 (nds32_emit_load_store): New.
18229 (nds32_emit_post_inc_load_store): New.
18230 (nds32_emit_mem_move): New.
18231 (nds32_emit_mem_move_block): New.
18232 (nds32_expand_movmemsi_loop_unknown_size): New.
18233 (nds32_expand_movmemsi_loop_known_size): New.
18234 (nds32_expand_movmemsi_loop): New.
18235 (nds32_expand_movmemsi_unroll): New.
18236 (nds32_expand_movmemqi): Rename ...
18237 (nds32_expand_movmemsi): ... to this.
18238 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
18239 (movmemsi): ... to this.
18240 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
18241 (nds32_expand_movmemsi): ... to this.
18243 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18244 Monk Chiang <sh.chiang04@gmail.com>
18245 Chung-Ju Wu <jasonwucj@gmail.com>
18247 * config/nds32/nds32-protos.h
18248 (nds32_expand_load_multiple): New arguments.
18249 (nds32_expand_store_multiple): Ditto.
18250 (nds32_valid_multiple_load_store): Rename ...
18251 (nds32_valid_multiple_load_store_p): ... to this.
18252 * config/nds32/nds32-memory-manipulation.c
18253 (nds32_expand_load_multiple): Refine implementation.
18254 (nds32_expand_store_multiple): Ditto.
18255 * config/nds32/nds32-multiple.md
18256 (load_multiple): Update nds32_expand_load_multiple interface.
18257 (store_multiple): Update nds32_expand_store_multiple interface.
18258 * config/nds32/nds32-predicates.c
18259 (nds32_valid_multiple_load_store): Rename ...
18260 (nds32_valid_multiple_load_store_p): ... to this and refine
18262 * config/nds32/predicates.md
18263 (nds32_load_multiple_and_update_address_operation): New predicate.
18264 (nds32_store_multiple_and_update_address_operation): New predicate.
18266 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18267 Chung-Ju Wu <jasonwucj@gmail.com>
18269 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
18270 (combo): New attribute.
18271 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
18273 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
18275 * config/nds32/nds32.opt: Change -mcmodel= default value.
18277 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
18278 Monk Chiang <sh.chiang04@gmail.com>
18279 Chung-Ju Wu <jasonwucj@gmail.com>
18281 * config/nds32/constants.md (unspec_element): New enum.
18282 * config/nds32/constraints.md (Umw): New constraint.
18283 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
18284 * config/nds32/nds32-intrinsic.md: Likewise.
18285 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
18286 (nds32_valid_smw_lwm_base_p): New.
18287 (nds32_output_smw_single_word): New.
18288 (nds32_output_lmw_single_word): New.
18289 (nds32_expand_unaligned_load): New.
18290 (nds32_expand_unaligned_store): New.
18291 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
18292 (nds32_output_smw_single_word): Declare.
18293 (nds32_output_lmw_single_word): Declare.
18294 (nds32_expand_unaligned_load): Declare.
18295 (nds32_expand_unaligned_store): Declare.
18296 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
18297 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
18298 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
18299 NDS32_BUILTIN_UASTORE_DW.
18300 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
18303 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
18304 Kito Cheng <kito.cheng@gmail.com>
18305 Chung-Ju Wu <jasonwucj@gmail.com>
18307 * config/nds32/nds32-intrinsic.c
18308 (nds32_expand_builtin_null_ftype_reg): Delete.
18309 (nds32_expand_builtin_reg_ftype_imm): Ditto.
18310 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
18311 (nds32_read_argument): New.
18312 (nds32_legitimize_target): Ditto.
18313 (nds32_legitimize_argument): Ditto.
18314 (nds32_check_constant_argument): Ditto.
18315 (nds32_expand_unop_builtin): Ditto.
18316 (nds32_expand_unopimm_builtin): Ditto.
18317 (nds32_expand_binop_builtin): Ditto.
18318 (nds32_builtin_decl_impl): Ditto.
18319 (builtin_description): Ditto.
18320 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
18321 (nds32_init_builtins_impl): Ditto.
18322 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
18323 (nds32_builtin_decl): New.
18324 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
18325 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
18327 2018-03-02 Jeff Law <law@redhat.com>
18329 * reorg.c (stop_search_p): Handle DEBUG_INSN.
18330 (redundant_insn, fill_simple_delay_slots): Likewise.
18331 (fill_slots_from_thread): Likewise.
18332 * resource.c (mark_referenced_resources): Likewise.
18333 (mark_set_resources, find_dead_or_set_registers): Likewise.
18335 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18337 * substring-locations.h (format_warning_va): Formatting fix for
18338 ATTRIBUTE_GCC_DIAG.
18339 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
18341 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
18342 * substring-locations.c: Include intl.h.
18343 (format_warning_va): Turned into small wrapper around
18344 format_warning_n_va, renamed to ...
18345 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
18346 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
18348 (format_warning_at_substring_n): New function.
18349 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
18350 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
18351 format_warning_at_substring with just a shorter name instead of
18352 const function pointer.
18353 (fmtwarn_n): New function.
18354 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
18355 appropriate, get rid of all the fmtstr temporaries, move conditionals
18356 with G_() wrapped string literals directly into fmtwarn arguments,
18357 cast dir.len to (int), formatting fixes.
18359 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
18361 * doc/invoke.texi: Remove "Cilk Plus" references.
18363 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18364 Richard Biener <rguenther@suse.de>
18367 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
18368 for error or warning attributes if CALL_FROM_THUNK_P is set.
18371 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18374 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
18375 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
18378 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
18379 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
18381 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
18382 instead of -1U in last predictors element's probability member.
18384 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
18387 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18388 arguments if they are comparable.
18390 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
18392 PR tree-optimization/84634
18393 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
18394 masks and masked_loop_p with a single loop_masks, making sure it's
18395 null for bb vectorization.
18397 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
18399 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
18400 (vect_analyze_data_ref_access): Use loop->safe_len rather than
18401 loop->force_vectorize to check whether there is no alias.
18403 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18406 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
18408 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
18410 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
18411 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
18412 instead of a loop around prev_real_insn.
18413 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
18416 PR inline-asm/84625
18417 * config/i386/i386.c (ix86_print_operand): Use conditional
18418 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
18421 2018-03-02 Richard Biener <rguenther@suse.de>
18423 PR tree-optimization/84427
18424 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
18425 (bitmap_set_subtract_values): Rewrite to handle multiple
18428 (prune_clobbered_mems): Likewise.
18429 (phi_translate): Take edge instead of pred/phiblock.
18430 (phi_translate_1): Likewise.
18431 (phi_translate_set): Likewise. Insert all translated
18432 exprs for a value into the set, keeping possibly multiple
18433 expressions per value.
18434 (compute_antic_aux): Adjust for phi_translate changes.
18435 When intersecting union the expressions and prune those
18436 not in the final value set, keeping possibly multiple
18437 expressions per value. Do not use value-insertion
18438 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
18439 all expressions. Add verification that the value-sets
18440 only shrink during iteration.
18441 (compute_partial_antic_aux): Adjust for the phi_translate changes.
18442 (do_pre_regular_insertion): Likewise.
18443 (do_pre_partial_partial_insertion): Likewise.
18445 2018-03-02 Richard Biener <rguenther@suse.de>
18448 * config/darwin.c (saved_debug_info_level): New static global.
18449 (darwin_asm_lto_start): Disable debug info generation for LTO out.
18450 (darwin_asm_lto_end): Restore debug info generation settings.
18452 2018-03-01 Martin Liska <mliska@suse.cz>
18455 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
18456 volatile arguments.
18458 2018-03-01 Richard Biener <rguenther@suse.de>
18461 * dwarf2out.c (gen_variable_die): Properly handle late VLA
18462 type annotation with LTO when debug was disabled at compile-time.
18464 2018-03-01 Matthew Fortune <mfortune@gmail.com>
18466 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
18468 (mips_final_postscan_insn): Likewise.
18470 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
18472 PR rtl-optimization/84528
18473 * alias.c (init_alias_target): Add commentary.
18474 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
18475 a unique base value if the frame pointer is not eliminated
18476 to the stack pointer.
18478 2018-03-01 Tom de Vries <tom@codesourcery.com>
18480 PR rtl-optimization/83327
18481 * lra-int.h (hard_regs_spilled_into): Declare.
18482 * lra.c (hard_regs_spilled_into): Define.
18483 (init_reg_info): Init hard_regs_spilled_into.
18484 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
18485 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
18486 (process_bb_lives): Handle hard_regs_spilled_into.
18487 (lra_create_live_ranges_1): Before doing liveness propagation, clear
18488 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
18490 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
18492 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
18493 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
18494 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
18495 * config/rs6000/aix72.h: New file.
18497 2018-02-28 Jakub Jelinek <jakub@redhat.com>
18499 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
18500 instead of warning_at with conditional singular and plural messages
18504 * stor-layout.c (update_alignment_for_field): For
18505 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
18506 && !DECL_PACKED (field), do the alignment update, just use
18507 only desired_align instead of MAX (type_align, desired_align)
18509 (place_field): Don't do known_align < desired_align handling
18510 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
18511 is non-NULL, instead do it after rli->prev_field handling and
18512 only if not within a bitfield word. For DECL_PACKED (field)
18513 use type_align of BITS_PER_UNIT.
18515 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
18517 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
18518 superfluous parentheses and trailing spaces.
18520 2018-02-28 Richard Biener <rguenther@suse.de>
18522 PR tree-optimization/84584
18523 * graphite-scop-detection.c (scop_detection::add_scop): Discard
18524 SCoPs with fake exit edge.
18526 2018-02-28 Martin Liska <mliska@suse.cz>
18529 * timevar.c (timer::print): Fix format to properly print 100%
18532 2018-02-28 Richard Biener <rguenther@suse.de>
18534 PR middle-end/84607
18535 * genmatch.c (capture_info::walk_match): Do not mark
18536 captured expressions without operands as expr_p given
18537 they act more like predicates and should be subject to
18538 "lost tail" side-effect preserving.
18540 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
18542 PR rtl-optimization/81611
18543 * auto-inc-dec.c (attempt_change): Move dead note from
18544 mem_insn if it's the next use of regno
18545 (find_address): Take address use of reg holding
18546 non-incremented value. Add parm to limit search to the named
18548 (merge_in_block): Attempt to use a mem insn that is the next
18549 use of the original regno.
18551 2018-02-27 Martin Sebor <msebor@redhat.com>
18554 * doc/invoke.texi (-Wmissing-attributes): New option.
18555 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
18557 2018-02-27 Martin Sebor <msebor@redhat.com>
18559 PR translation/84207
18560 * diagnostic-core.h (warning_n, error_n, inform_n): Change
18561 n argument to unsigned HOST_WIDE_INT.
18562 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
18563 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
18564 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
18565 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
18567 2018-02-27 Richard Biener <rguenther@suse.de>
18569 PR tree-optimization/84512
18570 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
18571 Do not use the estimate returned from record_stmt_cost for
18572 the scalar iteration cost but sum properly using add_stmt_cost.
18574 2018-02-27 Richard Biener <rguenther@suse.de>
18576 PR tree-optimization/84466
18577 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18578 Adjust last change to less strictly validate use operands.
18580 2018-02-27 Martin Liska <mliska@suse.cz>
18582 PR gcov-profile/84548
18583 * gcov.c (process_file): Allow partial overlap and consider it
18584 also as group functions.
18585 (output_lines): Properly calculate range of lines for a group.
18587 2018-02-27 Martin Liska <mliska@suse.cz>
18589 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
18590 'ggc' suffixes. Change first column width.
18591 (timer::print): Fix formatting of the column.
18593 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
18595 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
18596 preserve inline entry blocks for the sake of debug inline
18597 entry point markers alone.
18598 (remove_unused_locals): Suggest in comments a better place to
18599 force the preservation of inline entry blocks that are
18600 otherwise unused, but do not preserve them.
18602 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18604 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
18606 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18609 * config/i386/constraints.md (Bs): Replace
18610 ix86_indirect_branch_register with
18611 TARGET_INDIRECT_BRANCH_REGISTER.
18613 * config/i386/i386.md (indirect_jump): Likewise.
18614 (tablejump): Likewise.
18615 (*sibcall_memory): Likewise.
18616 (*sibcall_value_memory): Likewise.
18617 Peepholes of indirect call and jump via memory: Likewise.
18618 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
18619 (*sibcall_value_GOT_32): Likewise.
18620 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18621 (GOT_memory_operand): Likewise.
18622 (call_insn_operand): Likewise.
18623 (sibcall_insn_operand): Likewise.
18624 (GOT32_symbol_operand): Likewise.
18625 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
18627 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
18629 PR rtl-optimization/83496
18630 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
18631 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
18632 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
18633 redundant insn, if any.
18634 (relax_delay_slots): Likewise.
18635 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
18637 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
18639 PR tree-optimization/83965
18640 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
18641 that grouped statements are part of a reduction chain. Return
18642 true if the statement is not marked as a reduction itself but
18643 is part of a group.
18644 (vect_recog_dot_prod_pattern): Don't check whether the statement
18645 is part of a group here.
18646 (vect_recog_sad_pattern): Likewise.
18647 (vect_recog_widen_sum_pattern): Likewise.
18649 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
18652 * final.c (rest_of_clean_state): Also look for calls inside sequences.
18654 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18657 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
18659 (ix86_output_indirect_function_return): New prototype.
18660 (ix86_split_simple_return_pop_internal): Likewise.
18661 * config/i386/i386.c (indirect_return_via_cx): New.
18662 (indirect_return_via_cx_bnd): Likewise.
18663 (indirect_thunk_name): Handle return va CX_REG.
18664 (output_indirect_thunk_function): Create alias for
18665 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
18666 (ix86_output_indirect_jmp): Remove the bool argument.
18667 (ix86_output_indirect_function_return): New function.
18668 (ix86_split_simple_return_pop_internal): Likewise.
18669 * config/i386/i386.md (*indirect_jump): Don't pass false
18670 to ix86_output_indirect_jmp.
18671 (*tablejump_1): Likewise.
18672 (simple_return_pop_internal): Change it to define_insn_and_split.
18673 Call ix86_split_simple_return_pop_internal to split it for
18674 -mfunction-return=.
18675 (simple_return_indirect_internal): Call
18676 ix86_output_indirect_function_return instead of
18677 ix86_output_indirect_jmp.
18679 2018-02-26 Jakub Jelinek <jakub@redhat.com>
18682 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
18683 memset and value initialization afterwards.
18685 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
18687 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
18689 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18692 * common/config/aarch64/aarch64-common.c
18693 (aarch_option_optimization_table[]): Switch
18694 off fomit-frame-pointer
18696 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18697 Chung-Ju Wu <jasonwucj@gmail.com>
18699 * config/nds32/nds32-multiple.md (load_multiple): Disallow
18701 (store_multiple): Ditto.
18703 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18705 * config.gcc: Add --with-cpu support for nds32 target.
18706 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
18707 * config/nds32/nds32.opt: Add -mcpu= option.
18709 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
18711 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
18712 isel=yes): Warn for these deprecated options.
18714 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
18716 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
18717 ISA_2_5_MASKS_EMBEDDED.
18719 2018-02-23 Jakub Jelinek <jakub@redhat.com>
18721 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
18722 p->max as pointers rather than using iterative_hash_expr.
18724 2018-02-23 Carl Love <cel@us.ibm.com>
18726 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
18727 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
18729 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
18730 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
18731 P8V_BUILTIN_VEC_VUNSIGNED2.
18733 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
18736 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
18737 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
18739 * lra-constraints.c (curr_insn_transform): Set up
18740 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
18742 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
18743 * lra-eliminations.c (spill_pseudos): Ditto.
18744 (process_insn_for_elimination): Ditto.
18745 * lra-lives.c (reg_early_clobber_p): Use the new macros.
18746 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
18747 LRA_NON_CLOBBERED_ALT.
18749 2018-02-22 Martin Sebor <msebor@redhat.com>
18751 PR tree-optimization/84480
18752 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
18753 to maybe_diag_stxncpy_trunc. Call it.
18754 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
18755 from gimple_fold_builtin_strcpy. Print inlining stack.
18756 (handle_builtin_stxncpy): Print inlining stack.
18757 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
18759 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
18762 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
18763 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
18764 and -fcheck-pointer-bounds are used together.
18765 (indirect_thunk_prefix): New enum.
18766 (indirect_thunk_need_prefix): New function.
18767 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
18768 "_nt" instead of "_bnd" for NOTRACK prefix.
18769 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
18770 (output_indirect_thunk_function): Likewise.
18772 (ix86_code_end): Update output_indirect_thunk_function calls.
18773 (ix86_output_indirect_branch_via_reg): Replace
18774 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
18775 (ix86_output_indirect_branch_via_push): Likewise.
18776 (ix86_output_function_return): Likewise.
18777 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
18778 incompatible with -fcf-protection=branch and
18779 -fcheck-pointer-bounds.
18781 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18784 * config/aarch64/aarch64.c (aarch64_print_address_internal):
18785 Change gcc_assert call to output_operand_lossage.
18787 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18789 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
18791 2018-02-22 DJ Delorie <dj@redhat.com>
18792 Sebastian Perta <sebastian.perta@renesas.com>
18793 Oleg Endo <olegendo@gcc.gnu.org>
18795 * config/rx/rx.c (rx_rtx_costs): New function.
18796 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
18798 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
18800 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
18802 2018-02-22 Martin Liska <mliska@suse.cz>
18805 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
18806 Add "native" as a possible value.
18808 2018-02-22 Martin Liska <mliska@suse.cz>
18811 * config/i386/i386.c (ix86_option_override_internal):
18812 Add "native" as a possible value for -march and -mtune.
18814 2018-02-22 Jakub Jelinek <jakub@redhat.com>
18817 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
18818 to all type variants.
18820 PR tree-optimization/84503
18821 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
18822 width as info->bitpos + info->bitsize - start.
18823 (merged_store_group::merge_overlapping): Simplify width computation.
18824 (check_no_overlap): New function.
18825 (imm_store_chain_info::try_coalesce_bswap): Compute expected
18826 start + width and last_order of the group, fail if check_no_overlap
18828 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
18829 to group if check_no_overlap fails.
18831 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18833 * config/rs6000/altivec.md: Delete contraint arguments to
18834 define_expand, define_split, and define_peephole2, and in
18835 define_insn_and_split if always unused.
18836 * config/rs6000/darwin.md: Ditto.
18837 * config/rs6000/dfp.md: Ditto.
18838 * config/rs6000/rs6000.md: Ditto.
18839 * config/rs6000/sync.md: Ditto.
18840 * config/rs6000/vector.md: Ditto.
18841 * config/rs6000/vsx.md: Ditto.
18843 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18845 * config/rs6000/altivec.md: Write output control strings as braced
18846 blocks instead of double-quoted strings.
18847 * config/rs6000/darwin.md: Ditto.
18848 * config/rs6000/rs6000.md: Ditto.
18849 * config/rs6000/vector.md: Ditto.
18850 * config/rs6000/vsx.md: Ditto.
18852 2018-02-21 Jason Merrill <jason@redhat.com>
18854 PR c++/84314 - ICE with templates and fastcall attribute.
18855 * attribs.c (build_type_attribute_qual_variant): Remove assert.
18857 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18859 * ipa-cp.c (determine_versionability): Fix comment typos.
18861 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18864 * ipa-cp.c (determine_versionability): Do not version functions caling
18867 2018-02-21 Martin Liska <mliska@suse.cz>
18870 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18871 Add "native" as a possible value.
18872 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
18873 the macro when native cpu detection is available.
18875 2018-02-21 Martin Liska <mliska@suse.cz>
18878 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18879 Add "native" as a possible value.
18880 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18881 when native cpu detection is available.
18883 2018-02-21 Jakub Jelinek <jakub@redhat.com>
18884 Martin Sebor <msebor@redhat.com>
18886 PR tree-optimization/84478
18887 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18889 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18890 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18891 support which is conservatively correct, for 2 only stay conservative
18892 for maxlen. Formatting and comment capitalization fixes. Add STRICT
18893 argument to the 2 argument get_range_strlen, adjust 6 arg
18894 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18896 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18897 (gimple_fold_builtin_strlen): Pass true as last argument to
18900 2018-02-20 Martin Sebor <msebor@redhat.com>
18902 PR middle-end/84095
18903 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18904 (builtin_memref::set_base_and_offset): Same. Handle inner references.
18905 (builtin_memref::builtin_memref): Factor out parts into
18906 set_base_and_offset and call it.
18908 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18910 PR middle-end/84406
18911 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18912 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18913 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
18914 search at the associated MODE_INT.
18916 2018-02-20 Jeff Law <law@redhat.com>
18918 PR middle-end/82123
18919 PR tree-optimization/81592
18920 PR middle-end/79257
18921 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18922 for range data rather than using global data.
18923 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18924 range data rather than using global data.
18925 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18926 pass it to children as needed.
18927 (struct directive::fmtresult): Similarly.
18928 (struct directive::set_width): Similarly.
18929 (struct directive::set_precision): Similarly.
18930 (format_integer, format_directive, parse_directive): Similarly.
18931 (format_none): Accept unnamed vr_values parameter.
18932 (format_percent, format_floating, format_character): Similarly.
18933 (format_string, format_plain): Similarly.
18934 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18935 the EVRP range analyzer for range data rather than using global data.
18936 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18937 gimple-ssa-evrp-analyze.h
18938 (class sprintf_dom_walker): Add after_dom_children member function.
18939 Add evrp_range_analyzer member.
18940 (sprintf_dom_walker::before_dom_children): Call into the EVRP
18941 range analyzer as needed.
18942 (sprintf_dom_walker::after_dom_children): New member function.
18943 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18945 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18946 (evrp_range_analyzer::pop_to_marker): Likewise.
18948 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18950 PR tree-optimization/84419
18951 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18952 with the required type if its current type is compatible but
18955 2018-02-20 Jakub Jelinek <jakub@redhat.com>
18957 PR middle-end/82004
18958 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18959 after vectorization.
18961 2018-02-20 Martin Liska <mliska@suse.cz>
18964 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18965 possible values if we don't have a hint.
18967 2018-02-20 Martin Liska <mliska@suse.cz>
18971 * final.c (shorten_branches): Build align_tab array with one
18973 * opts.c (finish_options): Add alignment option limit check.
18974 (MAX_CODE_ALIGN): Likewise.
18975 (MAX_CODE_ALIGN_VALUE): Likewise.
18976 * doc/invoke.texi: Document maximum allowed option value for
18977 all -falign-* options.
18979 2018-02-19 Jakub Jelinek <jakub@redhat.com>
18982 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18983 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18984 * var-tracking.c (emit_note_insn_var_location): Remove all references
18985 to NOTE_INSN_CALL_ARG_LOCATION.
18986 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18987 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18988 Use copy_rtx_if_shared.
18989 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18990 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18991 (dwarf2out_var_location): Remove handling of
18992 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18994 * final.c (final_scan_insn): Remove all references to
18995 NOTE_INSN_CALL_ARG_LOCATION.
18996 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
18997 before dumping final insns.
18998 * except.c (emit_note_eh_region_end): Remove all references to
18999 NOTE_INSN_CALL_ARG_LOCATION.
19000 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
19001 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
19002 * config/arc/arc.c (hwloop_optimize): Likewise.
19003 * config/arm/arm.c (create_fix_barrier): Likewise.
19004 * config/s390/s390.c (s390_chunkify_start): Likewise.
19005 * config/sh/sh.c (find_barrier): Likewise.
19006 * config/i386/i386.c (rest_of_insert_endbranch,
19007 ix86_seh_fixup_eh_fallthru): Likewise.
19008 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
19009 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
19010 * config/frv/frv.c (frv_function_prologue): Likewise.
19011 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
19013 (note_outside_basic_block_p): Remove all references to
19014 NOTE_INSN_CALL_ARG_LOCATION.
19015 * gengtype.c (adjust_field_rtx_def): Likewise.
19016 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
19018 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
19019 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
19022 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
19025 PR tree-optimization/84452
19026 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
19027 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
19030 2018-02-19 Martin Liska <mliska@suse.cz>
19033 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
19035 2018-02-19 Martin Liska <mliska@suse.cz>
19036 Richard Sandiford <richard.sandiford@linaro.org>
19038 PR tree-optimization/82491
19039 * gimple-fold.c (get_base_constructor): Make earlier bail out
19042 2018-02-19 Carl Love <cel@us.ibm.com>
19044 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
19045 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
19047 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
19048 P8V_BUILTIN_VEC_NEG.
19050 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
19052 * config/rl78/rl78.md (movdf): New define expand.
19054 2018-02-19 Martin Liska <mliska@suse.cz>
19057 * doc/invoke.texi: Fix typo.
19058 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
19060 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
19062 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
19063 handle rs6000_single_float and rs6000_double_float specially for
19066 2018-02-16 Jeff Law <law@redhat.com>
19068 * config/rx/rx.c (add_pop_cfi_notes): New function.;
19069 (pop_regs): Use it.
19071 2018-02-16 Jakub Jelinek <jakub@redhat.com>
19074 * ipa-inline.c (inline_small_functions): Fix a typo.
19076 2018-02-16 Nathan Sidwell <nathan@acm.org>
19078 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
19080 2018-02-16 Carl Love <cel@us.ibm.com>
19082 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
19083 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
19084 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
19085 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
19086 expansion to P8V_BUILTIN_VEC_FLOAT2.
19088 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
19090 PR rtl-optimization/70023
19091 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
19092 src_regno into account.
19094 2018-02-16 Carl Love <cel@us.ibm.com>
19096 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
19097 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
19098 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
19099 * config/rs6000/rs6000.c: Remove case statements for
19100 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
19101 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
19102 and P9V_BUILTIN_VEC_VINSERT4B.
19103 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
19104 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
19105 * config/rs6000/vsx.md:
19106 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
19109 2018-02-16 Carl Love <cel@us.ibm.com>
19111 * config/rs6000/altivec.h: Add builtin names vec_extract4b
19113 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
19115 * config/rs6000/rs6000-c.c: Add the definitions for
19116 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
19117 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
19118 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
19119 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
19120 definition for insert4b and define insn *insert3b_internal.
19121 * doc/extend.texi: Add documentation for vec_extract4b.
19123 2018-02-16 Nathan Sidwell <nathan@acm.org>
19125 * doc/extend.texi (Backwards Compatibility): Mention friend
19126 injection. Note for-scope is deprecated.
19127 * doc/invoke.texi (-ffriend-injection): Deprecate.
19129 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
19131 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
19132 that moved to I2, also allow destinations that are a paradoxical
19133 subreg (instead of a normal reg).
19135 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
19138 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
19141 2018-02-16 Richard Biener <rguenther@suse.de>
19143 PR tree-optimization/84037
19144 PR tree-optimization/84016
19146 * config/i386/i386.c (ix86_builtin_vectorization_cost):
19147 Adjust vec_construct for the fact we need additional higher latency
19148 128bit inserts for AVX256 and AVX512 vector builds.
19149 (ix86_add_stmt_cost): Scale vector construction cost for
19152 2018-02-16 Richard Biener <rguenther@suse.de>
19154 PR tree-optimization/84417
19155 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
19156 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
19157 (non_rewritable_lvalue_p): Likewise, use poly-ints.
19159 2018-02-16 Martin Liska <mliska@suse.cz>
19162 * internal-fn.def (ASAN_CHECK): Set proper flags.
19163 (ASAN_MARK): Likewise.
19165 2018-02-16 Julia Koval <julia.koval@intel.com>
19167 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
19168 from PTA_CANNONLAKE.
19170 2018-02-16 Jakub Jelinek <jakub@redhat.com>
19173 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
19174 Use ++iter rather than iter++ for std::list iterators.
19175 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
19176 defer deleting them until all nodes in the forest are processed. Do
19177 free even leaf nodes. Change to_process into auto_vec.
19180 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
19181 * vec.h (vec_default_construct): Use memset instead of placement new
19182 if BROKEN_VALUE_INITIALIZATION is defined.
19183 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
19184 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
19187 PR rtl-optimization/83723
19188 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
19189 * lra.c (lra_substitute_pseudo): Likewise. If true, use
19190 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
19192 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
19194 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
19196 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
19198 PR rtl-optimization/81443
19199 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
19200 from inner REGs to paradoxical SUBREGs.
19202 2018-02-16 Richard Biener <rguenther@suse.de>
19204 PR tree-optimization/84399
19205 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
19206 For operands we can analyze at their definition make sure we can
19207 analyze them at each use as well.
19209 2018-02-16 Richard Biener <rguenther@suse.de>
19211 PR tree-optimization/84190
19212 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
19213 volatile accesses if the decl isn't volatile.
19215 2018-02-15 Jason Merrill <jason@redhat.com>
19217 PR c++/84314 - ICE with templates and fastcall attribute.
19218 * attribs.c (build_type_attribute_qual_variant): Don't clobber
19219 TYPE_CANONICAL on an existing type.
19221 2018-02-15 Jakub Jelinek <jakub@redhat.com>
19223 PR tree-optimization/84383
19224 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
19225 dstoff nor call operand_equal_p if dstbase is NULL.
19227 PR tree-optimization/84334
19228 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
19229 also a CONSTANT_CLASS_P, punt.
19231 2018-02-14 Jim Wilson <jimw@sifive.com>
19233 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
19234 first SMALL_OPERAND check. New local min_second_step. Move assert
19235 to where locals are set. Add TARGET_RVC support.
19236 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
19238 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
19240 * doc/invoke.texi: Correct -Wformat-overflow code sample.
19242 2018-02-14 Martin Sebor <msebor@redhat.com>
19244 PR tree-optimization/83698
19245 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
19246 arrays constrain the offset range to their bounds.
19247 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
19248 (builtin_access::overlap): Avoid setting the size of overlap if it's
19250 (maybe_diag_overlap): Also consider arrays when deciding what values
19251 of offsets to include in diagnostics.
19253 2018-02-14 Martin Sebor <msebor@redhat.com>
19256 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
19257 that correspond to the kind of a declaration.
19259 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
19262 * config/pa/pa.md: Load address of PIC label using the linkage table
19263 if the label is nonlocal.
19265 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
19267 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
19268 warning message if user requests -maltivec=be.
19269 * doc/invoke.texi: Document deprecation of -maltivec=be.
19271 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
19274 * config/rs6000/rs6000-c.c: Update definitions for
19275 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
19276 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
19278 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19281 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
19282 add _get_ssp intrinsics. Remove argument from
19283 __builtin_ia32_rdssp[d|q].
19284 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
19285 * config/i386/i386-builtin.def: Remove argument from
19286 __builtin_ia32_rdssp[d|q].
19287 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
19288 ix86_expand_special_args_builtin for _rdssp[d|q].
19289 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
19290 Clear register before usage.
19291 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
19292 Add documentation for new _get_ssp and _inc_ssp intrinsics.
19294 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
19296 PR tree-optimization/84357
19297 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
19298 operand 1 of an ARRAY_REF too.
19300 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
19303 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
19304 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
19306 (set_of_reg): New struct.
19307 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
19308 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
19309 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
19311 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
19312 Split into bitclr, bitset, bitinvert patterns if appropriate.
19313 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
19314 use rx_fuse_in_memory_bitop.
19315 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
19316 to named insn, correct maximum insn length.
19318 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
19321 * machmode.def: Define a complex mode for PARTIAL_INT.
19322 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
19324 * doc/rtl.texi: Document CSPImode.
19325 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
19327 (msp430_hard_regno_nregs_with_padding): Likewise.
19329 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
19332 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
19334 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
19336 PR rtl-optimization/84169
19337 * combine.c (try_combine): New variable split_i2i3. Set it to true if
19338 we generated a parallel as new i3 and we split that to new i2 and i3
19339 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
19340 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
19341 those to i2, not i1. Partially rewrite this scan code.
19343 2018-02-13 Jakub Jelinek <jakub@redhat.com>
19346 * stor-layout.c (place_field): For variable length fields, adjust
19347 offset_align afterwards not just based on the field's alignment,
19348 but also on the size.
19350 PR middle-end/84309
19351 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
19352 of exps and logs in the use_exp2 case.
19354 2018-02-13 Jeff Law <law@redhat.com>
19356 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
19357 entry for "vector".
19359 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
19362 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
19366 * common.opt (gas-loc-support, gas-locview-support): New.
19367 (ginline-points, ginternal-reset-location-views): New.
19368 * doc/invoke.texi: Document them. Use @itemx where intended.
19369 (gvariable-location-views): Adjust.
19370 * target.def (reset_location_view): New.
19371 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
19372 (TARGET_RESET_LOCATION_VIEW): New.
19373 * doc/tm.texi: Rebuilt.
19374 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
19375 (dwarf2out_default_as_locview_support): New.
19376 (output_asm_line_debug_info): Use option variables.
19377 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
19378 (output_loc_list): Likewise.
19379 (add_high_low_attributes): Check option variables.
19380 Don't output entry view attribute in strict mode.
19381 (gen_inlined_subroutine_die): Check option variables.
19382 (dwarf2out_inline_entry): Likewise.
19383 (init_sections_and_labels): Likewise.
19384 (dwarf2out_early_finish): Likewise.
19385 (maybe_reset_location_view): New, from...
19386 (dwarf2out_var_location): ... here. Call it.
19387 * debug.h (dwarf2out_default_as_loc_support): Declare.
19388 (dwarf2out_default_as_locview_support): Declare.
19389 * hooks.c (hook_int_rtx_insn_0): New.
19390 * hooks.h (hook_int_rtx_insn_0): Declare.
19391 * toplev.c (process_options): Take -gas-loc-support and
19392 -gas-locview-support from dwarf2out. Enable
19393 -gvariable-location-views by default only with locview
19394 assembler support. Enable -ginternal-reset-location-views by
19395 default only if the target defines the corresponding hook.
19396 Enable -ginline-points by default if location views are
19397 enabled; force it disabled if statement frontiers are
19399 * tree-inline.c (expand_call_inline): Check option variables.
19400 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
19402 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
19404 PR tree-optimization/84321
19405 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
19406 handling. Also check whether the anti-range contains any values
19407 that satisfy the mask; switch to a VR_RANGE if not.
19409 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
19412 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
19414 2018-02-13 Martin Jambor <mjambor@suse.cz>
19417 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
19418 of call statements, also set location of a load to a temporary.
19420 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
19422 * config/rl78/rl78.c (add_vector_labels): New function.
19423 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
19424 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
19425 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
19426 which checks that no arguments are passed.
19427 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
19428 * doc/extend.texi: Documentation for the new attribute.
19430 2018-02-13 Andreas Schwab <schwab@suse.de>
19432 * config/riscv/linux.h (CPP_SPEC): Define.
19434 2018-02-13 Jakub Jelinek <jakub@redhat.com>
19437 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
19438 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
19439 OPTION_MASK_ISA_AES as first argument to def_builtin_const
19440 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
19441 instead of OPTION_MASK_ISA_PCLMUL as first argument to
19442 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
19443 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
19444 temporarily for AES and PCLMUL builtins.
19446 PR tree-optimization/84339
19447 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
19448 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
19451 PR middle-end/84309
19452 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
19453 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
19454 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
19456 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
19458 * omp-simd-clone.h: New file.
19459 * omp-simd-clone.c: Include omp-simd-clone.h.
19460 (expand_simd_clones): No longer static.
19461 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
19462 cgraph.h and omp-simd-clone.h.
19463 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
19464 (vect_recog_widen_shift_pattern): Formatting fix.
19465 (vect_pattern_recog_1): Don't check optab for calls.
19468 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
19469 operands[2] into a REG before using gen_lowpart on it.
19471 2018-02-12 Jeff Law <law@redhat.com>
19474 * config/sh/sh.c (find_barrier): Consider a sibling call
19477 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
19478 successfully back substituting a reg.
19480 2018-02-12 Richard Biener <rguenther@suse.de>
19482 PR tree-optimization/84037
19483 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
19484 parameter, move visited init to caller.
19485 (vect_slp_analyze_operations): Separate cost from validity
19486 check, initialize visited once for all instances.
19487 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
19489 * tree-vect-stmts.c (vect_model_simple_cost): Make early
19491 (vect_model_promotion_demotion_cost): Likewise.
19492 (vectorizable_bswap): Guard cost modeling with !slp_node
19493 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
19495 (vectorizable_call): Likewise.
19496 (vectorizable_conversion): Likewise.
19497 (vectorizable_assignment): Likewise.
19498 (vectorizable_shift): Likewise.
19499 (vectorizable_operation): Likewise.
19500 (vectorizable_store): Likewise.
19501 (vectorizable_load): Likewise.
19502 (vectorizable_condition): Likewise.
19503 (vectorizable_comparison): Likewise.
19505 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
19508 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
19509 (ASAN_MARK): Fix fnspec to account for return value, change pointer
19510 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
19512 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19514 PR middle-end/83665
19515 * params.def (inline-min-speedup): Increase from 8 to 15.
19516 (max-inline-insns-auto): Decrease from 40 to 30.
19517 * ipa-split.c (consider_split): Add some buffer for function to
19518 be considered inlining candidate.
19519 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
19522 2018-02-12 Richard Biener <rguenther@suse.de>
19524 PR tree-optimization/84037
19525 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
19526 matched stmts if we cannot swap the non-matched ones.
19528 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
19530 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
19531 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
19532 _mm_maskz_scalef_round_ss): New intrinsics.
19533 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
19534 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
19535 __builtin_ia32_scalefss_round): Remove.
19536 (__builtin_ia32_scalefsd_mask_round,
19537 __builtin_ia32_scalefss_mask_round): New intrinsics.
19538 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
19539 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
19540 ((match_operand:VF_128 2 "<round_nimm_predicate>"
19541 "<round_constraint>")): Changed to ...
19542 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
19543 "<round_scalar_constraint>")): ... this.
19544 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
19545 %0, %1, %2<round_op3>}"): Changed to ...
19546 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
19547 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
19548 %2<round_scalar_mask_op3>}"): ... this.
19549 * config/i386/subst.md (round_scalar_nimm_predicate): New.
19551 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
19553 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
19554 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
19555 (_mm_maskz_sqrt_round_ss): New intrinsics.
19556 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
19557 (__builtin_ia32_sqrtsd_mask_round)
19558 (__builtin_ia32_sqrtss_mask_round): New builtins.
19559 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
19560 (__builtin_ia32_sqrtss_round): Remove.
19561 (__builtin_ia32_sqrtsd_mask_round)
19562 (__builtin_ia32_sqrtss_mask_round): New builtins.
19563 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
19564 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
19565 ((match_operand:VF_128 1 "vector_operand"
19566 "xBm,<round_constraint>")): Changed to ...
19567 ((match_operand:VF_128 1 "vector_operand"
19568 "xBm,<round_scalar_constraint>")): ... this.
19569 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
19570 %0, %2, %<iptr>1<round_op3>}): Changed to ...
19571 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
19572 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
19573 %<iptr>1<round_scalar_mask_op3>}): ... this.
19574 ((set_attr "prefix" "<round_prefix>")): Changed to ...
19575 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
19577 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
19580 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
19581 Cast vec_cmpeq result to correct type.
19582 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
19583 Cast vec_cmpgt result to correct type.
19585 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
19587 * final.c (final_scan_insn_1): Renamed from...
19588 (final_scan_insn): ... this. New wrapper, to recover
19589 seen from the outermost call in recursive ones.
19590 * config/sparc/sparc.c (output_return): Drop seen from call.
19591 (output_sibcall): Likewise.
19592 * config/visium/visium.c (output_branch): Likewise.
19594 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
19596 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
19599 2018-02-10 Alan Modra <amodra@gmail.com>
19602 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
19603 Specify LR as an input.
19605 2018-02-10 Jakub Jelinek <jakub@redhat.com>
19608 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
19609 remove_member_access_dummy_vars): New functions.
19610 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
19611 lower_omp_1, execute_lower_omp): Use them.
19613 PR rtl-optimization/84308
19614 * shrink-wrap.c (spread_components): Release todo vector.
19616 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
19618 PR rtl-optimization/57193
19619 * ira-color.c (struct allocno_color_data): Add member
19620 conflict_allocno_hard_prefs.
19621 (update_conflict_allocno_hard_prefs): New.
19622 (bucket_allocno_compare_func): Add a preference based on
19623 conflict_allocno_hard_prefs.
19624 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
19625 (color_allocnos): Remove a dead code. Initiate
19626 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
19628 2018-02-09 Jakub Jelinek <jakub@redhat.com>
19631 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
19632 constraint from =wa to wa. Avoid a subreg on the output operand,
19633 instead use a pseudo and subreg it in a move.
19634 (p9_xxbrd_<mode>): Changed to ...
19635 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
19636 (p9_xxbrd_v2df): New expander.
19637 (p9_xxbrw_<mode>): Changed to ...
19638 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
19639 (p9_xxbrw_v4sf): New expander.
19641 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19643 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
19645 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
19648 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
19649 multiply in 32-bit mode.
19650 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
19651 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
19654 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19656 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
19657 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
19658 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
19659 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
19661 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
19664 * dwarf2out.c (is_trivial_indirect_ref): New function.
19665 (dwarf2out_late_global_decl): Do not generate a location
19666 attribute for variables that have a non-trivial DECL_VALUE_EXPR
19667 and that are not defined in the current unit.
19669 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19671 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
19672 instead of a libcall for UNORDERED.
19674 2018-02-09 Tamar Christina <tamar.christina@arm.com>
19677 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
19678 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
19680 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19683 * config/s390/s390.c (s390_set_current_function): Invoke
19684 s390_indirect_branch_settings also if fndecl didn't change.
19686 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19688 * config/rs6000/rs6000.md (blockage): Set length to zero.
19690 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19692 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
19694 2018-02-09 Jakub Jelinek <jakub@redhat.com>
19697 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
19698 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
19702 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
19703 PARALLEL incoming that failed vt_get_decl_and_offset check.
19705 PR middle-end/84237
19706 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
19707 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
19709 (get_variable_section): For decls in named .bss* sections pass true as
19710 second argument to bss_initializer_p.
19712 2018-02-09 Marek Polacek <polacek@redhat.com>
19713 Jakub Jelinek <jakub@redhat.com>
19716 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
19717 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
19718 Sync some changes from cxx_fold_indirect_ref.
19720 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19722 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
19724 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
19725 (BLOCK_INLINE_ENTRY_LABEL): New.
19726 (dwarf2out_var_location): Disregard inline entry markers.
19727 (inline_entry_data): New struct.
19728 (inline_entry_data_hasher): New hashtable type.
19729 (inline_entry_data_hasher::hash): New.
19730 (inline_entry_data_hasher::equal): New.
19731 (inline_entry_data_table): New variable.
19732 (add_high_low_attributes): Add DW_AT_entry_pc and
19733 DW_AT_GNU_entry_view attributes if a pending entry is found
19734 in inline_entry_data_table. Add old entry_pc attribute only
19735 if debug nonbinding markers are disabled.
19736 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
19737 markers are enabled.
19738 (block_within_block_p, dwarf2out_inline_entry): New.
19739 (dwarf2out_finish): Check that no entries remained in
19740 inline_entry_data_table.
19741 * final.c (reemit_insn_block_notes): Handle inline entry notes.
19742 (final_scan_insn, notice_source_line): Likewise.
19743 (rest_of_clean_state): Skip inline entry markers.
19744 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
19746 * gimple.c (gimple_build_debug_inline_entry): New.
19747 * gimple.h (enum gimple_debug_subcode): Add
19748 GIMPLE_DEBUG_INLINE_ENTRY.
19749 (gimple_build_debug_inline_entry): Declare.
19750 (gimple_debug_inline_entry_p): New.
19751 (gimple_debug_nonbind_marker_p): Adjust.
19752 * insn-notes.def (INLINE_ENTRY): New.
19753 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
19754 inline entry marker notes.
19755 (print_insn): Likewise.
19756 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
19757 (INSN_DEBUG_MARKER_KIND): Likewise.
19758 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
19759 * tree-inline.c (expand_call_inline): Build and insert
19760 debug_inline_entry stmt.
19761 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
19762 inline entry blocks early, if nonbind markers are enabled.
19763 (dump_scope_block): Dump fragment info.
19764 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
19765 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
19766 (gimple_build_debug_inline_entry): New.
19767 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
19768 Enable/disable inline entry points too.
19769 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
19770 (DEBUG_INSN): Describe inline entry markers.
19772 * common.opt (gvariable-location-views): New.
19773 (gvariable-location-views=incompat5): New.
19774 * config.in: Rebuilt.
19775 * configure: Rebuilt.
19776 * configure.ac: Test assembler for view support.
19777 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
19778 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
19779 * dwarf2out.c (var_loc_view): New typedef.
19780 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
19781 (dwarf2out_locviews_in_attribute): New.
19782 (dwarf2out_locviews_in_loclist): New.
19783 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
19784 (enum dw_line_info_opcode): Add LI_adv_address.
19785 (struct dw_line_info_table): Add view.
19786 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
19787 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
19788 (zero_view_p): New variable.
19789 (ZERO_VIEW_P): New macro.
19790 (output_asm_line_debug_info): New.
19791 (struct var_loc_node): Add view.
19792 (add_AT_view_list, AT_loc_list): New.
19793 (add_var_loc_to_decl): Add view param. Test it against last.
19794 (new_loc_list): Add view params. Record them.
19795 (AT_loc_list_ptr): Handle loc and view lists.
19796 (view_list_to_loc_list_val_node): New.
19797 (print_dw_val): Handle dw_val_class_view_list.
19798 (size_of_die): Likewise.
19799 (value_format): Likewise.
19800 (loc_list_has_views): New.
19801 (gen_llsym): Set vl_symbol too.
19802 (maybe_gen_llsym, skip_loc_list_entry): New.
19803 (dwarf2out_maybe_output_loclist_view_pair): New.
19804 (output_loc_list): Output view list or entries too.
19805 (output_view_list_offset): New.
19806 (output_die): Handle dw_val_class_view_list.
19807 (output_dwarf_version): New.
19808 (output_compilation_unit_header): Use it.
19809 (output_skeleton_debug_sections): Likewise.
19810 (output_rnglists, output_line_info): Likewise.
19811 (output_pubnames, output_aranges): Update version comments.
19812 (output_one_line_info_table): Output view numbers in asm comments.
19813 (dw_loc_list): Determine current endview, pass it to new_loc_list.
19814 Call maybe_gen_llsym.
19815 (loc_list_from_tree_1): Adjust.
19816 (add_AT_location_description): Create view list attribute if
19817 needed, check it's absent otherwise.
19818 (convert_cfa_to_fb_loc_list): Adjust.
19819 (maybe_emit_file): Call output_asm_line_debug_info for test.
19820 (dwarf2out_var_location): Reset views as needed. Precompute
19821 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
19822 attribute. Set view.
19823 (new_line_info_table): Reset next view.
19824 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
19825 (dwarf2out_source_line): Likewise. Output view resets and labels to
19826 the assembler, or select appropriate line info opcodes.
19827 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
19828 (optimize_string_length): Catch it. Adjust.
19829 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
19830 dw_val_class_view_list, and remove it if no longer needed.
19831 (hash_loc_list): Hash view numbers.
19832 (loc_list_hasher::equal): Compare them.
19833 (optimize_location_lists): Check whether a view list symbol is
19834 needed, and whether the locview attribute is present, and
19835 whether they match. Remove the locview attribute if no longer
19837 (index_location_lists): Call skip_loc_list_entry for test.
19838 (dwarf2out_finish): Call output_asm_line_debug_info for test.
19839 Use output_dwarf_version.
19840 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19841 (struct dw_val_node): Add val_view_list.
19842 * final.c (SEEN_NEXT_VIEW): New.
19843 (set_next_view_needed): New.
19844 (clear_next_view_needed): New.
19845 (maybe_output_next_view): New.
19846 (final_start_function): Rename to...
19847 (final_start_function_1): ... this. Take pointer to FIRST,
19848 add SEEN parameter. Emit param bindings in the initial view.
19849 (final_start_function): Reintroduce SEEN-less interface.
19850 (final): Rename to...
19851 (final_1): ... this. Take SEEN parameter. Output final pending
19852 next view at the end.
19853 (final): Reintroduce seen-less interface.
19854 (final_scan_insn): Output pending next view before switching
19855 sections or ending a block. Mark the next view as needed when
19856 outputting variable locations. Notify debug backend of section
19857 changes, and of location view changes.
19858 (rest_of_handle_final): Adjust.
19859 * toplev.c (process_options): Autodetect value for debug variable
19860 location views option. Warn on incompat5 without -gdwarf-5.
19861 * doc/invoke.texi (gvariable-location-views): New.
19862 (gvariable-location-views=incompat5): New.
19863 (gno-variable-location-views): New.
19865 2018-02-08 David Malcolm <dmalcolm@redhat.com>
19867 PR tree-optimization/84136
19868 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19869 that the result of find_edge is non-NULL.
19871 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19874 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19875 storing integer register in SImode. Fix cost of 256 and 512
19876 byte aligned SSE register store.
19878 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19880 * config/i386/i386.c (ix86_multiplication_cost): Fix
19881 multiplication cost for TARGET_AVX512DQ.
19883 2018-02-08 Marek Polacek <polacek@redhat.com>
19885 PR tree-optimization/84238
19886 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19889 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19891 PR tree-optimization/84265
19892 * tree-vect-stmts.c (vectorizable_store): Don't treat
19893 VMAT_CONTIGUOUS accesses as grouped.
19894 (vectorizable_load): Likewise.
19896 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19898 PR tree-optimization/81635
19899 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19900 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19901 (test_round_for_mask): New functions.
19902 (wide_int_cc_tests): Call test_round_for_mask.
19903 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19904 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19905 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19906 range returned by get_range_info.
19908 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19911 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19912 * symtab.c: Include builtins.h
19913 (symtab_node::output_to_lto_symbol_table_p): Move here
19914 from lto-streamer-out.c:output_symbol_p.
19915 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19916 (output_symbol_p): Move all logic to symtab.c
19917 (produce_symtab): Update.
19919 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19921 * config/s390/s390-opts.h (enum indirect_branch): Define.
19922 * config/s390/s390-protos.h (s390_return_addr_from_memory)
19923 (s390_indirect_branch_via_thunk)
19924 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19925 (enum s390_indirect_branch_type): Define.
19926 * config/s390/s390.c (struct s390_frame_layout, struct
19927 machine_function): Remove.
19928 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19929 (indirect_branch_table_label_no, indirect_branch_table_name):
19931 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19932 (enum s390_indirect_branch_option): Define.
19933 (s390_return_addr_from_memory): New function.
19934 (s390_handle_string_attribute): New function.
19935 (s390_attribute_table): Add new attribute handler.
19936 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19937 (s390_indirect_branch_via_thunk): New function.
19938 (s390_indirect_branch_via_inline_thunk): New function.
19939 (s390_function_ok_for_sibcall): When jumping via thunk disallow
19940 sibling call optimization for non z10 compiles.
19941 (s390_emit_call): Force indirect branch target to be a single
19942 register. Add r1 clobber for non-z10 compiles.
19943 (s390_emit_epilogue): Emit return jump via return_use expander.
19944 (s390_reorg): Handle JUMP_INSNs as execute targets.
19945 (s390_option_override_internal): Perform validity checks for the
19946 new command line options.
19947 (s390_indirect_branch_attrvalue): New function.
19948 (s390_indirect_branch_settings): New function.
19949 (s390_set_current_function): Invoke s390_indirect_branch_settings.
19950 (s390_output_indirect_thunk_function): New function.
19951 (s390_code_end): Implement target hook.
19952 (s390_case_values_threshold): Implement target hook.
19953 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19955 * config/s390/s390.h (struct s390_frame_layout)
19956 (struct machine_function): Move here from s390.c.
19957 (TARGET_INDIRECT_BRANCH_NOBP_RET)
19958 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19959 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19960 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19961 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19962 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19963 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19964 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19965 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19966 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19967 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19968 (mnemonic attribute): Add values which aren't recognized
19970 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19971 pattern for branch conversion. Fix mnemonic attribute.
19972 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19973 indirect branch via thunk if requested.
19974 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19975 ("*indirect_jump"): Disable for branch conversion using out of
19977 ("indirect_jump_via_thunk<mode>_z10")
19978 ("indirect_jump_via_thunk<mode>")
19979 ("indirect_jump_via_inlinethunk<mode>_z10")
19980 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19981 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19982 ("casesi_jump_via_inlinethunk<mode>_z10")
19983 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19984 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19985 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19986 ("*indirect2_jump"): Disable for branch conversion.
19987 ("casesi_jump"): Turn into expander and expand patterns for branch
19989 ("return_use"): New expander.
19990 ("*return"): Emit return via thunk and rename it to ...
19991 ("*return<mode>"): ... this one.
19992 * config/s390/s390.opt: Add new options and and enum for the
19995 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19997 * lra-constraints.c (match_reload): Unconditionally use
19998 gen_lowpart_SUBREG, rather than selecting between that
19999 and equivalent gen_rtx_SUBREG code.
20001 2018-02-08 Richard Biener <rguenther@suse.de>
20003 PR tree-optimization/84233
20004 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
20005 changed flag instead of boguously re-using phi_inserted.
20007 2018-02-08 Martin Jambor <mjambor@suse.cz>
20009 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
20010 static local variables.
20012 2018-02-08 Richard Biener <rguenther@suse.de>
20014 PR tree-optimization/84278
20015 * tree-vect-stmts.c (vectorizable_store): When looking for
20016 smaller vector types to perform grouped strided loads/stores
20017 make sure the mode is supported by the target.
20018 (vectorizable_load): Likewise.
20020 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
20022 * config/aarch64/aarch64.c (aarch64_components_for_bb):
20023 Increase LDP/STP opportunities by adding adjacent callee-saves.
20025 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
20027 PR rtl-optimization/84068
20028 PR rtl-optimization/83459
20029 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
20031 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
20033 PR tree-optimization/84224
20034 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
20035 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
20036 non-zero arguments.
20038 2018-02-07 Iain Sandoe <iain@codesourcery.com>
20041 * config/rs6000/altivec.md (*restore_world): Remove LR use.
20042 * config/rs6000/predicates.md (restore_world_operation): Adjust op
20043 count, remove one USE.
20045 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
20047 * doc/install.texi (Configuration): Document the
20048 --with-long-double-format={ibm,ieee} PowerPC configuration
20052 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
20053 Convert from define_expand to be define_insn_and_split. Rework
20054 float/double/_Float128 conversions to QI/HI/SImode to work with
20055 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
20056 conversions to QI/HImode types did a store and then a load to
20057 truncate the value. For conversions to VSX registers, don't split
20058 the insn, instead emit the code directly. Use the code iterator
20059 any_fix to combine signed and unsigned conversions.
20060 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
20061 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
20062 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
20063 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
20064 (fix_<mode>di2_hw): Likewise.
20065 (fixuns_<mode>di2_hw): Likewise.
20066 (fix_<mode>si2_hw): Likewise.
20067 (fixuns_<mode>si2_hw): Likewise.
20068 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
20069 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
20070 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
20071 fix<uns>_trunc<SFDF:mode>si2_p8.
20072 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
20073 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
20074 (fix<uns>_<mode>_mem): Likewise.
20075 (fctiw<u>z_<mode>_mem): Likewise.
20076 (fix<uns>_<mode>_mem): Likewise.
20077 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
20078 the register allocator from doing a direct move to the GPRs to do
20079 a store, and instead use the ISA 3.0 store byte/half-word from
20080 vector register instruction. For IEEE 128-bit floating point,
20081 also optimize stores of 32-bit ints.
20082 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
20084 2018-02-07 Alan Hayward <alan.hayward@arm.com>
20086 * genextract.c (push_pathstr_operand): New function to support
20088 (walk_rtx): Call push_pathstr_operand.
20089 (print_path): Support [a-zA-Z].
20091 2018-02-07 Richard Biener <rguenther@suse.de>
20093 PR tree-optimization/84037
20094 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
20095 (cse_and_gimplify_to_preheader): Declare.
20096 (vect_get_place_in_interleaving_chain): Likewise.
20097 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20099 (_loop_vec_info::~_loop_vec_info): Delete it.
20100 (cse_and_gimplify_to_preheader): New function.
20101 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
20102 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
20103 (vectorizable_load): Likewise. For grouped stores always base
20104 the IV on the first element.
20105 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
20106 condition before gimplifying.
20108 2018-02-07 Jakub Jelinek <jakub@redhat.com>
20110 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
20111 *DIV_EXPR and *MOD_EXPR.
20113 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
20116 * config/i386/i386.c (ix86_option_override_internal): Mask out
20117 the CF_SET bit when checking -fcf-protection.
20119 2018-02-07 Tom de Vries <tom@codesourcery.com>
20122 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
20125 2018-02-07 Richard Biener <rguenther@suse.de>
20127 PR tree-optimization/84204
20128 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
20131 PR tree-optimization/84205
20132 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
20133 special-case isl_ast_op_zdiv_r.
20135 PR tree-optimization/84223
20136 * graphite-scop-detection.c (gather_bbs::before_dom_children):
20137 Only add conditions from within the region.
20138 (gather_bbs::after_dom_children): Adjust.
20140 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
20143 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
20144 * config/avr/avr.md: Only post-reload split REG-REG moves if
20145 either register is GENERAL_REG_P.
20147 2018-02-07 Jakub Jelinek <jakub@redhat.com>
20149 PR tree-optimization/84235
20150 * tree-ssa-scopedtables.c
20151 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
20152 if the subtraction is performed in floating point type where NaNs are
20153 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
20154 build 1. Formatting fix.
20156 2018-02-06 Jakub Jelinek <jakub@redhat.com>
20159 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
20160 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
20161 and skip it regardless of bb boundaries. Use CALL_P macro,
20162 don't test INSN_P (insn) together with CALL_P or JUMP_P check
20163 unnecessarily, formatting fix.
20165 2018-02-06 Michael Collison <michael.collison@arm.com>
20167 * config/arm/thumb2.md:
20168 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
20169 (*thumb_mov_notscc): Ditto.
20171 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
20174 * config/rs6000/rs6000.md (su code attribute): Use "u" for
20175 unsigned_fix, not "s".
20177 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20179 * configure.ac (gcc_fn_eh_frame_ro): New function.
20180 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
20181 correct .eh_frame permissions.
20182 * configure: Regenerate.
20184 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
20186 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
20187 irrelevant options.
20189 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20191 * config/rs6000/rs6000.c (rs6000_option_override_internal):
20192 Display warning message for -mno-speculate-indirect-jumps.
20194 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
20196 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
20198 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
20200 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
20202 PR tree-optimization/84225
20203 * tree-eh.c (find_trapping_overflow): Only call
20204 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
20206 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
20209 * config/i386/i386.c: Reimplement the check of possible options
20210 -mibt/-mshstk conbination. Change error messages.
20211 * doc/invoke.texi: Fix a typo: remove extra '='.
20213 2018-02-06 Marek Polacek <polacek@redhat.com>
20215 PR tree-optimization/84228
20216 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
20218 2018-02-06 Tamar Christina <tamar.christina@arm.com>
20221 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
20222 emitted arch directives.
20223 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
20224 __ARM_FEATURE_COPROC before changing architectures.
20226 2018-02-06 Richard Biener <rguenther@suse.de>
20228 * config/i386/i386.c (print_reg): Fix typo.
20229 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
20231 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
20233 * configure: Regenerate.
20235 2018-02-05 Martin Sebor <msebor@redhat.com>
20237 PR tree-optimization/83369
20238 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
20241 2018-02-05 Martin Liska <mliska@suse.cz>
20243 * doc/invoke.texi: Cherry-pick upstream r323995.
20245 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
20247 * ira.c (ira_init_register_move_cost): Adjust comment.
20249 2018-02-05 Martin Liska <mliska@suse.cz>
20251 PR gcov-profile/84137
20252 * doc/gcov.texi: Fix typo in documentation.
20254 2018-02-05 Martin Liska <mliska@suse.cz>
20256 PR gcov-profile/83879
20257 * doc/gcov.texi: Document necessity of --dynamic-list-data when
20258 using dlopen functionality.
20260 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
20262 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
20263 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
20264 _mm_maskz_range_ss, _mm_mask_range_round_ss,
20265 _mm_maskz_range_round_ss): New intrinsics.
20266 (__builtin_ia32_rangesd128_round)
20267 (__builtin_ia32_rangess128_round): Remove.
20268 (__builtin_ia32_rangesd128_mask_round,
20269 __builtin_ia32_rangess128_mask_round): New builtins.
20270 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
20271 __builtin_ia32_rangess128_round): Remove.
20272 (__builtin_ia32_rangesd128_mask_round,
20273 __builtin_ia32_rangess128_mask_round): New builtins.
20274 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
20275 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
20276 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
20277 "<round_saeonly_constraint>")): Changed to ...
20278 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
20279 "<round_saeonly_scalar_constraint>")): ... this.
20280 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
20281 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
20282 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
20283 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
20284 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
20286 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
20288 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
20290 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
20291 Remove all values except native, 8540 and 8548.
20293 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
20295 * config/i386/i386.c (ix86_output_function_return): Pass
20296 INVALID_REGNUM, instead of -1, as invalid register number to
20297 indirect_thunk_name and output_indirect_thunk.
20299 2018-02-02 Julia Koval <julia.koval@intel.com>
20301 * config.gcc: Add -march=icelake.
20302 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
20303 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
20304 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
20305 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
20306 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
20307 (processor_target_table): Add icelake.
20308 (ix86_option_override_internal): Handle new PTAs.
20309 (get_builtin_code_for_version): Handle icelake.
20310 (M_INTEL_COREI7_ICELAKE): New.
20311 (fold_builtin_cpu): Handle icelake.
20312 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
20313 * doc/invoke.texi: Add -march=icelake.
20315 2018-02-02 Julia Koval <julia.koval@intel.com>
20317 * config/i386/i386.c (ix86_option_override_internal): Change flags type
20318 to wide_int_bitmask.
20319 * wide-int-bitmask.h: New.
20321 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
20324 * config/i386/i386.md: Replace Pmode with word_mode in
20325 builtin_setjmp_setup and builtin_longjmp to support x32.
20327 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
20331 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
20333 (rs6000_supported_cpu_names): New static variable.
20334 (linux_cpu_translation_table): Likewise.
20335 (elf_platform) <cpu>: Define new static variable and use it.
20336 Translate kernel AT_PLATFORM name to canonical name if needed.
20337 Error if platform name is unknown.
20339 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
20342 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
20344 2018-02-01 Jeff Law <law@redhat.com>
20347 * config/i386/i386.c (release_scratch_register_on_entry): Add new
20348 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
20349 the scratch if RELEASE_VIA_POP is false.
20350 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
20351 If we have to save a temporary register, decrement SIZE appropriately.
20352 Pass new arguments to release_scratch_register_on_entry.
20353 (ix86_adjust_stack_and_probe): Likewise.
20354 (ix86_emit_probe_stack_range): Pass new arguments to
20355 release_scratch_register_on_entry.
20357 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
20359 PR rtl-optimization/84157
20360 * combine.c (change_zero_ext): Use REG_P predicate in
20361 front of HARD_REGISTER_P predicate.
20363 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
20365 * config/avr/avr.c (avr_option_override): Move disabling of
20366 -fdelete-null-pointer-checks to...
20367 * common/config/avr/avr-common.c (avr_option_optimization_table):
20370 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20372 PR tree-optimization/81635
20373 * tree-data-ref.c (split_constant_offset_1): For types that
20374 wrap on overflow, try to use range info to prove that wrapping
20377 2018-02-01 Renlin Li <renlin.li@arm.com>
20380 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
20381 TAILCALL_ADDR_REGS.
20382 (aarch64_register_move_cost): Likewise.
20383 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
20384 TAILCALL_ADDR_REGS.
20385 (REG_CLASS_NAMES): Likewise.
20386 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
20387 TAILCALL_ADDR_REGS. Remove IP registers.
20388 * config/aarch64/aarch64.md (Ucs): Update register constraint.
20390 2018-02-01 Richard Biener <rguenther@suse.de>
20392 * domwalk.h (dom_walker::dom_walker): Add additional constructor
20393 for specifying RPO order and allow NULL for that.
20394 * domwalk.c (dom_walker::dom_walker): Likewise.
20395 (dom_walker::walk): Handle NULL RPO order.
20396 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
20398 (rewrite_update_dom_walker): Likewise.
20399 (mark_def_dom_walker): Likewise.
20401 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20403 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
20404 (aarch64_maybe_expand_sve_subreg_move): Declare.
20405 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
20406 * config/aarch64/predicates.md (aarch64_any_register_operand): New
20408 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
20409 that are semantically a reverse operation.
20410 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
20411 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
20412 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
20414 (aarch64_can_change_mode_class): For big-endian, forbid changes
20415 between two SVE modes if they have different element sizes.
20417 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20419 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
20420 the TImode handling for big-endian targets.
20422 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20424 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
20425 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
20427 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
20428 Remove BSWAP handing for big-endian targets and use the form of
20429 LD1RQ appropariate for the mode.
20431 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20433 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
20434 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
20435 duplicated element.
20437 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20440 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
20441 check for operands that need to go through aarch64_sve_reload_be.
20443 2018-02-01 Jakub Jelinek <jakub@redhat.com>
20445 PR tree-optimization/81661
20446 PR tree-optimization/84117
20447 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
20448 * tree-eh.c: Include gimplify.h.
20449 (find_trapping_overflow, replace_trapping_overflow,
20450 rewrite_to_non_trapping_overflow): New functions.
20451 * tree-vect-loop.c: Include tree-eh.h.
20452 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
20453 * tree-data-ref.c: Include tree-eh.h.
20454 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
20456 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
20458 PR rtl-optimization/84123
20459 * combine.c (change_zero_ext): Check if hard register satisfies
20460 can_change_dest_mode before calling gen_lowpart_SUBREG.
20462 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
20465 * ira.c (ira_init_register_move_cost): Remove assert.
20467 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20469 PR rtl-optimization/84071
20470 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
20471 * doc/tm.texi: Regenerate.
20473 2018-01-31 Richard Biener <rguenther@suse.de>
20475 PR tree-optimization/84132
20476 * tree-data-ref.c (analyze_miv_subscript): Properly
20477 check whether evolution_function_is_affine_multivariate_p
20478 before calling gcd_of_steps_may_divide_p.
20480 2018-01-31 Julia Koval <julia.koval@intel.com>
20483 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
20484 * config/i386/i386.md (rdpid_rex64) New.
20485 (rdpid): Make 32bit only.
20487 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
20490 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
20491 an IDENTIFIER_NODE for FUNCTION_TYPE's.
20493 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20496 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
20498 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20500 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20502 PR rtl-optimization/84071
20503 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
20504 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
20506 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
20508 * config/arc/arc.c (arc_handle_aux_attribute): New function.
20509 (arc_attribute_table): Add 'aux' attribute.
20510 (arc_in_small_data_p): Consider aux like variables.
20511 (arc_is_aux_reg_p): New function.
20512 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
20513 (arc_get_aux_arg): New function.
20514 (prepare_move_operands): Handle aux-register access.
20515 (arc_handle_aux_attribute): New function.
20516 * doc/extend.texi (ARC Variable attributes): Add subsection.
20518 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
20520 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
20521 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
20522 (arc_attribute_table): Add 'uncached' attribute.
20523 (arc_print_operand): Print '.di' flag for uncached memory
20525 (arc_in_small_data_p): Do not consider for small data the uncached
20527 (arc_is_uncached_mem_p): New function.
20528 * config/arc/predicates.md (compact_store_memory_operand): Check
20529 for uncached memory accesses.
20530 (nonvol_nonimm_operand): Likewise.
20531 * doc/extend.texi (ARC Type Attribute): New subsection.
20533 2018-01-31 Jakub Jelinek <jakub@redhat.com>
20536 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
20537 falign-loops=): Add Optimization flag.
20539 2018-01-30 Jeff Law <law@redhat.com>
20542 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
20543 INT_REGISTERS_SAVED. Check it prior to calling
20544 get_scratch_register_on_entry.
20545 (ix86_adjust_stack_and_probe): Similarly.
20546 (ix86_emit_probe_stack_range): Similarly.
20547 (ix86_expand_prologue): Corresponding changes.
20549 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20552 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
20553 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
20555 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
20558 * lra-constraints.c (curr_insn_transform): Process AND in the
20561 2018-01-30 Jakub Jelinek <jakub@redhat.com>
20563 PR rtl-optimization/83986
20564 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
20565 dependence against last_pending_memory_flush in addition to
20566 pending_jump_insns.
20568 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
20570 PR tree-optimization/81611
20571 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
20574 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20577 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
20580 2018-01-30 Richard Biener <rguenther@suse.de>
20581 Jakub Jelinek <jakub@redhat.com>
20583 PR tree-optimization/84111
20584 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
20585 inner loops added during recursion, as they don't have up-to-date
20588 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
20591 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
20592 (can_inline_edge_by_limits_p): ... here.
20593 (can_early_inline_edge_p, check_callers,
20594 update_caller_keys, update_callee_keys, recursive_inlining,
20595 add_new_edges_to_heap, speculation_useful_p,
20596 inline_small_functions,
20597 inline_small_functions, flatten_function,
20598 inline_to_all_callers_1): Update.
20600 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
20602 * profile-count.c (profile_count::combine_with_ipa_count): Handle
20605 2018-01-30 Richard Biener <rguenther@suse.de>
20607 PR tree-optimization/83008
20608 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
20609 invariant and constant vector uses in stmts when they need
20610 more than one stmt.
20612 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20615 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
20616 * configure: Regenerate.
20618 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20620 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
20622 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
20623 Use gen_rtx_REG rather than gen_lowpart.
20625 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20627 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
20628 rather than 0 when creating partial subregs.
20630 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20632 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
20635 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
20638 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
20639 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
20640 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
20641 flags. This restores the settings used before the 2017-07-24.
20642 Turning off pre increment/decrement/modify allows IVOPTS to
20643 optimize DF/SF loops where the index is an int.
20645 2018-01-29 Richard Biener <rguenther@suse.de>
20646 Kelvin Nilsen <kelvin@gcc.gnu.org>
20649 * tree-vect-stmts.c (vectorizable_call): Don't call
20650 targetm.vectorize_builtin_md_vectorized_function if callee is
20653 2018-01-22 Carl Love <cel@us.ibm.com>
20655 * doc/extend.tex: Fix typo in second arg in
20656 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
20658 2018-01-29 Richard Biener <rguenther@suse.de>
20660 PR tree-optimization/84086
20661 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
20662 (flush_ssaname_freelist): When SSA names were released reset
20663 the SCEV hash table.
20665 2018-01-29 Richard Biener <rguenther@suse.de>
20667 PR tree-optimization/84057
20668 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
20669 removed paths when removing edges.
20671 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
20673 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
20674 -mfunction-return=@var{choice}.
20676 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
20678 PR diagnostic/84034
20679 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
20680 Handle CR like TAB.
20681 (layout::print_source_line): Likewise.
20682 (test_get_line_width_without_trailing_whitespace): Add test cases.
20684 2018-01-27 Jakub Jelinek <jakub@redhat.com>
20686 PR middle-end/84040
20687 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
20690 2018-01-26 Jim Wilson <jimw@sifive.com>
20692 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
20694 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
20697 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20699 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
20700 and CMP + SUB-immediate -> SUBS.
20702 2018-01-26 Martin Sebor <msebor@redhat.com>
20704 PR tree-optimization/83896
20705 * tree-ssa-strlen.c (get_string_len): Rename...
20706 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
20707 Avoid assuming length is constant.
20708 (handle_char_store): Use HOST_WIDE_INT for string length.
20710 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
20713 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
20714 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
20716 2018-01-26 Richard Biener <rguenther@suse.de>
20718 PR rtl-optimization/84003
20719 * dse.c (record_store): Only record redundant stores when
20720 the earlier store aliases at least all accesses the later one does.
20722 2018-01-26 Jakub Jelinek <jakub@redhat.com>
20724 PR rtl-optimization/83985
20725 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
20726 REG_CFA_RESTORE insns.
20727 (delete_unmarked_insns): Don't ignore separate shrink wrapping
20728 REG_CFA_RESTORE insns here.
20731 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
20732 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
20734 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20736 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
20737 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
20738 (arc_init): Likewise.
20739 (arc_override_options): Likewise.
20740 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
20742 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
20744 * config/arc/arc.h (TARGET_DBNZ): Define.
20745 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
20746 properly set the tune attribute.
20747 (dbnz): Use TARGET_DBNZ guard.
20748 * config/arc/arc.opt (mtune): Add core3 option.
20750 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20752 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
20753 recognize new pic like addresses.
20754 (arc_delegitimize_address): Clean up.
20756 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20758 * config/arc/arc-arches.def: Option mrf16 valid for all
20760 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
20761 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
20762 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
20763 * config/arc/arc-tables.opt: Regenerate.
20764 * config/arc/arc.c (arc_conditional_register_usage): Handle
20765 reduced register file case.
20766 (arc_file_start): Set must have build attributes.
20767 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
20768 mrf16 option value.
20769 * config/arc/arc.opt (mrf16): Add new option.
20770 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
20771 * config/arc/genmultilib.awk: Handle new mrf16 option.
20772 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
20773 * config/arc/t-multilib: Regenerate.
20774 * doc/invoke.texi (ARC Options): Document mrf16 option.
20776 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20778 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
20779 * config/arc/arc.c (arc_handle_secure_attribute): New function.
20780 (arc_attribute_table): Add 'secure_call' attribute.
20781 (arc_print_operand): Print secure call operand.
20782 (arc_function_ok_for_sibcall): Don't optimize tail calls when
20784 (arc_is_secure_call_p): New function. * config/arc/arc.md
20785 (call_i): Add support for sjli instruction.
20786 (call_value_i): Likewise.
20787 * config/arc/constraints.md (Csc): New constraint.
20789 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20790 John Eric Martin <John.Martin@emmicro-us.com>
20792 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
20793 * config/arc/arc.c (_arc_jli_section): New struct.
20794 (arc_jli_section): New type.
20795 (rc_jli_sections): New static variable.
20796 (arc_handle_jli_attribute): New function.
20797 (arc_attribute_table): Add jli_always and jli_fixed attribute.
20798 (arc_file_end): New function.
20799 (TARGET_ASM_FILE_END): Define.
20800 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
20801 (arc_add_jli_section): New function.
20802 (jli_call_scan): Likewise.
20803 (arc_reorg): Call jli_call_scan.
20804 (arc_output_addsi): Remove 'S' from printing asm operand.
20805 (arc_is_jli_call_p): New function.
20806 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
20808 (movhi_insn): Likewise.
20809 (movsi_insn): Likewise.
20810 (movsi_set_cc_insn): Likewise.
20811 (loadqi_update): Likewise.
20812 (load_zeroextendqisi_update): Likewise.
20813 (load_signextendqisi_update): Likewise.
20814 (loadhi_update): Likewise.
20815 (load_zeroextendhisi_update): Likewise.
20816 (load_signextendhisi_update): Likewise.
20817 (loadsi_update): Likewise.
20818 (loadsf_update): Likewise.
20819 (movsicc_insn): Likewise.
20820 (bset_insn): Likewise.
20821 (bxor_insn): Likewise.
20822 (bclr_insn): Likewise.
20823 (bmsk_insn): Likewise.
20824 (bicsi3_insn): Likewise.
20825 (cmpsi_cc_c_insn): Likewise.
20826 (movsi_ne): Likewise.
20827 (movsi_cond_exec): Likewise.
20828 (clrsbsi2): Likewise.
20829 (norm_f): Likewise.
20839 (call_i): Remove 'S' asm letter, add jli instruction.
20840 (call_value_i): Likewise.
20841 * config/arc/arc.op (mjli-always): New option.
20842 * config/arc/constraints.md (Cji): New constraint.
20843 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20845 (subsf3_fpx): Likewise.
20846 (mulsf3_fpx): Likewise.
20847 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20849 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20850 function attrbutes.
20851 * doc/invoke.texi (ARC): Document mjli-always option.
20853 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
20855 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20856 avoid addition with 0 and use incw and decw where possible.
20858 2018-01-26 Richard Biener <rguenther@suse.de>
20860 PR tree-optimization/81082
20861 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20862 association if it requires casting to unsigned.
20863 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20864 from fold_plusminus_mult_expr to catch important cases late when
20865 range info is available.
20867 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20869 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20870 * configure.ac (hidden_linkonce): New test.
20871 * configure: Regenerate.
20872 * config.in: Regenerate.
20874 2018-01-26 Julia Koval <julia.koval@intel.com>
20876 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20877 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20878 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20879 _mm_mask_bitshuffle_epi64_mask): Fix type.
20880 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20881 USI_FTYPE_V4DI_V4DI_USI): Remove.
20882 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20883 __builtin_ia32_vpshufbitqmb256_mask,
20884 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20885 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20886 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20888 2018-01-26 Alan Modra <amodra@gmail.com>
20891 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20892 UNSPEC_VBPERMQ. Sort other unspecs.
20894 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
20896 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20898 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
20900 PR middle-end/83055
20901 * predict.c (drop_profile): Do not push/pop cfun; update also
20903 (handle_missing_profiles): Fix logic looking for zero profiles.
20905 2018-01-25 Jakub Jelinek <jakub@redhat.com>
20907 PR middle-end/83977
20908 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20909 on functions with #pragma omp declare simd or functions with simd
20911 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20912 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20913 Remove trailing \n from warning_at calls.
20915 2018-01-25 Tom de Vries <tom@codesourcery.com>
20918 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20919 for neutered workers.
20921 2018-01-24 Joseph Myers <joseph@codesourcery.com>
20924 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20925 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20927 2018-01-24 Jeff Law <law@redhat.com>
20930 * i386.c (get_probe_interval): Move to earlier point.
20931 (ix86_compute_frame_layout): If -fstack-clash-protection and
20932 the frame is larger than the probe interval, then use pushes
20933 to save registers rather than reg->mem moves.
20934 (ix86_expand_prologue): Remove conditional for int_registers_saved
20937 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
20940 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20941 min/max for never referenced object.
20943 2018-01-24 Jakub Jelinek <jakub@redhat.com>
20945 PR middle-end/83977
20946 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20948 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20949 attributes from DECL_ATTRIBUTES (decl) without affecting
20950 DECL_ATTRIBUTES (current_function_decl).
20951 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20952 functions with non-NULL DECL_ABSTRACT_ORIGIN.
20954 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
20956 PR tree-optimization/83979
20957 * fold-const.c (fold_comparison): Use constant_boolean_node
20958 instead of boolean_{true,false}_node.
20960 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
20962 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20965 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20967 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20968 Simplify the clause that sets the length attribute.
20969 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20970 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20971 clause that sets the length attribute.
20972 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20974 2018-01-24 Tom de Vries <tom@codesourcery.com>
20977 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20978 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20979 Add strict parameter.
20980 (prevent_branch_around_nothing): Insert dummy insn between branch to
20981 label and label with no ptx insn inbetween.
20982 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20984 2018-01-24 Tom de Vries <tom@codesourcery.com>
20987 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20988 for neutered threads in warp.
20989 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20991 2018-01-24 Richard Biener <rguenther@suse.de>
20993 PR tree-optimization/83176
20994 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20997 2018-01-24 Richard Biener <rguenther@suse.de>
20999 PR tree-optimization/82819
21000 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
21001 code generating pluses that are no-ops in the target precision.
21003 2018-01-24 Richard Biener <rguenther@suse.de>
21005 PR middle-end/84000
21006 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
21008 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
21010 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
21011 to merge probabilities.
21012 * predict.c (probably_never_executed): Also mark as cold functions
21013 with global 0 profile and guessed local profile.
21014 * profile-count.c (profile_probability::combine_with_count): New
21016 * profile-count.h (profile_probability::operator*,
21017 profile_probability::operator*=, profile_probability::operator/,
21018 profile_probability::operator/=): Reduce precision to adjusted
21019 and set value to guessed on contradictory divisions.
21020 (profile_probability::combine_with_freq): Remove.
21021 (profile_probability::combine_wiht_count): Declare.
21022 (profile_count::force_nonzero):: Set to adjusted.
21023 (profile_count::probability_in):: Set quality to adjusted.
21024 * tree-ssa-tail-merge.c (replace_block_by): Use
21025 combine_with_count.
21027 2018-01-23 Andrew Waterman <andrew@sifive.com>
21028 Jim Wilson <jimw@sifive.com>
21030 * config/riscv/riscv.c (riscv_stack_boundary): New.
21031 (riscv_option_override): Set riscv_stack_boundary. Handle
21032 riscv_preferred_stack_boundary_arg.
21033 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
21034 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
21035 (STACK_BOUNDARY): Set to riscv_stack_boundary.
21036 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
21037 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
21038 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
21040 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
21043 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
21044 of struct ix86_frame.
21045 (ix86_expand_epilogue): Likewise. Add a local variable for
21046 the reg_save_offset field in struct ix86_frame.
21048 2018-01-23 Bin Cheng <bin.cheng@arm.com>
21050 PR tree-optimization/82604
21051 * tree-loop-distribution.c (enum partition_kind): New enum item
21052 PKIND_PARTIAL_MEMSET.
21053 (partition_builtin_p): Support above new enum item.
21054 (generate_code_for_partition): Ditto.
21055 (compute_access_range): Differentiate cases that equality can be
21056 proven at all loops, the innermost loops or no loops.
21057 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
21058 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
21059 (finalize_partitions, distribute_loop): Don't fuse partition of
21060 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
21061 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
21062 parloop is enabled.
21064 2018-01-23 Martin Liska <mliska@suse.cz>
21066 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
21067 order to ignore the predictor.
21068 (PRED_POLYMORPHIC_CALL): Likewise.
21069 (PRED_RECURSIVE_CALL): Likewise.
21071 2018-01-23 Martin Liska <mliska@suse.cz>
21073 * tree-profile.c (tree_profiling): Print function header to
21074 aware reader which function we are working on.
21075 * value-prof.c (gimple_find_values_to_profile): Do not print
21076 not interesting value histograms.
21078 2018-01-23 Martin Liska <mliska@suse.cz>
21080 * profile-count.h (enum profile_quality): Add
21081 profile_uninitialized as the first value. Do not number values
21082 as they are zero based.
21083 (profile_count::verify): Update sanity check.
21084 (profile_probability::verify): Likewise.
21086 2018-01-23 Nathan Sidwell <nathan@acm.org>
21088 * doc/invoke.texi (ffor-scope): Deprecate.
21090 2018-01-23 David Malcolm <dmalcolm@redhat.com>
21092 PR tree-optimization/83510
21093 * domwalk.c (set_all_edges_as_executable): New function.
21094 (dom_walker::dom_walker): Convert bool param
21095 "skip_unreachable_blocks" to enum reachability. Move setup of
21096 edge flags to set_all_edges_as_executable and only do it when
21097 reachability is REACHABLE_BLOCKS.
21098 * domwalk.h (enum dom_walker::reachability): New enum.
21099 (dom_walker::dom_walker): Convert bool param
21100 "skip_unreachable_blocks" to enum reachability.
21101 (set_all_edges_as_executable): New decl.
21102 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
21103 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
21105 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
21106 but converting true to REACHABLE_BLOCKS.
21107 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
21109 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
21110 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
21111 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
21113 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
21114 if check_all_array_refs will be called.
21116 2018-01-23 David Malcolm <dmalcolm@redhat.com>
21118 * tree.c (selftest::test_location_wrappers): Add more test
21121 2018-01-23 David Malcolm <dmalcolm@redhat.com>
21123 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
21124 (selftest::test_bit_in_range): Likewise.
21126 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
21129 * doc/sourcebuild.texi (vect_float): Say that the selector
21130 only describes the situation when -funsafe-math-optimizations is on.
21131 (vect_float_strict): Document.
21133 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
21135 PR tree-optimization/83965
21136 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
21137 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
21138 instead of checking only for a reduction.
21139 (vect_recog_widen_sum_pattern): Likewise.
21141 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
21143 * predict.c (probably_never_executed): Only use precise profile info.
21144 (compute_function_frequency): Skip after inlining hack since we now
21145 have quality checking.
21147 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
21149 * profile-count.h (profile_probability::very_unlikely,
21150 profile_probability::unlikely, profile_probability::even): Set
21151 precision to guessed.
21153 2018-01-23 Richard Biener <rguenther@suse.de>
21155 PR tree-optimization/83963
21156 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
21157 Properly terminate dominator walk when crossing the exit edge not
21158 when visiting its source block.
21160 2018-01-23 Jakub Jelinek <jakub@redhat.com>
21163 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
21164 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
21166 2018-01-22 Jakub Jelinek <jakub@redhat.com>
21168 PR tree-optimization/83957
21169 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
21170 semicolon after for body surrounded by braces.
21172 PR tree-optimization/83081
21173 * profile-count.h (profile_probability::split): New method.
21174 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
21175 Use profile_probability::split.
21176 (do_compare_rtx_and_jump): Fix adjustment of probabilities
21177 when splitting a single conditional jump into 2.
21179 2018-01-22 David Malcolm <dmalcolm@redhat.com>
21181 PR tree-optimization/69452
21182 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
21185 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21187 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
21188 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
21189 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
21191 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21193 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
21195 * config/rl78/rl78.md (movdi): New define_expand.
21196 * config/rl78/rl78.c (rl78_split_movdi): New function.
21198 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
21201 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
21203 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
21204 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
21205 128-bit to produce an UNSPEC move to get the double word with the
21206 signbit and then a shift directly to do signbit.
21207 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
21208 implementation with a new version that just does either a direct
21209 move or a regular move. Move memory interface to separate insns.
21210 Move insns so they are next to the expander.
21211 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
21212 with signbit move. Split big and little endian case.
21213 (signbit<mode>2_dm_mem_le): Likewise.
21214 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
21215 (signbit<mode>2_dm2): Likewise.
21217 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21219 * config/rl78/rl78.md (anddi3): New define_expand.
21221 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21223 * config/rl78/rl78.md (umindi3): New define_expand.
21225 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21227 * config/rl78/rl78.md (smindi3): New define_expand.
21229 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21231 * config/rl78/rl78.md (smaxdi3): New define_expand.
21233 2018-01-22 Carl Love <cel@us.ibm.com>
21235 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
21236 LVX_V1TI): Add macro expansion.
21237 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
21238 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
21239 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
21240 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
21241 Change check to determine if the instruction is a byte reversing
21242 entry. Fix typo in comment.
21243 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
21244 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
21245 Add def_builtin calls for new builtins.
21246 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
21247 Add define_insn expansion.
21249 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21251 * config/rl78/rl78.md (umaxdi3): New define_expand.
21253 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21255 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
21256 for non-QImode registers.
21258 2018-01-22 Richard Biener <rguenther@suse.de>
21260 PR tree-optimization/83963
21261 * graphite-scop-detection.c (scop_detection::get_sese): Delay
21262 including the loop exit block.
21263 (scop_detection::merge_sese): Likewise.
21264 (scop_detection::add_scop): Do it here instead.
21266 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21268 * doc/sourcebuild.texi (arm_softfloat): Document.
21270 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
21273 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
21274 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
21275 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
21277 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21278 David Edelsohn <dje.gcc@gmail.com>
21281 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21282 Change "crset eq" to "crset 2".
21283 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21284 (*call_indirect_aix<mode>_nospec): Likewise.
21285 (*call_value_indirect_aix<mode>_nospec): Likewise.
21286 (*call_indirect_elfv2<mode>_nospec): Likewise.
21287 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
21288 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
21289 change assembly output from . to $.
21290 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21291 (indirect_jump<mode>_nospec): Change assembly output from . to $.
21292 (*tablejump<mode>_internal1_nospec): Likewise.
21294 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
21297 * config/sh/sh_optimize_sett_clrt.cc:
21298 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
21300 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
21302 PR tree-optimization/83940
21303 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
21304 offset_dt to vect_constant_def rather than vect_unknown_def_type.
21305 (vect_check_load_store_mask): Add a mask_dt_out parameter and
21306 use it to pass back the definition type.
21307 (vect_check_store_rhs): Likewise rhs_dt_out.
21308 (vect_build_gather_load_calls): Add a mask_dt argument and use
21309 it instead of a call to vect_is_simple_use.
21310 (vectorizable_store): Update calls to vect_check_load_store_mask
21311 and vect_check_store_rhs. Use the dt returned by the latter instead
21312 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
21313 instead of calls to vect_is_simple_use. Pass the scalar rather
21314 than the vector operand to vect_is_simple_use when handling
21315 second and subsequent copies of an rhs value.
21316 (vectorizable_load): Update calls to vect_check_load_store_mask
21317 and vect_build_gather_load_calls. Use the cached mask_dt and
21318 gs_info.offset_dt instead of calls to vect_is_simple_use.
21320 2018-01-20 Jakub Jelinek <jakub@redhat.com>
21322 PR middle-end/83945
21323 * tree-emutls.c: Include gimplify.h.
21324 (lower_emutls_2): New function.
21325 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
21326 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
21327 it before further processing.
21330 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
21331 UINTVAL (trueop1) instead of INTVAL (op1).
21333 2018-01-19 Jakub Jelinek <jakub@redhat.com>
21337 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
21338 INCOMING_FRAME_SP_OFFSET if not defined.
21339 (scan_trace): Add ENTRY argument. If true and
21340 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
21341 emit a note to adjust the CFA offset.
21342 (create_cfi_notes): Adjust scan_trace callers.
21343 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
21344 INCOMING_FRAME_SP_OFFSET in the CIE.
21345 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
21346 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
21348 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
21349 * doc/tm.texi: Regenerated.
21351 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21353 PR rtl-optimization/83147
21354 * lra-constraints.c (remove_inheritance_pseudos): Use
21355 lra_substitute_pseudo_within_insn.
21357 2018-01-19 Tom de Vries <tom@codesourcery.com>
21358 Cesar Philippidis <cesar@codesourcery.com>
21361 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
21363 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
21366 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
21367 spaces for function labels.
21369 2018-01-19 Martin Liska <mliska@suse.cz>
21371 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
21372 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
21373 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
21374 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
21375 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
21376 (PRED_CONST_RETURN): Change from 69 to 65.
21377 (PRED_NULL_RETURN): Change from 91 to 71.
21378 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
21379 (PRED_LOOP_GUARD): Change from 66 to 73.
21381 2018-01-19 Martin Liska <mliska@suse.cz>
21383 * predict.c (predict_insn_def): Add new assert.
21384 (struct branch_predictor): Change type to signed integer.
21385 (test_prediction_value_range): Amend test to cover
21386 PROB_UNINITIALIZED.
21387 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
21388 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
21389 (PRED_LOOP_ITERATIONS_MAX): Likewise.
21390 (PRED_LOOP_IV_COMPARE): Likewise.
21391 * predict.h (PROB_UNINITIALIZED): Define new constant.
21393 2018-01-19 Martin Liska <mliska@suse.cz>
21395 * predict.c (dump_prediction): Add new format for
21396 analyze_brprob.py script which is enabled with -details
21398 * profile-count.h (precise_p): New function.
21400 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
21402 PR tree-optimization/83922
21403 * tree-vect-loop.c (vect_verify_full_masking): Return false if
21404 there are no statements that need masking.
21405 (vect_active_double_reduction_p): New function.
21406 (vect_analyze_loop_operations): Use it when handling phis that
21407 are not in the loop header.
21409 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
21411 PR tree-optimization/83914
21412 * tree-vect-loop.c (vectorizable_induction): Don't convert
21413 init_expr or apply the peeling adjustment for inductions
21414 that are nested within the vectorized loop.
21416 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21418 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
21421 2018-01-18 Jakub Jelinek <jakub@redhat.com>
21425 * function.h (gimplify_parameters): Add gimple_seq * argument.
21426 * function.c: Include gimple.h and options.h.
21427 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
21428 for the added local temporaries if needed.
21429 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
21430 if there are any parameter cleanups, wrap whole body into a
21431 try/finally with the cleanups.
21433 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
21436 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
21437 Use GET_MODE_CLASS for scalar floating point.
21439 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
21443 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
21444 Fix call of call_cgraph_insertion_hooks.
21446 2018-01-18 Martin Sebor <msebor@redhat.com>
21448 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
21450 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
21453 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
21456 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
21459 * common.opt: (-ffile-prefix-map): New option.
21460 * opts.c (common_handle_option): Defer it.
21461 * opts-global.c (handle_common_deferred_options): Handle it.
21462 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
21463 * file-prefix-map.h: New file.
21464 (remap_debug_filename, add_debug_prefix_map): ...here.
21465 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
21466 * final.c (debug_prefix_map, add_debug_prefix_map
21467 remap_debug_filename): Move to...
21468 * file-prefix-map.c: New file.
21469 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
21470 generalize, get rid of alloca(), use strrchr() instead of strchr().
21471 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
21472 Implement in terms of add_prefix_map().
21473 (remap_macro_filename, remap_debug_filename): Implement in term of
21475 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
21476 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
21477 * dbxout.c: Include file-prefix-map.h.
21478 * varasm.c: Likewise.
21479 * vmsdbgout.c: Likewise.
21480 * xcoffout.c: Likewise.
21481 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
21482 * doc/cppopts.texi (-fmacro-prefix-map): Document.
21483 * doc/invoke.texi (-ffile-prefix-map): Document.
21484 (-fdebug-prefix-map): Update description.
21486 2018-01-18 Martin Liska <mliska@suse.cz>
21488 * config/i386/i386.c (indirect_thunk_name): Document that also
21490 (output_indirect_thunk): Document why both instructions
21491 (pause and lfence) are generated.
21493 2018-01-18 Richard Biener <rguenther@suse.de>
21495 PR tree-optimization/83887
21496 * graphite-scop-detection.c
21497 (scop_detection::get_nearest_dom_with_single_entry): Remove.
21498 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
21499 (scop_detection::merge_sese): Re-implement with a flood-fill
21500 algorithm that properly finds a SESE region if it exists.
21502 2018-01-18 Jakub Jelinek <jakub@redhat.com>
21505 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
21506 pointer_diff optimizations use view_convert instead of convert.
21508 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21510 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21511 Generate different code for -mno-speculate-indirect-jumps.
21512 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21513 (*call_indirect_aix<mode>): Disable for
21514 -mno-speculate-indirect-jumps.
21515 (*call_indirect_aix<mode>_nospec): New define_insn.
21516 (*call_value_indirect_aix<mode>): Disable for
21517 -mno-speculate-indirect-jumps.
21518 (*call_value_indirect_aix<mode>_nospec): New define_insn.
21519 (*sibcall_nonlocal_sysv<mode>): Generate different code for
21520 -mno-speculate-indirect-jumps.
21521 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21523 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
21525 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
21526 long double type, set the flags for noting the default long double
21527 type, even if we don't pass or return a long double type.
21529 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
21532 * ipa-inline.c (flatten_function): Do not overwrite final inlining
21535 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
21537 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
21538 support for merge[hl].
21539 (fold_mergehl_helper): New helper function.
21540 (tree-vector-builder.h): New #include for tree_vector_builder usage.
21541 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
21542 (altivec_vmrglw_direct): Add xxmrglw insn.
21544 2018-01-17 Andrew Waterman <andrew@sifive.com>
21546 * config/riscv/riscv.c (riscv_conditional_register_usage): If
21547 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
21549 2018-01-17 David Malcolm <dmalcolm@redhat.com>
21552 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
21553 call the lto_location_cache before reading the
21554 DECL_SOURCE_LOCATION of the types.
21556 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
21557 Richard Sandiford <richard.sandiford@linaro.org>
21559 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
21560 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
21561 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
21562 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
21563 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
21565 * config/aarch64/constraints.md (aarch64_movti_operand):
21567 * config/aarch64/predicates.md (Uti): Add new constraint.
21569 2018-01-17 Carl Love <cel@us.ibm.com>
21571 * config/rs6000/vsx.md (define_expand xl_len_r,
21572 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
21573 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
21575 (define_expand, define_insn): Move the shift left from the
21576 define_insn to the define_expand for lxvl and stxvl instructions.
21577 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
21578 and XL_LEN_R definitions to PURE.
21580 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
21582 * config/i386/i386.c (indirect_thunk_name): Declare regno
21583 as unsigned int. Compare regno with INVALID_REGNUM.
21584 (output_indirect_thunk): Ditto.
21585 (output_indirect_thunk_function): Ditto.
21586 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
21587 in the call to output_indirect_thunk_function.
21589 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
21591 PR middle-end/83884
21592 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
21593 rather than the size of inner_type to determine the stack slot size
21594 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
21596 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
21599 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
21602 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
21604 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
21605 endian Linux systems to optionally enable multilibs for selecting
21606 the long double type if the user configured an explicit type.
21607 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
21608 have no long double multilibs if not defined.
21609 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
21610 warn if the user used -mabi={ieee,ibm}longdouble and we built
21611 multilibs for long double.
21612 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
21613 appropriate multilib option.
21614 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
21616 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
21617 for building long double multilibs.
21618 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
21620 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
21622 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
21625 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
21627 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
21630 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
21633 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
21636 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21638 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
21639 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
21641 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
21643 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
21644 different rtl trees depending on TARGET_64BIT.
21645 (rs6000_gen_lvx): Likewise.
21647 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21649 * config/visium/visium.md (nop): Tweak comment.
21650 (hazard_nop): Likewise.
21652 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21654 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
21655 -mspeculate-indirect-jumps.
21656 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
21657 for -mno-speculate-indirect-jumps.
21658 (*call_indirect_elfv2<mode>_nospec): New define_insn.
21659 (*call_value_indirect_elfv2<mode>): Disable for
21660 -mno-speculate-indirect-jumps.
21661 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
21662 (indirect_jump): Emit different RTL for
21663 -mno-speculate-indirect-jumps.
21664 (*indirect_jump<mode>): Disable for
21665 -mno-speculate-indirect-jumps.
21666 (*indirect_jump<mode>_nospec): New define_insn.
21667 (tablejump): Emit different RTL for
21668 -mno-speculate-indirect-jumps.
21669 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
21670 (tablejumpsi_nospec): New define_expand.
21671 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
21672 (tablejumpdi_nospec): New define_expand.
21673 (*tablejump<mode>_internal1): Disable for
21674 -mno-speculate-indirect-jumps.
21675 (*tablejump<mode>_internal1_nospec): New define_insn.
21676 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
21679 2018-01-16 Artyom Skrobov tyomitch@gmail.com
21681 * caller-save.c (insert_save): Drop unnecessary parameter. All
21684 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21685 Richard Biener <rguenth@suse.de>
21688 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
21689 return early, inline manually is_gimple_sizepos. Make sure if we
21690 call gimplify_expr we don't end up with a gimple constant.
21691 * tree.c (variably_modified_type_p): Don't return true for
21692 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
21693 * gimplify.h (is_gimple_sizepos): Remove.
21695 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21697 PR tree-optimization/83857
21698 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
21699 vectorizable_live_operation for pure SLP statements.
21700 (vectorizable_live_operation): Handle PHIs.
21702 2018-01-16 Richard Biener <rguenther@suse.de>
21704 PR tree-optimization/83867
21705 * tree-vect-stmts.c (vect_transform_stmt): Precompute
21706 nested_in_vect_loop_p since the scalar stmt may get invalidated.
21708 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21711 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
21712 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
21713 If off is not INTEGER_CST, issue a may not be aligned warning
21714 rather than isn't aligned. Use isn%'t rather than isn't.
21715 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
21717 <case MULT_EXPR>: Improve the case when bottom and one of the
21718 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
21719 operand, in that case check if the other operand is multiple of
21720 bottom divided by the INTEGER_CST operand.
21722 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21725 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
21726 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
21727 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
21728 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
21729 * config/pa/pa.c (pa_function_arg_advance): Likewise.
21730 (pa_function_arg, pa_arg_partial_bytes): Likewise.
21731 (pa_function_arg_size): New function.
21733 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21735 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
21736 in a separate statement.
21738 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21740 PR tree-optimization/83847
21741 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
21742 group gathers and scatters.
21744 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21746 PR rtl-optimization/86620
21747 * params.def (max-sched-ready-insns): Bump minimum value to 1.
21749 PR rtl-optimization/83213
21750 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
21751 to last if both are JUMP_INSNs.
21753 PR tree-optimization/83843
21754 * gimple-ssa-store-merging.c
21755 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
21756 store_immediate_info for bswap/nop orig_stores.
21758 2018-01-15 Andrew Waterman <andrew@sifive.com>
21760 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
21762 <UDIV>: Increase cost if !TARGET_DIV.
21764 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
21766 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
21767 (define_attr "cr_logical_3op"): New.
21768 (cceq_ior_compare): Adjust.
21769 (cceq_ior_compare_complement): Adjust.
21770 (*cceq_rev_compare): Adjust.
21771 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
21772 (is_cracked_insn): Adjust.
21773 (insn_must_be_first_in_group): Adjust.
21774 * config/rs6000/40x.md: Adjust.
21775 * config/rs6000/440.md: Adjust.
21776 * config/rs6000/476.md: Adjust.
21777 * config/rs6000/601.md: Adjust.
21778 * config/rs6000/603.md: Adjust.
21779 * config/rs6000/6xx.md: Adjust.
21780 * config/rs6000/7450.md: Adjust.
21781 * config/rs6000/7xx.md: Adjust.
21782 * config/rs6000/8540.md: Adjust.
21783 * config/rs6000/cell.md: Adjust.
21784 * config/rs6000/e300c2c3.md: Adjust.
21785 * config/rs6000/e500mc.md: Adjust.
21786 * config/rs6000/e500mc64.md: Adjust.
21787 * config/rs6000/e5500.md: Adjust.
21788 * config/rs6000/e6500.md: Adjust.
21789 * config/rs6000/mpc.md: Adjust.
21790 * config/rs6000/power4.md: Adjust.
21791 * config/rs6000/power5.md: Adjust.
21792 * config/rs6000/power6.md: Adjust.
21793 * config/rs6000/power7.md: Adjust.
21794 * config/rs6000/power8.md: Adjust.
21795 * config/rs6000/power9.md: Adjust.
21796 * config/rs6000/rs64.md: Adjust.
21797 * config/rs6000/titan.md: Adjust.
21799 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21801 * config/i386/predicates.md (indirect_branch_operand): Rewrite
21802 ix86_indirect_branch_register logic.
21804 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21806 * config/i386/constraints.md (Bs): Update
21807 ix86_indirect_branch_register check. Don't check
21808 ix86_indirect_branch_register with GOT_memory_operand.
21810 * config/i386/predicates.md (GOT_memory_operand): Don't check
21811 ix86_indirect_branch_register here.
21812 (GOT32_symbol_operand): Likewise.
21814 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21816 * config/i386/predicates.md (constant_call_address_operand):
21817 Rewrite ix86_indirect_branch_register logic.
21818 (sibcall_insn_operand): Likewise.
21820 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21822 * config/i386/constraints.md (Bs): Replace
21823 ix86_indirect_branch_thunk_register with
21824 ix86_indirect_branch_register.
21826 * config/i386/i386.md (indirect_jump): Likewise.
21827 (tablejump): Likewise.
21828 (*sibcall_memory): Likewise.
21829 (*sibcall_value_memory): Likewise.
21830 Peepholes of indirect call and jump via memory: Likewise.
21831 * config/i386/i386.opt: Likewise.
21832 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21833 (GOT_memory_operand): Likewise.
21834 (call_insn_operand): Likewise.
21835 (sibcall_insn_operand): Likewise.
21836 (GOT32_symbol_operand): Likewise.
21838 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21840 PR middle-end/83837
21841 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21842 type rather than type addr's type points to.
21843 (expand_omp_atomic_mutex): Likewise.
21844 (expand_omp_atomic): Likewise.
21846 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21849 * config/i386/i386.c (output_indirect_thunk_function): Use
21850 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21851 for __x86_return_thunk.
21853 2018-01-15 Richard Biener <rguenther@suse.de>
21855 PR middle-end/83850
21856 * expmed.c (extract_bit_field_1): Fix typo.
21858 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21861 * config/arm/iterators.md (VF): New mode iterator.
21862 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21863 Remove integer-related logic from pattern.
21864 (neon_vabd<mode>_3): Likewise.
21866 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21868 PR middle-end/82694
21869 * common.opt (fstrict-overflow): No longer an alias.
21870 (fwrapv-pointer): New option.
21871 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21872 also for pointer types based on flag_wrapv_pointer.
21873 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21874 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21875 opts->x_flag_wrapv got set.
21876 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21877 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21878 POINTER_TYPE_OVERFLOW_UNDEFINED.
21879 * match.pd: Likewise in address comparison pattern.
21880 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21882 2018-01-15 Richard Biener <rguenther@suse.de>
21885 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21886 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
21887 Reset type names to their identifier if their TYPE_DECL doesn't
21888 have linkage (and thus is used for ODR and devirt).
21889 (save_debug_info_for_decl): Remove.
21890 (save_debug_info_for_type): Likewise.
21891 (add_tree_to_fld_list): Adjust.
21892 * tree-pretty-print.c (dump_generic_node): Make dumping of
21893 type names more robust.
21895 2018-01-15 Richard Biener <rguenther@suse.de>
21897 * BASE-VER: Bump to 8.0.1.
21899 2018-01-14 Martin Sebor <msebor@redhat.com>
21902 * builtins.c (check_access): Avoid warning when the no-warning bit
21905 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
21907 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21908 * ira-color (allocno_hard_regs_compare): Likewise.
21910 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
21913 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21914 Use .pushsection/.popsection.
21916 2018-01-14 Martin Sebor <msebor@redhat.com>
21919 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21921 2018-01-14 Jakub Jelinek <jakub@redhat.com>
21923 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21924 entry from extra_headers.
21925 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21926 extra_headers, make the list bitwise identical to the i?86-*-* one.
21928 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21930 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21931 -mcmodel=large with -mindirect-branch=thunk,
21932 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21933 -mfunction-return=thunk-extern.
21934 * doc/invoke.texi: Document -mcmodel=large is incompatible with
21935 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21936 -mfunction-return=thunk and -mfunction-return=thunk-extern.
21938 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21940 * config/i386/i386.c (print_reg): Print the name of the full
21941 integer register without '%'.
21942 (ix86_print_operand): Handle 'V'.
21943 * doc/extend.texi: Document 'V' modifier.
21945 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21947 * config/i386/constraints.md (Bs): Disallow memory operand for
21948 -mindirect-branch-register.
21950 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21951 (GOT_memory_operand): Likewise.
21952 (call_insn_operand): Likewise.
21953 (sibcall_insn_operand): Likewise.
21954 (GOT32_symbol_operand): Likewise.
21955 * config/i386/i386.md (indirect_jump): Call convert_memory_address
21956 for -mindirect-branch-register.
21957 (tablejump): Likewise.
21958 (*sibcall_memory): Likewise.
21959 (*sibcall_value_memory): Likewise.
21960 Disallow peepholes of indirect call and jump via memory for
21961 -mindirect-branch-register.
21962 (*call_pop): Replace m with Bw.
21963 (*call_value_pop): Likewise.
21964 (*sibcall_pop_memory): Replace m with Bs.
21965 * config/i386/i386.opt (mindirect-branch-register): New option.
21966 * doc/invoke.texi: Document -mindirect-branch-register option.
21968 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21970 * config/i386/i386-protos.h (ix86_output_function_return): New.
21971 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21972 set function_return_type.
21973 (indirect_thunk_name): Add ret_p to indicate thunk for function
21975 (output_indirect_thunk_function): Pass false to
21976 indirect_thunk_name.
21977 (ix86_output_indirect_branch_via_reg): Likewise.
21978 (ix86_output_indirect_branch_via_push): Likewise.
21979 (output_indirect_thunk_function): Create alias for function
21980 return thunk if regno < 0.
21981 (ix86_output_function_return): New function.
21982 (ix86_handle_fndecl_attribute): Handle function_return.
21983 (ix86_attribute_table): Add function_return.
21984 * config/i386/i386.h (machine_function): Add
21985 function_return_type.
21986 * config/i386/i386.md (simple_return_internal): Use
21987 ix86_output_function_return.
21988 (simple_return_internal_long): Likewise.
21989 * config/i386/i386.opt (mfunction-return=): New option.
21990 (indirect_branch): Mention -mfunction-return=.
21991 * doc/extend.texi: Document function_return function attribute.
21992 * doc/invoke.texi: Document -mfunction-return= option.
21994 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21996 * config/i386/i386-opts.h (indirect_branch): New.
21997 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21998 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21999 with local indirect jump when converting indirect call and jump.
22000 (ix86_set_indirect_branch_type): New.
22001 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
22002 (indirectlabelno): New.
22003 (indirect_thunk_needed): Likewise.
22004 (indirect_thunk_bnd_needed): Likewise.
22005 (indirect_thunks_used): Likewise.
22006 (indirect_thunks_bnd_used): Likewise.
22007 (INDIRECT_LABEL): Likewise.
22008 (indirect_thunk_name): Likewise.
22009 (output_indirect_thunk): Likewise.
22010 (output_indirect_thunk_function): Likewise.
22011 (ix86_output_indirect_branch_via_reg): Likewise.
22012 (ix86_output_indirect_branch_via_push): Likewise.
22013 (ix86_output_indirect_branch): Likewise.
22014 (ix86_output_indirect_jmp): Likewise.
22015 (ix86_code_end): Call output_indirect_thunk_function if needed.
22016 (ix86_output_call_insn): Call ix86_output_indirect_branch if
22018 (ix86_handle_fndecl_attribute): Handle indirect_branch.
22019 (ix86_attribute_table): Add indirect_branch.
22020 * config/i386/i386.h (machine_function): Add indirect_branch_type
22021 and has_local_indirect_jump.
22022 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
22024 (tablejump): Likewise.
22025 (*indirect_jump): Use ix86_output_indirect_jmp.
22026 (*tablejump_1): Likewise.
22027 (simple_return_indirect_internal): Likewise.
22028 * config/i386/i386.opt (mindirect-branch=): New option.
22029 (indirect_branch): New.
22032 (thunk-inline): Likewise.
22033 (thunk-extern): Likewise.
22034 * doc/extend.texi: Document indirect_branch function attribute.
22035 * doc/invoke.texi: Document -mindirect-branch= option.
22037 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
22040 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
22042 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
22044 * ipa-inline.c (want_inline_small_function_p): Return false if
22045 inlining has already failed with CIF_FINAL_ERROR.
22046 (update_caller_keys): Call want_inline_small_function_p before
22048 (update_callee_keys): Likewise.
22050 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
22052 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
22054 (rs6000_quadword_masked_address_p): Likewise.
22055 (quad_aligned_load_p): Likewise.
22056 (quad_aligned_store_p): Likewise.
22057 (const_load_sequence_p): Add comment to describe the outer-most loop.
22058 (mimic_memory_attributes_and_flags): New function.
22059 (rs6000_gen_stvx): Likewise.
22060 (replace_swapped_aligned_store): Likewise.
22061 (rs6000_gen_lvx): Likewise.
22062 (replace_swapped_aligned_load): Likewise.
22063 (replace_swapped_load_constant): Capitalize argument name in
22064 comment describing this function.
22065 (rs6000_analyze_swaps): Add a third pass to search for vector loads
22066 and stores that access quad-word aligned addresses and replace
22067 with stvx or lvx instructions when appropriate.
22068 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
22069 New function prototype.
22070 (rs6000_quadword_masked_address_p): Likewise.
22071 (rs6000_gen_lvx): Likewise.
22072 (rs6000_gen_stvx): Likewise.
22073 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
22074 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
22075 when memory address is aligned.
22076 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
22077 this split to select lvx instruction when memory address is aligned.
22078 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
22079 instruction when memory address is aligned.
22080 (*vsx_le_perm_load_v16qi): Likewise.
22081 (four unnamed splitters): Modify to select the stvx instruction
22082 when memory is aligned.
22084 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
22086 * predict.c (determine_unlikely_bbs): Handle correctly BBs
22087 which appears in the queue multiple times.
22089 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22090 Alan Hayward <alan.hayward@arm.com>
22091 David Sherwood <david.sherwood@arm.com>
22093 * tree-vectorizer.h (vec_lower_bound): New structure.
22094 (_loop_vec_info): Add check_nonzero and lower_bounds.
22095 (LOOP_VINFO_CHECK_NONZERO): New macro.
22096 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
22097 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
22098 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
22099 fields. Make seg_len the distance travelled, not including the
22101 (dr_direction_indicator): Declare.
22102 (dr_zero_step_indicator): Likewise.
22103 (dr_known_forward_stride_p): Likewise.
22104 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
22106 (runtime_alias_check_p): Allow runtime alias checks with
22108 (operator ==): Compare access_size and align.
22109 (prune_runtime_alias_test_list): Rework for new distinction between
22110 the access_size and seg_len.
22111 (create_intersect_range_checks_index): Likewise. Cope with polynomial
22113 (get_segment_min_max): New function.
22114 (create_intersect_range_checks): Use it.
22115 (dr_step_indicator): New function.
22116 (dr_direction_indicator): Likewise.
22117 (dr_zero_step_indicator): Likewise.
22118 (dr_known_forward_stride_p): Likewise.
22119 * tree-loop-distribution.c (data_ref_segment_size): Return
22120 DR_STEP * (niters - 1).
22121 (compute_alias_check_pairs): Update call to the dr_with_seg_len
22123 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
22124 (vect_preserves_scalar_order_p): New function, split out from...
22125 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
22126 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
22127 (vect_vfa_access_size): New function.
22128 (vect_vfa_align): Likewise.
22129 (vect_compile_time_alias): Take access_size_a and access_b arguments.
22130 (dump_lower_bound): New function.
22131 (vect_check_lower_bound): Likewise.
22132 (vect_small_gap_p): Likewise.
22133 (vectorizable_with_step_bound_p): Likewise.
22134 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
22135 depencies if the vectorization factor is 1. Convert the checks
22136 for nonzero steps into checks on the bounds of DR_STEP. Try using
22137 a bunds check for variable steps if the minimum required step is
22138 relatively small. Update calls to the dr_with_seg_len
22139 constructor and to vect_compile_time_alias.
22140 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
22142 (vect_loop_versioning): Call it.
22143 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
22145 (vect_estimate_min_profitable_iters): Account for any bounds checks.
22147 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22148 Alan Hayward <alan.hayward@arm.com>
22149 David Sherwood <david.sherwood@arm.com>
22151 * doc/sourcebuild.texi (vect_scatter_store): Document.
22152 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
22154 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
22156 * genopinit.c (main): Add supports_vec_scatter_store and
22157 supports_vec_scatter_store_cached to target_optabs.
22158 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
22159 IFN_MASK_SCATTER_STORE.
22160 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
22162 * internal-fn.h (internal_store_fn_p): Declare.
22163 (internal_fn_stored_value_index): Likewise.
22164 * internal-fn.c (scatter_store_direct): New macro.
22165 (expand_scatter_store_optab_fn): New function.
22166 (direct_scatter_store_optab_supported_p): New macro.
22167 (internal_store_fn_p): New function.
22168 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
22169 IFN_MASK_SCATTER_STORE.
22170 (internal_fn_mask_index): Likewise.
22171 (internal_fn_stored_value_index): New function.
22172 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
22173 for scatter stores.
22174 * optabs-query.h (supports_vec_scatter_store_p): Declare.
22175 * optabs-query.c (supports_vec_scatter_store_p): New function.
22176 * tree-vectorizer.h (vect_get_store_rhs): Declare.
22177 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
22178 true for scatter stores.
22179 (vect_gather_scatter_fn_p): Handle scatter stores too.
22180 (vect_check_gather_scatter): Consider using scatter stores if
22181 supports_vec_scatter_store_p.
22182 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
22183 scatter stores too.
22184 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
22185 internal_fn_stored_value_index.
22186 (check_load_store_masking): Handle scatter stores too.
22187 (vect_get_store_rhs): Make public.
22188 (vectorizable_call): Use internal_store_fn_p.
22189 (vectorizable_store): Handle scatter store internal functions.
22190 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
22191 when deciding whether the end of the group has been reached.
22192 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
22193 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
22194 (mask_scatter_store<mode>): New insns.
22196 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22197 Alan Hayward <alan.hayward@arm.com>
22198 David Sherwood <david.sherwood@arm.com>
22200 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
22201 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
22202 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
22204 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
22205 Use vect_truncate_gather_scatter_offset if we can't treat the
22206 operation as a normal gather load or scatter store.
22207 (get_group_load_store_type): Take the gather_scatter_info
22208 as argument. Try using a gather load or scatter store for
22209 single-element groups.
22210 (get_load_store_type): Update calls to get_group_load_store_type
22211 and vect_use_strided_gather_scatters_p.
22213 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22214 Alan Hayward <alan.hayward@arm.com>
22215 David Sherwood <david.sherwood@arm.com>
22217 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
22218 optional tree argument.
22219 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
22221 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
22222 but continue to use the current value as a fallback.
22223 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
22224 to compare the updates.
22225 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
22226 (get_load_store_type): Use it when handling a strided access.
22227 (vect_get_strided_load_store_ops): New function.
22228 (vect_get_data_ptr_increment): Likewise.
22229 (vectorizable_load): Handle strided gather loads. Always pass
22230 a step to vect_create_data_ref_ptr and bump_vector_ptr.
22232 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22233 Alan Hayward <alan.hayward@arm.com>
22234 David Sherwood <david.sherwood@arm.com>
22236 * doc/md.texi (gather_load@var{m}): Document.
22237 (mask_gather_load@var{m}): Likewise.
22238 * genopinit.c (main): Add supports_vec_gather_load and
22239 supports_vec_gather_load_cached to target_optabs.
22240 * optabs-tree.c (init_tree_optimization_optabs): Use
22241 ggc_cleared_alloc to allocate target_optabs.
22242 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
22243 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
22245 * internal-fn.h (internal_load_fn_p): Declare.
22246 (internal_gather_scatter_fn_p): Likewise.
22247 (internal_fn_mask_index): Likewise.
22248 (internal_gather_scatter_fn_supported_p): Likewise.
22249 * internal-fn.c (gather_load_direct): New macro.
22250 (expand_gather_load_optab_fn): New function.
22251 (direct_gather_load_optab_supported_p): New macro.
22252 (direct_internal_fn_optab): New function.
22253 (internal_load_fn_p): Likewise.
22254 (internal_gather_scatter_fn_p): Likewise.
22255 (internal_fn_mask_index): Likewise.
22256 (internal_gather_scatter_fn_supported_p): Likewise.
22257 * optabs-query.c (supports_at_least_one_mode_p): New function.
22258 (supports_vec_gather_load_p): Likewise.
22259 * optabs-query.h (supports_vec_gather_load_p): Declare.
22260 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
22261 and memory_type field.
22262 (NUM_PATTERNS): Bump to 15.
22263 * tree-vect-data-refs.c: Include internal-fn.h.
22264 (vect_gather_scatter_fn_p): New function.
22265 (vect_describe_gather_scatter_call): Likewise.
22266 (vect_check_gather_scatter): Try using internal functions for
22267 gather loads. Recognize existing calls to a gather load function.
22268 (vect_analyze_data_refs): Consider using gather loads if
22269 supports_vec_gather_load_p.
22270 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
22271 (vect_get_gather_scatter_offset_type): Likewise.
22272 (vect_convert_mask_for_vectype): Likewise.
22273 (vect_add_conversion_to_patterm): Likewise.
22274 (vect_try_gather_scatter_pattern): Likewise.
22275 (vect_recog_gather_scatter_pattern): New pattern recognizer.
22276 (vect_vect_recog_func_ptrs): Add it.
22277 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
22278 internal_fn_mask_index and internal_gather_scatter_fn_p.
22279 (check_load_store_masking): Take the gather_scatter_info as an
22280 argument and handle gather loads.
22281 (vect_get_gather_scatter_ops): New function.
22282 (vectorizable_call): Check internal_load_fn_p.
22283 (vectorizable_load): Likewise. Handle gather load internal
22285 (vectorizable_store): Update call to check_load_store_masking.
22286 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
22287 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
22288 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
22289 (aarch64_gather_scale_operand_d): New predicates.
22290 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
22291 (mask_gather_load<mode>): New insns.
22293 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22294 Alan Hayward <alan.hayward@arm.com>
22295 David Sherwood <david.sherwood@arm.com>
22297 * optabs.def (fold_left_plus_optab): New optab.
22298 * doc/md.texi (fold_left_plus_@var{m}): Document.
22299 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
22300 * internal-fn.c (fold_left_direct): Define.
22301 (expand_fold_left_optab_fn): Likewise.
22302 (direct_fold_left_optab_supported_p): Likewise.
22303 * fold-const-call.c (fold_const_fold_left): New function.
22304 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
22305 * tree-parloops.c (valid_reduction_p): New function.
22306 (gather_scalar_reductions): Use it.
22307 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
22308 (vect_finish_replace_stmt): Declare.
22309 * tree-vect-loop.c (fold_left_reduction_fn): New function.
22310 (needs_fold_left_reduction_p): New function, split out from...
22311 (vect_is_simple_reduction): ...here. Accept reductions that
22312 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
22313 (vect_force_simple_reduction): Also store the reduction type in
22314 the assignment's STMT_VINFO_REDUC_TYPE.
22315 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
22316 (merge_with_identity): New function.
22317 (vect_expand_fold_left): Likewise.
22318 (vectorize_fold_left_reduction): Likewise.
22319 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
22320 scalar phi in place for it. Check for target support and reject
22321 cases that would reassociate the operation. Defer the transform
22322 phase to vectorize_fold_left_reduction.
22323 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
22324 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
22325 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
22327 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22329 * tree-if-conv.c (predicate_mem_writes): Remove redundant
22330 call to ifc_temp_var.
22332 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22333 Alan Hayward <alan.hayward@arm.com>
22334 David Sherwood <david.sherwood@arm.com>
22336 * target.def (legitimize_address_displacement): Take the original
22337 offset as a poly_int.
22338 * targhooks.h (default_legitimize_address_displacement): Update
22340 * targhooks.c (default_legitimize_address_displacement): Likewise.
22341 * doc/tm.texi: Regenerate.
22342 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
22343 as an argument, moving assert of ad->disp == ad->disp_term to...
22344 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
22345 Try calling targetm.legitimize_address_displacement before expanding
22346 the address rather than afterwards, and adjust for the new interface.
22347 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
22348 Match the new hook interface. Handle SVE addresses.
22349 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
22350 new hook interface.
22352 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22354 * Makefile.in (OBJS): Add early-remat.o.
22355 * target.def (select_early_remat_modes): New hook.
22356 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
22357 * doc/tm.texi: Regenerate.
22358 * targhooks.h (default_select_early_remat_modes): Declare.
22359 * targhooks.c (default_select_early_remat_modes): New function.
22360 * timevar.def (TV_EARLY_REMAT): New timevar.
22361 * passes.def (pass_early_remat): New pass.
22362 * tree-pass.h (make_pass_early_remat): Declare.
22363 * early-remat.c: New file.
22364 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
22366 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
22368 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22369 Alan Hayward <alan.hayward@arm.com>
22370 David Sherwood <david.sherwood@arm.com>
22372 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
22373 vfm1 with a bound_epilog parameter.
22374 (vect_do_peeling): Update calls accordingly, and move the prologue
22375 call earlier in the function. Treat the base bound_epilog as 0 for
22376 fully-masked loops and retain vf - 1 for other loops. Add 1 to
22377 this base when peeling for gaps.
22378 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
22379 with fully-masked loops.
22380 (vect_estimate_min_profitable_iters): Handle the single peeled
22381 iteration in that case.
22383 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22384 Alan Hayward <alan.hayward@arm.com>
22385 David Sherwood <david.sherwood@arm.com>
22387 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
22388 single-element interleaving even if the size is not a power of 2.
22389 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
22390 accesses for single-element interleaving if the group size is
22393 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22394 Alan Hayward <alan.hayward@arm.com>
22395 David Sherwood <david.sherwood@arm.com>
22397 * doc/md.texi (fold_extract_last_@var{m}): Document.
22398 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
22399 * optabs.def (fold_extract_last_optab): New optab.
22400 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
22401 * internal-fn.c (fold_extract_direct): New macro.
22402 (expand_fold_extract_optab_fn): Likewise.
22403 (direct_fold_extract_optab_supported_p): Likewise.
22404 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
22405 * tree-vect-loop.c (vect_model_reduction_cost): Handle
22406 EXTRACT_LAST_REDUCTION.
22407 (get_initial_def_for_reduction): Do not create an initial vector
22408 for EXTRACT_LAST_REDUCTION reductions.
22409 (vectorizable_reduction): Leave the scalar phi in place for
22410 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
22411 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
22412 epilogue code for EXTRACT_LAST_REDUCTION and defer the
22413 transform phase to vectorizable_condition.
22414 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
22416 (vect_finish_stmt_generation): ...here.
22417 (vect_finish_replace_stmt): New function.
22418 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
22419 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
22421 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
22423 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22424 Alan Hayward <alan.hayward@arm.com>
22425 David Sherwood <david.sherwood@arm.com>
22427 * doc/md.texi (extract_last_@var{m}): Document.
22428 * optabs.def (extract_last_optab): New optab.
22429 * internal-fn.def (EXTRACT_LAST): New internal function.
22430 * internal-fn.c (cond_unary_direct): New macro.
22431 (expand_cond_unary_optab_fn): Likewise.
22432 (direct_cond_unary_optab_supported_p): Likewise.
22433 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
22434 loops using EXTRACT_LAST.
22435 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
22436 (extract_last_<mode>): ...this optab.
22437 (vec_extract<mode><Vel>): Update accordingly.
22439 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22440 Alan Hayward <alan.hayward@arm.com>
22441 David Sherwood <david.sherwood@arm.com>
22443 * target.def (empty_mask_is_expensive): New hook.
22444 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
22445 * doc/tm.texi: Regenerate.
22446 * targhooks.h (default_empty_mask_is_expensive): Declare.
22447 * targhooks.c (default_empty_mask_is_expensive): New function.
22448 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
22449 if the target says that empty masks are expensive.
22450 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
22452 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
22454 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22455 Alan Hayward <alan.hayward@arm.com>
22456 David Sherwood <david.sherwood@arm.com>
22458 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
22459 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
22460 (vect_use_loop_mask_for_alignment_p): New function.
22461 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
22462 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
22463 niters_skip argument. Make sure that the first niters_skip elements
22464 of the first iteration are inactive.
22465 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
22466 Update call to vect_set_loop_masks_directly.
22467 (get_misalign_in_elems): New function, split out from...
22468 (vect_gen_prolog_loop_niters): ...here.
22469 (vect_update_init_of_dr): Take a code argument that specifies whether
22470 the adjustment should be added or subtracted.
22471 (vect_update_init_of_drs): Likewise.
22472 (vect_prepare_for_masked_peels): New function.
22473 (vect_do_peeling): Skip prologue peeling if we're using a mask
22474 instead. Update call to vect_update_inits_of_drs.
22475 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22477 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
22478 alignment. Do not include the number of peeled iterations in
22479 the minimum threshold in that case.
22480 (vectorizable_induction): Adjust the start value down by
22481 LOOP_VINFO_MASK_SKIP_NITERS iterations.
22482 (vect_transform_loop): Call vect_prepare_for_masked_peels.
22483 Take the number of skipped iterations into account when calculating
22485 * tree-vect-stmts.c (vect_gen_while_not): New function.
22487 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22488 Alan Hayward <alan.hayward@arm.com>
22489 David Sherwood <david.sherwood@arm.com>
22491 * doc/sourcebuild.texi (vect_fully_masked): Document.
22492 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
22493 default value to 0.
22494 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
22496 (vect_analyze_loop_2): ...here. Don't check the vectorization
22497 factor against the number of loop iterations if the loop is
22500 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22501 Alan Hayward <alan.hayward@arm.com>
22502 David Sherwood <david.sherwood@arm.com>
22504 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
22505 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
22506 (dump_groups): Update accordingly.
22507 (iv_use::mem_type): New member variable.
22508 (address_p): New function.
22509 (record_use): Add a mem_type argument and initialize the new
22511 (record_group_use): Add a mem_type argument. Use address_p.
22512 Remove obsolete null checks of base_object. Update call to record_use.
22513 (find_interesting_uses_op): Update call to record_group_use.
22514 (find_interesting_uses_cond): Likewise.
22515 (find_interesting_uses_address): Likewise.
22516 (get_mem_type_for_internal_fn): New function.
22517 (find_address_like_use): Likewise.
22518 (find_interesting_uses_stmt): Try find_address_like_use before
22519 calling find_interesting_uses_op.
22520 (addr_offset_valid_p): Use the iv mem_type field as the type
22521 of the addressed memory.
22522 (add_autoinc_candidates): Likewise.
22523 (get_address_cost): Likewise.
22524 (split_small_address_groups_p): Use address_p.
22525 (split_address_groups): Likewise.
22526 (add_iv_candidate_for_use): Likewise.
22527 (autoinc_possible_for_pair): Likewise.
22528 (rewrite_groups): Likewise.
22529 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
22530 (determine_group_iv_cost): Update after split of USE_ADDRESS.
22531 (get_alias_ptr_type_for_ptr_address): New function.
22532 (rewrite_use_address): Rewrite address uses in calls that were
22533 identified by find_address_like_use.
22535 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22536 Alan Hayward <alan.hayward@arm.com>
22537 David Sherwood <david.sherwood@arm.com>
22539 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
22541 * gimple-expr.h (is_gimple_addressable: Likewise.
22542 * gimple-expr.c (is_gimple_address): Likewise.
22543 * internal-fn.c (expand_call_mem_ref): New function.
22544 (expand_mask_load_optab_fn): Use it.
22545 (expand_mask_store_optab_fn): Likewise.
22547 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22548 Alan Hayward <alan.hayward@arm.com>
22549 David Sherwood <david.sherwood@arm.com>
22551 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
22552 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
22553 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
22554 (cond_umax@var{mode}): Document.
22555 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
22556 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
22557 (cond_umin_optab, cond_umax_optab): New optabs.
22558 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
22559 (COND_IOR, COND_XOR): New internal functions.
22560 * internal-fn.h (get_conditional_internal_fn): Declare.
22561 * internal-fn.c (cond_binary_direct): New macro.
22562 (expand_cond_binary_optab_fn): Likewise.
22563 (direct_cond_binary_optab_supported_p): Likewise.
22564 (get_conditional_internal_fn): New function.
22565 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
22566 Cope with reduction statements that are vectorized as calls rather
22568 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
22569 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
22570 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
22571 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
22572 (UNSPEC_COND_EOR): New unspecs.
22573 (optab): Add mappings for them.
22574 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
22575 (sve_int_op, sve_fp_op): New int attributes.
22577 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22578 Alan Hayward <alan.hayward@arm.com>
22579 David Sherwood <david.sherwood@arm.com>
22581 * optabs.def (while_ult_optab): New optab.
22582 * doc/md.texi (while_ult@var{m}@var{n}): Document.
22583 * internal-fn.def (WHILE_ULT): New internal function.
22584 * internal-fn.h (direct_internal_fn_supported_p): New override
22585 that takes two types as argument.
22586 * internal-fn.c (while_direct): New macro.
22587 (expand_while_optab_fn): New function.
22588 (convert_optab_supported_p): Likewise.
22589 (direct_while_optab_supported_p): New macro.
22590 * wide-int.h (wi::udiv_ceil): New function.
22591 * tree-vectorizer.h (rgroup_masks): New structure.
22592 (vec_loop_masks): New typedef.
22593 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
22594 and fully_masked_p.
22595 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
22596 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
22597 (vect_max_vf): New function.
22598 (slpeel_make_loop_iterate_ntimes): Delete.
22599 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
22600 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
22601 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
22602 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
22603 internal-fn.h, stor-layout.h and optabs-query.h.
22604 (vect_set_loop_mask): New function.
22605 (add_preheader_seq): Likewise.
22606 (add_header_seq): Likewise.
22607 (interleave_supported_p): Likewise.
22608 (vect_maybe_permute_loop_masks): Likewise.
22609 (vect_set_loop_masks_directly): Likewise.
22610 (vect_set_loop_condition_masked): Likewise.
22611 (vect_set_loop_condition_unmasked): New function, split out from
22612 slpeel_make_loop_iterate_ntimes.
22613 (slpeel_make_loop_iterate_ntimes): Rename to..
22614 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
22615 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
22616 (vect_do_peeling): Update call accordingly.
22617 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
22619 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22620 mask_compare_type, can_fully_mask_p and fully_masked_p.
22621 (release_vec_loop_masks): New function.
22622 (_loop_vec_info): Use it to free the loop masks.
22623 (can_produce_all_loop_masks_p): New function.
22624 (vect_get_max_nscalars_per_iter): Likewise.
22625 (vect_verify_full_masking): Likewise.
22626 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
22627 retries, and free the mask rgroups before retrying. Check loop-wide
22628 reasons for disallowing fully-masked loops. Make the final decision
22629 about whether use a fully-masked loop or not.
22630 (vect_estimate_min_profitable_iters): Do not assume that peeling
22631 for the number of iterations will be needed for fully-masked loops.
22632 (vectorizable_reduction): Disable fully-masked loops.
22633 (vectorizable_live_operation): Likewise.
22634 (vect_halve_mask_nunits): New function.
22635 (vect_double_mask_nunits): Likewise.
22636 (vect_record_loop_mask): Likewise.
22637 (vect_get_loop_mask): Likewise.
22638 (vect_transform_loop): Handle the case in which the final loop
22639 iteration might handle a partial vector. Call vect_set_loop_condition
22640 instead of slpeel_make_loop_iterate_ntimes.
22641 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
22642 (check_load_store_masking): New function.
22643 (prepare_load_store_mask): Likewise.
22644 (vectorizable_store): Handle fully-masked loops.
22645 (vectorizable_load): Likewise.
22646 (supportable_widening_operation): Use vect_halve_mask_nunits for
22648 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
22649 (vect_gen_while): New function.
22650 * config/aarch64/aarch64.md (umax<mode>3): New expander.
22651 (aarch64_uqdec<mode>): New insn.
22653 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22654 Alan Hayward <alan.hayward@arm.com>
22655 David Sherwood <david.sherwood@arm.com>
22657 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
22658 (reduc_xor_scal_optab): New optabs.
22659 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
22660 (reduc_xor_scal_@var{m}): Document.
22661 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
22662 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
22663 internal functions.
22664 * fold-const-call.c (fold_const_call): Handle them.
22665 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
22666 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
22667 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
22668 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
22669 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
22670 (UNSPEC_XORV): New unspecs.
22671 (optab): Add entries for them.
22672 (BITWISEV): New int iterator.
22673 (bit_reduc_op): New int attributes.
22675 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22676 Alan Hayward <alan.hayward@arm.com>
22677 David Sherwood <david.sherwood@arm.com>
22679 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
22680 * internal-fn.def (VEC_SHL_INSERT): New internal function.
22681 * optabs.def (vec_shl_insert_optab): New optab.
22682 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
22683 (duplicate_and_interleave): Likewise.
22684 * tree-vect-loop.c: Include internal-fn.h.
22685 (neutral_op_for_slp_reduction): New function, split out from
22686 get_initial_defs_for_reduction.
22687 (get_initial_def_for_reduction): Handle option 2 for variable-length
22688 vectors by loading the neutral value into a vector and then shifting
22689 the initial value into element 0.
22690 (get_initial_defs_for_reduction): Replace the code argument with
22691 the neutral value calculated by neutral_op_for_slp_reduction.
22692 Use gimple_build_vector for constant-length vectors.
22693 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
22694 but the first group_size elements have a neutral value.
22695 Use duplicate_and_interleave otherwise.
22696 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
22697 Update call to get_initial_defs_for_reduction. Handle SLP
22698 reductions for variable-length vectors by creating one vector
22699 result for each scalar result, with the elements associated
22700 with other scalar results stubbed out with the neutral value.
22701 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
22702 Require IFN_VEC_SHL_INSERT for double reductions on
22703 variable-length vectors, or SLP reductions that have
22704 a neutral value. Require can_duplicate_and_interleave_p
22705 support for variable-length unchained SLP reductions if there
22706 is no neutral value, such as for MIN/MAX reductions. Also require
22707 the number of vector elements to be a multiple of the number of
22708 SLP statements when doing variable-length unchained SLP reductions.
22709 Update call to vect_create_epilog_for_reduction.
22710 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
22711 and remove initial values.
22712 (duplicate_and_interleave): Make public.
22713 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
22714 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
22716 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22717 Alan Hayward <alan.hayward@arm.com>
22718 David Sherwood <david.sherwood@arm.com>
22720 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
22721 (can_duplicate_and_interleave_p): New function.
22722 (vect_get_and_check_slp_defs): Take the vector of statements
22723 rather than just the current one. Remove excess parentheses.
22724 Restriction rejectinon of vect_constant_def and vect_external_def
22725 for variable-length vectors to boolean types, or types for which
22726 can_duplicate_and_interleave_p is false.
22727 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
22728 (duplicate_and_interleave): New function.
22729 (vect_get_constant_vectors): Use gimple_build_vector for
22730 constant-length vectors and suitable variable-length constant
22731 vectors. Use duplicate_and_interleave for other variable-length
22732 vectors. Don't defer the update when inserting new statements.
22734 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22735 Alan Hayward <alan.hayward@arm.com>
22736 David Sherwood <david.sherwood@arm.com>
22738 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
22739 min_profitable_iters doesn't go negative.
22741 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22742 Alan Hayward <alan.hayward@arm.com>
22743 David Sherwood <david.sherwood@arm.com>
22745 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
22746 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
22747 * optabs.def (vec_mask_load_lanes_optab): New optab.
22748 (vec_mask_store_lanes_optab): Likewise.
22749 * internal-fn.def (MASK_LOAD_LANES): New internal function.
22750 (MASK_STORE_LANES): Likewise.
22751 * internal-fn.c (mask_load_lanes_direct): New macro.
22752 (mask_store_lanes_direct): Likewise.
22753 (expand_mask_load_optab_fn): Handle masked operations.
22754 (expand_mask_load_lanes_optab_fn): New macro.
22755 (expand_mask_store_optab_fn): Handle masked operations.
22756 (expand_mask_store_lanes_optab_fn): New macro.
22757 (direct_mask_load_lanes_optab_supported_p): Likewise.
22758 (direct_mask_store_lanes_optab_supported_p): Likewise.
22759 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
22761 (vect_load_lanes_supported): Likewise.
22762 * tree-vect-data-refs.c (strip_conversion): New function.
22763 (can_group_stmts_p): Likewise.
22764 (vect_analyze_data_ref_accesses): Use it instead of checking
22765 for a pair of assignments.
22766 (vect_store_lanes_supported): Take a masked_p parameter.
22767 (vect_load_lanes_supported): Likewise.
22768 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
22769 vect_store_lanes_supported and vect_load_lanes_supported.
22770 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
22771 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
22772 parameter. Don't allow gaps for masked accesses.
22773 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
22774 and vect_load_lanes_supported.
22775 (get_load_store_type): Take a masked_p parameter and update
22776 call to get_group_load_store_type.
22777 (vectorizable_store): Update call to get_load_store_type.
22778 Handle IFN_MASK_STORE_LANES.
22779 (vectorizable_load): Update call to get_load_store_type.
22780 Handle IFN_MASK_LOAD_LANES.
22782 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22783 Alan Hayward <alan.hayward@arm.com>
22784 David Sherwood <david.sherwood@arm.com>
22786 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
22788 * config/aarch64/aarch64-protos.h
22789 (aarch64_sve_struct_memory_operand_p): Declare.
22790 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
22791 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
22792 (VPRED, vpred): Handle SVE structure modes.
22793 * config/aarch64/constraints.md (Utx): New constraint.
22794 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
22795 (aarch64_sve_struct_nonimmediate_operand): New predicates.
22796 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
22797 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
22798 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
22799 structure modes. Split into pieces after RA.
22800 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
22801 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
22803 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
22804 SVE structure modes.
22805 (aarch64_classify_address): Likewise.
22806 (sizetochar): Move earlier in file.
22807 (aarch64_print_operand): Handle SVE register lists.
22808 (aarch64_array_mode): New function.
22809 (aarch64_sve_struct_memory_operand_p): Likewise.
22810 (TARGET_ARRAY_MODE): Redefine.
22812 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22813 Alan Hayward <alan.hayward@arm.com>
22814 David Sherwood <david.sherwood@arm.com>
22816 * target.def (array_mode): New target hook.
22817 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
22818 * doc/tm.texi: Regenerate.
22819 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
22820 * hooks.c (hook_optmode_mode_uhwi_none): New function.
22821 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
22822 targetm.array_mode.
22823 * stor-layout.c (mode_for_array): Likewise. Support polynomial
22826 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22827 Alan Hayward <alan.hayward@arm.com>
22828 David Sherwood <david.sherwood@arm.com>
22830 * fold-const.c (fold_binary_loc): Check the argument types
22831 rather than the result type when testing for a vector operation.
22833 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22835 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22836 * doc/tm.texi: Regenerate.
22838 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22839 Alan Hayward <alan.hayward@arm.com>
22840 David Sherwood <david.sherwood@arm.com>
22842 * doc/invoke.texi (-msve-vector-bits=): Document new option.
22843 (sve): Document new AArch64 extension.
22844 * doc/md.texi (w): Extend the description of the AArch64
22845 constraint to include SVE vectors.
22846 (Upl, Upa): Document new AArch64 predicate constraints.
22847 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22849 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22850 (msve-vector-bits=): New option.
22851 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22852 SVE when these are disabled.
22853 (sve): New extension.
22854 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22855 modes. Adjust their number of units based on aarch64_sve_vg.
22856 (MAX_BITSIZE_MODE_ANY_MODE): Define.
22857 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22858 aarch64_addr_query_type.
22859 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22860 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22861 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22862 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22863 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22864 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22865 (aarch64_simd_imm_zero_p): Delete.
22866 (aarch64_check_zero_based_sve_index_immediate): Declare.
22867 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22868 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22869 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22870 (aarch64_sve_float_mul_immediate_p): Likewise.
22871 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22872 rather than an rtx.
22873 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22874 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22875 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22876 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22877 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22878 (aarch64_regmode_natural_size): Likewise.
22879 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22880 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22882 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22883 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22884 for VG and the SVE predicate registers.
22885 (V_ALIASES): Add a "z"-prefixed alias.
22886 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22887 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22888 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22889 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22890 (REG_CLASS_NAMES): Add entries for them.
22891 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
22892 and the predicate registers.
22893 (aarch64_sve_vg): Declare.
22894 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22895 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22896 (REGMODE_NATURAL_SIZE): Define.
22897 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22899 * config/aarch64/aarch64.c: Include cfgrtl.h.
22900 (simd_immediate_info): Add a constructor for series vectors,
22901 and an associated step field.
22902 (aarch64_sve_vg): New variable.
22903 (aarch64_dbx_register_number): Handle VG and the predicate registers.
22904 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22905 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22906 (VEC_ANY_DATA, VEC_STRUCT): New constants.
22907 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22908 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22909 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22910 (aarch64_get_mask_mode): New functions.
22911 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22912 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22913 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
22914 predicate modes and predicate registers. Explicitly restrict
22915 GPRs to modes of 16 bytes or smaller. Only allow FP registers
22916 to store a vector mode if it is recognized by
22917 aarch64_classify_vector_mode.
22918 (aarch64_regmode_natural_size): New function.
22919 (aarch64_hard_regno_caller_save_mode): Return the original mode
22921 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22922 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22923 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22924 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22926 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
22927 does not overlap dest if the function is frame-related. Handle
22929 (aarch64_split_add_offset): New function.
22930 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22931 them aarch64_add_offset.
22932 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22933 and update call to aarch64_sub_sp.
22934 (aarch64_add_cfa_expression): New function.
22935 (aarch64_expand_prologue): Pass extra temporary registers to the
22936 functions above. Handle the case in which we need to emit new
22937 DW_CFA_expressions for registers that were originally saved
22938 relative to the stack pointer, but now have to be expressed
22939 relative to the frame pointer.
22940 (aarch64_output_mi_thunk): Pass extra temporary registers to the
22942 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
22943 IP0 and IP1 values for SVE frames.
22944 (aarch64_expand_vec_series): New function.
22945 (aarch64_expand_sve_widened_duplicate): Likewise.
22946 (aarch64_expand_sve_const_vector): Likewise.
22947 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22948 Handle SVE constants. Use emit_move_insn to move a force_const_mem
22949 into the register, rather than emitting a SET directly.
22950 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22951 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22952 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22953 (offset_9bit_signed_scaled_p): New functions.
22954 (aarch64_replicate_bitmask_imm): New function.
22955 (aarch64_bitmask_imm): Use it.
22956 (aarch64_cannot_force_const_mem): Reject expressions involving
22957 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
22958 (aarch64_classify_index): Handle SVE indices, by requiring
22959 a plain register index with a scale that matches the element size.
22960 (aarch64_classify_address): Handle SVE addresses. Assert that
22961 the mode of the address is VOIDmode or an integer mode.
22962 Update call to aarch64_classify_symbol.
22963 (aarch64_classify_symbolic_expression): Update call to
22964 aarch64_classify_symbol.
22965 (aarch64_const_vec_all_in_range_p): New function.
22966 (aarch64_print_vector_float_operand): Likewise.
22967 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
22968 "vN" for FP registers with SVE modes. Handle (const ...) vectors
22969 and the FP immediates 1.0 and 0.5.
22970 (aarch64_print_address_internal): Handle SVE addresses.
22971 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22972 (aarch64_regno_regclass): Handle predicate registers.
22973 (aarch64_secondary_reload): Handle big-endian reloads of SVE
22975 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22976 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22977 (aarch64_convert_sve_vector_bits): New function.
22978 (aarch64_override_options): Use it to handle -msve-vector-bits=.
22979 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22980 rather than an rtx.
22981 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22982 Handle SVE vector and predicate modes. Accept VL-based constants
22983 that need only one temporary register, and VL offsets that require
22984 no temporary registers.
22985 (aarch64_conditional_register_usage): Mark the predicate registers
22986 as fixed if SVE isn't available.
22987 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22988 Return true for SVE vector and predicate modes.
22989 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22990 rather than an unsigned int. Handle SVE modes.
22991 (aarch64_preferred_simd_mode): Update call accordingly. Handle
22993 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22995 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22996 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22997 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22998 (aarch64_sve_float_mul_immediate_p): New functions.
22999 (aarch64_sve_valid_immediate): New function.
23000 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
23001 Explicitly reject structure modes. Check for INDEX constants.
23002 Handle PTRUE and PFALSE constants.
23003 (aarch64_check_zero_based_sve_index_immediate): New function.
23004 (aarch64_simd_imm_zero_p): Delete.
23005 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
23006 vector modes. Accept constants in the range of CNT[BHWD].
23007 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
23008 ask for an Advanced SIMD mode.
23009 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
23010 (aarch64_simd_vector_alignment): Handle SVE predicates.
23011 (aarch64_vectorize_preferred_vector_alignment): New function.
23012 (aarch64_simd_vector_alignment_reachable): Use it instead of
23014 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
23015 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
23017 (MAX_VECT_LEN): Delete.
23018 (expand_vec_perm_d): Add a vec_flags field.
23019 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
23020 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
23021 (aarch64_evpc_ext): Don't apply a big-endian lane correction
23023 (aarch64_evpc_rev): Rename to...
23024 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
23025 (aarch64_evpc_rev_global): New function.
23026 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
23027 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
23029 (aarch64_evpc_sve_tbl): New function.
23030 (aarch64_expand_vec_perm_const_1): Update after rename of
23031 aarch64_evpc_rev. Handle SVE permutes too, trying
23032 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
23033 than aarch64_evpc_tbl.
23034 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
23035 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
23036 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
23037 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
23038 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
23039 (aarch64_expand_sve_vcond): New functions.
23040 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
23041 of aarch64_vector_mode_p.
23042 (aarch64_dwarf_poly_indeterminate_value): New function.
23043 (aarch64_compute_pressure_classes): Likewise.
23044 (aarch64_can_change_mode_class): Likewise.
23045 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
23046 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
23047 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
23048 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
23049 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
23050 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
23051 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
23052 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
23054 (Dn, Dl, Dr): Accept const as well as const_vector.
23055 (Dz): Likewise. Compare against CONST0_RTX.
23056 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
23057 of "vector" where appropriate.
23058 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
23059 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
23060 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
23061 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
23062 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
23063 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
23064 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
23065 (v_int_equiv): Extend to SVE modes.
23066 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
23068 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
23069 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
23070 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
23071 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
23072 (SVE_COND_FP_CMP): New int iterators.
23073 (perm_hilo): Handle the new unpack unspecs.
23074 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
23076 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
23077 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
23078 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
23079 (aarch64_equality_operator, aarch64_constant_vector_operand)
23080 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
23081 (aarch64_sve_nonimmediate_operand): Likewise.
23082 (aarch64_sve_general_operand): Likewise.
23083 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
23084 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
23085 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
23086 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
23087 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
23088 (aarch64_sve_float_arith_immediate): Likewise.
23089 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
23090 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
23091 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
23092 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
23093 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
23094 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
23095 (aarch64_sve_float_arith_operand): Likewise.
23096 (aarch64_sve_float_arith_with_sub_operand): Likewise.
23097 (aarch64_sve_float_mul_operand): Likewise.
23098 (aarch64_sve_vec_perm_operand): Likewise.
23099 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
23100 (aarch64_mov_operand): Accept const_poly_int and const_vector.
23101 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
23102 as well as const_vector.
23103 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
23104 in file. Use CONST0_RTX and CONSTM1_RTX.
23105 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
23106 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
23107 Use aarch64_simd_imm_zero.
23108 * config/aarch64/aarch64-sve.md: New file.
23109 * config/aarch64/aarch64.md: Include it.
23110 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
23111 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
23112 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
23113 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
23114 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
23115 (sve): New attribute.
23116 (enabled): Disable instructions with the sve attribute unless
23118 (movqi, movhi): Pass CONST_POLY_INT operaneds through
23119 aarch64_expand_mov_immediate.
23120 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
23121 CNT[BHSD] immediates.
23122 (movti): Split CONST_POLY_INT moves into two halves.
23123 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
23124 Split additions that need a temporary here if the destination
23125 is the stack pointer.
23126 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
23127 (*add<mode>3_poly_1): New instruction.
23128 (set_clobber_cc): New expander.
23130 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23132 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
23133 parameter and use it instead of GET_MODE_SIZE (innermode). Use
23134 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
23135 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
23136 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
23137 Change innermode from fixed_mode_size to machine_mode.
23138 (simplify_subreg): Update call accordingly. Handle a constant-sized
23139 subreg of a variable-length CONST_VECTOR.
23141 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23142 Alan Hayward <alan.hayward@arm.com>
23143 David Sherwood <david.sherwood@arm.com>
23145 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
23146 (add_offset_to_base): New function, split out from...
23147 (create_mem_ref): ...here. When handling a scale other than 1,
23148 check first whether the address is valid without the offset.
23149 Add it into the base if so, leaving the index and scale as-is.
23151 2018-01-12 Jakub Jelinek <jakub@redhat.com>
23154 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
23155 fold_for_warn before checking if arg2 is INTEGER_CST.
23157 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
23159 * config/rs6000/predicates.md (load_multiple_operation): Delete.
23160 (store_multiple_operation): Delete.
23161 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
23162 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
23163 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
23164 guarded by TARGET_STRING.
23165 (rs6000_output_load_multiple): Delete.
23166 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
23167 OPTION_MASK_STRING / TARGET_STRING handling.
23168 (print_operand) <'N', 'O'>: Add comment that these are unused now.
23169 (const rs6000_opt_masks) <"string">: Change mask to 0.
23170 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
23171 (MASK_STRING): Delete.
23172 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
23174 (load_multiple): Delete.
23181 (store_multiple): Delete.
23188 (movmemsi_8reg): Delete.
23189 (corresponding unnamed define_insn): Delete.
23190 (movmemsi_6reg): Delete.
23191 (corresponding unnamed define_insn): Delete.
23192 (movmemsi_4reg): Delete.
23193 (corresponding unnamed define_insn): Delete.
23194 (movmemsi_2reg): Delete.
23195 (corresponding unnamed define_insn): Delete.
23196 (movmemsi_1reg): Delete.
23197 (corresponding unnamed define_insn): Delete.
23198 * config/rs6000/rs6000.opt (mno-string): New.
23199 (mstring): Replace by deprecation warning stub.
23200 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
23202 2018-01-12 Jakub Jelinek <jakub@redhat.com>
23204 * regrename.c (regrename_do_replace): If replacing the same
23205 reg multiple times, try to reuse last created gen_raw_REG.
23208 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
23209 main to workaround a bug in GDB.
23211 2018-01-12 Tom de Vries <tom@codesourcery.com>
23214 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
23216 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
23218 PR rtl-optimization/80481
23219 * ira-color.c (get_cap_member): New function.
23220 (allocnos_conflict_by_live_ranges_p): Use it.
23221 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
23222 (setup_slot_coalesced_allocno_live_ranges): Ditto.
23224 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
23227 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
23228 (*saddl_se_1): Ditto.
23229 (*ssubsi_1): Ditto.
23230 (*ssubl_se_1): Ditto.
23232 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23234 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
23235 rather than wi::to_widest for DR_INITs.
23236 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
23237 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
23238 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
23240 (vect_analyze_group_access_1): Note that here.
23242 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23244 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
23245 polynomial type sizes.
23247 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23249 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
23250 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
23251 (gimple_add_tmp_var): Likewise.
23253 2018-01-12 Martin Liska <mliska@suse.cz>
23255 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
23256 (gimple_alloc_sizes): Likewise.
23257 (dump_gimple_statistics): Use PRIu64 in printf format.
23258 * gimple.h: Change uint64_t to int.
23260 2018-01-12 Martin Liska <mliska@suse.cz>
23262 * tree-core.h: Use uint64_t instead of int.
23263 * tree.c (tree_node_counts): Likewise.
23264 (tree_node_sizes): Likewise.
23265 (dump_tree_statistics): Use PRIu64 in printf format.
23267 2018-01-12 Martin Liska <mliska@suse.cz>
23269 * Makefile.in: As qsort_chk is implemented in vec.c, add
23270 vec.o to linkage of gencfn-macros.
23271 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
23272 passing the info to record_node_allocation_statistics.
23273 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
23275 * ggc-common.c (struct ggc_usage): Add operator== and use
23276 it in operator< and compare function.
23277 * mem-stats.h (struct mem_usage): Likewise.
23278 * vec.c (struct vec_usage): Remove operator< and compare
23279 function. Can be simply inherited.
23281 2018-01-12 Martin Jambor <mjambor@suse.cz>
23284 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
23285 * tree-ssa-math-opts.c: Include domwalk.h.
23286 (convert_mult_to_fma_1): New function.
23287 (fma_transformation_info): New type.
23288 (fma_deferring_state): Likewise.
23289 (cancel_fma_deferring): New function.
23290 (result_of_phi): Likewise.
23291 (last_fma_candidate_feeds_initial_phi): Likewise.
23292 (convert_mult_to_fma): Added deferring logic, split actual
23293 transformation to convert_mult_to_fma_1.
23294 (math_opts_dom_walker): New type.
23295 (math_opts_dom_walker::after_dom_children): New method, body moved
23296 here from pass_optimize_widening_mul::execute, added deferring logic
23298 (pass_optimize_widening_mul::execute): Moved most of code to
23299 math_opts_dom_walker::after_dom_children.
23300 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
23301 * config/i386/i386.c (ix86_option_override_internal): Added
23302 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
23304 2018-01-12 Richard Biener <rguenther@suse.de>
23307 * dwarf2out.c (gen_variable_die): Do not reset old_die for
23308 inline instance vars.
23310 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
23313 * config/rx/rx.c (rx_is_restricted_memory_address):
23314 Handle SUBREG case.
23316 2018-01-12 Richard Biener <rguenther@suse.de>
23318 PR tree-optimization/80846
23319 * target.def (split_reduction): New target hook.
23320 * targhooks.c (default_split_reduction): New function.
23321 * targhooks.h (default_split_reduction): Declare.
23322 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
23323 target requests first reduce vectors by combining low and high
23325 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
23326 (get_vectype_for_scalar_type_and_size): Export.
23327 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
23328 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
23329 * doc/tm.texi: Regenerate.
23330 * config/i386/i386.c (ix86_split_reduction): Implement
23331 TARGET_VECTORIZE_SPLIT_REDUCTION.
23333 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
23336 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
23337 in PIC mode except for TARGET_VXWORKS_RTP.
23338 * config/sparc/sparc.c: Include cfgrtl.h.
23339 (TARGET_INIT_PIC_REG): Define.
23340 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
23341 (sparc_pic_register_p): New predicate.
23342 (sparc_legitimate_address_p): Use it.
23343 (sparc_legitimize_pic_address): Likewise.
23344 (sparc_delegitimize_address): Likewise.
23345 (sparc_mode_dependent_address_p): Likewise.
23346 (gen_load_pcrel_sym): Remove 4th parameter.
23347 (load_got_register): Adjust call to above. Remove obsolete stuff.
23348 (sparc_expand_prologue): Do not call load_got_register here.
23349 (sparc_flat_expand_prologue): Likewise.
23350 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
23351 (sparc_use_pseudo_pic_reg): New function.
23352 (sparc_init_pic_reg): Likewise.
23353 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23354 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
23356 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
23358 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
23359 Add item for branch_cost.
23361 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
23363 PR rtl-optimization/83565
23364 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
23365 not extend the result to a larger mode for rotate operations.
23366 (num_sign_bit_copies1): Likewise.
23368 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23371 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
23373 Use values-Xc.o for -pedantic.
23374 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
23376 2018-01-12 Martin Liska <mliska@suse.cz>
23379 * ipa-devirt.c (final_warning_record::grow_type_warnings):
23381 (possible_polymorphic_call_targets): Use it.
23382 (ipa_devirt): Likewise.
23384 2018-01-12 Martin Liska <mliska@suse.cz>
23386 * profile-count.h (enum profile_quality): Use 0 as invalid
23387 enum value of profile_quality.
23389 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
23391 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
23392 -mext-string options.
23394 2018-01-12 Richard Biener <rguenther@suse.de>
23396 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
23397 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
23398 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
23400 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
23402 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
23404 * configure.ac (--with-long-double-format): Add support for the
23405 configuration option to change the default long double format on
23407 * config.gcc (powerpc*-linux*-*): Likewise.
23408 * configure: Regenerate.
23409 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
23410 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
23411 used without modification.
23413 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23415 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
23416 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
23417 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
23418 MISC_BUILTIN_SPEC_BARRIER.
23419 (rs6000_init_builtins): Likewise.
23420 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
23422 (speculation_barrier): New define_insn.
23423 * doc/extend.texi: Document __builtin_speculation_barrier.
23425 2018-01-11 Jakub Jelinek <jakub@redhat.com>
23428 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
23429 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
23430 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
23432 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
23433 integral modes instead of "ss" and "sd".
23434 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
23435 vectors with 32-bit and 64-bit elements.
23436 (vecdupssescalarmodesuffix): New mode attribute.
23437 (vec_dup<mode>): Use it.
23439 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
23442 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
23443 frame if argument is passed on stack.
23445 2018-01-11 Jakub Jelinek <jakub@redhat.com>
23448 * ree.c (combine_reaching_defs): Optimize also
23449 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
23450 reg2=any_extend(exp); reg1=reg2;, formatting fix.
23452 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
23454 PR middle-end/83189
23455 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
23457 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
23459 PR middle-end/83718
23460 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
23461 after they are computed.
23463 2018-01-11 Bin Cheng <bin.cheng@arm.com>
23465 PR tree-optimization/83695
23466 * gimple-loop-linterchange.cc
23467 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
23468 reset cached scev information after interchange.
23469 (pass_linterchange::execute): Remove call to scev_reset_htab.
23471 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23473 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
23474 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
23475 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
23476 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
23477 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
23478 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
23479 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
23480 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
23481 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
23482 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
23483 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
23484 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
23485 (V_lane_reg): Likewise.
23486 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
23488 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
23489 (vfmal_lane_low<mode>_intrinsic,
23490 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
23491 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
23492 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
23493 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
23494 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
23495 vfmsl_lane_high<mode>_intrinsic): New define_insns.
23497 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23499 * config/arm/arm-cpus.in (fp16fml): New feature.
23500 (ALL_SIMD): Add fp16fml.
23501 (armv8.2-a): Add fp16fml as an option.
23502 (armv8.3-a): Likewise.
23503 (armv8.4-a): Add fp16fml as part of fp16.
23504 * config/arm/arm.h (TARGET_FP16FML): Define.
23505 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
23507 * config/arm/arm-modes.def (V2HF): Define.
23508 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
23509 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
23510 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
23511 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
23512 vfmsl_low, vfmsl_high): New set of builtins.
23513 * config/arm/iterators.md (PLUSMINUS): New code iterator.
23514 (vfml_op): New code attribute.
23515 (VFMLHALVES): New int iterator.
23516 (VFML, VFMLSEL): New mode attributes.
23517 (V_reg): Define mapping for V2HF.
23518 (V_hi, V_lo): New mode attributes.
23519 (VF_constraint): Likewise.
23520 (vfml_half, vfml_half_selector): New int attributes.
23521 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
23523 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
23524 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
23526 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
23527 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
23528 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
23529 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
23531 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
23532 Document new effective target and option set.
23534 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23536 * config/arm/arm-cpus.in (armv8_4): New feature.
23537 (ARMv8_4a): New fgroup.
23538 (armv8.4-a): New arch.
23539 * config/arm/arm-tables.opt: Regenerate.
23540 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
23541 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
23542 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
23543 Add matching rules for -march=armv8.4-a and extensions.
23544 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
23546 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
23549 * config/rx/rx.md (BW): New mode attribute.
23550 (sync_lock_test_and_setsi): Add mode suffix to insn output.
23552 2018-01-11 Richard Biener <rguenther@suse.de>
23554 PR tree-optimization/83435
23555 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
23556 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
23557 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
23559 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23560 Alan Hayward <alan.hayward@arm.com>
23561 David Sherwood <david.sherwood@arm.com>
23563 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
23565 (aarch64_classify_address): Initialize it. Track polynomial offsets.
23566 (aarch64_print_address_internal): Use it to check for a zero offset.
23568 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23569 Alan Hayward <alan.hayward@arm.com>
23570 David Sherwood <david.sherwood@arm.com>
23572 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
23573 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
23574 Return a poly_int64 rather than a HOST_WIDE_INT.
23575 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
23576 rather than a HOST_WIDE_INT.
23577 * config/aarch64/aarch64.h (aarch64_frame): Protect with
23578 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
23579 hard_fp_offset, frame_size, initial_adjust, callee_offset and
23580 final_offset from HOST_WIDE_INT to poly_int64.
23581 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
23582 to_constant when getting the number of units in an Advanced SIMD
23584 (aarch64_builtin_vectorized_function): Check for a constant number
23586 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
23588 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
23589 attribute instead of GET_MODE_NUNITS.
23590 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
23591 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
23592 GET_MODE_SIZE for fixed-size registers.
23593 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
23594 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
23595 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
23596 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
23597 (aarch64_print_operand, aarch64_print_address_internal)
23598 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
23599 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
23600 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
23601 Handle polynomial GET_MODE_SIZE.
23602 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
23603 wider than SImode without modification.
23604 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
23605 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
23606 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
23607 passing and returning SVE modes.
23608 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
23609 rather than GEN_INT.
23610 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
23611 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
23612 (aarch64_allocate_and_probe_stack_space): Likewise.
23613 (aarch64_layout_frame): Cope with polynomial offsets.
23614 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
23615 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
23616 polynomial offsets.
23617 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
23618 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
23619 poly_int64 rather than a HOST_WIDE_INT.
23620 (aarch64_get_separate_components, aarch64_process_components)
23621 (aarch64_expand_prologue, aarch64_expand_epilogue)
23622 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
23623 (aarch64_anchor_offset): New function, split out from...
23624 (aarch64_legitimize_address): ...here.
23625 (aarch64_builtin_vectorization_cost): Handle polynomial
23626 TYPE_VECTOR_SUBPARTS.
23627 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
23629 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
23630 number of elements from the PARALLEL rather than the mode.
23631 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
23632 rather than GET_MODE_BITSIZE.
23633 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
23634 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
23635 (aarch64_expand_vec_perm_const_1): Handle polynomial
23636 d->perm.length () and d->perm elements.
23637 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
23638 Apply to_constant to d->perm elements.
23639 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
23640 polynomial CONST_VECTOR_NUNITS.
23641 (aarch64_move_pointer): Take amount as a poly_int64 rather
23643 (aarch64_progress_pointer): Avoid temporary variable.
23644 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
23645 the mode attribute instead of GET_MODE.
23647 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23648 Alan Hayward <alan.hayward@arm.com>
23649 David Sherwood <david.sherwood@arm.com>
23651 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
23652 x exists before using it.
23653 (aarch64_add_constant_internal): Rename to...
23654 (aarch64_add_offset_1): ...this. Replace regnum with separate
23655 src and dest rtxes. Handle the case in which they're different,
23656 including when the offset is zero. Replace scratchreg with an rtx.
23657 Use 2 additions if there is no spare register into which we can
23658 move a 16-bit constant.
23659 (aarch64_add_constant): Delete.
23660 (aarch64_add_offset): Replace reg with separate src and dest
23661 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
23662 Use aarch64_add_offset_1.
23663 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
23664 an rtx rather than an int. Take the delta as a poly_int64
23665 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
23666 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
23667 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
23668 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
23669 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
23670 and aarch64_add_sp.
23671 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
23672 aarch64_add_constant.
23674 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23676 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
23677 Use scalar_float_mode.
23679 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23681 * config/aarch64/aarch64-simd.md
23682 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
23683 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
23684 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
23685 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
23686 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
23687 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
23688 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
23689 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
23690 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
23691 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
23693 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23696 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
23697 targ_options->x_arm_arch_string is non NULL.
23699 2018-01-11 Tamar Christina <tamar.christina@arm.com>
23701 * config/aarch64/aarch64.h
23702 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
23704 2018-01-11 Sudakshina Das <sudi.das@arm.com>
23707 * expmed.c (emit_store_flag_force): Swap if const op0
23708 and change VOIDmode to mode of op0.
23710 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23712 PR rtl-optimization/83761
23713 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
23714 than bytes to mode_for_size.
23716 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23718 PR middle-end/83189
23719 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
23720 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
23723 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23725 PR middle-end/83575
23726 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
23727 when in layout mode.
23728 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
23729 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
23732 2018-01-10 Michael Collison <michael.collison@arm.com>
23734 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
23735 * config/aarch64/aarch64-option-extension.def: Add
23736 AARCH64_OPT_EXTENSION of 'fp16fml'.
23737 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23738 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
23739 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
23740 * config/aarch64/constraints.md (Ui7): New constraint.
23741 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
23742 (VFMLA_SEL_W): Ditto.
23745 (VFMLA16_LOW): New int iterator.
23746 (VFMLA16_HIGH): Ditto.
23747 (UNSPEC_FMLAL): New unspec.
23748 (UNSPEC_FMLSL): Ditto.
23749 (UNSPEC_FMLAL2): Ditto.
23750 (UNSPEC_FMLSL2): Ditto.
23751 (f16mac): New code attribute.
23752 * config/aarch64/aarch64-simd-builtins.def
23753 (aarch64_fmlal_lowv2sf): Ditto.
23754 (aarch64_fmlsl_lowv2sf): Ditto.
23755 (aarch64_fmlalq_lowv4sf): Ditto.
23756 (aarch64_fmlslq_lowv4sf): Ditto.
23757 (aarch64_fmlal_highv2sf): Ditto.
23758 (aarch64_fmlsl_highv2sf): Ditto.
23759 (aarch64_fmlalq_highv4sf): Ditto.
23760 (aarch64_fmlslq_highv4sf): Ditto.
23761 (aarch64_fmlal_lane_lowv2sf): Ditto.
23762 (aarch64_fmlsl_lane_lowv2sf): Ditto.
23763 (aarch64_fmlal_laneq_lowv2sf): Ditto.
23764 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
23765 (aarch64_fmlalq_lane_lowv4sf): Ditto.
23766 (aarch64_fmlsl_lane_lowv4sf): Ditto.
23767 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
23768 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
23769 (aarch64_fmlal_lane_highv2sf): Ditto.
23770 (aarch64_fmlsl_lane_highv2sf): Ditto.
23771 (aarch64_fmlal_laneq_highv2sf): Ditto.
23772 (aarch64_fmlsl_laneq_highv2sf): Ditto.
23773 (aarch64_fmlalq_lane_highv4sf): Ditto.
23774 (aarch64_fmlsl_lane_highv4sf): Ditto.
23775 (aarch64_fmlalq_laneq_highv4sf): Ditto.
23776 (aarch64_fmlsl_laneq_highv4sf): Ditto.
23777 * config/aarch64/aarch64-simd.md:
23778 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
23779 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23780 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
23781 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23782 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
23783 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
23784 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
23785 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
23786 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
23787 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
23788 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
23789 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
23790 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
23791 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
23792 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
23793 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
23794 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
23795 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
23796 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
23797 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
23798 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
23799 (vfmlsl_low_u32): Ditto.
23800 (vfmlalq_low_u32): Ditto.
23801 (vfmlslq_low_u32): Ditto.
23802 (vfmlal_high_u32): Ditto.
23803 (vfmlsl_high_u32): Ditto.
23804 (vfmlalq_high_u32): Ditto.
23805 (vfmlslq_high_u32): Ditto.
23806 (vfmlal_lane_low_u32): Ditto.
23807 (vfmlsl_lane_low_u32): Ditto.
23808 (vfmlal_laneq_low_u32): Ditto.
23809 (vfmlsl_laneq_low_u32): Ditto.
23810 (vfmlalq_lane_low_u32): Ditto.
23811 (vfmlslq_lane_low_u32): Ditto.
23812 (vfmlalq_laneq_low_u32): Ditto.
23813 (vfmlslq_laneq_low_u32): Ditto.
23814 (vfmlal_lane_high_u32): Ditto.
23815 (vfmlsl_lane_high_u32): Ditto.
23816 (vfmlal_laneq_high_u32): Ditto.
23817 (vfmlsl_laneq_high_u32): Ditto.
23818 (vfmlalq_lane_high_u32): Ditto.
23819 (vfmlslq_lane_high_u32): Ditto.
23820 (vfmlalq_laneq_high_u32): Ditto.
23821 (vfmlslq_laneq_high_u32): Ditto.
23822 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
23823 (AARCH64_FL_FOR_ARCH8_4): New.
23824 (AARCH64_ISA_F16FML): New ISA flag.
23825 (TARGET_F16FML): New feature flag for fp16fml.
23826 (doc/invoke.texi): Document new fp16fml option.
23828 2018-01-10 Michael Collison <michael.collison@arm.com>
23830 * config/aarch64/aarch64-builtins.c:
23831 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23832 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23833 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23834 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23835 (AARCH64_ISA_SHA3): New ISA flag.
23836 (TARGET_SHA3): New feature flag for sha3.
23837 * config/aarch64/iterators.md (sha512_op): New int attribute.
23838 (CRYPTO_SHA512): New int iterator.
23839 (UNSPEC_SHA512H): New unspec.
23840 (UNSPEC_SHA512H2): Ditto.
23841 (UNSPEC_SHA512SU0): Ditto.
23842 (UNSPEC_SHA512SU1): Ditto.
23843 * config/aarch64/aarch64-simd-builtins.def
23844 (aarch64_crypto_sha512hqv2di): New builtin.
23845 (aarch64_crypto_sha512h2qv2di): Ditto.
23846 (aarch64_crypto_sha512su0qv2di): Ditto.
23847 (aarch64_crypto_sha512su1qv2di): Ditto.
23848 (aarch64_eor3qv8hi): Ditto.
23849 (aarch64_rax1qv2di): Ditto.
23850 (aarch64_xarqv2di): Ditto.
23851 (aarch64_bcaxqv8hi): Ditto.
23852 * config/aarch64/aarch64-simd.md:
23853 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23854 (aarch64_crypto_sha512su0qv2di): Ditto.
23855 (aarch64_crypto_sha512su1qv2di): Ditto.
23856 (aarch64_eor3qv8hi): Ditto.
23857 (aarch64_rax1qv2di): Ditto.
23858 (aarch64_xarqv2di): Ditto.
23859 (aarch64_bcaxqv8hi): Ditto.
23860 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23861 (vsha512h2q_u64): Ditto.
23862 (vsha512su0q_u64): Ditto.
23863 (vsha512su1q_u64): Ditto.
23864 (veor3q_u16): Ditto.
23865 (vrax1q_u64): Ditto.
23866 (vxarq_u64): Ditto.
23867 (vbcaxq_u16): Ditto.
23868 * config/arm/types.md (crypto_sha512): New type attribute.
23869 (crypto_sha3): Ditto.
23870 (doc/invoke.texi): Document new sha3 option.
23872 2018-01-10 Michael Collison <michael.collison@arm.com>
23874 * config/aarch64/aarch64-builtins.c:
23875 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23876 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23877 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23878 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23879 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23880 (AARCH64_ISA_SM4): New ISA flag.
23881 (TARGET_SM4): New feature flag for sm4.
23882 * config/aarch64/aarch64-simd-builtins.def
23883 (aarch64_sm3ss1qv4si): Ditto.
23884 (aarch64_sm3tt1aq4si): Ditto.
23885 (aarch64_sm3tt1bq4si): Ditto.
23886 (aarch64_sm3tt2aq4si): Ditto.
23887 (aarch64_sm3tt2bq4si): Ditto.
23888 (aarch64_sm3partw1qv4si): Ditto.
23889 (aarch64_sm3partw2qv4si): Ditto.
23890 (aarch64_sm4eqv4si): Ditto.
23891 (aarch64_sm4ekeyqv4si): Ditto.
23892 * config/aarch64/aarch64-simd.md:
23893 (aarch64_sm3ss1qv4si): Ditto.
23894 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23895 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23896 (aarch64_sm4eqv4si): Ditto.
23897 (aarch64_sm4ekeyqv4si): Ditto.
23898 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23899 (sm3part_op): Ditto.
23900 (CRYPTO_SM3TT): Ditto.
23901 (CRYPTO_SM3PART): Ditto.
23902 (UNSPEC_SM3SS1): New unspec.
23903 (UNSPEC_SM3TT1A): Ditto.
23904 (UNSPEC_SM3TT1B): Ditto.
23905 (UNSPEC_SM3TT2A): Ditto.
23906 (UNSPEC_SM3TT2B): Ditto.
23907 (UNSPEC_SM3PARTW1): Ditto.
23908 (UNSPEC_SM3PARTW2): Ditto.
23909 (UNSPEC_SM4E): Ditto.
23910 (UNSPEC_SM4EKEY): Ditto.
23911 * config/aarch64/constraints.md (Ui2): New constraint.
23912 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23913 * config/arm/types.md (crypto_sm3): New type attribute.
23914 (crypto_sm4): Ditto.
23915 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23916 (vsm3tt1aq_u32): Ditto.
23917 (vsm3tt1bq_u32): Ditto.
23918 (vsm3tt2aq_u32): Ditto.
23919 (vsm3tt2bq_u32): Ditto.
23920 (vsm3partw1q_u32): Ditto.
23921 (vsm3partw2q_u32): Ditto.
23922 (vsm4eq_u32): Ditto.
23923 (vsm4ekeyq_u32): Ditto.
23924 (doc/invoke.texi): Document new sm4 option.
23926 2018-01-10 Michael Collison <michael.collison@arm.com>
23928 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23929 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23930 (AARCH64_FL_FOR_ARCH8_4): New.
23931 (AARCH64_FL_V8_4): New flag.
23932 (doc/invoke.texi): Document new armv8.4-a option.
23934 2018-01-10 Michael Collison <michael.collison@arm.com>
23936 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23937 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23938 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23939 * config/aarch64/aarch64-option-extension.def: Add
23940 AARCH64_OPT_EXTENSION of 'sha2'.
23941 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23942 (crypto): Disable sha2 and aes if crypto disabled.
23943 (crypto): Enable aes and sha2 if enabled.
23944 (simd): Disable sha2 and aes if simd disabled.
23945 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23947 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23948 (TARGET_SHA2): New feature flag for sha2.
23949 (TARGET_AES): New feature flag for aes.
23950 * config/aarch64/aarch64-simd.md:
23951 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23952 conditional on TARGET_AES.
23953 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23954 (aarch64_crypto_sha1hsi): Make pattern conditional
23956 (aarch64_crypto_sha1hv4si): Ditto.
23957 (aarch64_be_crypto_sha1hv4si): Ditto.
23958 (aarch64_crypto_sha1su1v4si): Ditto.
23959 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23960 (aarch64_crypto_sha1su0v4si): Ditto.
23961 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23962 (aarch64_crypto_sha256su0v4si): Ditto.
23963 (aarch64_crypto_sha256su1v4si): Ditto.
23964 (doc/invoke.texi): Document new aes and sha2 options.
23966 2018-01-10 Martin Sebor <msebor@redhat.com>
23968 PR tree-optimization/83781
23969 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23972 2018-01-11 Martin Sebor <msebor@gmail.com>
23973 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23975 PR tree-optimization/83501
23976 PR tree-optimization/81703
23978 * tree-ssa-strlen.c (get_string_cst): Rename...
23979 (get_string_len): ...to this. Handle global constants.
23980 (handle_char_store): Adjust.
23982 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
23983 Jim Wilson <jimw@sifive.com>
23985 * config/riscv/riscv-protos.h (riscv_output_return): New.
23986 * config/riscv/riscv.c (struct machine_function): New naked_p field.
23987 (riscv_attribute_table, riscv_output_return),
23988 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23989 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23990 (riscv_compute_frame_info): Only compute frame->mask if not a naked
23992 (riscv_expand_prologue): Add early return for naked function.
23993 (riscv_expand_epilogue): Likewise.
23994 (riscv_function_ok_for_sibcall): Return false for naked function.
23995 (riscv_set_current_function): New.
23996 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23997 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23998 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23999 * doc/extend.texi (RISC-V Function Attributes): New.
24001 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
24003 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
24004 check for 128-bit long double before checking TCmode.
24005 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
24006 128-bit long doubles before checking TFmode or TCmode.
24007 (FLOAT128_IBM_P): Likewise.
24009 2018-01-10 Martin Sebor <msebor@redhat.com>
24011 PR tree-optimization/83671
24012 * builtins.c (c_strlen): Unconditionally return zero for the empty
24014 Use -Warray-bounds for warnings.
24015 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
24016 for non-constant array indices with COMPONENT_REF, arrays of
24017 arrays, and pointers to arrays.
24018 (gimple_fold_builtin_strlen): Determine and set length range for
24019 non-constant character arrays.
24021 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
24023 PR middle-end/81897
24024 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
24027 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
24029 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
24031 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
24034 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
24035 VECTOR_MEM_ALTIVEC_OR_VSX_P.
24036 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
24037 indexed_or_indirect_operand predicate.
24038 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
24039 (*vsx_le_perm_load_v8hi): Likewise.
24040 (*vsx_le_perm_load_v16qi): Likewise.
24041 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
24042 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
24043 (*vsx_le_perm_store_v8hi): Likewise.
24044 (*vsx_le_perm_store_v16qi): Likewise.
24045 (eight unnamed splitters): Likewise.
24047 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
24049 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
24050 * config/rs6000/emmintrin.h: Likewise.
24051 * config/rs6000/mmintrin.h: Likewise.
24052 * config/rs6000/xmmintrin.h: Likewise.
24054 2018-01-10 David Malcolm <dmalcolm@redhat.com>
24057 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
24059 * tree.c (tree_nop_conversion): Return true for location wrapper
24061 (maybe_wrap_with_location): New function.
24062 (selftest::check_strip_nops): New function.
24063 (selftest::test_location_wrappers): New function.
24064 (selftest::tree_c_tests): Call it.
24065 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
24066 (maybe_wrap_with_location): New decl.
24067 (EXPR_LOCATION_WRAPPER_P): New macro.
24068 (location_wrapper_p): New inline function.
24069 (tree_strip_any_location_wrapper): New inline function.
24071 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
24074 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
24075 stack_realign_offset for the largest alignment of stack slot
24077 (ix86_find_max_used_stack_alignment): New function.
24078 (ix86_finalize_stack_frame_flags): Use it. Set
24079 max_used_stack_alignment if we don't realign stack.
24080 * config/i386/i386.h (machine_function): Add
24081 max_used_stack_alignment.
24083 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
24085 * config/arm/arm.opt (-mbranch-cost): New option.
24086 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
24089 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
24092 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
24093 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
24095 2018-01-10 Richard Biener <rguenther@suse.de>
24098 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
24099 early out so it also covers the case where we have a non-NULL
24102 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
24104 PR tree-optimization/83753
24105 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
24106 for non-strided grouped accesses if the number of elements is 1.
24108 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
24111 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
24112 * i386.h (TARGET_USE_GATHER): Define.
24113 * x86-tune.def (X86_TUNE_USE_GATHER): New.
24115 2018-01-10 Martin Liska <mliska@suse.cz>
24118 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
24119 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
24121 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
24122 CLEANUP_NO_PARTITIONING is not set.
24124 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
24126 * doc/rtl.texi: Remove documentation of (const ...) wrappers
24127 for vectors, as a partial revert of r254296.
24128 * rtl.h (const_vec_p): Delete.
24129 (const_vec_duplicate_p): Don't test for vector CONSTs.
24130 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
24131 * expmed.c (make_tree): Likewise.
24134 * common.md (E, F): Use CONSTANT_P instead of checking for
24136 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
24137 checking for CONST_VECTOR.
24139 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
24141 PR middle-end/83575
24142 * predict.c (force_edge_cold): Handle in more sane way edges
24143 with no prediction.
24145 2018-01-09 Carl Love <cel@us.ibm.com>
24147 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
24149 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
24150 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
24151 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
24152 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
24153 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
24154 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
24155 * config/rs6000/rs6000-protos.h: Add extern defition for
24156 rs6000_generate_float2_double_code.
24157 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
24159 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
24160 (float2_v2df): Add define_expand.
24162 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
24165 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
24166 op_mode in the force_to_mode call.
24168 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
24170 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
24171 instead of checking each element individually.
24172 (aarch64_evpc_uzp): Likewise.
24173 (aarch64_evpc_zip): Likewise.
24174 (aarch64_evpc_ext): Likewise.
24175 (aarch64_evpc_rev): Likewise.
24176 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
24177 instead of checking each element individually. Return true without
24179 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
24180 whether all selected elements come from the same input, instead of
24181 checking each element individually. Remove calls to gen_rtx_REG,
24182 start_sequence and end_sequence and instead assert that no rtl is
24185 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
24187 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
24188 order of HIGH and CONST checks.
24190 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
24192 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
24193 if the destination isn't an SSA_NAME.
24195 2018-01-09 Richard Biener <rguenther@suse.de>
24197 PR tree-optimization/83668
24198 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
24200 (canonicalize_loop_form): ... here, renamed from ...
24201 (canonicalize_loop_closed_ssa_form): ... this and amended to
24202 swap successor edges for loop exit blocks to make us use
24203 the RPO order we need for initial schedule generation.
24205 2018-01-09 Joseph Myers <joseph@codesourcery.com>
24207 PR tree-optimization/64811
24208 * match.pd: When optimizing comparisons with Inf, avoid
24209 introducing or losing exceptions from comparisons with NaN.
24211 2018-01-09 Martin Liska <mliska@suse.cz>
24214 * asan.c (shadow_mem_size): Add gcc_assert.
24216 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
24218 Don't save registers in main().
24221 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
24222 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
24223 * config/avr/avr.c (avr_set_current_function): Don't error if
24224 naked, OS_task or OS_main are specified at the same time.
24225 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
24227 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
24229 * common/config/avr/avr-common.c (avr_option_optimization_table):
24230 Switch on -mmain-is-OS_task for optimizing compilations.
24232 2018-01-09 Richard Biener <rguenther@suse.de>
24234 PR tree-optimization/83572
24235 * graphite.c: Include cfganal.h.
24236 (graphite_transform_loops): Connect infinite loops to exit
24237 and remove fake edges at the end.
24239 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
24241 * ipa-inline.c (edge_badness): Revert accidental checkin.
24243 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
24246 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
24247 symbols; not inline clones.
24249 2018-01-09 Jakub Jelinek <jakub@redhat.com>
24252 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
24253 hard registers. Formatting fixes.
24255 PR preprocessor/83722
24256 * gcc.c (try_generate_repro): Pass
24257 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
24258 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
24261 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
24262 Kito Cheng <kito.cheng@gmail.com>
24264 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
24265 (riscv_leaf_function_p): Delete.
24266 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
24268 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24270 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
24272 (do_ifelse): New function.
24273 (do_isel): New function.
24274 (do_sub3): New function.
24275 (do_add3): New function.
24276 (do_load_mask_compare): New function.
24277 (do_overlap_load_compare): New function.
24278 (expand_compare_loop): New function.
24279 (expand_block_compare): Call expand_compare_loop() when appropriate.
24280 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
24281 option description.
24282 (-mblock-compare-inline-loop-limit): New option.
24284 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24287 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
24288 Reverse order of second and third operands in first alternative.
24289 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
24290 of first and second elements in UNSPEC_VPERMR vector.
24291 (altivec_expand_vec_perm_le): Likewise.
24293 2018-01-08 Jeff Law <law@redhat.com>
24295 PR rtl-optimizatin/81308
24296 * tree-switch-conversion.c (cfg_altered): New file scoped static.
24297 (process_switch): If group_case_labels makes a change, then set
24299 (pass_convert_switch::execute): If a switch is converted, then
24300 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
24302 PR rtl-optimization/81308
24303 * recog.c (split_all_insns): Conditionally cleanup the CFG after
24306 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
24308 PR target/83663 - Revert r255946
24309 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
24310 generation for cases where splatting a value is not useful.
24311 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
24312 across a vec_duplicate and a paradoxical subreg forming a vector
24313 mode to a vec_concat.
24315 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24317 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
24318 -march=armv8.3-a variants.
24319 * config/arm/t-multilib: Likewise.
24320 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
24322 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24324 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
24326 (cceq_ior_compare_complement): Give it a name so I can use it, and
24327 change boolean_or_operator predicate to boolean_operator so it can
24328 be used to generate a crand.
24329 (eqne): New code iterator.
24330 (bd/bd_neg): New code_attrs.
24331 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
24332 a single define_insn.
24333 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
24334 decrement (bdnzt/bdnzf/bdzt/bdzf).
24335 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
24336 with the new names of the branch decrement patterns, and added the
24337 names of the branch decrement conditional patterns.
24339 2018-01-08 Richard Biener <rguenther@suse.de>
24341 PR tree-optimization/83563
24342 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
24345 2018-01-08 Richard Biener <rguenther@suse.de>
24347 PR middle-end/83713
24348 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
24350 2018-01-08 Richard Biener <rguenther@suse.de>
24352 PR tree-optimization/83685
24353 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
24354 references to abnormals.
24356 2018-01-08 Richard Biener <rguenther@suse.de>
24359 * dwarf2out.c (output_indirect_strings): Handle empty
24360 skeleton_debug_str_hash.
24361 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
24363 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
24365 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
24366 (emit_store_direct): Likewise.
24367 (arc_trampoline_adjust_address): Likewise.
24368 (arc_asm_trampoline_template): New function.
24369 (arc_initialize_trampoline): Use asm_trampoline_template.
24370 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
24371 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
24372 * config/arc/arc.md (flush_icache): Delete pattern.
24374 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
24376 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
24377 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
24380 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
24383 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
24384 by not USED_FOR_TARGET.
24385 (make_pass_resolve_sw_modes): Likewise.
24387 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
24389 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
24392 2018-01-08 Richard Biener <rguenther@suse.de>
24394 PR middle-end/83580
24395 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
24397 2018-01-08 Richard Biener <rguenther@suse.de>
24399 PR middle-end/83517
24400 * match.pd ((t * 2) / 2) -> t): Add missing :c.
24402 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
24404 PR middle-end/81897
24405 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
24406 basic blocks with a small number of successors.
24407 (convert_control_dep_chain_into_preds): Improve handling of
24409 (dump_predicates): Split apart into...
24410 (dump_pred_chain): ...here...
24411 (dump_pred_info): ...and here.
24412 (can_one_predicate_be_invalidated_p): Add debugging printfs.
24413 (can_chain_union_be_invalidated_p): Improve check for invalidation
24415 (uninit_uses_cannot_happen): Avoid unnecessary if
24416 convert_control_dep_chain_into_preds yielded nothing.
24418 2018-01-06 Martin Sebor <msebor@redhat.com>
24420 PR tree-optimization/83640
24421 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
24422 subtracting negative offset from size.
24423 (builtin_access::overlap): Adjust offset bounds of the access to fall
24424 within the size of the object if possible.
24426 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
24428 PR rtl-optimization/83699
24429 * expmed.c (extract_bit_field_1): Restrict the vector usage of
24430 extract_bit_field_as_subreg to cases in which the extracted
24431 value is also a vector.
24433 * lra-constraints.c (process_alt_operands): Test for the equivalence
24434 substitutions when detecting a possible reload cycle.
24436 2018-01-06 Jakub Jelinek <jakub@redhat.com>
24439 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
24440 by default if flag_selective_schedling{,2}. Formatting fixes.
24442 PR rtl-optimization/83682
24443 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
24444 if it has non-VECTOR_MODE element mode.
24445 (vec_duplicate_p): Likewise.
24447 PR middle-end/83694
24448 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
24449 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
24451 2018-01-05 Jakub Jelinek <jakub@redhat.com>
24454 * config/i386/i386-builtin.def
24455 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
24456 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
24457 Require also OPTION_MASK_ISA_AVX512F in addition to
24458 OPTION_MASK_ISA_GFNI.
24459 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
24460 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
24461 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
24462 to OPTION_MASK_ISA_GFNI.
24463 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
24464 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
24465 OPTION_MASK_ISA_AVX512BW.
24466 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
24467 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
24468 addition to OPTION_MASK_ISA_GFNI.
24469 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
24470 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
24471 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
24472 to OPTION_MASK_ISA_GFNI.
24473 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
24474 a requirement for all ISAs rather than any of them with a few
24476 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
24478 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
24479 bitmasks to be enabled with 3 exceptions, instead of requiring any
24480 enabled ISA with lots of exceptions.
24481 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
24482 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
24483 Change avx512bw in isa attribute to avx512f.
24484 * config/i386/sgxintrin.h: Add license boilerplate.
24485 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
24486 to __AVX512F__ and __AVX512VL to __AVX512VL__.
24487 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
24488 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
24490 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
24491 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
24492 temporarily sse2 rather than sse if not enabled already.
24495 * config/i386/sse.md (VI248_VLBW): Rename to ...
24496 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
24497 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
24498 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
24499 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
24500 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
24501 mode iterator instead of VI248_VLBW.
24503 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
24505 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
24506 (record_modified): Skip clobbers; add debug output.
24507 (param_change_prob): Use sreal frequencies.
24509 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
24511 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
24512 punt for user-aligned variables.
24514 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
24516 * tree-chrec.c (chrec_contains_symbols): Return true for
24519 2018-01-05 Sudakshina Das <sudi.das@arm.com>
24522 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
24523 of (x|y) == x for BICS pattern.
24525 2018-01-05 Jakub Jelinek <jakub@redhat.com>
24527 PR tree-optimization/83605
24528 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
24529 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
24532 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
24534 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
24535 * config/epiphany/rtems.h: New file.
24537 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24538 Uros Bizjak <ubizjak@gmail.com>
24541 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
24542 QIreg_operand instead of register_operand predicate.
24543 * config/i386/i386.c (ix86_rop_should_change_byte_p,
24544 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
24545 comments instead of -fmitigate[-_]rop.
24547 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24550 * cgraphunit.c (symbol_table::compile): Switch to text_section
24551 before calling assembly_start debug hook.
24552 * run-rtl-passes.c (run_rtl_passes): Likewise.
24555 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24557 * tree-vrp.c (extract_range_from_binary_expr_1): Check
24558 range_int_cst_p rather than !symbolic_range_p before calling
24559 extract_range_from_multiplicative_op_1.
24561 2018-01-04 Jeff Law <law@redhat.com>
24563 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
24564 redundant test in assertion.
24566 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24568 * doc/rtl.texi: Document machine_mode wrapper classes.
24570 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24572 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
24573 using tree_to_uhwi.
24575 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24577 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
24578 the VEC_PERM_EXPR fold to fail.
24580 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24583 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
24584 to switched_sections.
24586 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24589 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
24590 test for d.testing.
24592 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
24595 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
24596 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
24598 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24601 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
24602 is BLKmode and bitpos not zero or mode change is needed.
24604 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24607 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
24610 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
24613 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
24614 instead of MULT rtx. Update all corresponding splitters.
24615 (*saddl_se): Ditto.
24616 (*ssub<modesuffix>): Ditto.
24617 (*ssubl_se): Ditto.
24618 (*cmp_sadd_di): Update split patterns.
24619 (*cmp_sadd_si): Ditto.
24620 (*cmp_sadd_sidi): Ditto.
24621 (*cmp_ssub_di): Ditto.
24622 (*cmp_ssub_si): Ditto.
24623 (*cmp_ssub_sidi): Ditto.
24624 * config/alpha/predicates.md (const23_operand): New predicate.
24625 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
24626 Look for ASHIFT, not MULT inner operand.
24627 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
24629 2018-01-04 Martin Liska <mliska@suse.cz>
24631 PR gcov-profile/83669
24632 * gcov.c (output_intermediate_file): Add version to intermediate
24634 * doc/gcov.texi: Document new field 'version' in intermediate
24635 file format. Fix location of '-k' option of gcov command.
24637 2018-01-04 Martin Liska <mliska@suse.cz>
24640 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
24642 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24644 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
24646 2018-01-03 Martin Sebor <msebor@redhat.com>
24648 PR tree-optimization/83655
24649 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
24650 checking calls with invalid arguments.
24652 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24654 * tree-vect-stmts.c (vect_get_store_rhs): New function.
24655 (vectorizable_mask_load_store): Delete.
24656 (vectorizable_call): Return false for masked loads and stores.
24657 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
24658 instead of gimple_assign_rhs1.
24659 (vectorizable_load): Handle IFN_MASK_LOAD.
24660 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
24662 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24664 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
24666 (vectorizable_mask_load_store): ...here.
24667 (vectorizable_load): ...and here.
24669 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24671 * tree-vect-stmts.c (vect_build_all_ones_mask)
24672 (vect_build_zero_merge_argument): New functions, split out from...
24673 (vectorizable_load): ...here.
24675 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24677 * tree-vect-stmts.c (vect_check_store_rhs): New function,
24679 (vectorizable_mask_load_store): ...here.
24680 (vectorizable_store): ...and here.
24682 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24684 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
24686 (vectorizable_mask_load_store): ...here.
24688 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24690 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
24691 (vect_model_store_cost): Take a vec_load_store_type instead of a
24693 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
24694 (vect_model_store_cost): Take a vec_load_store_type instead of a
24696 (vectorizable_mask_load_store): Update accordingly.
24697 (vectorizable_store): Likewise.
24698 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
24700 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24702 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
24703 IFN_MASK_LOAD calls here rather than...
24704 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
24706 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24707 Alan Hayward <alan.hayward@arm.com>
24708 David Sherwood <david.sherwood@arm.com>
24710 * expmed.c (extract_bit_field_1): For vector extracts,
24711 fall back to extract_bit_field_as_subreg if vec_extract
24714 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24715 Alan Hayward <alan.hayward@arm.com>
24716 David Sherwood <david.sherwood@arm.com>
24718 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
24719 they are variable or constant sized.
24720 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
24721 slots for constant-sized data.
24723 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24724 Alan Hayward <alan.hayward@arm.com>
24725 David Sherwood <david.sherwood@arm.com>
24727 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
24728 handling COND_EXPRs with boolean comparisons, try to find a better
24729 basis for the mask type than the boolean itself.
24731 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24733 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
24734 is calculated and how it can be overridden.
24735 * genmodes.c (max_bitsize_mode_any_mode): New variable.
24736 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
24738 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
24741 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24742 Alan Hayward <alan.hayward@arm.com>
24743 David Sherwood <david.sherwood@arm.com>
24745 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
24746 Remove the mode argument.
24747 (aarch64_simd_valid_immediate): Remove the mode and inverse
24749 * config/aarch64/iterators.md (bitsize): New iterator.
24750 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
24751 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
24752 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
24753 aarch64_simd_valid_immediate.
24754 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
24755 (aarch64_reg_or_bic_imm): Likewise.
24756 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
24757 with an insn_type enum and msl with a modifier_type enum.
24758 Replace element_width with a scalar_mode. Change the shift
24759 to unsigned int. Add constructors for scalar_float_mode and
24760 scalar_int_mode elements.
24761 (aarch64_vect_float_const_representable_p): Delete.
24762 (aarch64_can_const_movi_rtx_p)
24763 (aarch64_simd_scalar_immediate_valid_for_move)
24764 (aarch64_simd_make_constant): Update call to
24765 aarch64_simd_valid_immediate.
24766 (aarch64_advsimd_valid_immediate_hs): New function.
24767 (aarch64_advsimd_valid_immediate): Likewise.
24768 (aarch64_simd_valid_immediate): Remove mode and inverse
24769 arguments. Rewrite to use the above. Use const_vec_duplicate_p
24770 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
24771 and aarch64_float_const_representable_p on the result.
24772 (aarch64_output_simd_mov_immediate): Remove mode argument.
24773 Update call to aarch64_simd_valid_immediate and use of
24774 simd_immediate_info.
24775 (aarch64_output_scalar_simd_mov_immediate): Update call
24778 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24779 Alan Hayward <alan.hayward@arm.com>
24780 David Sherwood <david.sherwood@arm.com>
24782 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
24783 (mode_nunits): Likewise CONST_MODE_NUNITS.
24784 * machmode.def (ADJUST_NUNITS): Document.
24785 * genmodes.c (mode_data::need_nunits_adj): New field.
24786 (blank_mode): Update accordingly.
24787 (adj_nunits): New variable.
24788 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
24790 (emit_mode_size_inline): Set need_bytesize_adj for all modes
24791 listed in adj_nunits.
24792 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
24793 listed in adj_nunits. Don't emit case statements for such modes.
24794 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
24795 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
24796 nothing if adj_nunits is nonnull.
24797 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
24798 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
24799 (emit_mode_fbit): Update use of print_maybe_const_decl.
24800 (emit_move_size): Likewise. Treat the array as non-const
24802 (emit_mode_adjustments): Handle adj_nunits.
24804 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24806 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
24807 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
24808 (VECTOR_MODES): Use it.
24809 (make_vector_modes): Take the prefix as an argument.
24811 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24812 Alan Hayward <alan.hayward@arm.com>
24813 David Sherwood <david.sherwood@arm.com>
24815 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
24816 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
24817 for MODE_VECTOR_BOOL.
24818 * machmode.def (VECTOR_BOOL_MODE): Document.
24819 * genmodes.c (VECTOR_BOOL_MODE): New macro.
24820 (make_vector_bool_mode): New function.
24821 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
24823 * lto-streamer-in.c (lto_input_mode_table): Likewise.
24824 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
24826 * stor-layout.c (int_mode_for_mode): Likewise.
24827 * tree.c (build_vector_type_for_mode): Likewise.
24828 * varasm.c (output_constant_pool_2): Likewise.
24829 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
24830 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
24831 for MODE_VECTOR_BOOL.
24832 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24833 of mode class checks.
24834 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24835 instead of a list of mode class checks.
24836 (expand_vector_scalar_condition): Likewise.
24837 (type_for_widest_vector_mode): Handle BImode as an inner mode.
24839 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24840 Alan Hayward <alan.hayward@arm.com>
24841 David Sherwood <david.sherwood@arm.com>
24843 * machmode.h (mode_size): Change from unsigned short to
24845 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24846 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24847 or if measurement_type is not polynomial.
24848 (fixed_size_mode::includes_p): Check for constant-sized modes.
24849 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24850 return a poly_uint16 rather than an unsigned short.
24851 (emit_mode_size): Change the type of mode_size from unsigned short
24852 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
24853 (emit_mode_adjustments): Cope with polynomial vector sizes.
24854 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24856 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24858 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24859 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24860 * caller-save.c (setup_save_areas): Likewise.
24861 (replace_reg_with_saved_mem): Likewise.
24862 * calls.c (emit_library_call_value_1): Likewise.
24863 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24864 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24865 (gen_lowpart_for_combine): Likewise.
24866 * convert.c (convert_to_integer_1): Likewise.
24867 * cse.c (equiv_constant, cse_insn): Likewise.
24868 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24869 (cselib_subst_to_values): Likewise.
24870 * dce.c (word_dce_process_block): Likewise.
24871 * df-problems.c (df_word_lr_mark_ref): Likewise.
24872 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24873 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24874 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24875 (rtl_for_decl_location): Likewise.
24876 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24877 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24878 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24879 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24880 (expand_expr_real_1): Likewise.
24881 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24882 (pad_below): Likewise.
24883 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24884 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24885 * ira.c (get_subreg_tracking_sizes): Likewise.
24886 * ira-build.c (ira_create_allocno_objects): Likewise.
24887 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24888 (ira_sort_regnos_for_alter_reg): Likewise.
24889 * ira-costs.c (record_operand_costs): Likewise.
24890 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24891 (resolve_simple_move): Likewise.
24892 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24893 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24894 (lra_constraints): Likewise.
24895 (CONST_POOL_OK_P): Reject variable-sized modes.
24896 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24897 (add_pseudo_to_slot, lra_spill): Likewise.
24898 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24899 * optabs-query.c (get_best_extraction_insn): Likewise.
24900 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24901 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24902 (expand_mult_highpart, valid_multiword_target_p): Likewise.
24903 * recog.c (offsettable_address_addr_space_p): Likewise.
24904 * regcprop.c (maybe_mode_change): Likewise.
24905 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24906 * regrename.c (build_def_use): Likewise.
24907 * regstat.c (dump_reg_info): Likewise.
24908 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24909 (find_reloads, find_reloads_subreg_address): Likewise.
24910 * reload1.c (eliminate_regs_1): Likewise.
24911 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24912 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24913 (simplify_binary_operation_1, simplify_subreg): Likewise.
24914 * targhooks.c (default_function_arg_padding): Likewise.
24915 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24916 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24917 (verify_gimple_assign_ternary): Likewise.
24918 * tree-inline.c (estimate_move_cost): Likewise.
24919 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24920 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24921 (get_address_cost_ainc): Likewise.
24922 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24923 (vect_supportable_dr_alignment): Likewise.
24924 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24925 (vectorizable_reduction): Likewise.
24926 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24927 (vectorizable_operation, vectorizable_load): Likewise.
24928 * tree.c (build_same_sized_truth_vector_type): Likewise.
24929 * valtrack.c (cleanup_auto_inc_dec): Likewise.
24930 * var-tracking.c (emit_note_insn_var_location): Likewise.
24931 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24932 (ADDR_VEC_ALIGN): Likewise.
24934 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24935 Alan Hayward <alan.hayward@arm.com>
24936 David Sherwood <david.sherwood@arm.com>
24938 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24940 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24941 or if measurement_type is polynomial.
24942 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24943 * combine.c (make_extraction): Likewise.
24944 * dse.c (find_shift_sequence): Likewise.
24945 * dwarf2out.c (mem_loc_descriptor): Likewise.
24946 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24947 (extract_bit_field, extract_low_bits): Likewise.
24948 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24949 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24950 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24951 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24952 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24953 * reload.c (find_reloads): Likewise.
24954 * reload1.c (alter_reg): Likewise.
24955 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24956 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24957 * tree-if-conv.c (predicate_mem_writes): Likewise.
24958 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24959 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24960 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24961 * valtrack.c (dead_debug_insert_temp): Likewise.
24962 * varasm.c (mergeable_constant_section): Likewise.
24963 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24965 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24966 Alan Hayward <alan.hayward@arm.com>
24967 David Sherwood <david.sherwood@arm.com>
24969 * expr.c (expand_assignment): Cope with polynomial mode sizes
24970 when assigning to a CONCAT.
24972 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24973 Alan Hayward <alan.hayward@arm.com>
24974 David Sherwood <david.sherwood@arm.com>
24976 * machmode.h (mode_precision): Change from unsigned short to
24978 (mode_to_precision): Return a poly_uint16 rather than an unsigned
24980 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24981 or if measurement_type is not polynomial.
24982 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
24983 in which the mode is already known to be a scalar_int_mode.
24984 * genmodes.c (emit_mode_precision): Change the type of mode_precision
24985 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
24987 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24988 for GET_MODE_PRECISION.
24989 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24990 for GET_MODE_PRECISION.
24991 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24993 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24994 (expand_field_assignment, make_extraction): Likewise.
24995 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24996 (get_last_value): Likewise.
24997 * convert.c (convert_to_integer_1): Likewise.
24998 * cse.c (cse_insn): Likewise.
24999 * expr.c (expand_expr_real_1): Likewise.
25000 * lra-constraints.c (simplify_operand_subreg): Likewise.
25001 * optabs-query.c (can_atomic_load_p): Likewise.
25002 * optabs.c (expand_atomic_load): Likewise.
25003 (expand_atomic_store): Likewise.
25004 * ree.c (combine_reaching_defs): Likewise.
25005 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
25006 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
25007 * tree.h (type_has_mode_precision_p): Likewise.
25008 * ubsan.c (instrument_si_overflow): Likewise.
25010 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25011 Alan Hayward <alan.hayward@arm.com>
25012 David Sherwood <david.sherwood@arm.com>
25014 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
25015 polynomial numbers of units.
25016 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
25017 (valid_vector_subparts_p): New function.
25018 (build_vector_type): Remove temporary shim and take the number
25019 of units as a poly_uint64 rather than an int.
25020 (build_opaque_vector_type): Take the number of units as a
25021 poly_uint64 rather than an int.
25022 * tree.c (build_vector_from_ctor): Handle polynomial
25023 TYPE_VECTOR_SUBPARTS.
25024 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
25025 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
25026 (build_vector_from_val): If the number of units is variable,
25027 use build_vec_duplicate_cst for constant operands and
25028 VEC_DUPLICATE_EXPR otherwise.
25029 (make_vector_type): Remove temporary is_constant ().
25030 (build_vector_type, build_opaque_vector_type): Take the number of
25031 units as a poly_uint64 rather than an int.
25032 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
25034 * cfgexpand.c (expand_debug_expr): Likewise.
25035 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
25036 (store_constructor, expand_expr_real_1): Likewise.
25037 (const_scalar_mask_from_tree): Likewise.
25038 * fold-const-call.c (fold_const_reduction): Likewise.
25039 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
25040 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
25041 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
25042 (fold_relational_const): Likewise.
25043 (native_interpret_vector): Likewise. Change the size from an
25044 int to an unsigned int.
25045 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
25046 TYPE_VECTOR_SUBPARTS.
25047 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
25048 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
25049 duplicating a non-constant operand into a variable-length vector.
25050 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
25051 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
25052 * ipa-icf.c (sem_variable::equals): Likewise.
25053 * match.pd: Likewise.
25054 * omp-simd-clone.c (simd_clone_subparts): Likewise.
25055 * print-tree.c (print_node): Likewise.
25056 * stor-layout.c (layout_type): Likewise.
25057 * targhooks.c (default_builtin_vectorization_cost): Likewise.
25058 * tree-cfg.c (verify_gimple_comparison): Likewise.
25059 (verify_gimple_assign_binary): Likewise.
25060 (verify_gimple_assign_ternary): Likewise.
25061 (verify_gimple_assign_single): Likewise.
25062 * tree-pretty-print.c (dump_generic_node): Likewise.
25063 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25064 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
25065 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
25066 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
25067 (vect_shift_permute_load_chain): Likewise.
25068 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
25069 (expand_vector_condition, optimize_vector_constructor): Likewise.
25070 (lower_vec_perm, get_compute_type): Likewise.
25071 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
25072 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
25073 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
25074 (vect_recog_mask_conversion_pattern): Likewise.
25075 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
25076 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
25077 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25078 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
25079 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
25080 (vectorizable_shift, vectorizable_operation, vectorizable_store)
25081 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
25082 (supportable_widening_operation): Likewise.
25083 (supportable_narrowing_operation): Likewise.
25084 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
25086 * varasm.c (output_constant): Likewise.
25088 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25089 Alan Hayward <alan.hayward@arm.com>
25090 David Sherwood <david.sherwood@arm.com>
25092 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
25093 so that both the length == 3 and length != 3 cases set up their
25094 own permute vectors. Add comments explaining why we know the
25095 number of elements is constant.
25096 (vect_permute_load_chain): Likewise.
25098 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25099 Alan Hayward <alan.hayward@arm.com>
25100 David Sherwood <david.sherwood@arm.com>
25102 * machmode.h (mode_nunits): Change from unsigned char to
25104 (ONLY_FIXED_SIZE_MODES): New macro.
25105 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
25106 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
25107 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
25109 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
25110 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
25111 or if measurement_type is not polynomial.
25112 * genmodes.c (ZERO_COEFFS): New macro.
25113 (emit_mode_nunits_inline): Make mode_nunits_inline return a
25115 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
25116 Use ZERO_COEFFS when emitting initializers.
25117 * data-streamer.h (bp_pack_poly_value): New function.
25118 (bp_unpack_poly_value): Likewise.
25119 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
25120 for GET_MODE_NUNITS.
25121 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
25122 for GET_MODE_NUNITS.
25123 * tree.c (make_vector_type): Remove temporary shim and make
25124 the real function take the number of units as a poly_uint64
25125 rather than an int.
25126 (build_vector_type_for_mode): Handle polynomial nunits.
25127 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
25128 * emit-rtl.c (const_vec_series_p_1): Likewise.
25129 (gen_rtx_CONST_VECTOR): Likewise.
25130 * fold-const.c (test_vec_duplicate_folding): Likewise.
25131 * genrecog.c (validate_pattern): Likewise.
25132 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
25133 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
25134 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
25135 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
25136 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
25137 * rtlanal.c (subreg_get_info): Likewise.
25138 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25139 (vect_grouped_load_supported): Likewise.
25140 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
25141 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
25142 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
25143 (simplify_const_unary_operation, simplify_binary_operation_1)
25144 (simplify_const_binary_operation, simplify_ternary_operation)
25145 (test_vector_ops_duplicate, test_vector_ops): Likewise.
25146 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
25147 instead of CONST_VECTOR_NUNITS.
25148 * varasm.c (output_constant_pool_2): Likewise.
25149 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
25150 explicit-encoded elements in the XVEC for variable-length vectors.
25152 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25154 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
25156 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25157 Alan Hayward <alan.hayward@arm.com>
25158 David Sherwood <david.sherwood@arm.com>
25160 * coretypes.h (fixed_size_mode): Declare.
25161 (fixed_size_mode_pod): New typedef.
25162 * builtins.h (target_builtins::x_apply_args_mode)
25163 (target_builtins::x_apply_result_mode): Change type to
25164 fixed_size_mode_pod.
25165 * builtins.c (apply_args_size, apply_result_size, result_vector)
25166 (expand_builtin_apply_args_1, expand_builtin_apply)
25167 (expand_builtin_return): Update accordingly.
25169 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25171 * cse.c (hash_rtx_cb): Hash only the encoded elements.
25172 * cselib.c (cselib_hash_rtx): Likewise.
25173 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
25174 CONST_VECTOR encoding.
25176 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25177 Jeff Law <law@redhat.com>
25180 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
25181 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
25182 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
25183 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
25186 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
25187 explicitly probe *sp in a noreturn function if there were any callee
25188 register saves or frame pointer is needed.
25190 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25193 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
25194 BLKmode for ternary, binary or unary expressions.
25197 * var-tracking.c (delete_vta_debug_insn): New inline function.
25198 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
25199 insns from get_insns () to NULL instead of each bb separately.
25200 Use delete_vta_debug_insn. No longer static.
25201 (vt_debug_insns_local, variable_tracking_main_1): Adjust
25202 delete_vta_debug_insns callers.
25203 * rtl.h (delete_vta_debug_insns): Declare.
25204 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
25205 instead of variable_tracking_main.
25207 2018-01-03 Martin Sebor <msebor@redhat.com>
25209 PR tree-optimization/83603
25210 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
25211 arguments past the endof the argument list in functions declared
25212 without a prototype.
25213 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
25214 Avoid checking when arguments are null.
25216 2018-01-03 Martin Sebor <msebor@redhat.com>
25219 * doc/extend.texi (attribute const): Fix a typo.
25220 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
25221 issuing -Wsuggest-attribute for void functions.
25223 2018-01-03 Martin Sebor <msebor@redhat.com>
25225 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
25226 offset_int::from instead of wide_int::to_shwi.
25227 (maybe_diag_overlap): Remove assertion.
25228 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
25229 * gimple-ssa-sprintf.c (format_directive): Same.
25230 (parse_directive): Same.
25231 (sprintf_dom_walker::compute_format_length): Same.
25232 (try_substitute_return_value): Same.
25234 2018-01-03 Jeff Law <law@redhat.com>
25236 PR middle-end/83654
25237 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
25238 non-constant residual for zero at runtime and avoid probing in
25239 that case. Reorganize code for trailing problem to mirror handling
25242 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25244 PR tree-optimization/83501
25245 * tree-ssa-strlen.c (get_string_cst): New.
25246 (handle_char_store): Call get_string_cst.
25248 2018-01-03 Martin Liska <mliska@suse.cz>
25250 PR tree-optimization/83593
25251 * tree-ssa-strlen.c: Include tree-cfg.h.
25252 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
25253 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
25254 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
25256 (strlen_dom_walker::before_dom_children): Call
25257 gimple_purge_dead_eh_edges. Dump tranformation with details
25259 (strlen_dom_walker::before_dom_children): Update call by adding
25260 new argument cleanup_eh.
25261 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
25263 2018-01-03 Martin Liska <mliska@suse.cz>
25266 * cif-code.def (VARIADIC_THUNK): New enum value.
25267 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
25270 2018-01-03 Jan Beulich <jbeulich@suse.com>
25272 * sse.md (mov<mode>_internal): Tighten condition for when to use
25273 vmovdqu<ssescalarsize> for TI and OI modes.
25275 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25277 Update copyright years.
25279 2018-01-03 Martin Liska <mliska@suse.cz>
25282 * ipa-visibility.c (function_and_variable_visibility): Skip
25283 functions with noipa attribure.
25285 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25287 * gcc.c (process_command): Update copyright notice dates.
25288 * gcov-dump.c (print_version): Ditto.
25289 * gcov.c (print_version): Ditto.
25290 * gcov-tool.c (print_version): Ditto.
25291 * gengtype.c (create_file): Ditto.
25292 * doc/cpp.texi: Bump @copying's copyright year.
25293 * doc/cppinternals.texi: Ditto.
25294 * doc/gcc.texi: Ditto.
25295 * doc/gccint.texi: Ditto.
25296 * doc/gcov.texi: Ditto.
25297 * doc/install.texi: Ditto.
25298 * doc/invoke.texi: Ditto.
25300 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25302 * vector-builder.h (vector_builder::m_full_nelts): Change from
25303 unsigned int to poly_uint64.
25304 (vector_builder::full_nelts): Update prototype accordingly.
25305 (vector_builder::new_vector): Likewise.
25306 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
25307 (vector_builder::operator ==): Likewise.
25308 (vector_builder::finalize): Likewise.
25309 * int-vector-builder.h (int_vector_builder::int_vector_builder):
25310 Take the number of elements as a poly_uint64 rather than an
25312 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
25313 from unsigned int to poly_uint64.
25314 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
25315 (vec_perm_indices::new_vector): Likewise.
25316 (vec_perm_indices::length): Likewise.
25317 (vec_perm_indices::nelts_per_input): Likewise.
25318 (vec_perm_indices::input_nelts): Likewise.
25319 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
25320 number of elements per input as a poly_uint64 rather than an
25321 unsigned int. Use the original encoding for variable-length
25322 vectors, rather than clamping each individual element.
25323 For the second and subsequent elements in each pattern,
25324 clamp the step and base before clamping their sum.
25325 (vec_perm_indices::series_p): Handle polynomial element counts.
25326 (vec_perm_indices::all_in_range_p): Likewise.
25327 (vec_perm_indices_to_tree): Likewise.
25328 (vec_perm_indices_to_rtx): Likewise.
25329 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
25330 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
25331 (tree_vector_builder::new_binary_operation): Handle polynomial
25332 element counts. Return false if we need to know the number
25333 of elements at compile time.
25334 * fold-const.c (fold_vec_perm): Punt if the number of elements
25335 isn't known at compile time.
25337 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25339 * vec-perm-indices.h (vec_perm_builder): Change element type
25340 from HOST_WIDE_INT to poly_int64.
25341 (vec_perm_indices::element_type): Update accordingly.
25342 (vec_perm_indices::clamp): Handle polynomial element_types.
25343 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25344 (vec_perm_indices::all_in_range_p): Likewise.
25345 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
25347 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
25348 polynomial vec_perm_indices element types.
25349 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
25350 * fold-const.c (fold_vec_perm): Likewise.
25351 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
25352 * tree-vect-generic.c (lower_vec_perm): Likewise.
25353 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25354 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
25355 element type to HOST_WIDE_INT.
25357 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25358 Alan Hayward <alan.hayward@arm.com>
25359 David Sherwood <david.sherwood@arm.com>
25361 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
25362 rather than an int. Use plus_constant.
25363 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
25364 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
25366 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25367 Alan Hayward <alan.hayward@arm.com>
25368 David Sherwood <david.sherwood@arm.com>
25370 * calls.c (emit_call_1, expand_call): Change struct_value_size from
25371 a HOST_WIDE_INT to a poly_int64.
25373 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25374 Alan Hayward <alan.hayward@arm.com>
25375 David Sherwood <david.sherwood@arm.com>
25377 * calls.c (load_register_parameters): Cope with polynomial
25378 mode sizes. Require a constant size for BLKmode parameters
25379 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
25380 forces a parameter to be padded at the lsb end in order to
25381 fill a complete number of words, require the parameter size
25382 to be ordered wrt UNITS_PER_WORD.
25384 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25385 Alan Hayward <alan.hayward@arm.com>
25386 David Sherwood <david.sherwood@arm.com>
25388 * reload1.c (spill_stack_slot_width): Change element type
25389 from unsigned int to poly_uint64_pod.
25390 (alter_reg): Treat mode sizes as polynomial.
25392 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25393 Alan Hayward <alan.hayward@arm.com>
25394 David Sherwood <david.sherwood@arm.com>
25396 * reload.c (complex_word_subreg_p): New function.
25397 (reload_inner_reg_of_subreg, push_reload): Use it.
25399 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25400 Alan Hayward <alan.hayward@arm.com>
25401 David Sherwood <david.sherwood@arm.com>
25403 * lra-constraints.c (process_alt_operands): Reject matched
25404 operands whose sizes aren't ordered.
25405 (match_reload): Refer to this check here.
25407 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25408 Alan Hayward <alan.hayward@arm.com>
25409 David Sherwood <david.sherwood@arm.com>
25411 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
25412 that the mode size is in the set {1, 2, 4, 8, 16}.
25414 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25415 Alan Hayward <alan.hayward@arm.com>
25416 David Sherwood <david.sherwood@arm.com>
25418 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
25419 Use plus_constant instead of gen_rtx_PLUS.
25421 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25422 Alan Hayward <alan.hayward@arm.com>
25423 David Sherwood <david.sherwood@arm.com>
25425 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
25426 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
25427 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
25428 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
25429 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
25430 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
25431 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
25432 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
25433 * config/i386/i386.c (ix86_push_rounding): ...this new function.
25434 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
25436 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
25437 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
25438 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
25439 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
25440 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
25441 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
25442 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
25443 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
25444 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
25445 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
25447 * expr.c (emit_move_resolve_push): Treat the input and result
25448 of PUSH_ROUNDING as a poly_int64.
25449 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
25450 (emit_push_insn): Likewise.
25451 * lra-eliminations.c (mark_not_eliminable): Likewise.
25452 * recog.c (push_operand): Likewise.
25453 * reload1.c (elimination_effects): Likewise.
25454 * rtlanal.c (nonzero_bits1): Likewise.
25455 * calls.c (store_one_arg): Likewise. Require the padding to be
25456 known at compile time.
25458 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25459 Alan Hayward <alan.hayward@arm.com>
25460 David Sherwood <david.sherwood@arm.com>
25462 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
25463 Use plus_constant instead of gen_rtx_PLUS.
25465 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25466 Alan Hayward <alan.hayward@arm.com>
25467 David Sherwood <david.sherwood@arm.com>
25469 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
25470 rather than an int.
25472 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25473 Alan Hayward <alan.hayward@arm.com>
25474 David Sherwood <david.sherwood@arm.com>
25476 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
25477 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
25478 via stack temporaries. Treat the mode size as polynomial too.
25480 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25481 Alan Hayward <alan.hayward@arm.com>
25482 David Sherwood <david.sherwood@arm.com>
25484 * expr.c (expand_expr_real_2): When handling conversions involving
25485 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
25486 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
25487 as a poly_uint64 too.
25489 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25490 Alan Hayward <alan.hayward@arm.com>
25491 David Sherwood <david.sherwood@arm.com>
25493 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
25495 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25496 Alan Hayward <alan.hayward@arm.com>
25497 David Sherwood <david.sherwood@arm.com>
25499 * combine.c (can_change_dest_mode): Handle polynomial
25500 REGMODE_NATURAL_SIZE.
25501 * expmed.c (store_bit_field_1): Likewise.
25502 * expr.c (store_constructor): Likewise.
25503 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
25504 and polynomial REGMODE_NATURAL_SIZE.
25505 (gen_lowpart_common): Likewise.
25506 * reginfo.c (record_subregs_of_mode): Likewise.
25507 * rtlanal.c (read_modify_subreg_p): Likewise.
25509 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25510 Alan Hayward <alan.hayward@arm.com>
25511 David Sherwood <david.sherwood@arm.com>
25513 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
25514 numbers of elements.
25516 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25517 Alan Hayward <alan.hayward@arm.com>
25518 David Sherwood <david.sherwood@arm.com>
25520 * match.pd: Cope with polynomial numbers of vector elements.
25522 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25523 Alan Hayward <alan.hayward@arm.com>
25524 David Sherwood <david.sherwood@arm.com>
25526 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
25527 in a POINTER_PLUS_EXPR.
25529 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25530 Alan Hayward <alan.hayward@arm.com>
25531 David Sherwood <david.sherwood@arm.com>
25533 * omp-simd-clone.c (simd_clone_subparts): New function.
25534 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
25535 (ipa_simd_modify_function_body): Likewise.
25537 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25538 Alan Hayward <alan.hayward@arm.com>
25539 David Sherwood <david.sherwood@arm.com>
25541 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
25542 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
25543 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
25544 (expand_vector_condition, vector_element): Likewise.
25545 (subparts_gt): New function.
25546 (get_compute_type): Use subparts_gt.
25547 (count_type_subparts): Delete.
25548 (expand_vector_operations_1): Use subparts_gt instead of
25549 count_type_subparts.
25551 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25552 Alan Hayward <alan.hayward@arm.com>
25553 David Sherwood <david.sherwood@arm.com>
25555 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
25556 (vect_compile_time_alias): ...this new function. Do the calculation
25557 on poly_ints rather than trees.
25558 (vect_prune_runtime_alias_test_list): Update call accordingly.
25560 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25561 Alan Hayward <alan.hayward@arm.com>
25562 David Sherwood <david.sherwood@arm.com>
25564 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
25566 (vect_schedule_slp_instance): Likewise.
25568 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25569 Alan Hayward <alan.hayward@arm.com>
25570 David Sherwood <david.sherwood@arm.com>
25572 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
25573 constant and extern definitions for variable-length vectors.
25574 (vect_get_constant_vectors): Note that the number of units
25575 is known to be constant.
25577 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25578 Alan Hayward <alan.hayward@arm.com>
25579 David Sherwood <david.sherwood@arm.com>
25581 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
25582 of units as polynomial. Choose between WIDE and NARROW based
25585 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25586 Alan Hayward <alan.hayward@arm.com>
25587 David Sherwood <david.sherwood@arm.com>
25589 * tree-vect-stmts.c (simd_clone_subparts): New function.
25590 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
25592 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25593 Alan Hayward <alan.hayward@arm.com>
25594 David Sherwood <david.sherwood@arm.com>
25596 * tree-vect-stmts.c (vectorizable_call): Treat the number of
25597 vectors as polynomial. Use build_index_vector for
25598 IFN_GOMP_SIMD_LANE.
25600 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25601 Alan Hayward <alan.hayward@arm.com>
25602 David Sherwood <david.sherwood@arm.com>
25604 * tree-vect-stmts.c (get_load_store_type): Treat the number of
25605 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
25606 for variable-length vectors.
25607 (vectorizable_mask_load_store): Treat the number of units as
25608 polynomial, asserting that it is constant if the condition has
25609 already been enforced.
25610 (vectorizable_store, vectorizable_load): Likewise.
25612 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25613 Alan Hayward <alan.hayward@arm.com>
25614 David Sherwood <david.sherwood@arm.com>
25616 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
25617 of units as polynomial. Punt if we can't tell at compile time
25618 which vector contains the final result.
25620 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25621 Alan Hayward <alan.hayward@arm.com>
25622 David Sherwood <david.sherwood@arm.com>
25624 * tree-vect-loop.c (vectorizable_induction): Treat the number
25625 of units as polynomial. Punt on SLP inductions. Use an integer
25626 VEC_SERIES_EXPR for variable-length integer reductions. Use a
25627 cast of such a series for variable-length floating-point
25630 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25631 Alan Hayward <alan.hayward@arm.com>
25632 David Sherwood <david.sherwood@arm.com>
25634 * tree.h (build_index_vector): Declare.
25635 * tree.c (build_index_vector): New function.
25636 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
25637 of units as polynomial, forcibly converting it to a constant if
25638 vectorizable_reduction has already enforced the condition.
25639 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
25640 to create a {1,2,3,...} vector.
25641 (vectorizable_reduction): Treat the number of units as polynomial.
25642 Choose vectype_in based on the largest scalar element size rather
25643 than the smallest number of units. Enforce the restrictions
25646 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25647 Alan Hayward <alan.hayward@arm.com>
25648 David Sherwood <david.sherwood@arm.com>
25650 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
25651 number of units as polynomial.
25653 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25654 Alan Hayward <alan.hayward@arm.com>
25655 David Sherwood <david.sherwood@arm.com>
25657 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
25658 * target.def (autovectorize_vector_sizes): Return the vector sizes
25659 by pointer, using vector_sizes rather than a bitmask.
25660 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
25661 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
25662 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
25664 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
25665 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
25666 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
25667 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
25668 * omp-general.c (omp_max_vf): Likewise.
25669 * omp-low.c (omp_clause_aligned_alignment): Likewise.
25670 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
25671 * tree-vect-loop.c (vect_analyze_loop): Likewise.
25672 * tree-vect-slp.c (vect_slp_bb): Likewise.
25673 * doc/tm.texi: Regenerate.
25674 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
25676 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
25677 the vector size as a poly_uint64 rather than an unsigned int.
25678 (current_vector_size): Change from an unsigned int to a poly_uint64.
25679 (get_vectype_for_scalar_type): Update accordingly.
25680 * tree.h (build_truth_vector_type): Take the size and number of
25681 units as a poly_uint64 rather than an unsigned int.
25682 (build_vector_type): Add a temporary overload that takes
25683 the number of units as a poly_uint64 rather than an unsigned int.
25684 * tree.c (make_vector_type): Likewise.
25685 (build_truth_vector_type): Take the number of units as a poly_uint64
25686 rather than an unsigned int.
25688 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25689 Alan Hayward <alan.hayward@arm.com>
25690 David Sherwood <david.sherwood@arm.com>
25692 * target.def (get_mask_mode): Take the number of units and length
25693 as poly_uint64s rather than unsigned ints.
25694 * targhooks.h (default_get_mask_mode): Update accordingly.
25695 * targhooks.c (default_get_mask_mode): Likewise.
25696 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
25697 * doc/tm.texi: Regenerate.
25699 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25700 Alan Hayward <alan.hayward@arm.com>
25701 David Sherwood <david.sherwood@arm.com>
25703 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
25704 * omp-general.c (omp_max_vf): Likewise.
25705 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
25706 (expand_omp_simd): Handle polynomial safelen.
25707 * omp-low.c (omplow_simd_context): Add a default constructor.
25708 (omplow_simd_context::max_vf): Change from int to poly_uint64.
25709 (lower_rec_simd_input_clauses): Update accordingly.
25710 (lower_rec_input_clauses): Likewise.
25712 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25713 Alan Hayward <alan.hayward@arm.com>
25714 David Sherwood <david.sherwood@arm.com>
25716 * tree-vectorizer.h (vect_nunits_for_cost): New function.
25717 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
25718 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
25719 (vect_analyze_slp_cost): Likewise.
25720 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
25721 (vect_model_load_cost): Likewise.
25723 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25724 Alan Hayward <alan.hayward@arm.com>
25725 David Sherwood <david.sherwood@arm.com>
25727 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
25728 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
25729 from an unsigned int * to a poly_uint64_pod *.
25730 (calculate_unrolling_factor): New function.
25731 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
25733 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25734 Alan Hayward <alan.hayward@arm.com>
25735 David Sherwood <david.sherwood@arm.com>
25737 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
25738 from an unsigned int to a poly_uint64.
25739 (_loop_vec_info::slp_unrolling_factor): Likewise.
25740 (_loop_vec_info::vectorization_factor): Change from an int
25742 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
25743 (vect_get_num_vectors): New function.
25744 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
25745 (vect_get_num_copies): Use vect_get_num_vectors.
25746 (vect_analyze_data_ref_dependences): Change max_vf from an int *
25747 to an unsigned int *.
25748 (vect_analyze_data_refs): Change min_vf from an int * to a
25750 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25751 than an unsigned HOST_WIDE_INT.
25752 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
25753 (vect_analyze_data_ref_dependence): Change max_vf from an int *
25754 to an unsigned int *.
25755 (vect_analyze_data_ref_dependences): Likewise.
25756 (vect_compute_data_ref_alignment): Handle polynomial vf.
25757 (vect_enhance_data_refs_alignment): Likewise.
25758 (vect_prune_runtime_alias_test_list): Likewise.
25759 (vect_shift_permute_load_chain): Likewise.
25760 (vect_supportable_dr_alignment): Likewise.
25761 (dependence_distance_ge_vf): Take the vectorization factor as a
25762 poly_uint64 rather than an unsigned HOST_WIDE_INT.
25763 (vect_analyze_data_refs): Change min_vf from an int * to a
25765 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
25766 vfm1 as a poly_uint64 rather than an int. Make the same change
25767 for the returned bound_scalar.
25768 (vect_gen_vector_loop_niters): Handle polynomial vf.
25769 (vect_do_peeling): Likewise. Update call to
25770 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
25771 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
25773 * tree-vect-loop.c (vect_determine_vectorization_factor)
25774 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
25775 (vect_get_known_peeling_cost): Likewise.
25776 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
25777 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
25778 (vect_transform_loop): Likewise. Use the lowest possible VF when
25779 updating the upper bounds of the loop.
25780 (vect_min_worthwhile_factor): Make static. Return an unsigned int
25781 rather than an int.
25782 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
25783 polynomial unroll factors.
25784 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
25785 (vect_make_slp_decision): Likewise.
25786 (vect_supported_load_permutation_p): Likewise, and polynomial
25788 (vect_analyze_slp_cost): Handle polynomial vf.
25789 (vect_slp_analyze_node_operations): Likewise.
25790 (vect_slp_analyze_bb_1): Likewise.
25791 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25792 than an unsigned HOST_WIDE_INT.
25793 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
25794 (vectorizable_load): Handle polynomial vf.
25795 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
25797 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
25799 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25800 Alan Hayward <alan.hayward@arm.com>
25801 David Sherwood <david.sherwood@arm.com>
25803 * match.pd: Handle bit operations involving three constants
25804 and try to fold one pair.
25806 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25808 * tree-vect-loop-manip.c: Include gimple-fold.h.
25809 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
25810 niters_maybe_zero parameters. Handle other cases besides a step of 1.
25811 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
25812 Add a path that uses a step of VF instead of 1, but disable it
25814 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
25815 and niters_no_overflow parameters. Update calls to
25816 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
25817 Create a new SSA name if the latter choses to use a ste other
25818 than zero, and return it via niters_vector_mult_vf_var.
25819 * tree-vect-loop.c (vect_transform_loop): Update calls to
25820 vect_do_peeling, vect_gen_vector_loop_niters and
25821 slpeel_make_loop_iterate_ntimes.
25822 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
25823 (vect_gen_vector_loop_niters): Update declarations after above changes.
25825 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
25827 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
25828 128-bit round to integer instructions.
25829 (ceil<mode>2): Likewise.
25830 (btrunc<mode>2): Likewise.
25831 (round<mode>2): Likewise.
25833 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25835 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25836 unaligned VSX load/store on P8/P9.
25837 (expand_block_clear): Allow the use of unaligned VSX
25838 load/store on P8/P9.
25840 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25842 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25844 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25845 swap associated with both a load and a store.
25847 2018-01-02 Andrew Waterman <andrew@sifive.com>
25849 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25850 * config/riscv/riscv.md (clear_cache): Use it.
25852 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
25854 * web.c: Remove out-of-date comment.
25856 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25858 * expr.c (fixup_args_size_notes): Check that any existing
25859 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25860 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25861 (emit_single_push_insn): ...here.
25863 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25865 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25866 (const_vector_encoded_nelts): New function.
25867 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25868 (const_vector_int_elt, const_vector_elt): Declare.
25869 * emit-rtl.c (const_vector_int_elt_1): New function.
25870 (const_vector_elt): Likewise.
25871 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25872 of CONST_VECTOR_ELT.
25874 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25876 * expr.c: Include rtx-vector-builder.h.
25877 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25878 directly on the tree encoding.
25879 (const_vector_from_tree): Likewise.
25880 * optabs.c: Include rtx-vector-builder.h.
25881 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25882 sequence of "u" values.
25883 * vec-perm-indices.c: Include rtx-vector-builder.h.
25884 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25885 directly on the vec_perm_indices encoding.
25887 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25889 * doc/rtl.texi (const_vector): Describe new encoding scheme.
25890 * Makefile.in (OBJS): Add rtx-vector-builder.o.
25891 * rtx-vector-builder.h: New file.
25892 * rtx-vector-builder.c: Likewise.
25893 * rtl.h (rtx_def::u2): Add a const_vector field.
25894 (CONST_VECTOR_NPATTERNS): New macro.
25895 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25896 (CONST_VECTOR_DUPLICATE_P): Likewise.
25897 (CONST_VECTOR_STEPPED_P): Likewise.
25898 (CONST_VECTOR_ENCODED_ELT): Likewise.
25899 (const_vec_duplicate_p): Check for a duplicated vector encoding.
25900 (unwrap_const_vec_duplicate): Likewise.
25901 (const_vec_series_p): Check for a non-duplicated vector encoding.
25902 Say that the function only returns true for integer vectors.
25903 * emit-rtl.c: Include rtx-vector-builder.h.
25904 (gen_const_vec_duplicate_1): Delete.
25905 (gen_const_vector): Call gen_const_vec_duplicate instead of
25906 gen_const_vec_duplicate_1.
25907 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25908 (gen_const_vec_duplicate): Use rtx_vector_builder.
25909 (gen_const_vec_series): Likewise.
25910 (gen_rtx_CONST_VECTOR): Likewise.
25911 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25912 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25913 Build a new vector rather than modifying a CONST_VECTOR in-place.
25914 (handle_special_swappables): Update call accordingly.
25915 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25916 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25917 Build a new vector rather than modifying a CONST_VECTOR in-place.
25918 (handle_special_swappables): Update call accordingly.
25920 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25922 * simplify-rtx.c (simplify_const_binary_operation): Use
25923 CONST_VECTOR_ELT instead of XVECEXP.
25925 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25927 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25928 the selector elements to be different from the data elements
25929 if the selector is a VECTOR_CST.
25930 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25931 ssizetype for the selector.
25933 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25935 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25936 before testing each element individually.
25937 * tree-vect-generic.c (lower_vec_perm): Likewise.
25939 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25941 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25942 * selftest-run-tests.c (selftest::run_tests): Call it.
25943 * vector-builder.h (vector_builder::operator ==): New function.
25944 (vector_builder::operator !=): Likewise.
25945 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25946 (vec_perm_indices::all_from_input_p): New function.
25947 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25948 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25949 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25950 instead of reading the VECTOR_CST directly. Detect whether both
25951 vector inputs are the same before constructing the vec_perm_indices,
25952 and update the number of inputs argument accordingly. Use the
25953 utility functions added above. Only construct sel2 if we need to.
25955 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25957 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25958 the broadcast of the low byte.
25959 (expand_mult_highpart): Use an explicit encoding for the permutes.
25960 * optabs-query.c (can_mult_highpart_p): Likewise.
25961 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25962 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25963 (vectorizable_bswap): Likewise.
25964 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25965 explicit encoding for the power-of-2 permutes.
25966 (vect_permute_store_chain): Likewise.
25967 (vect_grouped_load_supported): Likewise.
25968 (vect_permute_load_chain): Likewise.
25970 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25972 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25973 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25974 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25975 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25976 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25977 (vect_gen_perm_mask_any): Likewise.
25979 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25981 * int-vector-builder.h: New file.
25982 * vec-perm-indices.h: Include int-vector-builder.h.
25983 (vec_perm_indices): Redefine as an int_vector_builder.
25984 (auto_vec_perm_indices): Delete.
25985 (vec_perm_builder): Redefine as a stand-alone class.
25986 (vec_perm_indices::vec_perm_indices): New function.
25987 (vec_perm_indices::clamp): Likewise.
25988 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25989 (vec_perm_indices::new_vector): New function.
25990 (vec_perm_indices::new_expanded_vector): Update for new
25991 vec_perm_indices class.
25992 (vec_perm_indices::rotate_inputs): New function.
25993 (vec_perm_indices::all_in_range_p): Operate directly on the
25994 encoded form, without computing elided elements.
25995 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25996 encoding. Update for new vec_perm_indices class.
25997 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25998 the given vec_perm_builder.
25999 (expand_vec_perm_var): Update vec_perm_builder constructor.
26000 (expand_mult_highpart): Use vec_perm_builder instead of
26001 auto_vec_perm_indices.
26002 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
26003 vec_perm_indices instead of auto_vec_perm_indices. Use a single
26004 or double series encoding as appropriate.
26005 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
26006 vec_perm_indices instead of auto_vec_perm_indices.
26007 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26008 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26009 (vect_permute_store_chain): Likewise.
26010 (vect_grouped_load_supported): Likewise.
26011 (vect_permute_load_chain): Likewise.
26012 (vect_shift_permute_load_chain): Likewise.
26013 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
26014 (vect_transform_slp_perm_load): Likewise.
26015 (vect_schedule_slp_instance): Likewise.
26016 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26017 (vectorizable_mask_load_store): Likewise.
26018 (vectorizable_bswap): Likewise.
26019 (vectorizable_store): Likewise.
26020 (vectorizable_load): Likewise.
26021 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
26022 vec_perm_indices instead of auto_vec_perm_indices. Use
26023 tree_to_vec_perm_builder to read the vector from a tree.
26024 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
26025 vec_perm_builder instead of a vec_perm_indices.
26026 (have_whole_vector_shift): Use vec_perm_builder and
26027 vec_perm_indices instead of auto_vec_perm_indices. Leave the
26028 truncation to calc_vec_perm_mask_for_shift.
26029 (vect_create_epilog_for_reduction): Likewise.
26030 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
26031 from auto_vec_perm_indices to vec_perm_indices.
26032 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
26033 instead of changing individual elements.
26034 (aarch64_vectorize_vec_perm_const): Use new_vector to install
26035 the vector in d.perm.
26036 * config/arm/arm.c (expand_vec_perm_d::perm): Change
26037 from auto_vec_perm_indices to vec_perm_indices.
26038 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
26039 instead of changing individual elements.
26040 (arm_vectorize_vec_perm_const): Use new_vector to install
26041 the vector in d.perm.
26042 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
26043 Update vec_perm_builder constructor.
26044 (rs6000_expand_interleave): Likewise.
26045 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
26046 (rs6000_expand_interleave): Likewise.
26048 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26050 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
26051 to qimode could truncate the indices.
26052 * optabs.c (expand_vec_perm_var): Likewise.
26054 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26056 * Makefile.in (OBJS): Add vec-perm-indices.o.
26057 * vec-perm-indices.h: New file.
26058 * vec-perm-indices.c: Likewise.
26059 * target.h (vec_perm_indices): Replace with a forward class
26061 (auto_vec_perm_indices): Move to vec-perm-indices.h.
26062 * optabs.h: Include vec-perm-indices.h.
26063 (expand_vec_perm): Delete.
26064 (selector_fits_mode_p, expand_vec_perm_var): Declare.
26065 (expand_vec_perm_const): Declare.
26066 * target.def (vec_perm_const_ok): Replace with...
26067 (vec_perm_const): ...this new hook.
26068 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
26069 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
26070 * doc/tm.texi: Regenerate.
26071 * optabs.def (vec_perm_const): Delete.
26072 * doc/md.texi (vec_perm_const): Likewise.
26073 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
26074 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
26075 expand_vec_perm for constant permutation vectors. Assert that
26076 the mode of variable permutation vectors is the integer equivalent
26077 of the mode that is being permuted.
26078 * optabs-query.h (selector_fits_mode_p): Declare.
26079 * optabs-query.c: Include vec-perm-indices.h.
26080 (selector_fits_mode_p): New function.
26081 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
26082 is defined, instead of checking whether the vec_perm_const_optab
26083 exists. Use targetm.vectorize.vec_perm_const instead of
26084 targetm.vectorize.vec_perm_const_ok. Check whether the indices
26085 fit in the vector mode before using a variable permute.
26086 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
26087 vec_perm_indices instead of an rtx.
26088 (expand_vec_perm): Replace with...
26089 (expand_vec_perm_const): ...this new function. Take the selector
26090 as a vec_perm_indices rather than an rtx. Also take the mode of
26091 the selector. Update call to shift_amt_for_vec_perm_mask.
26092 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
26093 Use vec_perm_indices::new_expanded_vector to expand the original
26094 selector into bytes. Check whether the indices fit in the vector
26095 mode before using a variable permute.
26096 (expand_vec_perm_var): Make global.
26097 (expand_mult_highpart): Use expand_vec_perm_const.
26098 * fold-const.c: Includes vec-perm-indices.h.
26099 * tree-ssa-forwprop.c: Likewise.
26100 * tree-vect-data-refs.c: Likewise.
26101 * tree-vect-generic.c: Likewise.
26102 * tree-vect-loop.c: Likewise.
26103 * tree-vect-slp.c: Likewise.
26104 * tree-vect-stmts.c: Likewise.
26105 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
26107 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
26108 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
26109 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
26110 (aarch64_vectorize_vec_perm_const): ...this new function.
26111 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
26112 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26113 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
26114 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
26115 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
26116 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26117 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
26119 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
26120 check for NEON modes.
26121 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
26122 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
26123 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
26124 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
26126 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
26127 the old VEC_PERM_CONST conditions.
26128 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
26129 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
26130 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
26131 (ia64_vectorize_vec_perm_const_ok): Merge into...
26132 (ia64_vectorize_vec_perm_const): ...this new function.
26133 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
26134 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
26135 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
26136 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
26137 * config/mips/mips.c (mips_expand_vec_perm_const)
26138 (mips_vectorize_vec_perm_const_ok): Merge into...
26139 (mips_vectorize_vec_perm_const): ...this new function.
26140 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
26141 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
26142 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
26143 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
26144 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
26145 (rs6000_expand_vec_perm_const): Delete.
26146 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
26148 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26149 (altivec_expand_vec_perm_const_le): Take each operand individually.
26150 Operate on constant selectors rather than rtxes.
26151 (altivec_expand_vec_perm_const): Likewise. Update call to
26152 altivec_expand_vec_perm_const_le.
26153 (rs6000_expand_vec_perm_const): Delete.
26154 (rs6000_vectorize_vec_perm_const_ok): Delete.
26155 (rs6000_vectorize_vec_perm_const): New function.
26156 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
26157 an element count and rtx array.
26158 (rs6000_expand_extract_even): Update call accordingly.
26159 (rs6000_expand_interleave): Likewise.
26160 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
26161 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
26162 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
26163 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
26164 (rs6000_expand_vec_perm_const): Delete.
26165 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
26166 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26167 (altivec_expand_vec_perm_const_le): Take each operand individually.
26168 Operate on constant selectors rather than rtxes.
26169 (altivec_expand_vec_perm_const): Likewise. Update call to
26170 altivec_expand_vec_perm_const_le.
26171 (rs6000_expand_vec_perm_const): Delete.
26172 (rs6000_vectorize_vec_perm_const_ok): Delete.
26173 (rs6000_vectorize_vec_perm_const): New function. Remove stray
26174 reference to the SPE evmerge intructions.
26175 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
26176 an element count and rtx array.
26177 (rs6000_expand_extract_even): Update call accordingly.
26178 (rs6000_expand_interleave): Likewise.
26179 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
26180 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
26182 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26184 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26186 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
26187 vector mode and that that mode matches the mode of the data
26189 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
26190 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
26191 directly using expand_vec_perm_1 when forcing selectors into
26193 (expand_vec_perm_var): New function, split out from expand_vec_perm.
26195 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26197 * optabs-query.h (can_vec_perm_p): Delete.
26198 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
26199 * optabs-query.c (can_vec_perm_p): Split into...
26200 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
26201 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
26202 particular selector is valid.
26203 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26204 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26205 (vect_grouped_load_supported): Likewise.
26206 (vect_shift_permute_load_chain): Likewise.
26207 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
26208 (vect_transform_slp_perm_load): Likewise.
26209 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26210 (vectorizable_bswap): Likewise.
26211 (vect_gen_perm_mask_checked): Likewise.
26212 * fold-const.c (fold_ternary_loc): Likewise. Don't take
26213 implementations of variable permutation vectors into account
26214 when deciding which selector to use.
26215 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
26216 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
26217 with a false third argument.
26218 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
26219 to test whether the constant selector is valid and can_vec_perm_var_p
26220 to test whether a variable selector is valid.
26222 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26224 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
26225 * optabs-query.c (can_vec_perm_p): Likewise.
26226 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
26227 instead of vec_perm_indices.
26228 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
26229 (vect_gen_perm_mask_checked): Likewise,
26230 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
26231 (vect_gen_perm_mask_checked): Likewise,
26233 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26235 * optabs-query.h (qimode_for_vec_perm): Declare.
26236 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
26237 (qimode_for_vec_perm): ...this new function.
26238 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
26240 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26242 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
26243 does not have a conditional at the top.
26245 2018-01-02 Richard Biener <rguenther@suse.de>
26247 * ipa-inline.c (big_speedup_p): Fix expression.
26249 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
26252 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
26255 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
26259 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
26260 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
26261 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
26262 cond_taken_branch_cost 3->4.
26264 2018-01-01 Jakub Jelinek <jakub@redhat.com>
26266 PR tree-optimization/83581
26267 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
26268 TODO_cleanup_cfg if any changes have been made.
26270 PR middle-end/83608
26271 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
26272 convert_modes if target mode has the right side, but different mode
26275 PR middle-end/83609
26276 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
26277 last argument when extracting from CONCAT. If either from_real or
26278 from_imag is NULL, use expansion through memory. If result is not
26279 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
26280 the parts directly to inner mode, if even that fails, use expansion
26283 PR middle-end/83623
26284 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
26285 check for bswap in mode rather than HImode and use that in expand_unop
26288 Copyright (C) 2018 Free Software Foundation, Inc.
26290 Copying and distribution of this file, with or without modification,
26291 are permitted in any medium without royalty provided the copyright
26292 notice and this notice are preserved.