1 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
4 * config/i386/i386.c (rest_of_insert_endbranch): Set
5 endbr_queued_at_entrance to true and don't insert ENDBR if
6 x86_function_profiler will be called.
7 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
9 * config/i386/i386.h (machine_function): Add
10 endbr_queued_at_entrance.
12 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
14 * genattrtab.c (mk_attr_alt): Use alternative_mask.
15 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
17 (check_attr_test): Use alternative_mask.
18 (get_attr_value): Likewise.
19 (compute_alternative_mask): Use alternative_mask and XWINT.
20 (make_alternative_compare): Use alternative_mask.
21 (attr_alt_subset_p): Use XWINT.
22 (attr_alt_subset_of_compl_p): Likewise.
23 (attr_alt_intersection): Use alternative_mask and XWINT.
24 (attr_alt_union): Likewise.
25 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
26 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
27 (simplify_test_exp): Use alternative_mask and XWINT.
28 (write_test_expr): Use alternative_mask and XWINT, adjust bit
29 number calculation to support 64 bits. Generate code that
31 (main): Use alternative_mask.
32 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
34 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
37 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
38 RETURN+USE when returning via %r14.
40 2018-09-24 Martin Liska <mliska@suse.cz>
42 * gcov.c (output_lines): Print colorization legend
43 for both flag_use_colors and flag_use_hotness_colors.
46 2018-09-24 Martin Liska <mliska@suse.cz>
48 * coverage.c (get_coverage_counts): Use warning_at
49 with current_function_decl location. Use %qD in warning
52 2018-09-24 Martin Liska <mliska@suse.cz>
54 * memory-block.h (memory_block_pool::release): Annotate with
55 valgrind that the memory is not accessible.
57 2018-09-24 Martin Liska <mliska@suse.cz>
60 * asan.c: Make asan_handled_variables extern.
62 * cfgexpand.c (expand_stack_vars): Make sure
63 a representative is unpoison if another
64 variable in the partition is handled by
65 use-after-scope sanitization.
67 2018-09-24 Richard Biener <rguenther@suse.de>
69 PR tree-optimization/63155
70 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
71 the worklist when the edge of the respective argument isn't
74 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
76 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
77 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
78 (MASK_CLASS_P): Update for rename.
79 (MAYBE_MASK_CLASS_P): Ditto.
80 (REG_CLASS_NAMES): Update.
81 (REG_CLASS_CONTENT): Update.
82 * config/i386/i386.c (regclass_map): Update for MASK_REG
83 and ALL_MASK_REGS rename.
84 * config/i386/constraints.md (Yk): Update for rename.
87 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
89 * config/i386/i386.h (enum reg_class): Remove
90 EVEX_SSE_REGS and MOD4_SSE_REGS.
91 (REG_CLASS_NAMES): Update.
92 (REG_CLASS_CONTENT): Update.
93 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
94 registers as ALL_SSE_REGS.
95 (ix86_additional_allocno_class_p): Remove.
96 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
97 (ix86_register_priority): Lower priority of EVEX SSE registers.
98 Use IN_RANGE macro where appropriate.
99 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
100 AVX-5124VNNIW checks.
101 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
102 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
103 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
104 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
105 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
106 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
107 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
108 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
109 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
110 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
111 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
112 * config/i386/constraints.md (Yh): Remove.
114 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
116 * config/i386/i386.c (regclass_map): Declare integer REX registers
119 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
121 * doc/service.texi (Service): Switch the fsf.org link to https.
123 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
126 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
127 Define to speculation_safe_value_not_needed.
129 2018-09-21 Florian Weimer <fweimer@redhat.com>
132 * doc/extend.texi (Common Function Attributes): Mention that
133 noreturn suppresses tail call optimization.
135 2018-09-21 Jeff Law <law@redhat.com>
137 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
138 vr_values::cleanup_edges_and_switches.
139 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
141 (identify_jump_threads): Remove EDGE_IGNORE handling.
142 (execute_vrp): Move handling of to_remove_edges and
143 to_update_switch_stmts into vr_values class member functions.
144 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
145 (to_update_switch_stmts): Likewise.
146 * vr-values.c: Include cfghooks.h.
147 (vr_values::vr_values): Initialize to_remove_edges and
148 to_update_switch_stmts.
149 (vr_values::~vr_values): Verify to_remove_edges and
150 to_update_switch_stmts are empty.
151 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
152 (vr_values::cleanup_edges_and_switches): New member function.
153 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
154 function. Add new data members.
156 2018-09-21 David Malcolm <dmalcolm@redhat.com>
158 PR tree-optimization/87309
159 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
160 calls with pflags and alt_flags.
161 (selftest::test_capture_of_dump_calls): Add test of interaction of
162 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
164 2018-09-21 Olivier Hainque <hainque@adacore.com>
166 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
168 2018-09-21 Olivier Hainque <hainque@adacore.com>
170 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
172 2018-09-21 Olivier Hainque <hainque@adacore.com>
174 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
175 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
176 (VXWORKS_LIBS_RTP): Minor reordering.
178 2018-09-21 Olivier Hainque <hainque@adacore.com>
180 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
181 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
183 2018-09-21 Olivier Hainque <hainque@adacore.com>
185 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
186 (PTRDIFF_TYPE): Likewise.
188 2018-09-21 Olivier Hainque <hainque@adacore.com>
190 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
191 triplet, similar to support for VxWorks7.
192 * config/vxworks-dummy.h: Provide a default definition
193 of TARGET_VXWORKS64 to 0.
195 2018-09-21 Olivier Hainque <hainque@adacore.com>
197 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
198 * config/vxworks-dummy.h: here.
200 2018-09-21 Olivier Hainque <hainque@adacore.com>
202 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
204 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
205 Bo Zhou <zbo.zhou@hisilicon.com>
207 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
208 * config/aarch64/aarch64-tune.md: Regenerated.
209 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
210 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
211 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
213 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
214 Julian Brown <julian@codesourcery.com>
216 * builtins.c (get_builtin_sync_mem): Handle address spaces.
218 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
220 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
221 if the call takes a static chain.
223 2018-09-21 Martin Liska <mliska@suse.cz>
225 * auto-profile.c (autofdo_source_profile::read): Do not
227 (read_profile): Do not add working sets.
228 (read_autofdo_file): Remove sum_all.
229 (afdo_callsite_hot_enough_for_early_inline): Remove const
231 * coverage.c (struct counts_entry): Remove gcov_summary.
232 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
233 do not support GCOV_TAG_PROGRAM_SUMMARY.
234 (get_coverage_counts): Remove summary and expected
236 * coverage.h (get_coverage_counts): Likewise.
237 * doc/gcov-dump.texi: Remove -w option.
238 * gcov-dump.c (dump_working_sets): Remove.
239 (main): Do not support '-w' option.
240 (print_usage): Likewise.
241 (tag_summary): Likewise.
242 * gcov-io.c (gcov_write_summary): Do not dump
244 (gcov_read_summary): Likewise.
245 (gcov_histo_index): Remove.
246 (gcov_histogram_merge): Likewise.
247 (compute_working_sets): Likewise.
248 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
250 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
251 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
252 (GCOV_HISTOGRAM_SIZE): Remove.
253 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
254 (struct gcov_summary): Simplify rapidly just
255 to runs and sum_max fields.
256 (gcov_histo_index): Remove.
257 (NUM_GCOV_WORKING_SETS): Likewise.
258 (compute_working_sets): Likewise.
259 * gcov-tool.c (print_overlap_usage_message): Remove
261 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
262 (output_lines): Remove program related line.
263 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
264 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
266 (input_profile_summary): Do not read it.
267 (merge_profile_summaries): And do not merge it.
268 (input_symtab): Do not call removed function.
269 * modulo-sched.c (sms_schedule): Do not print sum_max.
270 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
271 removed when histogram method was invented.
272 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
274 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
276 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
277 and dump selected value.
278 * profile.c (add_working_set): Remove.
279 (get_working_sets): Likewise.
280 (find_working_set): Likewise.
281 (get_exec_counts): Do not work with working sets.
282 (read_profile_edge_counts): Do not inform as sum_max is removed.
283 (compute_branch_probabilities): Likewise.
284 (compute_value_histograms): Remove argument for call of
286 * profile.h: Do not make gcov_summary const.
288 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
290 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
292 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
294 PR tree-optimization/86990
295 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
296 Check that the entire merged store group is made of constants only for
299 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
301 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
302 (VTABLE_VERIFICATION_SPEC): Likewise.
303 (SANITIZER_EARLY_SPEC): Likewise.
304 (SANITIZER_SPEC): Likewise.
305 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
306 * doc/invoke.texi (Link Options): Document -r.
308 2018-09-20 Richard Biener <rguenther@suse.de>
311 * gimplify.c (gimplify_expr): Retain alignment of
312 addressable lvalue in dereference.
314 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
317 * configure.ac: Check for .loc is_stmt support.
318 * configure, config.in: Rebuilt.
319 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
322 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
324 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
325 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
328 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
330 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
332 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
335 2018-09-20 Marek Polacek <polacek@redhat.com>
337 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
339 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
341 PR tree-optimization/87288
342 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
343 into account when determining PEELING_FOR_NITERS.
345 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
347 PR tree-optimization/86877
348 * tree-vect-loop.c (vect_analyze_loop_2): Call
349 vect_verify_datarefs_alignment.
351 2018-09-19 Marek Polacek <polacek@redhat.com>
353 * doc/invoke.texi: Document -Wclass-conversion.
355 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
357 * config/pa/pa.c (pa_adjust_priority): Delete.
358 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
360 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
361 (atomic_storehi): Likewise.
362 (atomic_storesi): Likewise.
363 (atomic_loaddi): Restore compare and swap exchange loop code.
365 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
367 PR rtl-optimization/86902
368 * combine.c (try_combine): When changing the CC mode used, don't change
369 an unrelated mode in other_insn to that new CC mode.
371 2018-09-19 David Malcolm <dmalcolm@redhat.com>
373 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
374 with %T in place of calls to dump_generic_expr.
375 (prune_runtime_alias_test_list): Likewise.
376 (create_runtime_alias_checks): Likewise.
377 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
378 (vect_analyze_data_ref_dependence): Likewise.
379 (vect_slp_analyze_data_ref_dependence): Likewise.
380 (vect_record_base_alignment): Likewise. Use %G in place of call
382 (vect_compute_data_ref_alignment): Likewise.
383 (verify_data_ref_alignment): Likewise.
384 (vect_find_same_alignment_drs): Likewise.
385 (vect_analyze_group_access_1): Likewise.
386 (vect_analyze_data_ref_accesses): Likewise.
387 (dependence_distance_ge_vf): Likewise.
388 (dump_lower_bound): Likewise.
389 (vect_prune_runtime_alias_test_list): Likewise.
390 (vect_find_stmt_data_reference): Likewise.
391 (vect_analyze_data_refs): Likewise.
392 (vect_create_addr_base_for_vector_ref): Likewise.
393 (vect_create_data_ref_ptr): Likewise.
394 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
395 (vect_can_advance_ivs_p): Likewise.
396 (vect_update_ivs_after_vectorizer): Likewise.
397 (vect_gen_prolog_loop_niters): Likewise.
398 (vect_prepare_for_masked_peels): Likewise.
399 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
400 (vect_determine_vectorization_factor): Likewise.
401 (vect_is_simple_iv_evolution): Likewise.
402 (vect_analyze_scalar_cycles_1): Likewise.
403 (vect_analyze_loop_operations): Likewise.
404 (report_vect_op): Likewise.
405 (vect_is_slp_reduction): Likewise.
406 (check_reduction_path): Likewise.
407 (vect_is_simple_reduction): Likewise.
408 (vect_create_epilog_for_reduction): Likewise.
409 (vect_finalize_reduction:): Likewise.
410 (vectorizable_induction): Likewise.
411 (vect_transform_loop_stmt): Likewise.
412 (vect_transform_loop): Likewise.
413 (optimize_mask_stores): Likewise.
414 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
415 (vect_split_statement): Likewise.
416 (vect_recog_over_widening_pattern): Likewise.
417 (vect_recog_average_pattern): Likewise.
418 (vect_determine_min_output_precision_1): Likewise.
419 (vect_determine_precisions_from_range): Likewise.
420 (vect_determine_precisions_from_users): Likewise.
421 (vect_mark_pattern_stmts): Likewise.
422 (vect_pattern_recog_1): Likewise.
423 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
424 (vect_record_max_nunits): Likewise.
425 (vect_build_slp_tree_1): Likewise.
426 (vect_build_slp_tree_2): Likewise.
427 (vect_print_slp_tree): Likewise.
428 (vect_analyze_slp_instance): Likewise.
429 (vect_detect_hybrid_slp_stmts): Likewise.
430 (vect_detect_hybrid_slp_1): Likewise.
431 (vect_slp_analyze_operations): Likewise.
432 (vect_slp_analyze_bb_1): Likewise.
433 (vect_transform_slp_perm_load): Likewise.
434 (vect_schedule_slp_instance): Likewise.
435 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
436 (vect_mark_stmts_to_be_vectorized): Likewise.
437 (vect_init_vector_1): Likewise.
438 (vect_get_vec_def_for_operand): Likewise.
439 (vect_finish_stmt_generation_1): Likewise.
440 (vect_check_load_store_mask): Likewise.
441 (vectorizable_call): Likewise.
442 (vectorizable_conversion): Likewise.
443 (vectorizable_operation): Likewise.
444 (vectorizable_load): Likewise.
445 (vect_analyze_stmt): Likewise.
446 (vect_is_simple_use): Likewise.
447 (vect_get_vector_types_for_stmt): Likewise.
448 (vect_get_mask_type_for_stmt): Likewise.
449 * tree-vectorizer.c (increase_alignment): Likewise.
451 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
453 * doc/rtl.texi: Adjust vec_select description.
454 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
455 non-constant selectors.
457 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
459 * config/aarch64/aarch64-protos.h
460 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
461 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
462 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
463 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
464 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
465 (AARCH64_FL_PROFILE): Move index so flags are ordered.
466 (AARCH64_ISA_RCPC8_4): New flag.
467 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
468 to aarch64_offset_9bit_signed_unscaled_p.
469 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
471 * config/aarch64/constraints.md (Ust): New constraint.
472 * config/aarch64/predicates.md.
473 (aarch64_9bit_offset_memory_operand): New predicate.
474 (aarch64_rcpc_memory_operand): New predicate.
476 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
478 PR rtl-optimization/87361
479 * rtlanal.c (nonzero_bits1): Revert accidental change.
481 2018-09-19 Richard Biener <rguenther@suse.de>
483 PR tree-optimization/87349
484 PR tree-optimization/87342
485 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
487 2018-09-18 Marek Polacek <polacek@redhat.com>
489 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
490 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
492 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
494 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
496 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
498 PR rtl-optimization/86882
499 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
501 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
503 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
504 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
506 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
509 * doc/invoke.texi (Link Options): Fix formatting and grammar.
511 2018-09-18 Richard Biener <rguenther@suse.de>
514 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
515 (compute_samebase_partition_bases): Likewise.
516 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
517 (gimple_can_coalesce_p): Simplify.
519 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
521 Handle a library implementation of ffs calling __builtin_ffs.
522 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
523 (mmix_init_libfuncs): New function: make __builtin_ffs expand
526 2018-09-17 David Malcolm <dmalcolm@redhat.com>
528 * diagnostic-show-locus.c (class layout_range): Add field
530 (layout_range::layout_range): Add "original_idx" param and use it
531 to initialize new field.
532 (make_range): Use 0 for original_idx.
533 (layout::layout): Pass in index to calls to
534 maybe_add_location_range.
535 (layout::maybe_add_location_range): Add param "original_idx" and
536 pass it on to layout_range.
537 (layout::print_any_labels): Pass on range->m_original_idx to
539 (gcc_rich_location::add_location_if_nearby): Use 0 for
541 * gcc-rich-location.h (text_range_label::get_text): Update for new
543 (range_label_for_type_mismatch::get_text): Likewise.
545 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
547 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
549 2018-09-17 David Malcolm <dmalcolm@redhat.com>
551 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
552 format_string_diagnostic_t.
553 (fmtwarn_n): Likewise.
554 * substring-locations.c
555 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
556 (format_warning_n_va): Convert to...
557 (format_string_diagnostic_t::emit_warning_n_va): ...this.
558 (format_warning_va): Convert to...
559 (format_string_diagnostic_t::emit_warning_va): ...this.
560 (format_warning_at_substring): Convert to...
561 (format_string_diagnostic_t::emit_warning): ...this.
562 (format_warning_at_substring_n): Convert to...
563 (format_string_diagnostic_t::emit_warning_n): ...this.
564 * substring-locations.h (class format_string_diagnostic_t): New
566 (format_warning_va): Convert to
567 format_string_diagnostic_t::emit_warning_va.
568 (format_warning_n_va): Convert to
569 format_string_diagnostic_t::emit_warning_n_va.
570 (format_warning_at_substring): Convert to
571 format_string_diagnostic_t::emit_warning.
572 (format_warning_at_substring_n): Convert to
573 format_string_diagnostic_t::emit_warning_n.
575 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
576 Bernd Schmidt <bernds_cb1@t-online.de>
578 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
581 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
583 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
584 operand 0 predicate to nonimmediate operand.
585 (rint<mode>2_frndint): Remove insn pattern.
586 (rint<mode>2): Change operand 1 predicate to general_operand.
587 Extend operand 1 to XFmode and generate rintxf2 insn.
588 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
589 Do not use X87MODEF mode macro.
590 (frndintxf2_<rounding>_i387): Rename from
591 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
592 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
593 to XFmode and generate significandxf3 insn.
595 2018-09-17 Richard Biener <rguenther@suse.de>
597 PR tree-optimization/87328
598 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
599 visiting unexecutable backedges when not iterating.
600 (do_rpo_vn): Mark all edges not executable even when not
603 2018-09-17 Martin Jambor <mjambor@suse.cz>
606 * doc/invoke.texi (Warning Options): Likewise.
608 2018-09-17 Richard Biener <rguenther@suse.de>
610 PR tree-optimization/87301
611 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
612 clean EH info from leftover copy assignments.
614 2018-09-17 Martin Liska <mliska@suse.cz>
616 PR gcov-profile/85871
617 * gcov.c (output_intermediate_file): Fix out of bounds
620 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
622 * config/arc/arc.c: Object attributes for core4 not reflected
624 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
627 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
629 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
631 2018-09-17 Martin Liska <mliska@suse.cz>
633 * doc/gcov.texi: Document new option --use-hotness-colors.
634 * gcov.c (struct source_info): Declare new field.
635 (source_info::source_info): Set default for maximum_count.
636 (print_usage): Add new -q option.
637 (process_args): Process it.
638 (accumulate_line_info): Save src->maximum_count.
639 (output_line_beginning): Make color line number if
640 flag_use_hotness_colors is set.
641 (output_line_details): Pass default argument value.
642 (output_lines): Pass src->maximum_count.
644 2018-09-17 Martin Liska <mliska@suse.cz>
646 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
647 Use processor_names table.
648 * config/i386/i386.c (ix86_default_align): Use
649 processor_cost_table for alignment values.
650 (ix86_option_override_internal): Use processor_names.
651 (ix86_function_specific_print): Likewise.
652 * config/i386/i386.h (struct processor_costs):
653 Add alignment values.
654 (struct ptt): Remove and replace with const char *.
655 * config/i386/x86-tune-costs.h (struct processor_costs):
656 Declare default alignments for all costs.
658 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
660 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
661 symbolics or VR_VARYING ranges for ABS_EXPR.
662 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
663 when range will wrap.
665 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
668 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
669 before and after a JUMP_TABLE_DATA.
671 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
674 * dojump.c (do_compare_and_jump): Canonicalize function pointers
675 when one operand is a function pointer. Use POINTER_TYPE_P and
676 FUNC_OR_METHOD_TYPE_P.
677 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
678 * fold-const.c (build_range_check): Likewise.
679 * match.pd (simple_comparison): Likewise.
681 2018-09-14 David Malcolm <dmalcolm@redhat.com>
684 * spellcheck.c (get_edit_distance_cutoff): New function.
685 (selftest::test_edit_distance_unit_test_oneway): Rename to...
686 (selftest::test_get_edit_distance_one_way): ...this.
687 (selftest::test_get_edit_distance_unit): Rename to...
688 (selftest::test_get_edit_distance_both_ways): ...this.
689 (selftest::test_edit_distances): Move tests to this new function,
690 and test some more pairs of strings. Update for above renaming.
691 (selftest::get_old_cutoff): New function.
692 (selftest::test_get_edit_distance_cutoff): New function.
693 (selftest::assert_suggested_for): New function.
694 (ASSERT_SUGGESTED_FOR): New macro.
695 (selftest::assert_not_suggested_for): New function.
696 (ASSERT_NOT_SUGGESTED_FOR): New macro.
697 (selftest::test_suggestions): New function.
698 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
699 tests to selftest::test_edit_distances and call it. Add calls to
700 selftest::test_get_edit_distance_cutoff and
701 selftest::test_suggestions.
702 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
703 (best_match::consider): Replace hard-coded cutoff calculation with
705 (best_match::get_cutoff): New declaration.
706 (best_match::get_best_meaningful_candidate): Likewise.
708 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
710 * builtins.c (fold_builtin_strlen): Remove TODO comment.
712 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
715 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
717 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
718 terminated string literal.
720 2018-09-14 Martin Sebor <msebor@redhat.com>
722 * builtins.c (unterminated_array): Handle ARRAY_REF.
723 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
724 * builtins.h (unterminated_array): Declare extern.
725 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
727 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
730 2018-09-14 Martin Sebor <msebor@redhat.com>
731 Jeff Law <law@redhat.com>
733 * builtins.c (unterminated_array): New.
734 (expand_builtin_strcpy): Adjust.
735 (expand_builtin_strcpy_args): Detect unterminated arrays.
736 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
738 * gimple-fold.h (get_maxval_strlen): Add argument.
739 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
741 * gimple-fold.c (get_range_strlen): Add argument.
742 (get_maxval_strlen): Adjust.
743 * gimple-fold.h (get_range_strlen): Add argument.
745 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
747 * config/i386/movdirintrin.h: Fix copyright year.
749 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
751 * reg-stack.c: Include regs.h.
752 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
753 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
754 FIRST_STACK_REG, not DFmode.
755 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
756 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
757 (change stack): Default register mode to the reg_raw_mode of
758 FIRST_STACK_REG, not DFmode.
759 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
760 (*swapxf): Rename from swapxf.
762 2018-09-14 Carl Love <cel@us.ibm.com>
764 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
765 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
767 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
770 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
773 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
776 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
778 2018-09-14 Jason Merrill <jason@redhat.com>
780 Fix --enable-gather-detailed-mem-stats.
781 * hash-table.c (hash_table_usage): Change from variable to function.
782 * hash-table.h: Adjust.
783 * Makefile.in: Add missing dependencies on hash-table.h.
785 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
787 PR tree-optimization/87259
789 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
790 execute_cse_reciprocals_1 has tried transforming.
792 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
794 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
795 VR_VARYING for PLUS/MINUS_EXPR.
797 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
799 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
802 2018-09-14 Richard Biener <rguenther@suse.de>
805 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
806 bits for the merged partition.
808 2018-09-13 Martin Sebor <msebor@redhat.com>
809 Bernd Edlinger <bernd.edlinger@hotmail.de>
811 * builtins.h (c_srlen): Add argument.
812 * builtins.c (warn_string_no_nul): New function.
813 (c_strlen): Add argument and use it. Update recursive calls.
814 Pass DECL argument to string_constant to get info on non
815 terminated strings. Update *NONSTR as needed.
816 (fold_builtin_strlen): Add argument to calls to c_strlen.
817 Warn for unterminated arrays.
818 (warn_string_no_null): Add prototype.
819 * expr.c (string_constant): Update arguments. Update recursive
820 calls appropriately. Detect missing NUL terminator and outermost
821 declaration its missing in.
822 Improve checks for arrays with nonzero lower bound or elements
823 that are not a single byte. Simplify offset computation.
824 Simplify checks for non-NUL terminated strings.
825 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
826 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
828 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
830 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
832 * fold-const.c (c_getstr): Fix function comment. Remove unused third
833 argument. Fix range checks.
834 * fold-const.h (c_getstr): Adjust protoype.
835 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
836 string is constant but contains no NUL byte.
838 * expr.c (string_constant): Adjust function comment.
839 Remove bogus check for zero termination.
841 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
843 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
844 (get_constant_size): Don't make STRING_CSTs larger than they are.
845 (check_string_literal): New check function for STRING_CSTs.
846 (output_constant): Use it.
848 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
851 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
853 2018-09-13 Richard Biener <rguenther@suse.de>
855 PR tree-optimization/87263
856 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
857 (struct unwind_state): Add max_rpo field.
858 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
859 Compute max_rpo, the max RPO number a block can be backwards reached
860 from. Re-write non-iterating mode to a RPO ordered worklist approach,
861 separating it from the iterating mode.
863 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
865 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
866 (rfs_decision): New scheduling decision.
868 2018-09-13 Richard Biener <rguenther@suse.de>
871 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
872 (vn_nary_op_insert_pieces_predicated): Do not write useless
873 valid_dominated_by_p entry outside of the allocated storage.
875 2018-09-13 Omar Sandoval <osandov@osandov.com>
876 Tom de Vries <tdevries@suse.de>
879 * dwarf2out.c (is_c): New function.
880 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
882 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
885 * config/aarch64/aarch64.md (*aarch64_bfxil):
887 * config/aarch64/constraints.md (Ulc): Define.
888 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
890 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
893 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
895 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
896 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
897 aarch64_layout_frame call.
898 (aarch64_expand_epilogue): Likewise.
899 (aarch64_initial_elimination_offset): Likewise.
900 (aarch64_get_separate_components): Likewise.
901 (aarch64_use_return_insn_p): Likewise.
902 (aarch64_layout_frame): Remove unneeded check.
904 2018-09-13 Jakub Jelinek <jakub@redhat.com>
906 * configure.ac: Only append
907 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
908 gcc_config_arguments if it was never reconfigured or last reconfigure
909 was with different arguments.
910 * configure: Regenerated.
912 2018-09-13 Jakub Jelinek <jakub@redhat.com>
913 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
916 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
917 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
919 2018-09-13 Jakub Jelinek <jakub@redhat.com>
921 PR tree-optimization/87287
922 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
923 X % C == 0 to X % (unsigned) C == 0 optimization to ...
924 * match.pd (X % C == 0): ... here. New optimization.
926 2018-09-12 Jakub Jelinek <jakub@redhat.com>
929 * expr.h (maybe_optimize_mod_cmp): Declare.
930 * expr.c (mod_inv): New function.
931 (maybe_optimize_mod_cmp): New function.
932 (do_store_flag): Use it.
933 * cfgexpand.c (expand_gimple_cond): Likewise.
935 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
936 Julian Brown <julian@codesourcery.com>
939 * gimplify.c (gimplify_scan_omp_clauses): Set
940 target_firstprivatize_array_bases in OpenACC parallel and kernels
941 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
942 OpenACC data regions.
944 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
946 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
947 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
949 2018-09-12 Richard Biener <rguenther@suse.de>
951 PR tree-optimization/87280
952 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
953 edge but unreachable target.
954 (do_rpo_vn): For conservatively handling a PHI only mark
955 the backedge executable but not the block reachable.
957 2018-09-12 Richard Biener <rguenther@suse.de>
959 PR tree-optimization/87266
960 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
963 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
965 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
967 ("trunc<BFP:mode><DFP_ALL:mode>2")
968 ("trunc<DFP_ALL:mode><BFP:mode>2")
969 ("extend<BFP:mode><DFP_ALL:mode>2")
970 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
971 according to the target operand type.
973 2018-09-12 Jakub Jelinek <jakub@redhat.com>
974 Andreas Krebbel <krebbel@linux.ibm.com>
976 PR tree-optimization/86844
977 * gimple-ssa-store-merging.c
978 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
979 there are any overlapping stores in between them, make sure they are
980 also coalesced or we give up completely.
982 2018-09-12 Jakub Jelinek <jakub@redhat.com>
985 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
986 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
988 2018-09-12 Tom de Vries <tdevries@suse.de>
990 * common.opt (gdescribe-dies): Add option.
991 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
992 attribute for artifical and nameless decls.
993 (dwarf2out_register_external_die): Add description attribute to
994 external reference die.
995 (add_desc_attribute): New functions.
996 (gen_subprogram_die): Add description attribute to
997 DW_TAG_call_site_parameter.
998 * tree-pretty-print.c (print_generic_expr_to_str): New function.
999 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
1000 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
1002 (@item -gdescribe-dies): Add.
1004 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
1006 * tree-vrp.c (vrp_shift_undefined_p): Remove.
1007 (extract_range_from_binary_expr_1: Call
1008 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
1009 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
1012 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
1014 * gimple-ssa-warn-alloca.c
1015 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
1016 field for ALLOCA_BOUND_*_LARGE.
1018 2018-09-11 Nathan Sidwell <nathan@acm.org>
1020 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
1022 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
1024 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
1025 for clobbers. Remove obsolete comment.
1027 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
1029 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
1030 mpxchk, mpxld and mpxst types.
1031 (define_attr length_immediate): Remove all processing of mpx types.
1032 (define_attr prefix_0f): Ditto.
1033 (define_attr memory): Ditto.
1035 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
1037 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
1038 (log<mode>2): Change operand 1 predicate to general_operand.
1039 Extend operand 1 to XFmode and generate logxf3 insn.
1040 (log10<mode>2): Change operand 1 predicate to general_operand.
1041 Extend operand 1 to XFmode and generate log10xf3 insn.
1042 (log2<mode>2): Change operand 1 predicate to general_operand.
1043 Extend operand 1 to XFmode and generate log2xf3 insn.
1044 (fyl2xp1_extend<mode>xf3_i387): Remove.
1045 (log1p<mode>2): Change operand 1 predicate to general_operand.
1046 Extend operand 1 to XFmode and generate log1pxf3 insn.
1047 (fxtract_extend<mode>xf3_i387): Remove.
1048 (logb<mode>2): Change operand 1 predicate to general_operand.
1049 Extend operand 1 to XFmode and generate logbxf3 insn.
1050 (ilogb<mode>2): Change operand 1 predicate to general_operand.
1051 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
1052 (significand<mode>2): Change operand 1 predicate to general_operand.
1053 Extend operand 1 to XFmode and generate significandxf3 insn.
1055 2018-09-11 Nathan Sidwell <nathan@acm.org>
1057 * gcc.c (perror_with_name, pfatal_with_name): Delete.
1058 (load_specs): Use fatal_error.
1059 (DELETE_IF_ORDINARY, process_command): Use error.
1060 (execute, run_attempt): Use fatal_error.
1062 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
1064 * diagnostic-core.h (sorry_at): New prototype.
1065 * diagnostic.c (sorry_at): New function.
1067 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
1069 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
1070 by zero as VR_UNDEFINED.
1072 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
1074 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
1075 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
1076 (<sincos>mode2): New expander.
1077 (sincos_extend<mode>xf3_i387): Remove insn pattern.
1078 (sincos -> sin, cos splitters): Remove splitter patterns.
1079 (sincos<mode>3): Change operand 2 predicate to general_operand.
1080 Extend operand 2 to XFmode and generate sincosxf3 insn.
1081 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
1082 Change operand 3 predicate to const1_operand.
1083 (fptan_extend<mode>xf4_i387): Remove insn pattern.
1084 (tanxf2): Update operands in the call to fptanxf4_i387.
1085 (tan<mode>2): Change operand 1 predicate to general_operand.
1086 Extend operand 1 to XFmode and generate tanxf3 insn.
1087 (atan2xf3): Rename from *fpatanxf3_i387.
1088 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
1089 (atan2xf3): Remove expander.
1090 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
1091 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
1092 (atan<mode>2): Change operand 1 predicate to general_operand.
1093 Extend operand 1 to XFmode and generate atanxf3 insn.
1095 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
1097 * config/i386/i386.md (x87/SSE constant load splitter): Use
1098 memory_operand instead of nonimmediate_operand for input operand
1101 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
1103 * config/i386/i386.md (float partial SSE register stall splitter): Move
1104 splitter near its instruction pattern.
1105 (float_extend partial SSE register stall splitter): Ditto.
1106 (float_truncate partial SSE register stall splitter): Ditto.
1108 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
1111 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1112 to speculation_safe_value_not_needed.
1115 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
1116 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
1117 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
1118 leaf_function_p, instead use has_hard_reg_initial_val.
1120 2018-09-09 Nathan Sidwell <nathan@acm.org>
1122 * gcc.h (pfatal_with_name): Don't declare here.
1123 * gcc.c (pfatal_with_name): Make static.
1125 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
1127 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
1130 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
1132 PR rtl-optimization/85458
1133 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
1134 priority hook to reduce the priority of EXPR.
1136 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
1138 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
1139 DImode for x87 on 32bit targets. Conditionally disable x87 modes
1140 with X87_ENABLE_FLOAT. Remove preparation code.
1141 (*float<SWI48:mode><MODEF:mode>2): Rename from
1142 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
1143 math using "enabled" attribute.
1144 (*floatdi<MODEF:mode>2_i387): Rename from
1145 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
1146 enable for 32bit targets only.
1147 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
1149 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
1150 as operand 1 predicate. Rewrite as define_insn_and_split.
1151 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
1153 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
1155 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
1156 to fallthru to FLOAT case.
1158 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
1161 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
1162 around folding of vec_sl to handle out of range shift values.
1164 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
1166 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
1167 Update callers to gen_fix_trunc<mode>_i387_fisttp
1168 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
1169 nonimmediate_operand.
1170 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
1171 and corresponding splitters.
1172 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
1173 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
1174 (fix_truncdi_i387_with_temp): Remove insn pattern
1175 and corresponding splitters.
1176 (fix_trunc<mode>_i387): Change operand 0 predicate to
1177 nonimmediate_operand.
1178 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
1179 and corresponding splitters.
1180 (*fistdi2_1): Remove.
1182 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
1183 (lrintxfdi2): Remove expander. Reimplement as define_insn.
1184 (*fist<mode>2_1): Remove.
1185 (fist<mode>2): Ditto.
1186 (fist<mode>2_with_temp): Remove insn pattern and corresponding
1188 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
1189 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
1190 (fistdi2_<rounding>): Change operand 0 predicate to
1191 nonimmediate_operand.
1192 (fistdi2_<rounding>_with_temp): Remove insn pattern
1193 and corresponding splitters.
1194 (fist<mode>2_<rounding>): Change operand 0 predicate to
1195 nonimmediate_operand.
1196 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
1197 and corresponding splitters.
1199 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
1201 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1203 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
1206 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
1208 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
1209 early gimple folding of vec_splat().
1210 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
1211 * gimple-fold.h: Add an extern define for tree_vec_extract().
1213 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
1215 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
1216 wrappers around TREE_TYPE comparisons.
1218 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1221 * config/s390/predicates.md: Add nonsym_memory_operand.
1222 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
1223 contains a SYMBOL_REF, load it into an intermediate pseudo.
1224 (s390_emit_compare_and_swap): Legitimize operand.
1225 * config/s390/s390.md: Use the new nonsym_memory_operand
1226 with UNSPECV_CAS patterns.
1228 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1231 * config/s390/s390-passes.def: New file.
1232 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
1234 (make_pass_s390_early_mach): Add declaration.
1235 * config/s390/s390.c (make_pass_s390_early_mach):
1236 (s390_option_override): Remove dynamic registration.
1237 * config/s390/t-s390: Add s390-passes.def.
1239 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1241 * config/s390/s390.c (s390_decompose_constant_pool_ref):
1242 Remove UNSPEC_LTREL_BASE check.
1243 (annotate_constant_pool_refs): Likewise.
1244 (find_constant_pool_ref): Likewise.
1245 (find_ltrel_base): Removed.
1246 (replace_ltrel_base): Removed.
1247 (s390_mainpool_finish): Remove replace_ltrel_base call.
1248 (s390_chunkify_start): Remove pending LTREL_BASE logic.
1249 (s390_chunkify_finish): Remove replace_ltrel_base call.
1250 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
1252 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
1255 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1256 to speculation_safe_value_not_needed.
1258 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
1259 Bernd Schmidt <bernds_cb1@t-online.de>
1261 * config/nvptx/nvptx-opts.h: New file.
1262 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
1263 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
1265 (TARGET_SM35): New macro.
1266 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
1268 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
1270 (misa=): New option.
1271 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
1273 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
1275 * config/i386/i386.md (truncdfsf2): Remove expander.
1276 (truncdfsf2_with_temp): Ditto.
1277 (truncxf<mode>2): Ditto.
1278 (*truncdfsf_fast_mixed): Remove insn pattern.
1279 (*truncdfsf_fast_i387): Ditto.
1280 (*truncdfsf_mixed): Ditto.
1281 (*truncdfsf_i387): Ditto.
1282 (*truncdfsf2_i387_1): Ditto.
1283 (*truncxfsf2_mixed): Ditto.
1284 (*truncxfdf2_mixed): Ditto.
1285 (*truncxf<mode>2_i387_noop): Ditto. Update callers
1286 to call gen_truncxf<mode>2 instead.
1287 (*truncxf<mode>2_i387): Remove.
1288 (reg->reg splitters): Remove splitter pattern.
1289 (reg->mem splitters): Ditto.
1291 (truncdfsf2): New insn pattern.
1292 (truncxf<mode>2): Ditto.
1294 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1296 * tree-ssa-math-opts.c (is_mult_by): New function.
1297 (is_square_of): Use the above.
1298 (optimize_recip_sqrt): New function.
1299 (pass_cse_reciprocals::execute): Use the above.
1301 2018-09-05 Richard Biener <rguenther@suse.de>
1304 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
1305 to zero-init the emplaced vec.
1307 2018-09-05 Martin Liska <mliska@suse.cz>
1309 PR tree-optimization/87205
1310 * tree-switch-conversion.c (pass_lower_switch::execute):
1311 Group cases for switch statements.
1313 2018-09-05 Richard Biener <rguenther@suse.de>
1315 PR tree-optimization/87217
1316 * tree-ssa-sccvn.c (vuse_valueize): New.
1317 (vn_reference_lookup_pieces): Use it.
1318 (vn_reference_lookup): Likewise.
1320 2018-09-05 Nathan Sidwell <nathan@acm.org>
1323 * stor-layout.c (place_field): Scan forwards to check last
1324 bitfield when ms_bitfield_placement is in effect.
1326 2018-09-05 Richard Biener <rguenther@suse.de>
1329 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
1332 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
1333 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
1335 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
1336 * config.gcc (extra_objs): Build it.
1337 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
1339 * config/aarch64/aarch64-passes.def
1340 (pass_tag_collision_avoidance): New pass.
1341 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
1342 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
1343 (aarch64_classify_address): Remove static qualifier.
1344 (aarch64_address_info, aarch64_address_type): Move to...
1345 * config/aarch64/aarch64-protos.h: ... here.
1346 (make_pass_tag_collision_avoidance): New function.
1347 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
1350 2018-09-05 Martin Liska <mliska@suse.cz>
1352 * doc/gcov.texi: Update documentation of humar
1354 * gcov.c (format_count): Print one decimal place, it provides
1355 more fine number of situations like '1G' vs. '1.4G'.
1357 2018-09-05 Martin Liska <mliska@suse.cz>
1360 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
1361 * optc-gen.awk: Allow 'Var' for Deprecated options in order
1362 to generate a MASK value.
1364 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
1367 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
1368 if frame pointer isn't used.
1369 (compute_frame_pointer_to_fb_displacement): Likewise.
1371 2018-09-04 Jakub Jelinek <jakub@redhat.com>
1374 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
1375 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
1376 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
1377 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
1378 and OPTION_MASK_ISA_XSAVEC_UNSET.
1380 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
1382 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
1383 XOR operations in NAND case.
1385 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
1387 * wide-int-range.cc (wide_int_range_convert): New.
1388 * wide-int-range.h (wide_int_range_convert): New.
1389 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
1390 code into wide_int_range_convert.
1391 (extract_range_into_wide_ints): Do not munge anti range constants
1392 into the entire domain. Just return the range back.
1394 2018-09-04 Martin Liska <mliska@suse.cz>
1396 * genmatch.c (output_line_directive): Add new argument
1398 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
1400 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
1402 * doc/invoke.texi (Option Summary): Add whitespace.
1404 * doc/invoke.texi (Option Summary): Add -Waligned-new.
1406 2018-09-04 Richard Biener <rguenther@suse.de>
1408 PR tree-optimization/87211
1409 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
1410 backedge value we're supposed to treat as VARYING also number
1411 the PHI to VARYING in case it got a different value-number already.
1413 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
1415 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
1416 (extract_range_from_binary_expr_1): Do not call
1417 vrp_can_optimize_bit_op.
1418 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
1420 (wide_int_range_get_mask_and_bounds): New.
1421 (wide_int_range_optimize_bit_op): New.
1422 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
1423 (wide_int_range_bit_and): Same.
1424 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
1425 (wide_int_range_optimize_bit_op): New.
1426 (wide_int_range_get_mask_and_bounds): New.
1428 2018-09-04 Richard Biener <rguenther@suse.de>
1430 PR tree-optimization/87176
1431 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
1432 variable. When value-numbering a virtual PHI node make sure
1433 to not value-number to the backedge value.
1435 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
1437 * doc/extend.texi (Long Long, Hex Floats): Document support for
1438 long long and hex floats in more recent versions of ISO C++.
1440 2018-09-03 Richard Biener <rguenther@suse.de>
1442 PR tree-optimization/87177
1443 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
1446 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1448 * bb-reorder.c (edge_order): Convert to C-qsort-style
1449 tri-state comparator.
1450 (reorder_basic_blocks_simple): Change std::stable_sort to
1453 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1455 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
1456 tri-state comparator.
1457 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
1459 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1461 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
1462 (mergesort): ... here as maximum count for using netsort.
1463 (gcc_qsort): Set nlim to 3 if stable sort is requested.
1464 (gcc_stablesort): New.
1465 * system.h (gcc_stablesort): Declare.
1467 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1469 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
1470 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
1471 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
1473 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
1475 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
1476 lxsdx and stxsdx alternatives.
1477 (*mov<mode>_hardfloat64): Ditto.
1478 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
1480 2018-09-03 Richard Biener <rguenther@suse.de>
1482 PR tree-optimization/87200
1483 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
1486 2018-09-03 Martin Liska <mliska@suse.cz>
1488 PR tree-optimization/87201
1489 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
1490 Fix parenthesis in an expression.
1492 2018-09-03 Richard Biener <rguenther@suse.de>
1494 PR tree-optimization/87197
1495 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
1496 visited. CSE the VN_INFO hashtable lookup.
1498 PR tree-optimization/87169
1499 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
1500 iterating make sure there's no extra backedges from irreducible
1501 regions feeding the header. Mark the destination block
1504 2018-09-03 Martin Liska <mliska@suse.cz>
1507 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
1508 * common/common-targhooks.c (default_get_valid_option_values):
1510 * common/common-targhooks.h (default_get_valid_option_values):
1512 * common/config/i386/i386-common.c: Move processor_target_table
1514 (ix86_get_valid_option_values): New function.
1515 (TARGET_GET_VALID_OPTION_VALUES): New macro.
1516 * config/i386/i386.c (struct ptt): Move to i386-common.c.
1517 (PTA_*): Move all defined masks into i386-common.c.
1518 (ix86_function_specific_restore): Use new processor_cost_table.
1519 * config/i386/i386.h (struct ptt): Moved from i386.c.
1520 (struct pta): Likewise.
1521 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
1522 * doc/tm.texi.in: Likewise.
1523 * opt-suggestions.c (option_proposer::suggest_option):
1524 Pass prefix to build_option_suggestions.
1525 (option_proposer::get_completions): Likewise.
1526 (option_proposer::build_option_suggestions): Use the new target
1528 * opts.c (struct option_help_tuple): New struct.
1529 (print_filtered_help): Use the new target hook.
1531 2018-09-03 Martin Liska <mliska@suse.cz>
1534 * predict.c (set_even_probabilities): Add likely_edges
1535 argument and handle cases where we have precisely one
1537 (combine_predictions_for_bb): Catch also likely_edges.
1538 (tree_predict_by_opcode): Handle gswitch statements.
1539 * tree-cfg.h (find_case_label_for_value): New declaration.
1540 (find_taken_edge_switch_expr): Likewise.
1541 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
1542 Find pivot in decision tree based on probabily, not by number of
1545 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
1547 * doc/standards.texi (Standards): Update Objective-C reference.
1549 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1551 * doc/install.texi (Prerequisites): Update link for MPC.
1553 2018-09-01 Michael Matz <matz@suse.de>
1555 PR tree-optimization/87074
1556 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
1557 PHIs for outer-loop uses.
1559 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1561 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
1562 * doc/invoke.texi (C Dialect Options): Ditto.
1564 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1566 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
1568 2018-08-31 Richard Biener <rguenther@suse.de>
1570 PR tree-optimization/87168
1571 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
1572 (rpo_elim::eliminate_avail): When OP was not visited it must
1575 2018-08-31 David Malcolm <dmalcolm@redhat.com>
1577 * tree-vrp.c (copy_value_range): Convert param "from" from
1578 "value_range *" to "const value_range *".
1579 (range_is_null): Likewise for param "vr".
1580 (range_int_cst_p): Likewise.
1581 (range_int_cst_singleton_p): Likewise.
1582 (symbolic_range_p): Likewise.
1583 (value_ranges_intersect_p): Likewise for both params.
1584 (value_range_nonnegative_p): Likewise for param "vr".
1585 (value_range_constant_singleton): Likewise.
1586 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
1587 (extract_range_into_wide_ints): Likewise for param "vr".
1588 (extract_range_from_multiplicative_op): Likewise for params "vr0"
1590 (vrp_can_optimize_bit_op): Likewise.
1591 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
1593 (extract_range_from_unary_expr): Likewise.
1594 (debug_value_range): Likewise for param "vr".
1595 (value_range::dump): Add "const" qualifier.
1596 (vrp_prop::check_array_ref): Convert local "vr" from
1597 "value_range *" to "const value_range *".
1598 (vrp_prop::check_mem_ref): Likewise.
1599 (vrp_prop::visit_stmt): Likewise for local "old_vr".
1600 (vrp_intersect_ranges_1): Likewise for param "vr_1".
1601 (vrp_intersect_ranges): Likewise.
1602 (simplify_stmt_for_jump_threading): Likewise for local "vr".
1603 (vrp_prop::vrp_finalize): Likewise.
1604 * tree-vrp.h (value_range::dump): Add "const" qualifier.
1605 (vrp_intersect_ranges): Add "const" qualifier to params as above.
1606 (extract_range_from_unary_expr): Likewise.
1607 (value_range_constant_singleton): Likewise.
1608 (symbolic_range_p): Likewise.
1609 (copy_value_range): Likewise.
1610 (extract_range_from_binary_expr_1): Likewise.
1611 (range_int_cst_p): Likewise.
1612 (vrp_set_zero_nonzero_bits): Likewise.
1613 (range_int_cst_singleton_p): Likewise.
1615 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
1617 * config/aarch64/arm_neon.h (vabsd_s64): New.
1618 (vnegd_s64): Likewise.
1620 2018-08-31 Martin Jambor <mjambor@suse.cz>
1622 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
1624 2018-08-31 Martin Liska <mliska@suse.cz>
1626 * ipa-icf.c (sem_item::add_type): Use
1627 sem_item::m_type_hash_cache.
1628 * ipa-icf.h: Move the cache from sem_item_optimizer
1631 2018-08-31 Nathan Sidwell <nathan@acm.org>
1633 * doc/extend.texi (Backwards Compatibility): Remove implicit
1634 extern C leeway of () being (...).
1636 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1638 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
1640 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
1644 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
1646 2018-08-31 Jakub Jelinek <jakub@redhat.com>
1649 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
1650 gen_int_mode. Formatting fixes.
1652 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
1654 * target.def (custom_function_descriptors): Improve documentation.
1655 * doc/tm.texi.in (Trampolines): Expand discussion of function
1656 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
1657 beginning of the section.
1658 * doc/tm.texi: Regenerated.
1660 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
1662 * cfg.h (class auto_edge_flag): Spell out the template-id of the
1663 base class in the initializer list. This is a workaround for
1664 building with older GCC.
1665 (class auto_bb_flag): Likewise.
1667 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
1669 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
1670 (altivec_vcmpequ<VI_char>_p): Remove star.
1671 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
1673 (expand_strncmp_vec_sequence): New function.
1674 (emit_final_str_compare_vec): New function.
1675 (expand_strn_compare): Add support for vector strncmp.
1676 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
1677 length specification to bytes.
1678 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
1679 (vcmpnezb_p): New pattern.
1680 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
1681 for option -mstring-compare-inline-limit.
1683 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
1685 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
1686 (PTA_SKYLAKE): Add PTA_AES.
1687 (PTA_GOLDMONT): Likewise.
1689 2018-08-29 Jan Hubicka <jh@suse.cz>
1692 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
1693 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
1695 2018-08-29 Jan Hubicka <jh@suse.cz>
1697 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
1699 (hash_tree): Do not visit TYPE_STUB_DECL.
1700 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
1701 stream TYPE_STUB_DECL.
1702 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
1703 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
1704 after free_lang_data.
1705 (type_in_anonymous_namespace_p): Likewise.
1707 2018-08-29 Jan Hubicka <jh@suse.cz>
1709 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1710 comment that it has to be even number.
1711 (class sreal): Change m_sig type to int32_t.
1712 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1713 int64_t for temporary calculations.
1714 (sreal_verify_basics): Drop one bit from minimum and maximum.
1716 2018-08-30 Richard Biener <rguenther@suse.de>
1718 PR tree-optimization/87147
1719 * tree-ssa-sccvn.c (SSA_VISITED): New function.
1720 (visit_phi): When the degenerate result is from the backedge and
1721 we didn't visit its definition yet drop to VARYING.
1722 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
1724 2018-08-29 Jan Hubicka <jh@suse.cz>
1726 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
1728 (hash_tree): Likewise.
1730 2018-08-29 Jan Hubicka <jh@suse.cz>
1732 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
1733 and TYPE_NEXT_REF_TO.
1735 2018-08-29 Jan Hubicka <jh@suse.cz>
1737 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1738 comment that it has to be even number.
1739 (class sreal): Change m_sig type to int32_t.
1740 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1741 int64_t for temporary calculations.
1742 (sreal_verify_basics): Drop one bit from minimum and maximum.
1744 2018-08-30 Tamar Christina <tamar.christina@arm.com>
1746 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
1748 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
1751 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
1752 if to_add is negative.
1754 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
1757 * builtins.c (c_strlen): Improve range checks.
1759 2018-08-29 Martin Sebor <msebor@redhat.com>
1760 Jeff Law <law@redhat.com>
1762 PR tree-optimization/86714
1763 PR tree-optimization/86711
1764 * builtins.c (c_strlen): Add arguments to call to string_constant.
1765 * expr.c (string_constant): Add argument. Detect missing nul
1766 terminator and outermost declaration it's missing in.
1767 * expr.h (string_constant): Add argument.
1768 * fold-const.c (read_from_constant_string): Add arguments to call to
1770 (c_getstr): Likewise.
1771 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1773 * tree-ssa-strlen.c (get_stridx): Likewise.
1775 2018-08-29 Jan Hubicka <jh@suse.cz>
1777 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
1778 Do not stream DECL_VINDEX.
1779 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
1780 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
1781 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
1783 2018-08-29 Richard Biener <rguenther@suse.de>
1785 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
1786 virtual operands that are not default defs to honor region
1788 (rpo_vn_valueize): Remove ineffective code here.
1790 2018-08-29 Richard Biener <rguenther@suse.de>
1792 PR tree-optimization/87132
1793 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
1794 when skipping defs reachable over backedges.
1796 2018-08-29 Richard Biener <rguenther@suse.de>
1798 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
1799 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
1800 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
1801 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
1802 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
1803 (vn_reference_lookup_3): Remove use of const_parms.
1804 (free_rpo_vn): Do not free const_parms.
1805 (do_rpo_vn): Do not call init_const_parms.
1806 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
1807 SSA_NAME_POINTS_TO_READONLY_MEMORY.
1808 (call_may_clobber_ref_p_1): Likewise.
1810 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
1813 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
1815 (-ftree-scev-cprop): Document.
1817 2018-08-29 Jan Hubicka <jh@suse.cz>
1819 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
1821 (sreal constructor): Update.
1822 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
1823 sreal:operator/): Update.
1825 2018-08-29 Martin Liska <mliska@suse.cz>
1827 * tree-switch-conversion.c (switch_conversion::expand):
1828 Strenghten assumption about gswitch statements.
1830 2018-08-29 Richard Biener <rguenther@suse.de>
1832 PR tree-optimization/87117
1833 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1834 re-value-number released SSA VDEFs.
1836 2018-08-29 Richard Biener <rguenther@suse.de>
1838 PR tree-optimization/87126
1839 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
1841 2018-08-28 Jim Wilson <jimw@sifive.com>
1843 * config/riscv/pic.md: Rewrite.
1844 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
1846 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
1847 (SOFTF, default_load, softload, softstore): New.
1849 2018-08-28 Jeff Law <law@redhat.com>
1851 * fold-const.c (fold_binary_loc): Remove recently added assert.
1853 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
1855 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
1856 to OP parmeter of generated function.
1858 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
1860 PR tree-optimization/87009
1861 * match.pd: Add boolean optimizations.
1863 2018-08-28 Martin Sebor <msebor@redhat.com>
1866 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1867 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1868 (pass_walloca::gate): Use it.
1869 (alloca_call_type): Same.
1870 (pass_walloca::execute): Same.
1871 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1873 2018-08-28 David Malcolm <dmalcolm@redhat.com>
1875 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1876 GCC_VERSION for usage of "__gcc_dump_printf__" format from
1879 2018-08-28 Richard Biener <rguenther@suse.de>
1881 PR tree-optimization/87124
1882 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1883 constants before looking up avail.
1885 2018-08-28 Jakub Jelinek <jakub@redhat.com>
1888 * calls.c (maybe_warn_nonstring_arg): Punt early if
1889 warn_stringop_overflow is zero. Don't call get_range_strlen
1890 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1891 Swap comparison operands to have constants on rhs. Only use
1892 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
1893 increment lenrng[0].
1895 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
1897 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1898 use of tree_to_shwi. Remove duplicated test for the size being
1899 a whole number of bytes.
1901 2018-08-28 Richard Biener <rguenther@suse.de>
1903 PR tree-optimization/87117
1904 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1905 Handle removed stmt without LHS (GIMPLE_NOP).
1907 2018-08-28 Richard Biener <rguenther@suse.de>
1909 PR tree-optimization/87117
1910 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1911 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1913 2018-08-28 Richard Biener <rguenther@suse.de>
1915 PR tree-optimization/87117
1916 * tree-ssa-pre.c (compute_avail): Do not make expressions
1917 with predicated values available.
1918 (get_expr_value_id): Assert we do not run into predicated value
1921 2018-08-28 Richard Biener <rguenther@suse.de>
1923 PR tree-optimization/87117
1924 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1925 get virtual operands.
1926 (get_expr_operands): Handle STRING_CST like other decls.
1928 2018-08-28 Martin Liska <mliska@suse.cz>
1930 * tree.h: Update documentation of fndecl_built_in_p
1934 2018-08-27 Jeff Law <law@redhat.com>
1935 PR tree-optimization/87110
1936 * tree-ssa-dse.c (compute_trims): Handle non-constant
1939 2018-08-27 Martin Sebor <msebor@redhat.com>
1941 PR tree-optimization/86914
1942 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1944 2018-08-27 Martin Sebor <msebor@redhat.com>
1946 PR tree-optimization/87112
1947 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1948 the type of the bound argument.
1950 2018-08-27 Jeff Law <law@redhat.com>
1952 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1953 type does not have a TYPE_SIZE_UNIT.
1955 2018-08-27 Steve Ellcey <sellcey@cavium.com>
1957 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1958 with include of backend.h.
1960 2018-08-27 Richard Biener <rguenther@suse.de>
1962 PR tree-optimization/86927
1963 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1964 use const cond reduction code.
1966 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
1968 PR tree-optimization/85758
1969 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1971 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1974 * diagnostic-show-locus.c (class layout_range): Update for
1975 conversion of show_caret_p to a tri-state.
1976 (layout_range::layout_range): Likewise.
1977 (make_range): Likewise.
1978 (layout::maybe_add_location_range): Likewise.
1979 (layout::should_print_annotation_line_p): Don't show annotation
1980 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1981 (layout::get_state_at_point): Update for conversion of
1982 show_caret_p to a tri-state. Bail out early for
1983 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1984 underlining or source colorization.
1985 (gcc_rich_location::add_location_if_nearby): Update for conversion
1986 of show_caret_p to a tri-state.
1987 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1988 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1990 (selftest::test_one_liner_labels): Likewise.
1991 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1992 conversion of show_caret_p to a tri-state.
1993 * pretty-print.c (text_info::set_location): Likewise.
1994 * pretty-print.h (text_info::set_location): Likewise.
1995 * substring-locations.c (format_warning_n_va): Likewise.
1996 * tree-diagnostic.c (default_tree_printer): Likewise.
1997 * tree-pretty-print.c (newline_and_indent): Likewise.
1999 2018-08-27 David Malcolm <dmalcolm@redhat.com>
2002 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
2003 line above for line-insertion fix-it hints.
2004 (selftest::test_fixit_insert_containing_newline): Update the
2005 expected results, and add a test with line-numbering enabled.
2007 2018-08-27 Martin Liska <mliska@suse.cz>
2010 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
2011 params with DECL_HAS_VALUE_EXPR_P.
2013 2018-08-27 Martin Liska <mliska@suse.cz>
2015 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
2016 selected expansion strategy.
2018 2018-08-27 Martin Liska <mliska@suse.cz>
2020 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
2021 * builtins.c (is_builtin_fn): Likewise.
2022 * attribs.c (diag_attr_exclusions): Use new function
2023 fndecl_built_in_p and remove check for FUNCTION_DECL if
2025 (builtin_mathfn_code): Likewise.
2026 (fold_builtin_expect): Likewise.
2027 (fold_call_expr): Likewise.
2028 (fold_builtin_call_array): Likewise.
2029 (fold_call_stmt): Likewise.
2030 (set_builtin_user_assembler_name): Likewise.
2031 (is_simple_builtin): Likewise.
2032 * calls.c (gimple_alloca_call_p): Likewise.
2033 (maybe_warn_nonstring_arg): Likewise.
2034 * cfgexpand.c (expand_call_stmt): Likewise.
2035 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
2036 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
2037 (cgraph_node::verify_node): Likewise.
2038 * cgraphclones.c (build_function_decl_skip_args): Likewise.
2039 (cgraph_node::create_clone): Likewise.
2040 * config/arm/arm.c (arm_insert_attributes): Likewise.
2041 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
2042 * dse.c (scan_insn): Likewise.
2043 * expr.c (expand_expr_real_1): Likewise.
2044 * fold-const.c (operand_equal_p): Likewise.
2045 (fold_binary_loc): Likewise.
2046 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
2047 * gimple-low.c (lower_stmt): Likewise.
2048 * gimple-pretty-print.c (dump_gimple_call): Likewise.
2049 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
2051 * gimple.c (gimple_build_call_from_tree): Likewise.
2052 (gimple_call_builtin_p): Likewise.
2053 (gimple_call_combined_fn): Likewise.
2054 * gimplify.c (gimplify_call_expr): Likewise.
2055 (gimple_boolify): Likewise.
2056 (gimplify_modify_expr): Likewise.
2057 (gimplify_addr_expr): Likewise.
2058 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
2059 * ipa-cp.c (determine_versionability): Likewise.
2060 * ipa-fnsummary.c (compute_fn_summary): Likewise.
2061 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
2062 * ipa-split.c (visit_bb): Likewise.
2063 (split_function): Likewise.
2064 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
2065 * lto-cgraph.c (input_node): Likewise.
2066 * lto-streamer-out.c (write_symbol): Likewise.
2067 * omp-low.c (setjmp_or_longjmp_p): Likewise.
2068 (lower_omp_1): Likewise.
2069 * predict.c (strip_predict_hints): Likewise.
2070 * print-tree.c (print_node): Likewise.
2071 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
2072 * trans-mem.c (is_tm_irrevocable): Likewise.
2073 (is_tm_load): Likewise.
2074 (is_tm_simple_load): Likewise.
2075 (is_tm_store): Likewise.
2076 (is_tm_simple_store): Likewise.
2077 (is_tm_abort): Likewise.
2078 (tm_region_init_1): Likewise.
2079 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
2080 * tree-cfg.c (verify_gimple_call): Likewise.
2081 (move_stmt_r): Likewise.
2082 (stmt_can_terminate_bb_p): Likewise.
2083 * tree-eh.c (lower_eh_constructs_2): Likewise.
2084 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
2085 * tree-inline.c (remap_gimple_stmt): Likewise.
2086 (copy_bb): Likewise.
2087 (estimate_num_insns): Likewise.
2088 (fold_marked_statements): Likewise.
2089 * tree-sra.c (scan_function): Likewise.
2090 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
2091 (optimize_stack_restore): Likewise.
2092 (pass_fold_builtins::execute): Likewise.
2093 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
2094 (mark_all_reaching_defs_necessary_1): Likewise.
2095 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
2096 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
2097 (pass_forwprop::execute): Likewise.
2098 * tree-ssa-loop-im.c (stmt_cost): Likewise.
2099 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
2100 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
2101 * tree-ssa-strlen.c (get_string_length): Likewise.
2102 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
2103 (find_func_aliases_for_call): Likewise.
2104 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
2105 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
2106 * tree-tailcall.c (find_tail_calls): Likewise.
2107 * tree.c (need_assembler_name_p): Likewise.
2108 (free_lang_data_in_decl): Likewise.
2109 (get_call_combined_fn): Likewise.
2110 * ubsan.c (is_ubsan_builtin_p): Likewise.
2111 * varasm.c (incorporeal_function_p): Likewise.
2112 * tree.h (DECL_BUILT_IN): Remove and replace with
2114 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
2115 (fndecl_built_in_p): New.
2117 2018-08-27 Martin Liska <mliska@suse.cz>
2119 PR tree-optimization/86847
2120 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
2121 Dump also subtree probability.
2122 (switch_decision_tree::do_jump_if_equal): New function.
2123 (switch_decision_tree::emit_case_nodes): Handle special
2124 situations in balanced tree that can be emitted much simpler.
2125 Fix calculation of probabilities that happen in tree expansion.
2126 * tree-switch-conversion.h (struct cluster): Add
2128 (struct simple_cluster): Likewise.
2129 (struct case_tree_node): Add new function has_child.
2130 (do_jump_if_equal): New.
2132 2018-08-27 Martin Liska <mliska@suse.cz>
2134 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
2135 Add new argument to bit_test_cluster constructor.
2136 (bit_test_cluster::emit): Set bits really number of values
2138 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
2139 probability argument.
2140 * tree-switch-conversion.h (struct bit_test_cluster):
2141 Add m_handles_entire_switch.
2143 2018-08-27 Martin Liska <mliska@suse.cz>
2145 PR tree-optimization/86702
2146 * tree-switch-conversion.c (jump_table_cluster::emit):
2147 Make probabilities even for values in jump table
2148 according to number of cases handled.
2149 (switch_decision_tree::compute_cases_per_edge): Pass
2150 argument to reset_out_edges_aux function.
2151 (switch_decision_tree::analyze_switch_statement): Likewise.
2152 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
2155 2018-08-27 Martin Liska <mliska@suse.cz>
2157 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
2158 cfun argument explicitly.
2159 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
2160 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
2161 function gimple_switch_default_bb.
2162 (convert_switch_statements):
2164 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
2165 * stmt.c (label_to_block_fn): Use label_to_block and pass
2166 cfun argument explicitly and use gimple_switch_label_bb.
2167 (expand_case): Likewise.
2168 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
2169 cfun argument explicitly. Likewise.
2170 (make_edges_bb): Likewise.
2171 (make_cond_expr_edges): Likewise.
2172 (get_cases_for_edge): Likewise.
2173 (make_gimple_switch_edges): Likewise.
2174 (label_to_block_fn): Likewise.
2175 (label_to_block): Likewise.
2176 (make_goto_expr_edges): Likewise.
2177 (make_gimple_asm_edges): Likewise.
2178 (main_block_label): Likewise.
2179 (group_case_labels_stmt): Likewise.
2180 (find_taken_edge_computed_goto): Likewise.
2181 (find_taken_edge_switch_expr): Likewise.
2182 (gimple_verify_flow_info): Likewise.
2183 (gimple_redirect_edge_and_branch): Likewise.
2184 (gimple_switch_label_bb): New function.
2185 (gimple_switch_default_bb): Likewise.
2186 (gimple_switch_edge): Likewise.
2187 (gimple_switch_default_edge): Likewise.
2188 * tree-cfg.h (label_to_block_fn): Remove and replace ...
2189 (label_to_block): ... with this.
2190 (gimple_switch_label_bb): New.
2191 (gimple_switch_default_bb): Likewise.
2192 (gimple_switch_edge): Likewise.
2193 (gimple_switch_default_edge): Likewise.
2194 * tree-cfgcleanup.c (convert_single_case_switch): Use
2195 new gimple functions and pass new argument to label_to_block.
2196 (cleanup_control_flow_bb):
2197 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
2198 cfun argument explicitly.
2199 (make_eh_edges): Likewise.
2200 (redirect_eh_dispatch_edge): Likewise.
2201 (lower_resx): Likewise.
2202 (lower_eh_dispatch): Likewise.
2203 (maybe_remove_unreachable_handlers): Likewise.
2204 (unsplit_eh): Likewise.
2205 (cleanup_empty_eh): Likewise.
2206 (verify_eh_edges): Likewise.
2207 (verify_eh_dispatch_edge): Likewise.
2208 * tree-ssa-dom.c (record_edge_info): Likewise.
2209 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
2210 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
2211 (thread_through_normal_block): Likewise.
2212 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
2213 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
2214 * tree-switch-conversion.c (switch_conversion::collect): Use new
2216 (switch_conversion::check_final_bb): Likewise.
2217 (switch_conversion::gather_default_values): Pass new argument
2219 (switch_conversion::build_constructors): Likewise.
2220 (switch_decision_tree::compute_cases_per_edge): Use new
2221 gimple_switch_edge function.
2222 (switch_decision_tree::analyze_switch_statement): Pass new argument
2224 (switch_decision_tree::try_switch_expansion): Use
2225 gimple_switch_default_edge.
2226 * tree-vrp.c (find_switch_asserts): Pass new argument
2228 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
2229 (vr_values::simplify_switch_using_ranges): Likewise.
2231 2018-08-27 Richard Biener <rguenther@suse.de>
2233 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
2234 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
2236 * tree-ssa-sccvn.h (struct vn_pval): New structure.
2237 (struct vn_nary_op_s): Add unwind_to member. Add
2238 predicated_values flag and put result into a union together
2239 with a linked list of vn_pval.
2240 (struct vn_ssa_aux): Add name member to make maintaining
2241 a map of SSA name to vn_ssa_aux possible. Remove no longer
2242 needed info, dfsnum, low, visited, on_sccstack, use_processed
2243 and range_info_anti_range_p members.
2244 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
2245 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
2247 (vn_valueize): New global.
2248 (vn_context_bb): Likewise.
2249 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
2250 VN_INFO_PTR_INFO): Remove.
2251 * tree-ssa-sccvn.c: ... (rewrite)
2252 (pass_fre::execute): For -O2+ initialize loops and run
2253 RPO VN in optimistic mode (iterating). For -O1 and -Og
2254 run RPO VN in non-optimistic mode.
2255 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
2256 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
2257 * doc/invoke.texi (sccvn-max-scc-size): Remove.
2258 (rpo-vn-max-loop-depth): Document.
2259 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
2260 when valuezing the VUSE signals we walked out of the region.
2261 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
2262 (phi_translate): Set VN context block to use for availability
2264 (compute_avail): Likewise.
2265 (pre_valueize): New function.
2266 (pass_pre::execute): Adjust to the RPO VN API.
2268 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
2269 (propagate_constants_for_unrolling): Remove.
2270 (tree_unroll_loops_completely): Perform value-numbering
2271 on the unrolled bodies loop parent.
2273 2018-08-27 Richard Biener <rguenther@suse.de>
2275 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
2276 for partial antic compute.
2278 2018-08-27 Jakub Jelinek <jakub@redhat.com>
2280 PR rtl-optimization/87065
2281 * combine.c (simplify_if_then_else): Formatting fix.
2282 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
2284 (known_cond): Don't return const_true_rtx for vector modes. Use
2285 CONST0_RTX instead of const0_rtx. Formatting fixes.
2287 2018-08-27 Martin Liska <mliska@suse.cz>
2289 PR gcov-profile/87069
2290 * gcov.c (process_file): Record files already processed
2291 and warn about a file being processed multiple times.
2293 2018-08-27 Martin Liska <mliska@suse.cz>
2296 * config/aarch64/aarch64.c (aarch64_override_options_internal):
2297 Set default values for x_aarch64_*_string strings.
2298 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
2299 prefix. For -mabi do not print '=ABI' in help and use
2300 <option_value> format for -msve-vector-bits and -moverride
2303 2018-08-26 Jeff Law <law@redhat.com>
2305 * config/mips/frame-header-opt.c: Include "backend.h" rather than
2308 2018-08-26 Marek Polacek <polacek@redhat.com>
2310 PR c++/87029, Implement -Wredundant-move.
2311 * doc/invoke.texi: Document -Wredundant-move.
2313 2018-08-25 Martin Sebor <msebor@redhat.com>
2315 PR tree-optimization/87059
2316 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
2317 to the same type as the other.
2318 * fold-const.c (fold_binary_loc): Assert expectation.
2320 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
2322 * config/darwin.c (machopic_legitimize_pic_address): Clean up
2323 extraneous parentheses, dead code section and formatting.
2325 2018-08-24 David Malcolm <dmalcolm@redhat.com>
2328 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
2329 wide enough for jumps in the line-numbering to be visible.
2330 (layout::print_gap_in_line_numbering): New member function.
2331 (layout::calculate_line_spans): When using line numbering, merge
2332 line spans that are only 1 line apart.
2333 (diagnostic_show_locus): When printing line numbers, show gaps in
2334 line numbering directly, rather than printing headers.
2335 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
2336 line-numbering with multiple line spans.
2337 (selftest::test_fixit_insert_containing_newline_2): Add test of
2338 line-numbering, in which the spans are close enough to be merged.
2340 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
2342 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
2343 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
2344 * tree-vrp.c (range_is_nonnull): Remove.
2345 (range_includes_zero_p): Accept value_range instead of min/max.
2346 (extract_range_from_binary_expr_1): Do not early bail on
2348 Use range_includes_zero_p instead of range_is_nonnull.
2349 (extract_range_from_unary_expr): Use range_includes_zero_p instead
2350 of range_is_nonnull.
2351 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
2352 special case VR_ANTI_RANGE.
2353 (vrp_finalize): Same.
2354 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
2356 (range_is_nonnull): Remove.
2357 * vr-values.c (vrp_stmt_computes_nonzero): Use
2358 range_includes_zero_p instead of range_is_nonnull.
2359 (extract_range_basic): Pass value_range to range_includes_zero_p
2360 instead of range_is_nonnull.
2362 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
2364 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
2365 * emit-rtl.h (rtl_data): Remove return_bnd.
2366 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
2367 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
2368 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
2369 (POINTER_BOUNDS_MODE): Remove definition.
2370 (make_pointer_bounds_mode): Remove.
2371 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
2372 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
2373 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
2374 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
2375 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
2376 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
2377 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
2379 * config/i386/i386-modes.def (BND32, BND64): Remove.
2380 * config/i386/i386.c (dbx_register_map): Remove bound registers.
2381 (dbx64_register_map): Ditto.
2382 (svr4_dbx_register_map): Ditto.
2383 (indirect_thunk_bnd_needed): Remove.
2384 (indirect_thunks_bnd_used): Ditto.
2385 (indirect_return_bnd_needed): Ditto.
2386 (indirect_return_via_cx_bnd): Ditto.
2387 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
2388 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
2389 (output_indirect_thunk): Ditto. Remove need_prefix argument.
2390 (output_indirect_thunk_function): Remove handling of
2391 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
2392 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
2393 (ix86_save_reg): Remove handling of crtl->return_bnd.
2394 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
2395 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
2396 and UNSPEC_BNDLX_ADDR.
2397 (ix86_output_indirect_branch_via_reg): Remove handling of
2398 indirect_thunk_prefix_bnd.
2399 (ix86_output_indirect_branch_via_push): Ditto.
2400 (ix86_output_function_return): Ditto.
2401 (ix86_output_indirect_function_return): Ditto.
2402 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
2403 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
2404 (CALL_USED_REGISTERS): Ditto.
2405 (REG_ALLOC_ORDER): Update for removal of bound registers.
2406 (HI_REGISTER_NAMES): Ditto.
2407 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
2408 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
2409 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
2410 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
2411 (FIRST_PSEUDO_REG): Update.
2412 (BND): Remove mode iterator.
2413 * config/i386/predicates.md (bnd_mem_operator): Remove.
2415 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
2417 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
2420 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
2422 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
2423 the case in which the permute needs only a single element and
2424 repeats for every vector of the result. Extend that case to
2425 handle variable-length vectors.
2426 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2428 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
2431 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
2432 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
2434 2018-08-24 Richard Biener <rguenther@suse.de>
2436 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
2437 bb_flags_allocated members.
2438 (auto_flag): New RAII class for allocating flags.
2439 (auto_edge_flag): New RAII class for allocating edge flags.
2440 (auto_bb_flag): New RAII class for allocating bb flags.
2441 * cfgloop.c (verify_loop_structure): Allocate temporary edge
2443 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
2444 in favor of temporarily allocated BB flag.
2445 * hsa-brig.c: Re-order includes.
2446 * hsa-dump.c: Likewise.
2447 * hsa-regalloc.c: Likewise.
2448 * print-rtl.c: Likewise.
2449 * profile-count.c: Likewise.
2451 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
2454 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
2457 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
2460 * wide-int-range.cc (wide_int_range_div): Do not ignore result
2461 from wide_int_range_multiplicative_op.
2463 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2465 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
2468 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
2470 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
2473 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
2475 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
2476 full GENERIC expression used for replacement.
2478 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
2480 * tree-vrp.c (abs_extent_range): Remove.
2481 (extract_range_into_wide_ints): Pass wide ints by reference.
2482 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
2483 Pass wide ints by reference in all calls to
2484 extract_range_into_wide_ints.
2485 * wide-int-range.cc (wide_int_range_div): New.
2486 * wide-int-range.h (wide_int_range_div): New.
2487 (wide_int_range_includes_zero_p): New.
2488 (wide_int_range_zero_p): New.
2490 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
2492 * config/aarch64/aarch64.md (arches): New enum.
2493 (arch): New enum attr.
2494 (arch_enabled): New attr.
2495 (enabled): Now uses arch_enabled only.
2496 (simd, sve, fp16): Removed attribute.
2497 (fp): Attr now defined in terms of 'arch'.
2498 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
2499 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
2500 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
2501 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
2502 attributes into 'arch'.
2503 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
2504 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
2505 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
2506 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
2507 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
2508 'simd' attribute into 'arch'.
2509 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
2510 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
2511 Convert use of 'fp' attribute to 'arch'.
2512 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
2513 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
2515 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
2516 (different modes) Merge 'fp' and 'simd' into 'arch'.
2517 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
2520 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
2522 PR rtl-optimization/87026
2523 * expmed.c (canonicalize_comparison): If we can no longer create
2524 pseudoregisters, don't.
2526 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
2529 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
2531 * config/arm/arm.c (speculation_barrier_libfunc): New static
2533 (arm_init_libfuncs): Initialize it.
2534 (arm_emit_speculation_barrier): New function.
2535 * config/arm/arm.md (speculation_barrier): Call
2536 arm_emit_speculation_barrier for architectures that do not have
2538 (speculation_barrier_insn): Only match on Armv7 or later.
2540 2018-08-23 Richard Biener <rguenther@suse.de>
2543 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
2546 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
2548 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
2549 of single-vector TBLs.
2550 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
2553 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
2556 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
2557 aarch64_evpc_tbl guard.
2559 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
2561 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
2564 2018-08-22 Martin Sebor <msebor@redhat.com>
2567 * tree-pretty-print.c (pretty_print_string): Add argument.
2568 (dump_generic_node): Call to pretty_print_string with string size.
2570 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
2572 PR rtl-optimization/86771
2573 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
2574 of two SETs into those two SETs, one to be placed at i2, if that SETs
2575 destination is modified between i2 and i3.
2577 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2579 PR tree-optimization/86725
2580 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
2582 (vect_analyze_scalar_cycles_1): Check it.
2584 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2586 PR tree-optimization/86725
2587 * tree-vect-loop.c (vect_is_simple_reduction): When treating
2588 an outer loop phi as a double reduction, make sure that the
2589 single user of the phi result is an inner loop phi.
2591 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2593 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
2594 grouped stores with gaps to a strided group.
2596 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2598 * tree-vect-stmts.c (get_group_load_store_type)
2599 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
2600 first statement in a group.
2602 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2604 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
2605 the sequence used in gcc/gcc.c.
2607 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2610 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
2613 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2615 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
2616 Darwin10-specific unwinder-shim.
2617 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
2618 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
2619 New to cater for Darwin10 Rosetta.
2621 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2623 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
2624 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
2626 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2631 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
2632 (dwarf2out_switch_text_section): Generate a local label for the
2633 second function sub-section and apply it as the second FDE start
2635 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
2636 second sub-section start.
2638 2018-08-22 Richard Biener <rguenther@suse.de>
2640 PR tree-optimization/86988
2641 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
2643 2018-08-22 Richard Biener <rguenther@suse.de>
2645 PR tree-optimization/86945
2646 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
2648 2018-08-22 Alexandre Oliva <oliva@adacore.com>
2650 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
2651 a comment about how uses of r2 for .sdata2 come about.
2653 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
2655 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
2657 2018-08-21 Marek Polacek <polacek@redhat.com>
2659 PR c++/86981, Implement -Wpessimizing-move.
2660 * doc/invoke.texi: Document -Wpessimizing-move.
2662 2018-08-21 Jan Hubicka <jh@suse.cz>
2664 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
2665 * tree.h (is_redundant_typedef): Remove.
2666 * dwarf2out.c (is_redundant_typedef): Turn into static function.
2668 2018-08-21 Jan Hubicka <jh@suse.cz>
2670 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
2673 2018-08-21 Tamar Christina <tamar.christina@arm.com>
2675 * expmed.c (extract_low_bits): Reject invalid subregs early.
2677 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2680 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
2683 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2685 * config/vxworks.h: Guard vxworks_asm_out_constructor and
2686 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
2687 * config/vxworks.c: Likewise.
2689 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2691 * config/vxworks.c: Set targetm.have_ctors_dtors
2692 if HAVE_INITFINI_ARRAY_SUPPORT.
2693 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
2694 if HAVE_INITFINI_ARRAY_SUPPORT.
2696 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2698 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
2699 default search path for VxWorks < 7.
2701 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2703 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
2704 (get_format_string): Refer to c_getstr.
2706 2018-08-21 Tom de Vries <tdevries@suse.de>
2708 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2709 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2710 (debuginfo_early_stop): Declare.
2711 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2712 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2713 (debuginfo_early_stop): New function.
2714 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
2715 and debuginfo_early_stop.
2716 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
2717 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
2718 (general_init): Call debuginfo_early_init.
2719 (finalize): Call debuginfo_fini.
2720 (do_compile): Call debuginfo_init.
2721 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
2723 (@item -fdump-debug, @item -fdump-earlydebug): Add.
2725 2018-08-21 Tom de Vries <tdevries@suse.de>
2727 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
2728 flag_dump_noaddr and flag_dump_unnumbered.
2730 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
2732 * wide-int-range.cc (wide_int_range_abs): New.
2733 (wide_int_range_order_set): Rename from wide_int_range_min_max.
2734 * wide-int-range.h (wide_int_range_abs): New.
2735 (wide_int_range_min_max): New.
2736 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
2737 case to call wide_int_range_abs.
2738 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
2739 (extract_range_from_abs_expr): Delete.
2741 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
2744 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
2745 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
2748 2018-08-20 Nathan Sidwell <nathan@acm.org>
2749 Jeff Law <law@redhat.com>
2751 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
2752 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
2754 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2757 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
2758 (decl_attributes): Likewise.
2759 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
2761 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
2762 * diagnostic-core.h (class auto_diagnostic_group): New class.
2763 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
2764 (diagnostic_report_diagnostic): Handle the first diagnostics within
2766 (emit_diagnostic): Add auto_diagnostic_group instance.
2768 (inform_n): Likewise.
2769 (warning): Likewise.
2770 (warning_at): Likewise.
2771 (warning_n): Likewise.
2772 (pedwarn): Likewise.
2773 (permerror): Likewise.
2775 (error_n): Likewise.
2776 (error_at): Likewise.
2778 (fatal_error): Likewise.
2779 (internal_error): Likewise.
2780 (internal_error_no_backtrace): Likewise.
2781 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
2782 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
2783 * diagnostic.h (struct diagnostic_context): Add fields
2784 "diagnostic_group_nesting_depth",
2785 "diagnostic_group_emission_count", "begin_group_cb",
2787 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
2788 Add auto_diagnostic_group instance(s).
2789 (find_explicit_erroneous_behavior): Likewise.
2790 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
2791 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
2792 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
2793 (gimplify_va_arg_expr): Likewise.
2794 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
2795 (HSA_SORRY_AT): Likewise.
2796 * ipa-devirt.c (compare_virtual_tables): Likewise.
2797 (warn_odr): Likewise.
2798 * multiple_target.c (expand_target_clones): Likewise.
2799 * opts-common.c (cmdline_handle_error): Likewise.
2800 * reginfo.c (globalize_reg): Likewise.
2801 * substring-locations.c (format_warning_n_va): Likewise.
2802 * tree-inline.c (expand_call_inline): Likewise.
2803 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
2804 * tree-ssa-loop-niter.c
2805 (do_warn_aggressive_loop_optimizations): Likewise.
2806 * tree-ssa-uninit.c (warn_uninit): Likewise.
2807 * tree.c (warn_deprecated_use): Likewise.
2809 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
2812 * config/i386/i386.md (eh_return): Always update EH return
2813 address in word_mode.
2815 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
2817 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
2818 TARGET_SPLIT_COMPLEX_ARG is defined.
2820 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2822 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
2824 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2827 * expr.c (expand_assignment): Assert that bitpos is positive.
2828 (store_field): Likewise
2829 (expand_expr_real_1): Make sure that bitpos is positive.
2830 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
2833 2018-08-20 Nathan Sidwell <nathan@acm.org>
2835 * Makefile.in (CPP_ID_DATA_H): Delete.
2836 (CPP_INTERNAL_H): Don't add it.
2837 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
2838 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
2840 2018-08-20 Richard Biener <rguenther@suse.de>
2842 PR tree-optimization/78655
2843 * tree-vrp.c (extract_range_from_binary_expr_1): Make
2844 pointer + offset nonnull if either operand is nonnull work.
2846 2018-08-20 Tom de Vries <tdevries@suse.de>
2848 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
2849 unless the referenced die describes the added property using
2850 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
2851 Otherwise, add a DW_AT_location to the referenced die.
2853 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
2856 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
2857 register_operand when calling ix86_set_reg_reg_cost.
2858 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
2859 Set *total to 0 for operands that satisfy x86_64_immediate_operand
2860 predicate and to 1 otherwise.
2862 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
2864 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2865 emit a diagnostic that it is not supported and reset the option.
2866 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2867 supported and consume the option. (ASM_FINAL_SPEC): New.
2869 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2871 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2874 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
2876 C-SKY port: Documentation
2878 * doc/extend.texi (C-SKY Function Attributes): New section.
2879 * doc/invoke.texi (Option Summary): Add C-SKY options.
2880 (C-SKY Options): New section.
2881 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2883 2018-08-17 Jojo <jijie_rong@c-sky.com>
2884 Huibin Wang <huibin_wang@c-sky.com>
2885 Sandra Loosemore <sandra@codesourcery.com>
2886 Chung-Lin Tang <cltang@codesourcery.com>
2888 C-SKY port: Backend implementation
2890 * config/csky/*: New.
2891 * common/config/csky/*: New.
2893 2018-08-17 Jojo <jijie_rong@c-sky.com>
2894 Huibin Wang <huibin_wang@c-sky.com>
2895 Sandra Loosemore <sandra@codesourcery.com>
2896 Chung-Lin Tang <cltang@codesourcery.com>
2897 Andrew Jenner <andrew@codesourcery.com>
2899 C-SKY port: Configury
2901 * config.gcc (csky-*-*): New.
2902 * configure.ac: Add csky to targets for dwarf2 debug_line support.
2903 * configure: Regenerated.
2905 2018-08-17 David Malcolm <dmalcolm@redhat.com>
2907 * dump-context.h: Include "dumpfile.h".
2908 (dump_context::dump_printf_va): Convert final param from va_list
2909 to va_list *. Convert from ATTRIBUTE_PRINTF to
2910 ATTRIBUTE_GCC_DUMP_PRINTF.
2911 (dump_context::dump_printf_loc_va): Likewise.
2912 * dumpfile.c: Include "stringpool.h".
2913 (make_item_for_dump_printf_va): Delete.
2914 (make_item_for_dump_printf): Delete.
2915 (class dump_pretty_printer): New class.
2916 (dump_pretty_printer::dump_pretty_printer): New ctor.
2917 (dump_pretty_printer::emit_items): New member function.
2918 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2920 (dump_pretty_printer::emit_item): New member function.
2921 (dump_pretty_printer::stash_item): New member function.
2922 (dump_pretty_printer::format_decoder_cb): New member function.
2923 (dump_pretty_printer::decode_format): New member function.
2924 (dump_context::dump_printf_va): Reimplement in terms of
2925 dump_pretty_printer.
2926 (dump_context::dump_printf_loc_va): Convert final param from va_list
2928 (dump_context::begin_scope): Reimplement call to
2929 make_item_for_dump_printf.
2930 (dump_printf): Update for change to dump_printf_va.
2931 (dump_printf_loc): Likewise.
2932 (selftest::test_capture_of_dump_calls): Convert "stmt" from
2933 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
2934 with %T, %E, and %G.
2935 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2936 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2937 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2938 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2939 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2940 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2941 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2942 within a dump_printf_loc call to "%wu".
2943 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2944 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
2945 missing space after "=".
2946 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2947 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2948 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2949 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2950 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
2951 duplicate "vectorized" from message.
2953 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2955 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2956 polyNxK_t element's TYPE_STRING_FLAG.
2958 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2960 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2961 (they were unnamed before). Fix comments.
2963 2018-08-17 Nathan Sidwell <nathan@acm.org>
2965 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2967 2018-08-17 Richard Biener <rguenther@suse.de>
2969 PR tree-optimization/86841
2970 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2972 2018-08-17 Martin Liska <mliska@suse.cz>
2974 * common.opt: Remove Warn, Init and Report for options with
2975 Ignore/Deprecated flag. Warning is done automatically for
2977 * config/i386/i386.opt: Likewise.
2978 * config/ia64/ia64.opt: Likewise.
2979 * config/rs6000/rs6000.opt: Likewise.
2980 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2981 Remove usage of flag_check_pointer_bounds.
2982 * lto-wrapper.c (merge_and_complain): Do not handle
2983 OPT_fcheck_pointer_bounds.
2984 (append_compiler_options): Likewise.
2985 * opt-functions.awk: Do not handle Deprecated.
2986 * optc-gen.awk: Check that Var, Report and Init are not
2987 used for an option with Ignore/Deprecated flag.
2988 * opts-common.c (decode_cmdline_option): Do not report
2990 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2992 * opts.h (struct cl_option): Remove cl_deprecated flag.
2993 (CL_ERR_DEPRECATED): Remove error enum value.
2995 2018-08-17 Richard Biener <rguenther@suse.de>
2998 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2999 across a va-arg-pack using call adjust its return value accordingly.
3001 2018-08-16 Martin Sebor <msebor@redhat.com>
3003 PR tree-optimization/86853
3004 * gimple-ssa-sprintf.c (struct format_result): Rename member.
3005 (struct fmtresult): Add member and initialize it in ctors.
3006 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
3007 (format_string): Handle %S the same as %ls. Set MAYFAIL.
3008 (format_directive): Set POSUNDER4K when MAYFAIL is set.
3009 (parse_directive): Handle %C same as %c.
3010 (sprintf_dom_walker::compute_format_length): Adjust.
3011 (is_call_safe): Adjust.
3013 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
3015 * builtins.c (c_strlen): Add new parameter eltsize. Use it
3016 for determining how to count the elements.
3017 * builtins.h (c_strlen): Adjust prototype.
3018 * expr.c (string_constant): Add new parameter mem_size.
3019 Set *mem_size appropriately.
3020 * expr.h (string_constant): Adjust protoype.
3021 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
3022 * gimple-fold.h (get_range_strlen): Adjust prototype.
3023 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
3024 (format_string): Call get_string_length with eltsize.
3026 2018-08-16 David Malcolm <dmalcolm@redhat.com>
3028 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
3029 to emit the span, rather than setting it as the prefix.
3031 2018-08-16 David Malcolm <dmalcolm@redhat.com>
3033 * diagnostic-show-locus.c (layout::start_annotation_line): Add
3034 "margin_char" parameter, defaulting to space. Use it in place
3035 of pp_space for the initial part of the margin.
3036 (layout::print_leading_fixits): Use '+' when filling the margin
3037 of line-insertion fix-it hints.
3039 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
3041 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
3044 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
3046 * config/rs6000/altivec.md: Don't set length attribute to the default
3048 * config/rs6000/darwin.md: Ditto.
3049 * config/rs6000/dfp.md: Ditto.
3050 * config/rs6000/htm.md: Ditto.
3051 * config/rs6000/rs6000.md: Ditto.
3052 * config/rs6000/sync.md: Ditto.
3053 * config/rs6000/vsx.md: Ditto.
3055 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
3057 * config/rs6000/altivec.md: Don't set length attribute to the default
3058 value, for branch instructions.
3059 * config/rs6000/darwin.md: Ditto.
3060 * config/rs6000/rs6000.md: Ditto.
3062 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
3064 * config/rs6000/rs6000.md (length): Always define as const_int 4.
3065 (unnamed conditional branch define_insn): Set length to 4 or 8
3066 depending on offset.
3067 (<bd>_<mode>): Similar, for alternative 0.
3068 (<bd>tf_<mode>): Ditto.
3070 2018-08-16 Tamar Christina <tamar.christina@arm.com>
3072 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
3074 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
3076 * doc/rtl.texi: Replace old RTX class names with new names.
3079 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
3081 * expmed.h (canonicalize_comparison): New declaration.
3082 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
3083 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
3084 * optabs.c (prepare_cmp_insn): Likewise.
3085 * rtl.h (unsigned_condition_p): New function which checks if a
3086 comparison operator is unsigned.
3088 2018-08-16 Nathan Sidwell <nathan@acm.org>
3090 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
3091 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
3093 2018-08-16 Tamar Christina <tamar.christina@arm.com>
3096 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
3097 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
3098 (mov<mov>): ..this and enable unconditionally.
3100 2018-08-16 Tamar Christina <tamar.christina@arm.com>
3102 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
3104 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
3106 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
3107 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
3108 "Common" with "Target".
3110 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
3112 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
3113 * doc/invoke.texi (mmitigate-rop): Remove.
3114 * config/i386/i386.c: Do not include "regrename.h".
3115 (ix86_rop_should_change_byte_p, reg_encoded_number)
3116 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
3118 (ix86_reorg): Remove call to ix86_mitigate_rop.
3119 * config/i386/i386.md (attr "modrm_class"): Remove.
3120 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
3121 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
3122 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
3124 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
3126 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
3127 allow folding of mergeh() and mergel() for the float and double types.
3128 (fold_mergehl_helper): Rework to handle building a permute tree
3131 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
3133 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
3136 2018-08-15 David Malcolm <dmalcolm@redhat.com>
3138 * common.opt (fdiagnostics-show-labels): New option.
3139 * diagnostic-show-locus.c (class layout_range): Add field
3141 (class layout): Add field "m_show_labels_p".
3142 (layout_range::layout_range): Add param "label" and use it to
3144 (make_range): Pass in NULL for new "label" param of layout_range's
3146 (layout::layout): Initialize m_show_labels_p.
3147 (layout::maybe_add_location_range): Pass in loc_range->m_label
3148 when constructing layout_range instances.
3149 (struct line_label): New struct.
3150 (layout::print_any_labels): New member function.
3151 (layout::print_line): Call it if label-printing is enabled.
3152 (selftest::test_one_liner_labels): New test.
3153 (selftest::test_diagnostic_show_locus_one_liner): Call it.
3154 * diagnostic.c (diagnostic_initialize): Initialize
3155 context->show_labels_p.
3156 * diagnostic.h (struct diagnostic_context): Add field
3158 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
3159 -fno-diagnostics-show-labels.
3160 * dwarf2out.c (gen_producer_string): Add
3161 OPT_fdiagnostics_show_labels to the ignored options.
3162 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
3164 (gcc_rich_location::maybe_add_expr): Likewise.
3165 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
3166 label" param, defaulting to NULL.
3167 (gcc_rich_location::add_expr): Add "label" param.
3168 (gcc_rich_location::maybe_add_expr): Likewise.
3169 (class text_range_label): New class.
3170 (class range_label_for_type_mismatch): New class.
3171 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
3172 of format_warning_va.
3173 (fmtwarn_n): Likewise for new params of format_warning_n_va.
3174 * lto-wrapper.c (merge_and_complain): Add
3175 OPT_fdiagnostics_show_labels to the "pick one setting" options.
3176 (append_compiler_options): Likewise to the dropped options.
3177 (append_diag_options): Likewise to the passed-on options.
3178 * opts.c (common_handle_option): Handle the new option.
3179 * selftest-diagnostic.c
3180 (test_diagnostic_context::test_diagnostic_context): Enable
3182 * substring-locations.c: Include "gcc-rich-location.h".
3183 (format_warning_n_va): Add "fmt_label" and "param_label" params
3184 and use them as appropriate.
3185 (format_warning_va): Add "fmt_label" and "param_label" params,
3186 passing them on to format_warning_n_va.
3187 (format_warning_at_substring): Likewise.
3188 (format_warning_at_substring_n): Likewise.
3189 * substring-locations.h (format_warning_va): Add "fmt_label" and
3190 "param_label" params.
3191 (format_warning_n_va): Likewise.
3192 (format_warning_at_substring): Likewise.
3193 (format_warning_at_substring_n): Likewise.
3194 * toplev.c (general_init): Initialize global_dc->show_labels_p.
3196 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
3199 * builtins.c (expand_builtin_memcmp): Do not expand the call
3200 when overflow is detected.
3202 2018-08-15 Martin Sebor <msebor@redhat.com>
3204 PR tree-optimization/71625
3205 * config/aarch64/aarch64-builtins.c
3206 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
3208 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
3210 * config/s390/s390.c (s390_reorg): Remove loop.
3212 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3215 (darwin_function_switched_text_sections): Delete.
3216 * gcc/config/darwin.h
3217 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
3219 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3222 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
3223 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
3224 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
3226 2018-08-15 Martin Liska <mliska@suse.cz>
3228 PR tree-optimization/86925
3229 * predict.c (expr_expected_value_1): When taking
3230 later predictor, assign also probability.
3231 Use fold_build2_initializer_loc in order to fold
3232 the expression in -frounding-math.
3234 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
3236 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
3238 (expand_vec_perm_1): Try the new method.
3240 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
3243 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
3244 Check whether lra_live_max_point is 0 before dividing.
3246 2018-08-14 Martin Sebor <msebor@redhat.com>
3248 PR tree-optimization/86650
3249 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
3250 (vrp_prop::check_mem_ref): Same.
3252 2018-08-13 Liu Hao <lh_mouse@126.com>
3254 * pretty-print.c (eat_esc_sequence): Swap the foreground and
3255 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
3256 and clear it thereafter, as it only works for DBCS.
3258 2018-08-13 Liu Hao <lh_mouse@126.com>
3260 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
3261 handle returned by _get_osf_handle().
3263 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3265 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
3266 for folding vec_perm.
3268 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3270 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
3271 Add support for gimple-folding of vec_pack() and vec_unpack()
3274 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3276 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
3277 vec_xst variants to the list.
3278 (rs6000_gimple_fold_builtin): Add support for folding unaligned
3279 vector loads and stores.
3281 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
3283 * config.gcc (rs6000-ibm-aix4.x): Delete.
3284 (rs6000-ibm-aix5.1): Delete.
3285 (rs6000-ibm-aix5.2): Delete.
3286 (rs6000-ibm-aix5.3): Delete.
3287 * config/rs6000/aix43.h: Delete.
3288 * config/rs6000/aix51.h: Delete.
3289 * config/rs6000/aix52.h: Delete.
3290 * config/rs6000/t-aix43: Delete.
3292 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
3294 * config/s390/s390.c (s390_decompose_constant_pool_ref):
3296 (s390_decompose_address): Factor out constant pool ref
3299 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3301 * config/nds32/nds32-predicates.c
3302 (nds32_can_use_bclr_p): Change return type as bool.
3303 (nds32_can_use_bset_p): Ditto.
3304 (nds32_can_use_btgl_p): Ditto.
3305 (nds32_can_use_bitci_p): Ditto.
3306 * config/nds32/nds32-protos.h
3307 (nds32_can_use_bclr_p): Change declaration.
3308 (nds32_can_use_bset_p): Ditto.
3309 (nds32_can_use_btgl_p): Ditto.
3310 (nds32_can_use_bitci_p): Ditto.
3312 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3314 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
3315 Support -msched-prolog-epilog option.
3316 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
3318 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3320 * common/config/nds32/nds32-common.c
3321 (nds32_option_optimization_table): Enalbe -malways-align.
3323 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3325 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
3327 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
3328 OPT_misr_secure_ case.
3329 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
3330 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
3331 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
3333 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
3334 (nds32_isr_info): New field security_level.
3335 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
3336 * config/nds32/nds32.md (return_internal): Consider critical attribute.
3337 * config/nds32/nds32.opt (misr-secure): New option.
3338 * config/nds32/nds32_init.inc: New file.
3339 * config/nds32/nds32_isr.h: New file.
3341 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
3343 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
3344 Update comment for atomic instructions.
3345 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
3346 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
3348 (atomic_loaddi): Revise fence expansion to only emit fence prior to
3349 load for __ATOMIC_SEQ_CST model.
3350 (atomic_loaddi_1): Remove float register target.
3351 (atomic_storedi): Handle CONST_INT values.
3352 (atomic_storedi_1): Remove float register source. Add special case
3354 (memory_barrier): New expander and insn.
3356 2018-08-11 Jakub Jelinek <jakub@redhat.com>
3358 PR tree-optimization/86835
3359 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
3360 new_stmt after def_gsi, make sure to insert new_square_stmt after
3361 that stmt, not 2 stmts before it.
3363 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
3366 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
3369 2018-08-10 Martin Liska <mliska@suse.cz>
3372 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
3374 * builtins.c (expand_builtin_expect_with_probability):
3376 (expand_builtin_expect_with_probability): New function.
3377 (build_builtin_expect_predicate): Add new argumnet probability
3378 for BUILT_IN_EXPECT_WITH_PROBABILITY.
3379 (fold_builtin_expect):
3382 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
3383 * builtins.h (fold_builtin_expect): Set new argument.
3384 * doc/extend.texi: Document __builtin_expect_with_probability.
3385 * doc/invoke.texi: Likewise.
3386 * gimple-fold.c (gimple_fold_call): Pass new argument.
3387 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
3388 also BUILT_IN_EXPECT_WITH_PROBABILITY.
3389 * predict.c (get_predictor_value): New function.
3390 (expr_expected_value): Add new argument probability. Assume
3391 that predictor and probability are always non-null.
3392 (expr_expected_value_1): Likewise. For __builtin_expect and
3393 __builtin_expect_with_probability set probability. Handle
3394 combination in binary expressions.
3395 (tree_predict_by_opcode): Simplify code by simply calling
3396 get_predictor_value.
3397 (pass_strip_predict_hints::execute): Add handling of
3398 BUILT_IN_EXPECT_WITH_PROBABILITY.
3399 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
3401 * tree.h (DECL_BUILT_IN_P): New function.
3403 2018-08-10 Martin Liska <mliska@suse.cz>
3405 PR tree-optimization/85799
3406 * passes.def: Add argument for pass_strip_predict_hints.
3407 * predict.c (class pass_strip_predict_hints): Add new argument
3409 (strip_predictor_early): New function.
3410 (pass_strip_predict_hints::execute): Call the function to
3412 (strip_predict_hints): New function.
3413 * predict.def: Fix comment.
3415 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
3417 * Makefile.in: Clarify which tm.texi to copy over to assert the
3418 right to grant a GFDL license for all.
3420 2018-08-09 Jeff Law <law@redhat.com>
3422 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
3425 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
3427 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
3430 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3432 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
3433 reductions for variable-length vectors.
3435 2018-08-09 David Malcolm <dmalcolm@redhat.com>
3438 * common.opt (fdiagnostics-show-line-numbers): New option.
3439 * diagnostic-show-locus.c (class layout): Add fields
3440 "m_show_line_numbers_p" and "m_linenum_width";
3441 (num_digits): New function.
3442 (test_num_digits): New function.
3443 (layout::layout): Initialize new fields. Update m_x_offset
3444 logic to handle any left margin.
3445 (layout::print_source_line): Print line number when requested.
3446 (layout::start_annotation_line): New member function.
3447 (layout::print_annotation_line): Call it.
3448 (layout::print_leading_fixits): Likewise.
3449 (layout::print_trailing_fixits): Likewise. Update calls to
3450 move_to_column for new parameter.
3451 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
3452 it to potentially call start_annotation_line.
3453 (layout::show_ruler): Call start_annotation_line.
3454 (selftest::test_line_numbers_multiline_range): New selftest.
3455 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
3456 and selftest::test_line_numbers_multiline_range.
3457 * diagnostic.c (diagnostic_initialize): Initialize
3458 show_line_numbers_p.
3459 * diagnostic.h (struct diagnostic_context): Add field
3460 "show_line_numbers_p".
3461 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
3462 -fno-diagnostics-show-line-numbers.
3463 * dwarf2out.c (gen_producer_string): Add
3464 OPT_fdiagnostics_show_line_numbers to the ignored options.
3465 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
3466 one setting" options.
3467 (append_compiler_options): Likewise to the dropped options.
3468 (append_diag_options): Likewise to the passed-on options.
3469 * opts.c (common_handle_option): Handle the new option.
3470 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
3472 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
3474 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
3475 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
3476 third argument of type "const signed char" to descriptions of
3477 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
3478 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
3479 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
3480 __builtin_bcdsub_ov functions.
3482 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3484 PR tree-optimization/86858
3485 * tree-vect-loop.c (vect_is_simple_reduction): Restore
3486 flow_bb_inside_loop_p calls.
3488 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3490 PR tree-optimization/86871
3491 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
3492 instead of gimple_assign_lhs.
3494 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
3497 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
3498 register constraint to operand 0.
3499 (add<mode>3_carryinC): Likewise.
3500 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
3502 2018-08-09 Martin Liska <mliska@suse.cz>
3505 * common.opt: Remove extra line.
3507 2018-08-09 Martin Liska <mliska@suse.cz>
3509 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
3510 at the end of a line, make first letter capital and end up
3511 a sentence with a dot.
3512 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
3513 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
3514 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
3515 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
3516 (PARAM_MAX_ISL_OPERATIONS): Likewise.
3517 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
3518 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
3519 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
3520 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
3521 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
3522 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
3523 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
3524 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
3525 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
3526 (PARAM_TREE_REASSOC_WIDTH): Likewise.
3527 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
3528 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
3529 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
3531 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
3534 * config/s390/s390.c (s390_option_override_internal): Reduce the
3535 stack-clash-protection-probe-interval param if it would be too big
3538 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
3541 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
3542 * config/m68k/m68k.c (handle_move_double): Don't call
3543 m68k_final_prescan_insn.
3544 (m68k_adjust_decorated_operand): Renamed from
3545 m68k_final_prescan_insn, remove first and third operand and
3547 (print_operand): Call it.
3548 (print_operand_address): Call it.
3550 2018-08-08 Nathan Sidwell <nathan@acm.org>
3552 * diagnostic.c (diagnostic_report_current_module): Use
3553 linemap_included_from & linemap_included_from_linemap.
3555 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
3557 * config/aarch64/aarch64-cores.def: Add phecda core.
3558 * config/aarch64/aarch64-tune.md: Regenerate.
3559 * doc/invoke.texi: Add phecda core.
3561 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
3564 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
3566 * config/s390/s390.md ("movti"): Add more alternatives for
3567 constant to GPR copies.
3569 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
3571 * config/s390/s390.c: Fix whitespace damage throughout the file.
3572 * config/s390/s390.h: Likewise.
3573 * config/s390/tpf.h: Likewise.
3575 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
3577 * config/s390/s390.c (s390_loadrelative_operand_p):
3578 Remove TARGET_CPU_ZARCH usages.
3579 (s390_rtx_costs): Likewise.
3580 (s390_legitimate_constant_p): Likewise.
3581 (s390_cannot_force_const_mem): Likewise.
3582 (legitimate_reload_constant_p): Likewise.
3583 (s390_preferred_reload_class): Likewise.
3584 (legitimize_pic_address): Likewise.
3585 (legitimize_tls_address): Likewise.
3586 (s390_split_branches): Removed.
3587 (s390_add_execute): Removed.
3588 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
3589 (s390_mainpool_start): Likewise.
3590 (s390_mainpool_finish): Likewise.
3591 (s390_mainpool_cancel): Removed.
3592 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
3593 (s390_chunkify_cancel): Likewise.
3594 (s390_return_addr_rtx): Likewise.
3595 (s390_register_info): Remove split_branches_pending_p uages.
3596 (s390_optimize_register_info): Likewise.
3597 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
3598 split_branches_pending_p usages.
3599 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
3600 (s390_load_got): Likewise.
3601 (s390_expand_split_stack_prologue): Likewise.
3602 (output_asm_nops): Likewise.
3603 (s390_function_profiler): Likewise.
3604 (s390_emit_call): Likewise.
3605 (s390_conditional_register_usage): Likewise.
3606 (s390_optimize_prologue): Likewise.
3607 (s390_reorg): Remove TARGET_CPU_ZARCH and
3608 split_branches_pending_p usages.
3609 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
3611 (s390_output_indirect_thunk_function): Likewise.
3612 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
3613 (TARGET_CPU_ZARCH_P): Removed.
3614 (struct machine_function): Remove split_branches_pending_p.
3615 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
3617 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
3619 * common/config/s390/s390-common.c (processor_flags_table):
3621 * config.gcc: Remove with_arch/with_tune support.
3622 * config/s390/2064.md: Remove cpu attribute comparisons.
3623 * config/s390/driver-native.c (s390_host_detect_local_cpu):
3625 * config/s390/linux.h (ASM_SPEC):
3626 Remove -march support.
3627 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
3628 Use a table to get an arch level.
3629 * config/s390/s390-opts.h (enum processor_type):
3631 * config/s390/s390.c
3632 (processor_table): Remove entries, add arch_level values.
3633 (s390_issue_rate): Remove cases.
3634 (s390_option_override): Adjust
3635 s390_option_override_internal() call.
3636 (s390_option_override_internal): Remove deprecation warning.
3637 (s390_valid_target_attribute_tree): Adjust
3638 s390_option_override_internal() call.
3639 * config/s390/s390.h (struct s390_processor):
3640 Share with s390-c.c, add arch_level field.
3641 * config/s390/s390.md:
3642 Remove occurrences in cpu attribute.
3643 * config/s390/s390.opt: Remove -march/-mtune support.
3644 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
3645 * doc/invoke.texi: Remove deprecation warning.
3647 2018-08-08 Luis Machado <luis.machado@linaro.org>
3649 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
3651 (qdf24xx_tunings): Set vector cost structure to
3652 qdf24xx_vector_cost.
3654 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
3655 <register_sextend>: Set to 3.
3657 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
3660 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
3661 * config/aarch64/aarch64-simd.md
3662 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
3663 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
3664 (aarch64_frecpx<mode>): ...this new pattern.
3665 * config/aarch64/aarch64-simd-builtins.def: Remove comment
3666 about aarch64_frecp<FRECP:frecp_suffix><mode>.
3668 2018-08-07 Martin Liska <mliska@suse.cz>
3671 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
3672 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
3673 * predict.def (PRED_MALLOC_NONNULL): New predictor.
3674 * doc/extend.texi: Document that malloc attribute adds
3677 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
3680 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3681 Define to speculation_safe_value_not_needed.
3683 2018-08-06 Jeff Law <law@redhat.com>
3685 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
3686 the vr_values instance to cprop_into_stmt.
3687 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
3688 (cprop_operand): Also query EVRP to determine if OP is a constant.
3690 2018-08-06 Nathan Sidwell <nathan@acm.org>
3692 * diagnostic.c (diagnostic_report_current_module): Reroll
3693 included-at loop. Translate text.
3695 2018-08-06 David Malcolm <dmalcolm@redhat.com>
3697 * function-tests.c (selftest::test_expansion_to_rtl): Call
3698 free_after_compilation.
3700 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3702 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
3704 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
3706 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
3707 loops with memory block operations from getting unrolled.
3709 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
3712 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3713 Define to speculation_safe_value_not_needed.
3715 2018-08-06 Jeff Law <law@redhat.com>
3717 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
3720 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3723 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
3724 with all enabled __intN types.
3726 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
3728 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3730 * alias.c (record_set): Check for clobber high.
3731 * cfgexpand.c (expand_gimple_stmt): Likewise.
3732 * combine-stack-adj.c (single_set_for_csa): Likewise.
3733 * combine.c (find_single_use_1): Likewise.
3734 (set_nonzero_bits_and_sign_copies): Likewise.
3735 (get_combine_src_dest): Likewise.
3736 (is_parallel_of_n_reg_sets): Likewise.
3737 (try_combine): Likewise.
3738 (record_dead_and_set_regs_1): Likewise.
3739 (reg_dead_at_p_1): Likewise.
3740 (reg_dead_at_p): Likewise.
3741 * dce.c (deletable_insn_p): Likewise.
3742 (mark_nonreg_stores_1): Likewise.
3743 (mark_nonreg_stores_2): Likewise.
3744 * df-scan.c (df_find_hard_reg_defs): Likewise.
3745 (df_uses_record): Likewise.
3746 (df_get_call_refs): Likewise.
3747 * dwarf2out.c (mem_loc_descriptor): Likewise.
3748 * haifa-sched.c (haifa_classify_rtx): Likewise.
3749 * ira-build.c (create_insn_allocnos): Likewise.
3750 * ira-costs.c (scan_one_insn): Likewise.
3751 * ira.c (equiv_init_movable_p): Likewise.
3752 (rtx_moveable_p): Likewise.
3753 (interesting_dest_for_shprep): Likewise.
3754 * jump.c (mark_jump_label_1): Likewise.
3755 * postreload-gcse.c (record_opr_changes): Likewise.
3756 * postreload.c (reload_cse_simplify): Likewise.
3757 (struct reg_use): Add source expr.
3758 (reload_combine): Check for clobber high.
3759 (reload_combine_note_use): Likewise.
3760 (reload_cse_move2add): Likewise.
3761 (move2add_note_store): Likewise.
3762 * print-rtl.c (print_pattern): Likewise.
3763 * recog.c (decode_asm_operands): Likewise.
3764 (store_data_bypass_p): Likewise.
3765 (if_test_bypass_p): Likewise.
3766 * regcprop.c (kill_clobbered_value): Likewise.
3767 (kill_set_value): Likewise.
3768 * reginfo.c (reg_scan_mark_refs): Likewise.
3769 * reload1.c (maybe_fix_stack_asms): Likewise.
3770 (eliminate_regs_1): Likewise.
3771 (elimination_effects): Likewise.
3772 (mark_not_eliminable): Likewise.
3773 (scan_paradoxical_subregs): Likewise.
3774 (forget_old_reloads_1): Likewise.
3775 * reorg.c (find_end_label): Likewise.
3776 (try_merge_delay_insns): Likewise.
3777 (redundant_insn): Likewise.
3778 (own_thread_p): Likewise.
3779 (fill_simple_delay_slots): Likewise.
3780 (fill_slots_from_thread): Likewise.
3781 (dbr_schedule): Likewise.
3782 * resource.c (update_live_status): Likewise.
3783 (mark_referenced_resources): Likewise.
3784 (mark_set_resources): Likewise.
3785 * rtl.c (copy_rtx): Likewise.
3786 * rtlanal.c (reg_referenced_p): Likewise.
3787 (single_set_2): Likewise.
3788 (noop_move_p): Likewise.
3789 (note_stores): Likewise.
3790 * sched-deps.c (sched_analyze_reg): Likewise.
3791 (sched_analyze_insn): Likewise.
3793 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3795 * cse.c (invalidate_reg): New function extracted from...
3796 (invalidate): ...here.
3797 (canonicalize_insn): Check for clobber high.
3798 (invalidate_from_clobbers): invalidate clobber highs.
3799 (invalidate_from_sets_and_clobbers): Likewise.
3800 (count_reg_usage): Check for clobber high.
3801 (insn_live_p): Likewise.
3802 * cselib.c (cselib_expand_value_rtx_1):Likewise.
3803 (cselib_invalidate_regno): Check for clobber in setter.
3804 (cselib_invalidate_rtx): Pass through setter.
3805 (cselib_invalidate_rtx_note_stores):
3806 (cselib_process_insn): Check for clobber high.
3807 * cselib.h (cselib_invalidate_rtx): Add operand.
3809 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3811 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
3812 (mark_not_eliminable): Likewise.
3813 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
3814 * lra-lives.c (process_bb_lives): Check for clobber high.
3815 * lra.c (new_insn_reg): Remember clobber highs.
3816 (collect_non_operand_hard_regs): Check for clobber high.
3817 (lra_set_insn_recog_data): Likewise.
3818 (add_regs_to_insn_regno_info): Likewise.
3819 (lra_update_insn_regno_info): Likewise.
3821 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3823 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
3824 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
3826 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3828 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
3829 (copy_insn_1): Likewise.
3830 (gen_hard_reg_clobber_high): New gen function.
3831 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
3832 * genemit.c (gen_exp): Likewise.
3833 (gen_emit_seq): Pass through info.
3834 (gen_insn): Check for CLOBBER_HIGH.
3835 (gen_expand): Pass through info.
3836 (gen_split): Likewise.
3837 (output_add_clobbers): Likewise.
3838 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
3839 (remove_clobbers): Likewise.
3840 * rtl.h (gen_hard_reg_clobber_high): New declaration.
3842 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3844 * doc/rtl.texi (clobber_high): Add.
3845 (parallel): Add in clobber high
3846 * rtl.c (rtl_check_failed_code3): Add function.
3847 * rtl.def (CLOBBER_HIGH): Add expression.
3848 * rtl.h (RTL_CHECKC3): Add macro.
3849 (rtl_check_failed_code3): Add declaration.
3850 (XC3EXP): Add macro.
3852 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
3855 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3856 cfun->machine->max_used_stack_alignment if needed.
3858 2018-08-04 Martin Sebor <msebor@redhat.com>
3860 PR tree-optimization/86571
3861 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
3864 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
3867 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3870 2018-08-03 Jeff Law <law@redhat.com>
3873 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3874 Define to speculation_safe_value_not_needed.
3876 2018-08-03 David Malcolm <dmalcolm@redhat.com>
3878 * doc/gcov.texi (-x): Remove duplicate "to".
3879 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3880 (-Wif-not-aligned): Remove duplicate "is".
3881 (-flto): Remove duplicate "the".
3882 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3883 duplicate "v5.00.b".
3884 (MSP430 Options): Remove duplicate "and" from the description
3885 of "-mgprel-sec=regexp".
3886 (x86 Options): Remove duplicate copies of "vmldLog102" and
3887 vmlsLog104 from description of "-mveclibabi=type".
3889 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
3891 * internal-fn.h (first_commutative_argument): Declare.
3892 * internal-fn.c (first_commutative_argument): New function.
3893 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3894 restrictions for pattern statements. Use first_commutative_argument
3895 to look for commutative operands in calls to internal functions.
3897 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
3899 * Makefile.in (wide-int-range.o): New.
3900 * tree-vrp.c: Move all the wide_int_* functions to...
3901 * wide-int-range.cc: ...here.
3902 * tree-vrp.h: Move all the wide_int_* prototypes to...
3903 * wide-int-range.h: ...here.
3905 2018-08-03 Tom de Vries <tdevries@suse.de>
3907 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3909 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3910 * except.c (output_function_exception_table): Do early exit if
3911 targetm_common.except_unwind_info (&global_options) == UI_NONE.
3913 2018-08-03 Martin Liska <mliska@suse.cz>
3915 * predict.c (dump_prediction): Change to 2 digits
3918 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
3920 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3922 (falkor_am_1_gtov_gtov): ... a new insn reservation.
3924 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
3926 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3927 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3928 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3929 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3930 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3932 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3934 * diagnostic-show-locus.c (diagnostic_show_locus): Use
3935 pp_take_prefix when saving the existing prefix.
3936 * diagnostic.c (diagnostic_append_note): Likewise.
3937 * langhooks.c (lhd_print_error_function): Likewise.
3938 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3939 param's type. Free the existing prefix.
3940 (pp_take_prefix): New function.
3941 (pretty_printer::pretty_printer): Drop the prefix parameter.
3942 Rename the length parameter to match the comment.
3943 (pretty_printer::~pretty_printer): Free the prefix.
3944 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3946 (struct pretty_printer): Drop the "const" from "prefix" field's
3947 type and clarify memory management.
3948 (pp_set_prefix): Drop the "const" from the 2nd param.
3949 (pp_take_prefix): New decl.
3951 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3953 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3954 for word_mode_ok here instead of passing as argument.
3955 (expand_block_compare): Change select_block_compare_mode() call.
3956 (expand_strncmp_gpr_sequence): New function.
3957 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3959 2018-08-02 Jeff Law <law@redhat.com>
3962 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3963 Define to speculation_safe_value_not_needed.
3966 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3967 Define to speculation_safe_value_not_needed.
3969 2018-08-02 Tom de Vries <tdevries@suse.de>
3972 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3973 function. Return UI_TARGET unconditionally.
3974 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3975 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3977 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3979 * genemit.c (print_overload_test): Fix typo.
3981 2018-08-02 Richard Biener <rguenther@suse.de>
3983 PR tree-optimization/86816
3984 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3985 which checks for value availability before querying it.
3986 (gvn_uses_equal): Use it.
3987 (same_succ_hash): Likewise.
3988 (gimple_equal_p): Likewise.
3990 2018-08-02 Nick Clifton <nickc@redhat.com>
3993 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3994 Define to speculation_safe_value_not_needed.
3997 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3998 Define to speculation_safe_value_not_needed.
4001 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4002 Define to speculation_safe_value_not_needed.
4005 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4006 Define to speculation_safe_value_not_needed.
4009 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4010 Define to speculation_safe_value_not_needed.
4013 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4014 Define to speculation_safe_value_not_needed.
4017 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4018 Define to speculation_safe_value_not_needed.
4021 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4022 Define to speculation_safe_value_not_needed.
4025 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
4026 speculation_safe_value_not_needed.
4029 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
4030 to speculation_safe_value_not_needed.
4032 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
4034 * doc/md.texi: Expand the documentation of instruction names
4035 to mention port-local uses. Document '@' in pattern names.
4036 * read-md.h (overloaded_instance, overloaded_name): New structs.
4038 (md_reader::handle_overloaded_name): New member function.
4039 (md_reader::get_overloads): Likewise.
4040 (md_reader::m_first_overload): New member variable.
4041 (md_reader::m_next_overload_ptr): Likewise.
4042 (md_reader::m_overloads_htab): Likewise.
4043 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
4044 m_next_overload_ptr and m_overloads_htab.
4045 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
4046 (get_mode_token, get_code_token, get_int_token): New functions.
4047 (map_attr_string): Add an optional argument that passes back
4048 the associated iterator.
4049 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
4050 (md_reader::handle_overloaded_name, add_overload_instance): New
4052 (apply_iterators): Handle '@' names. Report an error if '@'
4053 is used without iterators.
4054 (initialize_iterators): Initialize the new iterator_group fields.
4055 * genopinit.c (handle_overloaded_code_for)
4056 (handle_overloaded_gen): New functions.
4057 (main): Use them to print declarations of maybe_code_for_* and
4058 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
4059 * genemit.c (print_overload_arguments, print_overload_test)
4060 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
4061 (main): Use it to print definitions of maybe_code_for_* and
4062 maybe_gen_* functions.
4063 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
4064 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
4065 instead of explicit mode checks.
4066 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
4067 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
4068 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
4069 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
4070 (aarch64_expand_compare_and_swap): Likewise
4071 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
4072 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
4073 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
4074 (aarch64_constant_pool_reload_icode): Delete.
4075 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
4076 instead of aarch64_constant_pool_reload_icode. Use
4077 code_for_aarch64_reload_mov instead of explicit mode checks.
4078 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
4079 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
4080 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
4081 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
4082 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
4083 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
4084 (aarch64_atomic_load_op_code): Delete.
4085 (aarch64_emit_atomic_load_op): Likewise.
4086 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
4087 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
4088 instead of aarch64_emit_atomic_load_op.
4089 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
4090 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
4091 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
4092 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
4093 character before the pattern name.
4094 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
4095 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
4096 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
4097 (aarch64_frecps<mode>): Likewise.
4098 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
4099 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
4100 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
4101 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
4102 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
4104 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
4106 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
4107 Allow HFmode constants if TARGET_FP_F16INST.
4109 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
4112 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
4113 No longer check last store for clobber of address register.
4115 2018-08-02 Martin Liska <mliska@suse.cz>
4117 PR gcov-profile/86817
4118 * gcov.c (process_all_functions): New function.
4120 (process_file): Move functions processing to
4121 process_all_functions.
4123 2018-08-02 David Malcolm <dmalcolm@redhat.com>
4125 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
4126 "const" to the "gimple *" and "rtx_insn *" parameters.
4127 * dumpfile.h (dump_user_location_t::dump_user_location_t):
4129 (dump_location_t::dump_location_t): Likewise.
4131 2018-08-01 Martin Sebor <msebor@redhat.com>
4133 PR tree-optimization/86650
4134 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
4135 rather than a "gcall *". Directly pass the data of interest
4136 to percent_K_format, rather than building a temporary CALL_EXPR
4138 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
4139 (gimple_fold_builtin_strncat): Adjust.
4140 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
4141 gcall* argument with gimple*.
4142 * gimple-ssa-warn-restrict.c (check_call): Same.
4143 (wrestrict_dom_walker::before_dom_children): Same.
4144 (builtin_access::builtin_access): Same.
4145 (check_bounds_or_overlap): Same
4146 (maybe_diag_overlap): Same.
4147 (maybe_diag_offset_bounds): Same.
4148 * tree-diagnostic.c (default_tree_printer): Move usage of
4149 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
4151 * tree-pretty-print.c (percent_K_format): Add argument.
4152 * tree-pretty-print.h: Add argument.
4153 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
4154 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
4155 (maybe_diag_stxncpy_trunc): Same.
4156 (handle_builtin_stxncpy): Same.
4157 (handle_builtin_strcat): Same.
4159 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4161 * match.pd: Optimise pointer range checks.
4163 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4165 PR tree-optimization/86758
4166 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
4167 to remove pattern statements.
4169 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4171 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
4172 result of dfs_enumerate_from when constructing stmt_vec_infos,
4173 instead of additionally calling get_loop_body.
4175 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4177 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
4179 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
4180 When creating an iv, assert that the step is not known to be zero.
4181 (vect_setup_realignment): Update call accordingly.
4182 * tree-vect-stmts.c (vectorizable_store): Likewise.
4183 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
4185 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4187 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
4188 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
4189 (vectorizable_reduction): Likewise.
4190 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4191 (vect_detect_hybrid_slp_stmts): Likewise.
4192 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4194 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
4196 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
4197 (wide_int_set_zero_nonzero_bits): ...this.
4198 (zero_nonzero_bits_from_vr): Rename to...
4199 (vrp_set_zero_nonzero_bits): ...this.
4200 (extract_range_from_multiplicative_op_1): Abstract wide int
4202 (wide_int_range_multiplicative_op): ...here.
4203 (extract_range_from_binary_expr_1): Extract wide int binary
4204 operations into their own functions.
4205 (wide_int_range_lshift): New.
4206 (wide_int_range_can_optimize_bit_op): New.
4207 (wide_int_range_shift_undefined_p): New.
4208 (wide_int_range_bit_xor): New.
4209 (wide_int_range_bit_ior): New.
4210 (wide_int_range_bit_and): New.
4211 (wide_int_range_trunc_mod): New.
4212 (extract_range_into_wide_ints): New.
4213 (vrp_shift_undefined_p): New.
4214 (extract_range_from_multiplicative_op): New.
4215 (vrp_can_optimize_bit_op): New.
4216 * tree-vrp.h (value_range::dump): New.
4217 (wide_int_range_multiplicative_op): New.
4218 (wide_int_range_lshift):New.
4219 (wide_int_range_shift_undefined_p): New.
4220 (wide_int_range_bit_xor): New.
4221 (wide_int_range_bit_ior): New.
4222 (wide_int_range_bit_and): New.
4223 (wide_int_range_trunc_mod): New.
4224 (zero_nonzero_bits_from_bounds): Rename to...
4225 (wide_int_set_zero_nonzero_bits): ...this.
4226 (zero_nonzero_bits_from_vr): Rename to...
4227 (vrp_set_zero_nonzero_bits): ...this.
4228 (range_easy_mask_min_max): Rename to...
4229 (wide_int_range_can_optimize_bit_op): this.
4230 * vr-values.c (simplify_bit_ops_using_ranges): Rename
4231 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
4233 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4235 * tree-vectorizer.h (vect_orig_stmt): New function.
4236 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
4237 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
4238 (vect_create_epilog_for_reduction): Likewise.
4239 (vectorizable_live_operation): Likewise.
4240 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4241 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
4242 * tree-vect-stmts.c (vectorizable_call): Likewise.
4243 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
4245 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4247 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
4249 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
4250 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
4251 (vect_transform_loop): Likewise.
4252 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
4254 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4256 * tree-vectorizer.h (vect_schedule_slp): Return void.
4257 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
4258 (vect_schedule_slp): Likewise.
4260 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4262 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
4264 (vect_transform_loop): Update calls accordingly. Schedule SLP
4265 instances before the main loop, if any exist.
4267 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4269 PR tree-optimization/86749
4270 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
4271 If the lhs is used in a COND_EXPR, check that it is being used
4272 as the "then" or "else" value.
4274 2018-08-01 Tom de Vries <tdevries@suse.de>
4277 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
4278 speculation_safe_value_not_needed.
4280 2018-08-01 Richard Biener <rguenther@suse.de>
4282 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
4285 2018-08-01 Martin Liska <mliska@suse.cz>
4287 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
4288 format how successful transformation is dumped.
4289 (gimple_mod_pow2_value_transform): Likewise.
4290 (gimple_mod_subtract_transform): Likewise.
4291 (gimple_stringops_transform): Likewise.
4293 2018-08-01 Martin Liska <mliska@suse.cz>
4296 * value-prof.c (interesting_stringop_to_profile_p):
4297 Simplify the code and add BUILT_IN_MEMMOVE.
4298 (gimple_stringops_transform): Likewise.
4300 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
4302 * config/aarch64/aarch64-simd.md
4303 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
4304 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
4305 use GPI iterator instead of SI mode.
4307 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
4309 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
4310 rs6000_speculation_barrier.
4311 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
4312 new barrier pattern name.
4314 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
4316 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
4317 (speculation_barrier): New insn.
4319 2018-08-01 Richard Biener <rguenther@suse.de>
4322 * graphite.h: Include isl/id.h and isl/space.h to allow build
4325 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
4328 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
4329 mode for COFF targets.
4330 * defaults.h (TARGET_COFF): Define.
4331 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
4332 TARGET_COFF): Define.
4333 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
4334 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
4335 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
4337 2018-07-31 Alexandre Oliva <oliva@adacore.com>
4339 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
4340 * gimple-streamer-out.c (output_bb): Save it.
4341 * lto-streamer-in.c (input_struct_function_base): Restore
4342 instance discriminator if available. Create map on demand.
4343 * lto-streamer-out.c (output_struct_function_base): Save it if
4345 * final.c (decl_to_instance_map): Document LTO strategy.
4347 2018-07-31 Alexandre Oliva <oliva@adacore.com>
4348 Olivier Hainque <hainque@adacore.com>
4350 * debug.h (decl_to_instance_map_t): New type.
4351 (decl_to_instance_map): Declare.
4352 (maybe_create_decl_to_instance_map): New inline function.
4353 * final.c (bb_discriminator, last_bb_discriminator): New statics,
4354 to track basic block discriminators.
4355 (final_start_function_1): Initialize them.
4356 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
4358 (decl_to_instance_map): New variable.
4359 (map_decl_to_instance, maybe_set_discriminator): New functions.
4360 (notice_source_line): Set discriminator.
4362 2018-07-31 Ian Lance Taylor <iant@golang.org>
4364 * targhooks.c (default_have_speculation_safe_value): Add
4367 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4369 * dump-context.h: Include "pretty-print.h".
4370 (dump_context::refresh_dumps_are_enabled): New decl.
4371 (dump_context::emit_item): New decl.
4372 (class dump_context): Add fields "m_test_pp" and
4374 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
4375 (temp_dump_context::get_dumped_text): New decl.
4376 (class temp_dump_context): Add field "m_pp".
4377 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
4378 (dump_context::refresh_dumps_are_enabled): ...and add a test for
4380 (set_dump_file): Update for above change.
4381 (set_alt_dump_file): Likewise.
4382 (dump_loc): New overload, taking a pretty_printer *.
4383 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
4384 to any test pretty-printer.
4385 (make_item_for_dump_gimple_stmt): New function, adapted from
4386 optinfo::add_gimple_stmt.
4387 (dump_context::dump_gimple_stmt): Call it, and use the result,
4388 eliminating the direct usage of dump_file and alt_dump_file in
4389 favor of indirectly using them via emit_item.
4390 (make_item_for_dump_gimple_expr): New function, adapted from
4391 optinfo::add_gimple_expr.
4392 (dump_context::dump_gimple_expr): Call it, and use the result,
4393 eliminating the direct usage of dump_file and alt_dump_file in
4394 favor of indirectly using them via emit_item.
4395 (make_item_for_dump_generic_expr): New function, adapted from
4397 (dump_context::dump_generic_expr): Call it, and use the result,
4398 eliminating the direct usage of dump_file and alt_dump_file in
4399 favor of indirectly using them via emit_item.
4400 (make_item_for_dump_printf_va): New function, adapted from
4401 optinfo::add_printf_va.
4402 (make_item_for_dump_printf): New function.
4403 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
4404 and use the result, eliminating the direct usage of dump_file and
4405 alt_dump_file in favor of indirectly using them via emit_item.
4406 (make_item_for_dump_dec): New function.
4407 (dump_context::dump_dec): Call it, and use the result,
4408 eliminating the direct usage of dump_file and alt_dump_file in
4409 favor of indirectly using them via emit_item.
4410 (make_item_for_dump_symtab_node): New function, adapted from
4411 optinfo::add_symtab_node.
4412 (dump_context::dump_symtab_node): Call it, and use the result,
4413 eliminating the direct usage of dump_file and alt_dump_file in
4414 favor of indirectly using them via emit_item.
4415 (dump_context::begin_scope): Reimplement, avoiding direct usage
4416 of dump_file and alt_dump_file in favor of indirectly using them
4418 (dump_context::emit_item): New member function.
4419 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
4420 Set up test pretty-printer on the underlying context. Call
4421 refresh_dumps_are_enabled.
4422 (temp_dump_context::~temp_dump_context): Call
4423 refresh_dumps_are_enabled.
4424 (temp_dump_context::get_dumped_text): New member function.
4425 (selftest::verify_dumped_text): New function.
4426 (ASSERT_DUMPED_TEXT_EQ): New macro.
4427 (selftest::test_capture_of_dump_calls): Run all tests twice, with
4428 and then without optinfo enabled. Add uses of
4429 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
4430 * dumpfile.h: Update comment for the dump_* API.
4431 * optinfo-emit-json.cc
4432 (selftest::test_building_json_from_dump_calls): Update for new
4433 param for temp_dump_context ctor.
4434 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
4435 and "m_owned" field.
4436 (optinfo_item::~optinfo_item): Likewise.
4437 (optinfo::add_item): New member function.
4438 (optinfo::emit): Update comment.
4439 (optinfo::add_string): Delete.
4440 (optinfo::add_printf): Delete.
4441 (optinfo::add_printf_va): Delete.
4442 (optinfo::add_gimple_stmt): Delete.
4443 (optinfo::add_gimple_expr): Delete.
4444 (optinfo::add_tree): Delete.
4445 (optinfo::add_symtab_node): Delete.
4446 (optinfo::add_dec): Delete.
4447 * optinfo.h (class dump_context): New forward decl.
4448 (optinfo::add_item): New decl.
4449 (optinfo::add_string): Delete.
4450 (optinfo::add_printf): Delete.
4451 (optinfo::add_printf_va): Delete.
4452 (optinfo::add_gimple_stmt): Delete.
4453 (optinfo::add_gimple_expr): Delete.
4454 (optinfo::add_tree): Delete.
4455 (optinfo::add_symtab_node): Delete.
4456 (optinfo::add_dec): Delete.
4457 (optinfo::add_poly_int): Delete.
4458 (optinfo_item::optinfo_item): Remove "owned" param.
4459 (class optinfo_item): Remove field "m_owned".
4461 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4464 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
4465 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
4466 requested variable alignment.
4467 (expand_one_ssa_partition): Likewise.
4468 (expand_one_var): Likewise.
4470 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4472 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4473 to speculation_safe_value_not_needed.
4475 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4477 * targhooks.h (speculation_safe_value_not_needed): New prototype.
4478 * targhooks.c (speculation_safe_value_not_needed): New function.
4479 * target.def (have_speculation_safe_value): Update documentation.
4480 * doc/tm.texi: Regenerated.
4482 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4484 * config/aarch64/iterators.md (ALLI_TI): New iterator.
4485 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
4487 (despeculate_copy<ALLI:mode>_insn): New insn.
4488 (despeculate_copyti_insn): New insn.
4489 (despeculate_simple<ALLI:mode>): New insn
4490 (despeculate_simpleti): New insn.
4491 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
4493 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
4494 aarch64_speculation_safe_value.
4495 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
4497 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4499 * config/aarch64/aarch64-speculation.cc: New file.
4500 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
4501 before pass_reorder_blocks.
4502 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
4504 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
4505 X14 and X15 when tracking speculation.
4506 * config/aarch64/aarch64.md (register name constants): Add
4507 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
4508 (unspec): Add UNSPEC_SPECULATION_TRACKER.
4509 (speculation_barrier): New insn attribute.
4510 (cmp<mode>): Allow SP in comparisons.
4511 (speculation_tracker): New insn.
4512 (speculation_barrier): Add speculation_barrier attribute.
4513 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
4514 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
4515 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
4517 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4519 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
4520 aarch64_track_speculation is true.
4521 (tb<optab><mode>1): Likewise.
4522 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
4523 generate CB[N]Z when tracking speculation.
4524 (aarch64_split_compare_and_swap): Likewise.
4525 (aarch64_split_atomic_op): Likewise.
4527 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4529 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
4531 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4533 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
4534 (speculation_barrier): New insn.
4536 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4538 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
4539 * config/arm/arm.md (speculation_barrier): New expand.
4540 (speculation_barrier_insn): New pattern.
4542 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4544 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
4545 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
4546 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
4547 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
4549 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
4550 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
4551 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
4552 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
4553 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
4554 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
4555 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
4556 * builtins.c (expand_speculation_safe_value): New function.
4557 (expand_builtin): Call it.
4558 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
4559 * doc/extend.texi: Document __builtin_speculation_safe_value.
4560 * doc/md.texi: Document "speculation_barrier" pattern.
4561 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
4562 TARGET_HAVE_SPECULATION_SAFE_VALUE.
4563 * doc/tm.texi: Regenerated.
4564 * target.def (have_speculation_safe_value, speculation_safe_value): New
4566 * targhooks.c (default_have_speculation_safe_value): New function.
4567 (default_speculation_safe_value): New function.
4568 * targhooks.h (default_have_speculation_safe_value): Add prototype.
4569 (default_speculation_safe_value): Add prototype.
4571 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4573 * dump-context.h (dump_context::dump_loc): New decl.
4574 * dumpfile.c (dump_context::dump_loc): New member function.
4575 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
4576 and dump_gimple_stmt.
4577 (dump_context::dump_gimple_expr_loc): Likewise, using
4579 (dump_context::dump_generic_expr_loc): Likewise, using
4581 (dump_context::dump_printf_loc_va): Likewise, using
4583 (dump_context::begin_scope): Explicitly using the global function
4584 "dump_loc", rather than the member function.
4586 2018-07-31 Martin Sebor <msebor@redhat.com>
4588 PR tree-optimization/86741
4589 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
4591 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
4593 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
4594 depend on whether prefetch instructions will be emitted or not.
4595 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
4596 will be emitted or not.
4597 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
4598 (TARGET_SETMEM_PFD): New macros.
4600 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4602 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
4603 (NULL_STMT_VEC_INFO): Delete.
4604 (stmt_vec_info::operator*): Likewise.
4605 (stmt_vec_info::operator gimple *): Likewise.
4606 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
4607 of NULL_STMT_VEC_INFO.
4608 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4609 (vect_reassociating_reduction_p): Likewise.
4610 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4611 (vectorizable_store): Likewise.
4612 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
4613 (vec_info::free_stmt_vec_infos): Likewise.
4615 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4617 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
4618 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
4620 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4622 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
4623 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4624 (vec_info::free_stmt_vec_info): New private member functions.
4625 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
4626 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
4627 * tree-parloops.c (gather_scalar_reductions): Remove calls to
4628 set_stmt_vec_info_vec and free_stmt_vec_infos.
4629 * tree-vect-loop.c (_loop_vec_info): Remove call to
4630 set_stmt_vec_info_vec.
4631 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
4632 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
4633 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
4634 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4635 (vec_info::free_stmt_vec_info): ...these new functions. Remove
4636 assignments in {vec_info::,}new_stmt_vec_info that are redundant
4637 with the clearing in the xcalloc.
4638 (stmt_vec_info_vec): Delete.
4639 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
4640 (vectorize_loops): Likewise.
4641 (vec_info::~vec_info): Remove argument from call to
4642 free_stmt_vec_infos.
4643 (vec_info::add_stmt): Remove vinfo argument from call to
4646 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4648 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
4649 rather than a gimple stmt.
4650 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
4651 information for pattern statements when passed the original
4652 statement; instead wait to be passed the pattern statement itself.
4653 Don't call set_vinfo_for_stmt here.
4654 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
4655 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
4656 stmt_vec_infos here.
4657 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
4658 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
4659 stmt_vec_infos entry.
4661 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4663 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
4664 * tree-vectorizer.c (vec_info::replace_stmt): New function.
4665 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
4666 * tree-vect-stmts.c (vectorizable_call): Likewise.
4667 (vectorizable_simd_clone_call): Likewise.
4669 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4671 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
4672 * tree-vectorizer.c (vec_info::remove_stmt): New function.
4673 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
4674 * tree-vect-loop.c (vect_transform_loop): Likewise.
4675 * tree-vect-slp.c (vect_schedule_slp): Likewise.
4676 * tree-vect-stmts.c (vect_remove_stores): Likewise.
4678 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4680 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
4681 (vect_dr_stmt): Delete.
4682 * tree-vectorizer.c (vec_info::lookup_dr): New function.
4683 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
4685 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
4686 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
4687 (vect_verify_datarefs_alignment, vect_peeling_supportable)
4688 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4689 (vect_analyze_data_refs): Likewise.
4690 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
4692 (vect_find_same_alignment_drs): Likewise.
4693 (vect_slp_analyze_node_dependences): Update calls accordingly.
4694 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4695 instead of DR_VECT_AUX.
4696 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
4697 of a vector data references. Use vec_info::lookup_dr instead of
4699 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
4700 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4701 instead of DR_VECT_AUX.
4703 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4705 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
4707 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4709 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4710 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4711 (vect_gen_prolog_loop_niters): Likewise.
4713 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4715 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
4716 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
4717 (vect_known_alignment_in_bytes, vect_dr_behavior)
4718 (vect_get_scalar_dr_size): Take references as dr_vec_infos
4719 instead of data_references. Update calls to other routines for
4720 which the same change has been made.
4721 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
4722 dr_vec_infos instead of stmt_vec_infos.
4723 (vect_analyze_data_ref_dependence): Update call accordingly.
4724 (vect_slp_analyze_data_ref_dependence)
4725 (vect_record_base_alignments): Use DR_VECT_AUX.
4726 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
4727 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
4728 (vector_alignment_reachable_p, vect_get_data_access_cost)
4729 (vect_peeling_supportable, vect_analyze_group_access_1)
4730 (vect_analyze_group_access, vect_analyze_data_ref_access)
4731 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
4732 (vect_compile_time_alias, vect_small_gap_p)
4733 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
4734 (vect_supportable_dr_alignment): Take references as dr_vec_infos
4735 instead of data_references. Update calls to other routines for
4736 which the same change has been made.
4737 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
4738 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4739 (vect_slp_analyze_and_verify_node_alignment)
4740 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4741 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4742 (vect_setup_realignment): Use dr_vec_infos. Update calls after
4744 (_vect_peel_info::dr): Replace with...
4745 (_vect_peel_info::dr_info): ...this new field.
4746 (vect_peeling_hash_get_most_frequent)
4747 (vect_peeling_hash_choose_best_peeling): Update accordingly.
4748 (vect_peeling_hash_get_lowest_cost):
4749 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
4750 routines for which the same change has been made.
4751 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
4753 * tree-vect-loop-manip.c (get_misalign_in_elems)
4754 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
4756 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4757 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
4758 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
4759 (get_group_load_store_type, get_negative_load_store_type)
4760 (vect_get_data_ptr_increment, vectorizable_store)
4761 (vectorizable_load): Likewise.
4762 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
4763 Update calls to other routines for which the same change has been made.
4765 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4767 * tree-vectorizer.h (vec_info::move_dr): New member function.
4768 (dataref_aux): Rename to...
4769 (dr_vec_info): ...this and add "dr" and "stmt" fields.
4770 (_stmt_vec_info::dr_aux): Update accordingly.
4771 (_stmt_vec_info::data_ref_info): Delete.
4772 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
4773 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
4774 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
4775 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
4777 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
4778 (STMT_VINFO_DR_INFO): New macro.
4779 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
4780 (set_dr_misalignment): Update after rename of dataref_aux.
4781 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
4782 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
4783 initialization of STMT_VINFO_DATA_REF.
4784 * tree-vectorizer.c (vec_info::move_dr): New function.
4785 * tree-vect-patterns.c (vect_recog_bool_pattern)
4786 (vect_recog_mask_conversion_pattern)
4787 (vect_recog_gather_scatter_pattern): Use it.
4788 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
4789 the "dr" and "stmt" fields of dr_vec_info instead of
4790 STMT_VINFO_DATA_REF.
4792 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4794 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
4795 (is_pattern_stmt_p): Use it.
4796 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
4797 on pattern statements.
4799 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4801 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
4802 original stmt as a stmt_vec_info rather than a gimple stmt.
4803 (vect_pattern_recog_1): Take the statement directly as a
4804 stmt_vec_info, rather than via a gimple_stmt_iterator.
4805 Update call to vect_mark_pattern_stmts.
4806 (vect_pattern_recog): Update calls accordingly.
4808 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4810 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
4811 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
4812 a vect_def_type for the first argument.
4813 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
4814 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
4815 operand if it isn't defined by a vectorized statement.
4816 (vect_build_gather_load_calls): Remove the mask_dt argument and
4817 update calls to vect_get_vec_def_for_stmt_copy.
4818 (vectorizable_bswap): Likewise the dt argument.
4819 (vectorizable_call): Update calls to vectorizable_bswap and
4820 vect_get_vec_def_for_stmt_copy.
4821 (vectorizable_simd_clone_call, vectorizable_assignment)
4822 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
4823 (vectorizable_comparison): Update calls to
4824 vect_get_vec_def_for_stmt_copy.
4825 (vectorizable_store): Likewise. Remove now-unnecessary calls to
4827 (vect_get_loop_based_defs): Remove dt argument and update call
4828 to vect_get_vec_def_for_stmt_copy.
4829 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
4830 and vect_get_vec_def_for_stmt_copy.
4831 (vectorizable_load): Update calls to vect_build_gather_load_calls
4832 and vect_get_vec_def_for_stmt_copy.
4833 * tree-vect-loop.c (vect_create_epilog_for_reduction)
4834 (vectorizable_reduction, vectorizable_live_operation): Update calls
4835 to vect_get_vec_def_for_stmt_copy.
4837 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4839 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
4840 and gimple stmt arguments with a stmt_vec_info.
4841 (vect_record_base_alignments): Update calls accordingly.
4842 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
4843 and gimple stmt arguments with a stmt_vec_info.
4844 (vect_build_slp_tree_1): Remove vinfo argument and update call
4845 to vect_record_max_nunits.
4846 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
4847 and vect_record_max_nunits.
4849 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4851 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
4852 file and take a stmt_vec_info instead of a gimple stmt.
4853 (supportable_widening_operation, vect_finish_replace_stmt)
4854 (vect_finish_stmt_generation, vect_get_store_rhs)
4855 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
4856 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
4857 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
4858 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
4859 (vect_create_data_ref_ptr, bump_vector_ptr)
4860 (vect_permute_store_chain, vect_setup_realignment)
4861 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
4862 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
4863 (vectorizable_reduction, vectorizable_induction)
4864 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4865 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4866 than gimple stmts as arguments.
4867 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4868 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4869 (can_group_stmts_p, vect_check_gather_scatter)
4870 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4871 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4872 (vect_permute_load_chain, vect_shift_permute_load_chain)
4873 (vect_transform_grouped_load)
4874 (vect_record_grouped_load_vectors): Likewise.
4875 * tree-vect-loop.c (vect_fixup_reduc_chain)
4876 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4877 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4878 (vectorizable_reduction, vectorizable_induction)
4879 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4880 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4881 (vect_get_load_store_mask): Likewise.
4882 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4883 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4884 * tree-vect-stmts.c (vect_mark_relevant)
4885 (is_simple_and_all_uses_invariant)
4886 (exist_non_indexing_operands_for_use_p, process_use)
4887 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4888 (vect_get_vec_def_for_operand, vect_get_vec_defs)
4889 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4890 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4891 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4892 (get_negative_load_store_type, get_load_store_type)
4893 (vect_check_load_store_mask, vect_check_store_rhs)
4894 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4895 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4896 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4897 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4898 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4899 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4900 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4901 (supportable_widening_operation): Likewise.
4903 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4905 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4906 a stmt_vec_info instead of a gcall.
4907 (vect_check_gather_scatter): Update call accordingly.
4908 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4910 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4911 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4912 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4913 instead of a gimple stmt.
4914 (vect_transform_loop): Update calls accordingly.
4915 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4916 stmt_vec_infos instead of gimple stmts.
4917 (vect_analyze_slp_instance): Update use accordingly.
4918 * tree-vect-stmts.c (read_vector_array, write_vector_array)
4919 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4920 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4921 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4922 (vect_gen_widened_results_half, vect_get_loop_based_defs)
4923 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4924 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4925 down to subroutines.
4927 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4929 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4930 of the worklist from a vector of gimple stmts to a vector of
4932 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4933 (vect_mark_stmts_to_be_vectorized): Likewise
4935 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4937 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4938 statement before passing it to vect_analyze_stmt.
4939 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4940 the chain of phi vector definitions. Track the exit phi via its
4942 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4943 STMT_VINFO_REDUC_DEF.
4944 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4945 stmt_vec_infos to handle the statement chains.
4946 (vect_get_slp_defs): Record the first statement in the node
4947 using a stmt_vec_info.
4948 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4949 statements here and pass their stmt_vec_info down to subroutines.
4950 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4951 down to vect_finish_stmt_generation.
4952 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4953 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4954 stmt_vec_infos to subroutines.
4955 (vect_remove_stores): Use stmt_vec_infos to handle the statement
4958 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4960 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4961 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4962 (vect_permute_store_chain, vect_setup_realignment)
4963 (vect_permute_load_chain, vect_shift_permute_load_chain)
4964 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4965 stmts internally, and when passing values to other vectorizer routines.
4966 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4967 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4968 (vect_analyze_loop_operations, get_initial_def_for_reduction)
4969 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4970 (vectorizable_reduction, vectorizable_induction)
4971 (vectorizable_live_operation, vect_transform_loop_stmt)
4972 (vect_transform_loop): Likewise.
4973 * tree-vect-patterns.c (vect_reassociating_reduction_p)
4974 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4975 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4976 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4977 (vect_slp_analyze_node_operations_1): Likewise.
4978 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4979 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4980 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4981 (vect_finish_stmt_generation_1, get_group_load_store_type)
4982 (get_load_store_type, vect_build_gather_load_calls)
4983 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4984 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4985 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4986 (vectorizable_store, vectorizable_load, vectorizable_condition)
4987 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4988 (supportable_widening_operation): Likewise.
4989 (vect_get_vector_types_for_stmt): Likewise.
4990 * tree-vectorizer.h (vect_dr_behavior): Likewise.
4992 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4994 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4995 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4996 (vect_permute_store_chain, vect_permute_load_chain)
4997 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4998 repeated stmt_vec_info lookups.
4999 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
5000 (vect_update_ivs_after_vectorizer): Likewise.
5001 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
5002 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
5003 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
5004 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5005 (vect_bb_slp_scalar_cost): Likewise.
5006 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
5008 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5010 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
5011 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
5012 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
5013 to get gassigns and gcalls, rather than operating on generc gimple
5015 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
5016 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
5017 (vectorizable_load, vect_analyze_stmt): Likewise.
5018 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
5020 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5022 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
5023 return stmt_vec_infos rather than gimple stmts. Do not accept
5025 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
5027 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
5028 Update use of get_later_stmt.
5029 (vect_get_constant_vectors): Update call accordingly.
5030 (vect_schedule_slp_instance): Likewise
5031 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
5032 (vect_slp_analyze_instance_dependence): Likewise.
5033 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
5035 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5037 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
5038 (stmt_info_for_cost::stmt_info): ...this new field.
5039 (add_stmt_costs): Update accordingly.
5040 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
5041 (vect_get_known_peeling_cost): Likewise.
5042 (vect_estimate_min_profitable_iters): Likewise.
5043 * tree-vect-stmts.c (record_stmt_cost): Likewise.
5045 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5047 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
5048 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5049 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
5051 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
5053 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5055 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
5056 a gimple stmt to a stmt_vec_info.
5057 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
5059 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5061 * tree-vectorizer.h (vec_info::grouped_stores): Change from
5062 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5063 (_loop_vec_info::reduction_chains): Likewise.
5064 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
5066 * tree-vect-slp.c (vect_analyze_slp): Likewise.
5068 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5070 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
5071 a gimple stmt to a stmt_vec_info.
5072 (_stmt_vec_info::next_element): Likewise.
5073 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
5074 (vect_slp_analyze_and_verify_node_alignment)
5075 (vect_analyze_group_access_1, vect_analyze_group_access)
5076 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
5077 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
5078 (vect_supportable_dr_alignment): Update accordingly.
5079 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
5080 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
5081 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
5082 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
5083 * tree-vect-slp.c (vect_build_slp_tree_1)
5084 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
5085 (vect_split_slp_store_group, vect_analyze_slp_instance)
5086 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
5087 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
5088 (get_group_load_store_type, get_load_store_type)
5089 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
5090 (vect_transform_stmt, vect_remove_stores): Likewise.
5092 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5094 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
5096 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
5097 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
5098 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
5099 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
5100 (vector_alignment_reachable_p, vect_get_data_access_cost)
5101 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
5102 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
5103 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
5104 (vect_analyze_group_access_1, vect_analyze_group_access)
5105 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
5106 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
5107 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
5108 result of vect_dr_stmt and use the stmt_vec_info instead of
5109 the associated gimple stmt.
5110 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5111 (vect_gen_prolog_loop_niters): Likewise.
5112 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5114 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5116 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
5117 to a vec<stmt_vec_info>.
5118 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
5119 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
5121 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
5122 to a vec<stmt_vec_info>.
5123 (bst_traits::value_type, bst_traits::value_type): Likewise.
5124 (bst_traits::hash): Update accordingly.
5125 (vect_get_and_check_slp_defs): Change the stmts parameter from
5126 a vec<gimple *> to a vec<stmt_vec_info>.
5127 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
5128 (vect_build_slp_tree): Likewise.
5129 (vect_build_slp_tree_2): Likewise. Update uses of
5130 SLP_TREE_SCALAR_STMTS.
5131 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
5132 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
5133 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
5134 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
5135 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
5136 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
5137 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
5138 (vect_get_constant_vectors, vect_get_slp_defs)
5139 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
5140 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
5141 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
5142 instead of gimple stmts.
5143 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
5144 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
5145 (vect_slp_analyze_instance_dependence): Update uses of
5146 SLP_TREE_SCALAR_STMTS.
5147 (vect_slp_analyze_and_verify_node_alignment): Likewise.
5148 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
5149 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
5150 (get_initial_defs_for_reduction): Likewise.
5151 (vect_create_epilog_for_reduction): Likewise.
5152 (vectorize_fold_left_reduction): Likewise.
5153 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
5154 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
5155 (can_vectorize_live_stmts): Likewise.
5157 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5159 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
5160 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5161 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
5163 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
5165 (gather_scalar_reductions): Update after above interface changes.
5166 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
5167 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
5169 (vect_force_simple_reduction): Likewise.
5170 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
5171 LOOP_VINFO_REDUCTIONS.
5172 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5174 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5176 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
5177 a gimple stmt to a stmt_vec_info.
5178 * tree-vect-loop.c (vect_active_double_reduction_p)
5179 (vect_force_simple_reduction, vectorizable_reduction): Update
5182 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5184 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
5185 vec<gimple *> to a vec<stmt_vec_info>.
5186 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
5187 the reduction_phis argument from a vec<gimple *> to a
5189 (vectorizable_reduction): Likewise the phis local variable that
5190 is passed to vect_create_epilog_for_reduction. Update for new type
5191 of SLP_TREE_VEC_STMTS.
5192 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
5193 (vectorizable_live_operation): Likewise.
5194 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
5195 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
5197 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5199 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
5200 a gimple stmt to a stmt_vec_info.
5201 (vectorizable_condition, vectorizable_live_operation)
5202 (vectorizable_reduction, vectorizable_induction): Pass back the
5203 vectorized statement as a stmt_vec_info.
5204 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
5205 use of STMT_VINFO_VEC_STMT.
5206 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
5207 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
5208 as stmt_vec_infos rather than gimple stmts.
5209 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
5211 (vectorizable_live_operation): Likewise.
5212 (vectorizable_reduction, vectorizable_induction): Likewise,
5213 updating use of STMT_VINFO_VEC_STMT.
5214 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
5215 of STMT_VINFO_VEC_STMT.
5216 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
5217 (vectorizable_simd_clone_call, vectorizable_conversion)
5218 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5219 (vectorizable_store, vectorizable_load, vectorizable_condition)
5220 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
5221 from a gimple stmt to a stmt_vec_info.
5222 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
5223 pointer to a stmt_vec_info to the vectorizable_* routines.
5225 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5227 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
5228 a gimple stmt to a stmt_vec_info.
5229 (is_pattern_stmt_p): Update accordingly.
5230 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
5231 (vect_record_grouped_load_vectors): Likewise.
5232 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
5233 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
5234 (vect_model_reduction_cost): Likewise.
5235 (vect_create_epilog_for_reduction): Likewise.
5236 (vectorizable_reduction, vectorizable_induction): Likewise.
5237 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5238 Return the stmt_vec_info for the pattern statement.
5239 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
5240 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
5241 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
5242 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
5243 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
5244 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
5245 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
5246 (free_stmt_vec_info, vect_is_simple_use): Likewise.
5248 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5250 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
5251 (vect_finish_stmt_generation): Likewise.
5252 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5253 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
5254 (vect_build_gather_load_calls): Use the return value of the above
5255 functions instead of a separate call to vinfo_for_stmt. Use narrow
5256 scopes for the input gimple stmt and wider scopes for the associated
5257 stmt_vec_info. Use vec_info::lookup_def when setting these
5258 stmt_vec_infos from an SSA_NAME definition.
5259 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
5260 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
5261 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5262 (vectorizable_store, vectorizable_load, vectorizable_condition)
5263 (vectorizable_comparison): Likewise.
5264 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
5265 (vectorizable_reduction): Likewise.
5267 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5269 * tree-vectorizer.h (vect_is_simple_use): Add an optional
5270 stmt_vec_info * parameter before the optional gimple **.
5271 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5272 (process_use, vect_get_vec_def_for_operand_1): Update callers.
5273 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
5274 * tree-vect-loop.c (vectorizable_reduction): Likewise.
5275 (vectorizable_live_operation): Likewise.
5276 * tree-vect-patterns.c (type_conversion_p): Likewise.
5277 (vect_look_through_possible_promotion): Likewise.
5278 (vect_recog_rotate_pattern): Likewise.
5279 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5281 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5283 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
5284 a typedef to a wrapper class.
5285 (NULL_STMT_VEC_INFO): New macro.
5286 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
5287 (stmt_vec_info::operator*): New function.
5288 (stmt_vec_info::operator gimple *): Likewise.
5289 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
5290 (add_stmt_costs): Likewise.
5291 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
5292 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
5293 (vect_get_known_peeling_cost): Likewise.
5294 (vect_estimate_min_profitable_iters): Likewise.
5295 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5296 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
5297 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
5298 (vectorizable_store, free_stmt_vec_infos): Likewise.
5299 (new_stmt_vec_info): Change return type of xcalloc to
5302 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5304 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
5305 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
5306 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
5307 a single_imm_use-based sequence.
5308 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
5310 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5312 * tree-vectorizer.h (vec_info::lookup_def): Declare.
5313 * tree-vectorizer.c (vec_info::lookup_def): New function.
5314 * tree-vect-patterns.c (vect_get_internal_def): Use it.
5315 (vect_widened_op_tree): Likewise.
5316 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5317 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
5318 (vectorizable_reduction): Likewise.
5319 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
5321 (vect_is_slp_reduction): Update calls accordingly. Use
5322 vec_info::lookup_def.
5323 (vect_is_simple_reduction): Likewise
5324 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
5326 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5328 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
5329 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
5330 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
5332 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
5333 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
5334 (vect_update_vf_for_slp, vect_analyze_loop_operations)
5335 (vect_is_slp_reduction, vectorizable_induction)
5336 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
5337 * tree-vect-patterns.c (vect_init_pattern_stmt):
5338 (vect_determine_min_output_precision_1, vect_determine_precisions)
5339 (vect_pattern_recog): Likewise.
5340 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
5341 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
5342 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
5343 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
5344 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
5345 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
5346 info field from a loop to a loop_vec_info.
5348 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5350 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
5351 (vec_info::add_stmt): Declare.
5352 * tree-vectorizer.c (vec_info::add_stmt): New function.
5353 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
5354 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
5355 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
5356 (vectorizable_induction): Likewise.
5357 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
5358 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5359 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
5360 (vectorizable_load): Likewise.
5361 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5362 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
5363 (vect_recog_gather_scatter_pattern): Likewise.
5364 (append_pattern_def_seq): Likewise. Remove a check that is
5365 performed by add_stmt itself.
5367 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5369 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
5370 which make_ssa_name was called with new_stmt before new_stmt
5373 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5375 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
5377 (vect_is_slp_reduction): ...here...
5378 (vect_is_simple_reduction): ...and here. Remove repetition of tests
5379 that are already known to be false.
5381 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5383 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
5384 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
5385 STMT_VINFO_NUM_SLP_USES when it's true.
5386 (vect_free_slp_instance): Add a final_p parameter and pass it to
5388 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
5389 (vect_analyze_slp_instance): Likewise.
5390 (vect_slp_analyze_operations): Likewise.
5391 (vect_slp_analyze_bb_1): Likewise.
5392 * tree-vectorizer.c (vec_info): Likewise.
5393 * tree-vect-loop.c (vect_transform_loop): Likewise.
5395 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5397 * tree-vect-loop.c (vectorizable_reduction): Assert that the
5398 function is not called for second and subsequent members of
5401 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5403 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
5404 cases for nested loops from here to ...
5405 (vect_create_epilog_for_reduction): ...here. Only call
5406 vect_is_simple_use for inner-loop reductions.
5408 2018-07-31 Martin Liska <mliska@suse.cz>
5410 PR gcov-profile/85338
5411 PR gcov-profile/85350
5412 PR gcov-profile/85372
5413 * profile.c (struct location_triplet): New.
5414 (struct location_triplet_hash): Likewise.
5415 (output_location): Do not output a BB that
5416 is already recorded for a line.
5417 (branch_prob): Use streamed_locations.
5419 2018-07-31 Martin Liska <mliska@suse.cz>
5421 PR gcov-profile/85370
5422 * coverage.c (coverage_begin_function): Do not mark target
5423 clones as artificial functions.
5425 2018-07-31 Martin Liska <mliska@suse.cz>
5427 PR gcov-profile/83813
5428 PR gcov-profile/84758
5429 PR gcov-profile/85217
5430 PR gcov-profile/85332
5431 * profile.c (branch_prob): Do not record GOTO expressions
5432 for GIMPLE statements which locations are already streamed.
5434 2018-07-31 Olivier Hainque <hainque@adacore.com>
5436 * gcc.c (handle_spec_function): Accept a soft_matched_part
5437 argument, as do_spec_1. Pass it down to ...
5438 (eval_spec_function): Accept a soft_matched_part argument,
5439 and pass it down to ...
5440 (do_spec_2): Accept a soft_matched_part argument, and pass
5441 it down to do_spec_1.
5442 (do_spec_1): Pass soft_matched_part to handle_spec_function.
5443 (handle_braces): Update call to handle_spec_function.
5444 (driver::set_up_specs): Update calls to do_spec_2.
5445 (compare_debug_dump_opt_spec_function): Likewise.
5446 (compare_debug_self_opt_spec_function): Likewise.
5448 2018-07-31 Olivier Hainque <hainque@adacore.com>
5450 * common.opt (nolibc): New option.
5451 * doc/invoke.texi (Link Options): Document it.
5452 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
5453 * config/alpha/linux.h: Likewise.
5454 * config/arc/elf.h: Likewise.
5455 * config/arm/uclinux-elf.h: Likewise.
5456 * config/arm/unknown-elf.h: Likewise.
5457 * config/avr/avrlibc.h: Likewise.
5458 * config/bfin/bfin.h: Likewise.
5459 * config/bfin/linux.h: Likewise.
5460 * config/bfin/uclinux.h: Likewise.
5461 * config/darwin.h: Likewise.
5462 * config/darwin10.h: Likewise.
5463 * config/darwin12.h: Likewise.
5464 * config/gnu-user.h: Likewise.
5465 * config/lm32/uclinux-elf.h: Likewise.
5466 * config/pa/pa-hpux11.h: Likewise.
5467 * config/pa/pa64-hpux.h: Likewise.
5468 * config/sparc/sparc.h: Likewise.
5470 2018-07-31 Olivier Hainque <hainque@adacore.com>
5472 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
5473 undefined variables.
5475 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
5478 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
5481 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
5483 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
5484 terminated string literal.
5486 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
5488 PR rtl-optimization/85160
5489 * combine.c (is_just_move): New function.
5490 (try_combine): Allow combining two instructions into two if neither of
5491 the original instructions was a move.
5493 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
5496 * doc/extend.texi (Global Register Variables): Discourage use of type
5498 (Local Register Variables): Likewise.
5500 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
5502 PR tree-optimization/86506
5503 * hwint.h (ceil_log2): Resync with hwint.c implementation.
5505 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
5508 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
5509 hard_regno, make sure no insn between `from` and `to` clobbers it.
5511 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
5512 Tom de Vries <tdevries@suse.de>
5514 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
5515 (PTX_DEFAULT_RUNTIME_DIM): ... this.
5516 (nvptx_goacc_validate_dims): Set default worker and gang dims to
5517 PTX_DEFAULT_RUNTIME_DIM.
5518 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
5520 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
5522 * config/pa/pa.c (pa_output_addr_vec): Align address table.
5523 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
5524 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
5526 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
5528 * config/rs6000/constraints.md (wG constraint): Delete, no longer
5530 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
5531 predicate to reflect toc fusion has been deleted.
5532 (toc_fusion_mem_raw): Delete, no longer used.
5533 (toc_fusion_mem_wrapped): Likewise.
5534 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
5536 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
5537 Delete, no longer used.
5538 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
5539 meant to be used for toc fusion.
5540 (rs6000_debug_print_mode): Delete toc fusion debugging.
5541 (rs6000_debug_reg_global): Likewise.
5542 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
5543 fusion and secondary reload support that were never used.
5544 (rs6000_option_override_internal): Delete TOC fusion, that was only
5545 partially defined, and it did not work unless you also used the
5547 (rs6000_legitimate_address_p): Delete TOC fusion support.
5548 (rs6000_opt_masks): Likewise.
5549 (fusion_wrap_memory_address): Delete function, no longer used.
5550 (fusion_split_address); Delete TOC fusion support.
5551 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
5552 longer used with toc fusion being deleted.
5553 (TARGET_TOC_FUSION_FP): Likewise.
5554 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
5556 (toc fusion spliter): Delete TOC fusion support.
5557 (toc_fusionload_<mode>): Likewise.
5558 (toc_fusionload_di): Likewise.
5559 (fusion_gpr_load_<mode>): Delete generator function, this insn no
5560 longer needs to be named. Rename predicate to delete TOC fusion.
5561 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5562 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5563 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5564 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5565 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
5567 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
5569 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
5570 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
5571 __int128 in built-in function prototypes.
5572 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
5573 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
5575 2018-07-27 Martin Sebor <msebor@redhat.com>
5577 PR tree-optimization/86696
5578 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
5579 types, including enums.
5580 (handle_char_store): Be prepared for the above function to fail.
5582 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
5584 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
5585 when optimization level is lower than 2 or optimize for size.
5587 2018-07-26 Martin Sebor <msebor@redhat.com>
5589 PR tree-optimization/86043
5590 PR tree-optimization/86042
5591 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
5592 (get_string_cst_length): Rename...
5593 (get_min_string_length): ...to this. Add argument.
5594 (handle_char_store): Extend to handle multi-character stores by
5596 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
5597 * tree.h (initializer_zerop): Add argument.
5599 2018-07-26 Jakub Jelinek <jakub@redhat.com>
5602 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
5603 declare target to variables if they have always,{to,from,tofrom} map
5606 2018-07-26 Martin Liska <mliska@suse.cz>
5609 * lto-wrapper.c: Add linker_output as prefix
5610 for ltrans_output_file.
5612 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
5614 PR rtl-optimization/85805
5615 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
5616 value for hard registers if that was written in the same mode.
5618 2018-07-26 Martin Liska <mliska@suse.cz>
5620 PR gcov-profile/86536
5621 * gcov.c (format_gcov): Use printf format %.*f directly
5622 and do not handle special values.
5624 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5626 * common/config/arc/arc-common.c (arc_option_optimization_table):
5627 Update default optimizations for size.
5629 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5631 * config/arc/arc.md (movsf_insn): Add short instruction selection.
5632 * config/arc/constraints.md (CfZ): New constraint.
5633 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
5634 (subsf3_fpu): Likewise.
5635 (cmpsf_fpu): Likewise.
5636 (cmpsf_fpu_uneq): Likewise.
5638 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5640 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
5642 (arc_is_uncached_mem_p): uncached applies to both the variable and
5645 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5647 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
5650 2018-07-25 David Malcolm <dmalcolm@redhat.com>
5652 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
5653 field "m_scopes" from vec to auto_vec.
5655 2018-07-25 Martin Liska <mliska@suse.cz>
5657 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
5660 2018-07-25 Richard Biener <rguenther@suse.de>
5663 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
5664 special wrt context_die late.
5665 (gen_subprogram_die): Re-use DIEs in local scope.
5667 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
5669 PR tree-optimization/86644
5670 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
5672 2018-07-25 Martin Liska <mliska@suse.cz>
5675 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
5676 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
5678 2018-07-25 Martin Liska <mliska@suse.cz>
5681 * params.def: Explain ASan abbreviation and provide
5682 a documentation link.
5684 2018-07-24 Martin Sebor <msebor@redhat.com>
5686 PR tree-optimization/86622
5687 PR tree-optimization/86532
5688 * builtins.h (string_length): Declare.
5689 * builtins.c (c_strlen): Correct handling of non-constant offsets.
5690 (check_access): Be prepared for non-constant length ranges.
5691 (string_length): Make extern.
5692 * expr.c (string_constant): Only handle the minor non-constant
5693 array index. Use string_constant to compute the length of
5694 a generic string constant.
5696 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
5698 PR tree-optimization/86618
5699 * tree-vect-stmts.c (vectorizable_call): Don't take the address
5700 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
5702 2018-07-24 David Malcolm <dmalcolm@redhat.com>
5704 PR tree-optimization/86636
5705 * json.cc (json::object::set): Fix comment. Add assertions.
5706 (json::array::append): Move here from json.h. Add comment and an
5708 (json::string::string): Likewise.
5709 * json.h (json::array::append): Move to json.cc.
5710 (json::string::string): Likewise.
5711 * optinfo-emit-json.cc
5712 (optrecord_json_writer::impl_location_to_json): Assert that we
5713 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
5714 wrapper around it. Expand the location once, rather than three
5716 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
5717 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
5719 (optrecord_json_writer::optinfo_to_json): Likewise, in four
5720 places. Fix some overlong lines.
5722 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
5724 * config/aarch64/aarch64-simd.md
5725 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
5726 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
5727 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
5728 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
5729 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
5730 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
5731 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
5732 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
5733 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
5735 2018-07-24 Jakub Jelinek <jakub@redhat.com>
5738 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
5739 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
5740 and abs_d == d, do the power of two handling if profitable.
5742 2018-07-24 Richard Biener <rguenther@suse.de>
5744 * match.pd: Add BIT_FIELD_REF canonicalizations.
5746 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5749 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
5751 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5753 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
5754 terminated STRING_CST object.
5756 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5758 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
5760 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5762 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
5763 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
5764 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
5765 the elements into a register.
5766 (rs6000_split_v4si_init_di_reg): Delete.
5767 (rs6000_split_v4si_init): Delete.
5768 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
5769 (vsx_init_v4si): Rewrite as a define_expand.
5771 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5773 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
5774 zero_extend argument from memory): New.
5776 2018-07-22 Martin Sebor <msebor@redhat.com>
5779 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
5780 diagnosing calls with unknown arguments unless -Walloca-larger-than
5781 is restricted to less than PTRDIFF_MAX bytes.
5783 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
5785 * doc/gcov.texi (Invoking Gcov): Editorial changes.
5787 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5789 * pretty-print.c (text_info::set_location): Remove redundant
5790 "line_table" parameter from call to rich_location::set_range.
5792 2018-07-20 Martin Sebor <msebor@redhat.com>
5795 * builtins.c (expand_builtin_alloca): Adjust.
5796 * calls.c (alloc_max_size): Simplify.
5797 * cgraphunit.c (cgraph_node::expand): Adjust.
5798 * common.opt (larger_than_size, warn_frame_larger_than): Remove
5800 (frame_larger_than_size): Same.
5801 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
5802 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
5804 * doc/invoke.texi (GCC Command Options): Document option arguments.
5805 Explain byte-size arguments and suffixes.
5806 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
5807 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
5808 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
5809 * doc/options.texi (UInteger): Expand.
5810 (Host_Wide_Int, ByteSize): Document new properties.
5811 * final.c (final_start_function_1): Include sizes in an error message.
5812 * function.c (frame_offset_overflow): Same.
5813 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
5814 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
5815 Diagnose unbounded alloca calls only for limits of less than
5817 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
5818 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
5820 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
5821 only for limits of less than PTRDIFF_MAX.
5822 * langhooks-def.h (lhd_handle_option): Change function argument
5824 * langhooks.c (lhd_handle_option): Same.
5825 * langhooks.h (handle_option): Same.
5826 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
5828 (var_type, var_type_struct): Same.
5829 (var_set): Handle ByteSize flag.
5830 * optc-gen.awk: Add comments to output to ease debugging. Make
5831 use of HOST_WIDE_INT where appropriate.
5832 * opts-gen-save.awk: Use %lx to format unsigned long.
5833 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
5834 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
5835 arguments. Parse bytes-size suffixes.
5836 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
5837 (enum_value_to_arg): Same.
5838 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
5839 (handle_option): Adjust.
5840 (generate_option): Change function argument to HOST_WIDE_INT.
5841 (cmdline_handle_error): Adjust.
5842 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
5843 (set_option): Change function argument to HOST_WIDE_INT.
5844 (option_enabled): Handle cl_host_wide_int.
5845 (get_option_state): Handle CLVC_SIZE.
5846 (control_warning_option): Same.
5847 * opts.c (common_handle_option): Change function argument to
5848 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
5849 OPT_Wvla_larger_than_.
5850 * opts.h (enum cl_var_type): Add an enumerator.
5851 * stor-layout.c (layout_decl): Print a more meaningful warning.
5852 * toplev.c (output_stack_usage): Adjust.
5854 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
5856 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
5857 call to inline_expand_builtin_string_cmp.
5858 (expand_builtin_strcmp): Likewise.
5859 (expand_builtin_strncmp): Likewise.
5860 (inline_string_cmp): Delete the last parameter, change char_type_node
5861 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
5863 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5864 the inlining expansion on target where the type of the call has same or
5865 narrower precision than unsigned char.
5867 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5869 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5870 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5871 * common.opt (fsave-optimization-record): New option.
5872 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5873 * doc/invoke.texi (-fsave-optimization-record): New option.
5874 * dumpfile.c: Include "optinfo-emit-json.h".
5875 (struct kv_pair): Move to coretypes.h.
5876 (optgroup_options): Make non-static.
5877 (dump_context::end_scope): Call
5878 optimization_records_maybe_pop_dump_scope.
5879 * dumpfile.h (optgroup_options): New decl.
5880 * json.cc: New file.
5882 * optinfo-emit-json.cc: New file.
5883 * optinfo-emit-json.h: New file.
5884 * optinfo.cc: Include "optinfo-emit-json.h".
5885 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5886 (optinfo_enabled_p): Check optimization_records_enabled_p.
5887 (optinfo_wants_inlining_info_p): Likewise.
5888 * optinfo.h: Update comment.
5889 * profile-count.c (profile_quality_as_string): New function.
5890 * profile-count.h (profile_quality_as_string): New decl.
5891 (profile_count::quality): New accessor.
5892 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5893 and optinfo_emit_json_cc_tests.
5894 * selftest.h (selftest::json_cc_tests): New decl.
5895 (selftest::optinfo_emit_json_cc_tests): New decl.
5896 * toplev.c: Include "optinfo-emit-json.h".
5897 (compile_file): Call optimization_records_finish.
5898 (do_compile): Call optimization_records_start.
5899 * tree-ssa-live.c: Include optinfo.h.
5900 (remove_unused_scope_block_p): Retain inlining information if
5901 optinfo_wants_inlining_info_p returns true.
5903 2018-07-20 Richard Biener <rguenther@suse.de>
5906 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5907 to cover -flto-partition=none.
5909 2018-07-20 Martin Liska <mliska@suse.cz>
5911 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5912 (get_decl_source_range): Remove unused function.
5914 2018-07-20 Richard Biener <rguenther@suse.de>
5916 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5917 (struct vn_phi_s): Likewise.
5918 (struct vn_reference_s): Likewise.
5919 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5920 for searching the slot of an entry known to be in the hash itself.
5921 (vn_phi_hasher::equal): Likewise.
5922 (vn_reference_hasher::equal): Likewise.
5923 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5925 (optimistic_info, current_info): Remove, keeping only valid_info.
5926 (vn_reference_lookup_1): Remove fallback lookup.
5927 (vn_reference_lookup_2): Likewise.
5928 (vn_nary_op_lookup_1): Likewise.
5929 (vn_phi_lookup): Likewise.
5930 (vn_nary_build_or_lookup_1): Make sure to not chain the built
5932 (vn_reference_insert): Adjust, chain the inserted hash element
5933 at last_inserted_ref.
5934 (vn_reference_insert_pieces): Likewise.
5935 (visit_reference_op_call): Likewise.
5936 (vn_nary_op_insert_into): Chain the inserted hash element at
5938 (vn_nary_op_insert_pieces): Adjust.
5939 (vn_nary_op_insert): Likewise.
5940 (vn_nary_op_insert_stmt): Likewise.
5941 (vn_phi_insert): Adjust, chain the inserted hash element at
5943 (process_scc): Remove clearing and copying the optimistic
5944 table. Instead remove elements inserted during an optimistic
5945 iteration from the single table we maintain.
5946 (init_scc_vn): Adjust.
5947 (free_scc_vn): Likewise.
5948 (sccvn_dom_walker::record_cond): Likewise.
5949 (sccvn_dom_walker::after_dom_children): Likewise.
5951 2018-07-19 Martin Sebor <msebor@redhat.com>
5953 PR tree-optimization/84047
5954 PR tree-optimization/83776
5955 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5956 (check_array_bounds): Call it.
5958 2018-07-19 Martin Sebor <msebor@redhat.com>
5960 * align.h (align_flags): Use member initialization.
5962 2018-07-19 David Malcolm <dmalcolm@redhat.com>
5964 * Makefile.in (OBJS): Add optinfo.o.
5965 * coretypes.h (class symtab_node): New forward decl.
5966 (struct cgraph_node): New forward decl.
5967 (class varpool_node): New forward decl.
5968 * dump-context.h: New file.
5969 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5971 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5972 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5973 (set_alt_dump_file): Likewise.
5974 (dump_context::~dump_context): New dtor.
5975 (dump_gimple_stmt): Move implementation to...
5976 (dump_context::dump_gimple_stmt): ...this new member function.
5977 Add the stmt to any pending optinfo, creating one if need be.
5978 (dump_gimple_stmt_loc): Move implementation to...
5979 (dump_context::dump_gimple_stmt_loc): ...this new member function.
5980 Start a new optinfo and add the stmt to it.
5981 (dump_gimple_expr): Move implementation to...
5982 (dump_context::dump_gimple_expr): ...this new member function.
5983 Add the stmt to any pending optinfo, creating one if need be.
5984 (dump_gimple_expr_loc): Move implementation to...
5985 (dump_context::dump_gimple_expr_loc): ...this new member function.
5986 Start a new optinfo and add the stmt to it.
5987 (dump_generic_expr): Move implementation to...
5988 (dump_context::dump_generic_expr): ...this new member function.
5989 Add the tree to any pending optinfo, creating one if need be.
5990 (dump_generic_expr_loc): Move implementation to...
5991 (dump_context::dump_generic_expr_loc): ...this new member
5992 function. Add the tree to any pending optinfo, creating one if
5994 (dump_printf): Move implementation to...
5995 (dump_context::dump_printf_va): ...this new member function. Add
5996 the text to any pending optinfo, creating one if need be.
5997 (dump_printf_loc): Move implementation to...
5998 (dump_context::dump_printf_loc_va): ...this new member function.
5999 Start a new optinfo and add the stmt to it.
6000 (dump_dec): Move implementation to...
6001 (dump_context::dump_dec): ...this new member function. Add the
6002 value to any pending optinfo, creating one if need be.
6003 (dump_context::dump_symtab_node): New member function.
6004 (dump_context::get_scope_depth): New member function.
6005 (dump_context::begin_scope): New member function.
6006 (dump_context::end_scope): New member function.
6007 (dump_context::ensure_pending_optinfo): New member function.
6008 (dump_context::begin_next_optinfo): New member function.
6009 (dump_context::end_any_optinfo): New member function.
6010 (dump_context::s_current): New global.
6011 (dump_context::s_default): New global.
6012 (dump_scope_depth): Delete global.
6013 (dumpfile_ensure_any_optinfo_are_flushed): New function.
6014 (dump_symtab_node): New function.
6015 (get_dump_scope_depth): Reimplement in terms of dump_context.
6016 (dump_begin_scope): Likewise.
6017 (dump_end_scope): Likewise.
6018 (selftest::temp_dump_context::temp_dump_context): New ctor.
6019 (selftest::temp_dump_context::~temp_dump_context): New dtor.
6020 (selftest::verify_item): New function.
6021 (ASSERT_IS_TEXT): New macro.
6022 (ASSERT_IS_TREE): New macro.
6023 (ASSERT_IS_GIMPLE): New macro.
6024 (selftest::test_capture_of_dump_calls): New test.
6025 (selftest::dumpfile_c_tests): Call it.
6026 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
6027 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
6028 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
6029 descriptive comment.
6030 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
6031 (dump_node, dump_bb): Move these unrelated decls.
6032 (class dump_manager): Add leading comment.
6033 * optinfo.cc: New file.
6034 * optinfo.h: New file.
6036 2018-07-19 Michael Collison <michael.collison@arm.com>
6037 Richard Henderson <rth@redhat.com>
6039 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
6040 (subti): Handle op1 zero.
6041 (subvti4, usub4ti4): New.
6042 (*sub<GPI>3_compare1_imm): New.
6043 (sub<GPI>3_carryinCV): New.
6044 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
6045 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
6047 2018-07-19 Michael Collison <michael.collison@arm.com>
6048 Richard Henderson <rth@redhat.com>
6050 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
6051 (addti3): Create simpler code if low part is already known to be 0.
6052 (addvti4, uaddvti4): New.
6053 (*add<GPI>3_compareC_cconly_imm): New.
6054 (*add<GPI>3_compareC_cconly): New.
6055 (*add<GPI>3_compareC_imm): New.
6056 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
6057 handle constants within this pattern..
6058 (*add<GPI>3_compareV_cconly_imm): New.
6059 (*add<GPI>3_compareV_cconly): New.
6060 (*add<GPI>3_compareV_imm): New.
6061 (add<GPI>3_compareV): New.
6062 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
6063 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
6064 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
6065 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
6066 with 'comparison' operator.
6067 (*add<GPI>3_compareV_cconly_imm): Ditto.
6068 (*add<GPI>3_compareV_cconly): Ditto.
6069 (*add<GPI>3_compareV_imm): Ditto.
6070 (add<GPI>3_compareV): Ditto.
6071 (add<mode>3_carryinC): Ditto.
6072 (*add<mode>3_carryinC_zero): Ditto.
6073 (*add<mode>3_carryinC): Ditto.
6074 (add<mode>3_carryinV): Ditto.
6075 (*add<mode>3_carryinV_zero): Ditto.
6076 (*add<mode>3_carryinV): Ditto.
6078 2018-07-19 Michael Collison <michael.collison@arm.com>
6079 Richard Henderson <rth@redhat.com>
6081 * config/aarch64/aarch64-modes.def (CC_V): New.
6082 * config/aarch64/aarch64-protos.h
6083 (aarch64_addti_scratch_regs): Declare
6084 (aarch64_subvti_scratch_regs): Declare.
6085 (aarch64_expand_subvti): Declare.
6086 (aarch64_gen_unlikely_cbranch): Declare
6087 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
6088 for signed overflow using CC_Vmode.
6089 (aarch64_get_condition_code_1): Handle CC_Vmode.
6090 (aarch64_gen_unlikely_cbranch): New function.
6091 (aarch64_addti_scratch_regs): New function.
6092 (aarch64_subvti_scratch_regs): New function.
6093 (aarch64_expand_subvti): New function.
6095 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
6097 * config/aarch64/aarch64-option-extensions.def: New entry for profile
6099 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
6100 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
6103 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
6106 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6107 address check not strict.
6109 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
6111 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
6113 (store_pair_lanes<mode>): Likewise.
6114 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
6115 enum value 'ADDR_QUERY_LDP_STP_N'.
6116 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
6117 (aarch64_print_address_internal): Add declaration.
6118 (aarch64_print_ldpstp_address): Remove.
6119 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
6120 (aarch64_print_operand): Change printing of 'y'.
6121 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
6122 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
6123 'true' rather than '1'.
6124 * config/aarch64/constraints.md (Uml): Likewise.
6125 (Uml): Rename to Umn.
6128 2018-07-19 Richard Biener <rguenther@suse.de>
6130 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
6132 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
6133 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
6134 (vn_reference_hasher): Likewise.
6135 (struct vn_tables_s): Remove obstack and alloc-pool members.
6136 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
6137 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
6138 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
6139 (vn_reference_insert_pieces): Likewise.
6140 (alloc_vn_nary_op_noinit): Adjust.
6141 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
6142 (vn_phi_eq): Adjust.
6143 (shared_lookup_phiargs): Remove.
6144 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
6145 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
6146 (visit_reference_op_call): Likewise.
6147 (copy_nary, copy_phi, copy_reference): Remove.
6148 (process_scc): Rewind the obstack when iterating. Do not
6149 copy the elements to valid_info but just move them from one
6150 hashtable to the other.
6151 (allocate_vn_table): Adjust.
6152 (free_vn_table): Likewise.
6153 (init_scc_vn): Likewise.
6154 (free_scc_vn): Likewise.
6156 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
6159 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
6160 indirect_return as function type attribute.
6161 (ix86_attribute_table): Change indirect_return to function
6163 * doc/extend.texi: Update indirect_return attribute.
6165 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
6167 * wide-int.h (widest2_int): New.
6168 * gimple-fold.c (arith_overflowed_p): Use it.
6169 * tree.h (widest2_int_cst): New.
6170 * tree-vrp.c (wide_int_binop_overflow): Rename from
6171 vrp_int_const_binop.
6172 Rewrite to work on trees.
6173 (extract_range_from_multiplicative_op_1): Abstract code to...
6174 (wide_int_range_min_max): ...here.
6175 (wide_int_range_cross_product): ...and here.
6176 (extract_range_from_binary_expr_1): Abstract overflow code to...
6177 (wide_int_range_mult_wrapping): ...here.
6178 * tree-vrp.h (wide_int_range_cross_product): New.
6179 (wide_int_range_mult_wrapping): New.
6181 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
6182 Julia Koval <julia.koval@intel.com>
6184 * config/i386/x86-tune-costs.h (skylake_memcpy,
6185 skylake_memset): Replace rep_prefix with unrolling for size 512.
6187 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
6190 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
6191 comparision with EQ_EXPR in last stmt.
6193 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
6195 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
6196 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
6197 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
6198 previously known as "PowerPC AltiVec Built-in Functions". Move
6199 some material to new subsubsections "PowerPC AltiVec Built-in
6200 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
6202 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
6203 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
6204 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
6205 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
6207 2018-07-18 Richard Biener <rguenther@suse.de>
6209 PR tree-optimization/86557
6210 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
6213 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
6215 * config/s390/s390.c (s390_function_profiler): Generate CFI.
6217 2018-07-17 Jeff Law <law@redhat.com>
6219 * config/arm/arm.c (get_label_padding): Update for recent
6220 changes to label_to_alignment.
6222 PR tree-optimization/86010
6223 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
6225 * config/mips/mips.c (vr4130_align_insns): Update for recent
6226 changes to label_to_alignment.
6228 * config/frv/frv.c (frv_label_align): Update for recent changes
6229 to label_to_alignment.
6231 * config/nios2/nios2.c (nios2_label_align): Update for recent
6232 changes which dropped ALIGN_LABELS_LOG.
6234 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
6236 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
6237 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
6239 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
6241 * config/arc/arc.c (arc_label_align): Use align_labels instead of
6242 deprecated align_labels_log.
6244 2018-07-17 Richard Biener <rguenther@suse.de>
6247 * dwarf2out.c (init_sections_and_labels): Always generate
6248 a debug_line_str_section for early LTO debug.
6249 (dwarf2out_finish): Reset debug_line_str_hash output early.
6250 Bump counter for extra dwarf5 .debug_loc labels to not conflict
6252 (dwarf2out_early_finish): Output debug_line_str.
6254 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
6256 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
6257 index register on z196 or later.
6259 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
6261 * config/s390/s390.c (s390_default_align): Set default function
6263 (s390_override_options_after_change): Call s390_default align.
6264 (s390_option_override_internal): Call s390_default_align.
6265 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
6267 2018-07-17 Jakub Jelinek <jakub@redhat.com>
6270 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
6271 to _looptemp_ clauses, other than the first two.
6273 2018-07-17 Martin Liska <mliska@suse.cz>
6275 * opts.c: Do not enable OPT_falign_* for -Os.
6277 2018-07-17 Martin Liska <mliska@suse.cz>
6279 * align.h (MAX_CODE_ALIGN): New.
6280 (MAX_CODE_ALIGN_VALUE): New.
6281 * common/config/i386/i386-common.c (ix86_handle_option):
6282 (MAX_CODE_ALIGN): Moved to align.h.
6283 * final.c (MAX_CODE_ALIGN): Likewise.
6284 * opts.c (parse_and_check_align_values):
6285 (MAX_CODE_ALIGN): Likewise.
6286 (MAX_CODE_ALIGN_VALUE): Likewise.
6288 2018-07-17 Martin Liska <mliska@suse.cz>
6290 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
6291 in order to fulfil coding style.
6292 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
6293 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6294 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6295 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
6296 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
6297 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
6298 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
6299 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
6300 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6302 2018-07-17 Martin Liska <mliska@suse.cz>
6304 * align.h: New file.
6305 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
6307 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
6308 align_flags of label_to_alignment.
6309 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
6311 * config/m68k/m68k.c: Do not use removed align_labels_value and
6313 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
6314 (LOOP_ALIGN): Likewise.
6315 (LABEL_ALIGN): Likewise.
6316 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
6317 Remove not used macro.
6318 (rs6000_loop_align): Change return type to align_flags.
6319 (rs6000_loop_align_max_skip): Remove.
6320 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
6321 Change return type to align_flags.
6322 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
6323 Remove not used macro.
6324 (rs6000_loop_align): Change return type to align_flags.
6325 (rs6000_loop_align_max_skip): Remove.
6326 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
6327 * config/rx/rx-protos.h (rx_align_for_label): Make it
6329 * config/rx/rx.c (rx_align_for_label): Change return type
6331 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
6333 into align_flags class.
6334 (LABEL_ALIGN): Likewise.
6335 (LOOP_ALIGN): Likewise.
6336 * config/s390/s390.c (s390_label_align): Use align_flags
6338 (s390_asm_output_function_label): Likewise.
6339 * config/sh/sh.c (sh_override_options_after_change):
6340 Use align_flags class directly without macros.
6341 (find_barrier): Likewise.
6342 (barrier_align): Likewise.
6343 (sh_loop_align): Likewise.
6344 * config/spu/spu.c (spu_option_override):
6345 Use align_flags_tuple::get_value instead of removed macros.
6346 (spu_sched_init): Likewise.
6347 * config/spu/spu.h (GTY): Likewise.
6348 * config/visium/visium.c (visium_option_override):
6349 Set "8" as default secondary alignment.
6350 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
6351 in order to guarantee secondary alignment of 8.
6352 * coretypes.h: Include align.h header file.
6353 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
6354 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
6355 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
6356 * doc/tm.texi.in: Likewise.
6357 * final.c (struct label_alignment): Remove not used structure.
6358 (LABEL_ALIGN): Change type to align_flags.
6359 (LOOP_ALIGN): Likewise.
6360 (JUMP_ALIGN): Likewise.
6361 (default_loop_align_max_skip): Remove.
6362 (default_label_align_max_skip): Likewise.
6363 (default_jump_align_max_skip): Likewise.
6364 (default_label_align_after_barrier_max_skip):
6365 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
6366 (LABEL_TO_MAX_SKIP): Remove.
6367 (label_to_alignment): Return align_flags type instead of integer.
6368 (label_to_max_skip): Remove.
6369 (align_fuzz): Use align_flags type.
6370 (compute_alignments): Use align_flags type and use align_flags::max
6371 to combine multiple alignments.
6372 (grow_label_align): Grow vec instead of C array.
6373 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
6374 (shorten_branches): Use align_flags type and use align_flags::max
6375 to combine multiple alignments.
6376 (final_scan_insn_1): Remove usage of secondary alignment that comes
6377 from label alignment, but instead use proper secondary alignment
6378 which is computed in grow_label_align.
6379 * flags.h (struct align_flags_tuple): Move to align.h.
6380 (struct align_flags): Likewise.
6381 (state_align_loops): Rename to align_loops.
6382 (state_align_jumps): Rename to align_jumps.
6383 (state_align_labels): Rename to align_labels.
6384 (state_align_functions): Rename to align_functions.
6385 (align_loops_log): Remove.
6386 (align_jumps_log): Remove.
6387 (align_labels_log): Remove.
6388 (align_functions_log): Remove.
6389 (align_loops_max_skip): Remove.
6390 (align_jumps_max_skip): Remove.
6391 (align_labels_max_skip): Remove.
6392 (align_functions_max_skip): Remove.
6393 (align_loops_value): Remove.
6394 (align_jumps_value): Remove.
6395 (align_labels_value): Remove.
6396 (align_functions_value): Remove.
6397 * output.h (label_to_alignment): Change return type to align_flags.
6398 (label_to_max_skip): Remove.
6399 * target.def: Remove loop_align_max_skip, label_align_max_skip,
6400 jump_align_max_skip macros.
6401 * targhooks.h (default_loop_align_max_skip): Remove.
6402 (default_label_align_max_skip): Likewise.
6403 (default_jump_align_max_skip): Likewise.
6404 (default_label_align_after_barrier_max_skip): Remove.
6405 * toplev.c (read_log_maxskip): Use ::normalize function.
6406 (parse_N_M): Remove not used argument and also call ::normalize.
6407 (parse_alignment_opts): Do not pass unused arguments.
6408 * varasm.c (assemble_start_function): Use directly align_functions
6409 instead of removed macros.
6410 * system.h: Do not poison removed macros.
6412 2018-07-17 Jakub Jelinek <jakub@redhat.com>
6415 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
6416 and cond temporaries don't have reference type if iterator has
6417 pointer type. For init use &for_pre_body instead of pre_p if
6418 for_pre_body is non-empty.
6420 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6422 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
6423 double-double modes to SFmode directly directly.
6424 (trunc<mode>sf2_fprs): Delete.
6426 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6428 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
6429 for conversions between IFmode and the decimal floating point modes.
6430 (init_float128_ieee): Use the correct names for conversions between
6431 KFmode and the decimal floating point modes.
6433 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6435 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
6436 for the conversions between TDmode and IFmode.
6437 (init_float128_ieee): Use more correct names for the conversions
6438 between TDmode and KFmode.
6440 2018-07-16 Jakub Jelinek <jakub@redhat.com>
6442 PR tree-optimization/86526
6443 * builtins.c (expand_builtin_memcmp): Formatting fixes.
6444 (inline_expand_builtin_string_cmp): Likewise.
6445 (inline_string_cmp): Likewise. Use c_readstr instead of
6446 builtin_memcpy_read_str. Add unit_mode temporary.
6448 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
6451 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
6452 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
6454 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
6456 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
6457 Alphabetize prototypes of built-in functions, separating out
6458 built-in functions that are listed in this section but should be
6459 described elsewhere.
6461 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
6464 * expmed.c (emit_store_flag): Do not emit setcc followed by a
6465 conditional move when trapping comparison was split to a
6466 non-trapping one (and vice versa).
6468 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6470 * config/s390/s390.c (s390_function_profiler): Generate nops
6471 instead of profiler call sequences.
6472 * config/s390/s390.opt: Add the new option.
6474 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6476 * config/s390/s390.c (s390_function_profiler): Generate
6477 __mcount_loc section.
6478 * config/s390/s390.opt: Add the new option.
6480 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6482 * common.opt: Add the new warning.
6483 * config/s390/s390.c (s390_function_profiler): Emit "brasl
6484 %r0,__fentry__" when -mfentry is specified.
6485 (s390_option_override_internal): Disallow -mfentry for 31-bit
6487 * config/s390/s390.opt: Add the new option.
6489 2018-07-16 Richard Biener <rguenther@suse.de>
6492 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
6493 for function-local FUNCTION_DECL and RESULT_DECL immediately.
6495 2018-07-16 Martin Liska <mliska@suse.cz>
6498 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
6501 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
6503 * config/arc/arcHS.md: Update ARCHS scheduling rules.
6505 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
6507 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
6509 * config/arc/arc-cpus.def (hs4x): New cpu.
6511 * config/arc/arc-tables.opt: Regenerate.
6512 * config/arc/arc.c (arc_sched_issue_rate): New function.
6513 (TARGET_SCHED_ISSUE_RATE): Define.
6514 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
6515 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
6517 (attr tune): Add ARCHS4x tune values.
6518 (attr tune_dspmpy): Define.
6519 (*tst): Correct instruction type.
6520 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
6521 * config/arc/arcHS4x.md: New file.
6522 * config/arc/fpu.md: Update instruction type attributes.
6523 * config/arc/t-multilib: Regenerate.
6525 2018-07-16 Tom de Vries <tdevries@suse.de>
6528 * var-tracking.c (vt_initialize): Fix pre_dec handling.
6530 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6532 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
6535 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
6537 PR tree-optimization/86514
6538 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
6539 conversion to a boolean type from a type with greater precision.
6541 2018-07-16 Tom de Vries <tdevries@suse.de>
6543 * var-tracking.c (vt_initialize): Print adjusted insn slim if
6544 dump_flags request TDF_SLIM.
6546 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
6548 * fold-const.c (int_const_binop_1): Abstract...
6549 (wide_int_binop): ...wide int code here.
6550 (poly_int_binop): ...poly int code here.
6551 Abstract the rest of int_const_binop_1 into int_const_binop.
6552 * fold-const.h (wide_int_binop): New.
6553 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
6554 Remove useless PLUS/MINUS_EXPR case.
6555 (zero_nonzero_bits_from_vr): Move wide int code...
6556 (zero_nonzero_bits_from_bounds): ...here.
6557 (extract_range_from_binary_expr_1): Move mask optimization code...
6558 (range_easy_mask_min_max): ...here.
6559 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
6560 (range_easy_mask_min_max): New.
6562 2018-07-15 Jeff Law <law@redhat.com>
6565 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
6568 2018-07-14 Jim Wilson <jimw@sifive.com>
6570 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
6572 2018-07-14 Paul Koning <ni1d@arrl.net>
6574 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
6576 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
6578 * lto-streamer-out.c (copy_function_or_variable): Dump info about
6581 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
6582 Steve Munroe <munroesj52@gmail.com>
6584 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
6585 (_mm_andnot_si128): Likewise.
6586 (_mm_or_si128): Likewise.
6587 (_mm_xor_si128): Likewise.
6589 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
6592 * builtins.c (expand_builtin_memcmp): Inline the calls first
6593 when result_eq is false.
6594 (expand_builtin_strcmp): Inline the calls first.
6595 (expand_builtin_strncmp): Likewise.
6596 (inline_string_cmp): New routine. Expand a string compare
6597 call by using a sequence of char comparison.
6598 (inline_expand_builtin_string_cmp): New routine. Inline expansion
6599 a call to str(n)cmp/memcmp.
6600 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
6602 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
6604 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
6606 * config/arm/driver-arm.c: Include arm-native.h.
6607 (host_detect_local_cpu): Use auto-generated data tables.
6608 (vendors, arm_cpu_table): Delete. Move part information to ...
6609 * config/arm/arm-cpus.in: ... here.
6610 * config/arm/parsecpu.awk (gen_native): New function.
6611 (vendor, part): New CPU fields.
6612 (END): Add support for building the native CPU detection tables.
6613 * config/arm/t-arm (arm-native.h): Add build rule.
6614 (driver-arm.o): Add dependency on arm-native.h.
6616 2018-07-13 Richard Biener <rguenther@suse.de>
6619 * match.pd (addr1 - addr2): Allow either of the operand to
6622 2018-07-13 Tom de Vries <tdevries@suse.de>
6624 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
6627 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
6629 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
6630 arrays instead of numbered variables.
6632 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
6634 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
6635 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
6637 2018-07-13 Richard Biener <rguenther@suse.de>
6640 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
6641 instead of get_context_die.
6643 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
6644 Richard Biener <rguenther@suse.de>
6647 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
6648 that the loop latch destination where phi is defined.
6650 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
6652 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
6653 (riscv_expand_epilogue): Add assertion to check interrupt mode.
6654 (riscv_set_current_function): Extract getting interrupt type to new
6656 (riscv_get_interrupt_type): New function.
6657 (riscv_merge_decl_attributes): New function, checking interrupt type is
6659 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
6661 2018-07-12 Paul Koning <ni1d@arrl.net>
6663 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
6666 2018-07-12 Paul Koning <ni1d@arrl.net>
6668 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
6669 zero reference, add doloop_end instead.
6670 * doc/md.texi (decrement_and_branch_until_zero): Remove.
6671 (Looping patterns): Remove decrement_and_branch_until_zero. Add
6672 detail for doloop_end.
6674 2018-07-12 Martin Sebor <msebor@redhat.com>
6677 * attribs.c (decl_attributes): Reject conflicting attributes before
6678 calling attribute handlers.
6680 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6682 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
6684 (gcc::dump_manager::get_dump_file_name): likewise.
6685 (dump_begin): Likewise.
6686 * dumpfile.h (dump_begin): Update prototype.
6687 (gcc::dump_manager::get_dump_file_name,
6688 gcc::dump_manager::get_dump_file_name): Update prototype.
6690 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6692 * internal-fn.h (vectorizable_internal_fn_p): New function.
6693 * tree-vect-slp.c (compatible_calls_p): Likewise.
6694 (vect_build_slp_tree_1): Remove nops argument. Handle calls
6695 to internal functions.
6696 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
6698 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6700 * fold-const.h (inverse_conditions_p): Declare.
6701 * fold-const.c (inverse_conditions_p): New function.
6702 * match.pd: Use inverse_conditions_p. Add folds of view_converts
6703 that test the inverse condition of a conditional internal function.
6704 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
6705 * internal-fn.c (internal_fn_mask_index): Handle conditional
6707 (vectorized_internal_fn_supported_p): New function.
6708 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
6709 (any_pred_load_store): Replace with...
6710 (need_to_predicate): ...this new variable.
6711 (redundant_ssa_names): New variable.
6712 (ifcvt_can_use_mask_load_store): Move initial checks to...
6713 (ifcvt_can_predicate): ...this new function. Handle tree codes
6714 for which a conditional internal function exists.
6715 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
6716 instead of ifcvt_can_use_mask_load_store. Update after variable
6718 (predicate_load_or_store): New function, split out from
6719 predicate_mem_writes.
6720 (check_redundant_cond_expr): New function.
6721 (value_available_p): Likewise.
6722 (predicate_rhs_code): Likewise.
6723 (predicate_mem_writes): Rename to...
6724 (predicate_statements): ...this. Use predicate_load_or_store
6725 and predicate_rhs_code.
6726 (combine_blocks, tree_if_conversion): Update after above name changes.
6727 (ifcvt_local_dce): Handle redundant_ssa_names.
6728 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
6729 general conditional functions.
6730 * tree-vect-stmts.c (vectorizable_call): Likewise.
6732 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6733 Alan Hayward <alan.hayward@arm.com>
6734 David Sherwood <david.sherwood@arm.com>
6736 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
6737 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
6738 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
6739 plus and minus and convert them into IFN_COND_FMA-based sequences.
6740 (convert_mult_to_fma): Handle conditional plus and minus.
6742 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6744 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
6745 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
6746 (cond_fnms_optab): New optabs.
6747 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
6749 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
6750 * internal-fn.h (get_conditional_internal_fn): Declare.
6751 (get_unconditional_internal_fn): Likewise.
6752 * internal-fn.c (cond_ternary_direct): New macro.
6753 (expand_cond_ternary_optab_fn): Likewise.
6754 (direct_cond_ternary_optab_supported_p): Likewise.
6755 (FOR_EACH_COND_FN_PAIR): Likewise.
6756 (get_conditional_internal_fn): New function.
6757 (get_unconditional_internal_fn): Likewise.
6758 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
6759 (gimple_match_op::gimple_match_op): Add a new overload for 5
6761 (gimple_match_op::set_op): Likewise.
6762 (gimple_resimplify5): Declare.
6763 * genmatch.c (decision_tree::gen): Generate simplifications for
6765 * gimple-match-head.c (gimple_simplify): Define an overload for
6766 5 operands. Handle calls with 5 arguments in the top-level overload.
6767 (convert_conditional_op): Handle conversions from unconditional
6768 internal functions to conditional ones.
6769 (gimple_resimplify5): New function.
6770 (build_call_internal): Pass a fifth operand.
6771 (maybe_push_res_to_seq): Likewise.
6772 (try_conditional_simplification): Try converting conditional
6773 internal functions to unconditional internal functions.
6774 Handle 3-operand unconditional forms.
6775 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
6776 Define ternary equivalents of the current rules for binary conditional
6778 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
6780 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
6781 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
6782 (optab): Handle them.
6783 (SVE_COND_FP_TERNARY): New int iterator.
6784 (sve_fmla_op, sve_fmad_op): New int attributes.
6785 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
6786 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
6787 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
6789 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6791 * target.def (preferred_else_value): New target hook.
6792 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
6793 * doc/tm.texi: Regenerate.
6794 * targhooks.h (default_preferred_else_value): Declare.
6795 * targhooks.c (default_preferred_else_value): New function.
6796 * internal-fn.h (conditional_internal_fn_code): Declare.
6797 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
6798 (get_conditional_internal_fn): Use it.
6799 (conditional_internal_fn_code): New function.
6800 * gimple-match.h (gimple_match_cond): New struct.
6801 (gimple_match_op): Add a cond member function.
6802 (gimple_match_op::gimple_match_op): Update all forms to take a
6804 * genmatch.c (expr::gen_transform): Use the same condition as res_op
6805 for the suboperation, but don't specify a particular else_value.
6806 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
6807 (visit_nary_op, visit_reference_op_load): Pass
6808 gimple_match_cond::UNCOND to the gimple_match_op constructor.
6809 * gimple-match-head.c: Include tree-eh.h
6810 (convert_conditional_op): New function.
6811 (maybe_resimplify_conditional_op): Likewise.
6812 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
6813 (gimple_resimplify2): Likewise.
6814 (gimple_resimplify3): Likewise.
6815 (gimple_resimplify4): Likewise.
6816 (maybe_push_res_to_seq): Return null for conditional operations.
6817 (try_conditional_simplification): New function.
6818 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
6820 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
6822 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
6824 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
6826 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6828 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6830 (hash_tree): Do not hash DECL_FCONTEXT
6831 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
6832 Do not stream DECL_FCONTEXT.
6833 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
6834 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
6836 2018-07-12 Richard Biener <rguenther@suse.de>
6839 * dwarf2out.c (gen_block_die): Only output blocks when they have
6840 at least one !DECL_IGNORED_P variable.
6842 2018-07-12 Richard Biener <rguenther@suse.de>
6845 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
6846 Remove -mieee-fp handling.
6848 2018-07-12 Richard Biener <rguenther@suse.de>
6850 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
6851 left-over from last patch.
6853 2018-07-12 Jakub Jelinek <jakub@redhat.com>
6855 PR tree-optimization/86492
6856 * gimple-ssa-store-merging.c
6857 (imm_store_chain_info::coalesce_immediate_stores): Call
6858 check_no_overlap even for the merge_overlapping case. Formatting fix.
6860 2018-07-12 Richard Biener <rguenther@suse.de>
6863 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6864 move possibly trapping operations into the conditional.
6866 2018-07-12 Richard Biener <rguenther@suse.de>
6868 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6869 (vn_lookup_simplify_result): Remove recursion limit applied
6871 (vn_nary_build_or_lookup_1): Adjust.
6872 (try_to_simplify): Likewise.
6873 * gimple-match-head.c (gimple_resimplify1): Instead apply one
6875 (gimple_resimplify2): Likewise.
6876 (gimple_resimplify3): Likewise.
6877 (gimple_resimplify4): Likewise.
6879 2018-07-11 Jakub Jelinek <jakub@redhat.com>
6881 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6882 Use __mmask64 type instead of __mmask8 for __M argument.
6883 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6884 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6886 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6887 __mmask16 for __M argument.
6888 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6889 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6890 to __mmask16 instead of __mmask8.
6891 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6892 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6893 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6894 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6895 instead of __mmask16 for __U argument.
6896 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6897 __mmask16 instead of __mmask8 for __U argument.
6898 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6900 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6902 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6904 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6906 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6908 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6910 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6912 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6914 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6916 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6918 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6919 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6920 return type as well as __M argument type and all casts from __mmask8
6922 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6923 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6924 return type as well as __M argument type and all casts from __mmask8
6926 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6927 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6928 return type as well as __M argument type and all casts from __mmask8
6930 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6931 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6932 return type as well as __M argument type and all casts from __mmask8
6934 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6935 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6938 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
6940 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6941 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6944 2018-07-11 Paul Koning <ni1d@arrl.net>
6946 * doc/md.texi (define_subst): Document how multiple occurrences of
6947 the same argument in the replacement pattern are handled.
6949 2018-07-11 Paul Koning <ni1d@arrl.net>
6951 * doc/extend.texi (Common Variable Attributes): Move "mode" into
6953 (Common Type Attributes): Add "mode" attribute.
6955 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
6957 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6958 stream DECL_ORIGINAL_TYPE.
6959 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6960 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6961 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6962 Do not walk original type.
6963 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6965 (write_ts_decl_non_common_tree_pointers): Do not stream
6967 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6968 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6970 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6972 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6973 thread twice from the same starting edge.
6975 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6977 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6978 * gimple.c (gimple_call_nonnull_result_p): ...here...
6979 (gimple_call_nonnull_arg): ...and here.
6980 * gimple.h (gimple_call_nonnull_result_p): New.
6981 (gimple_call_nonnull_arg): New.
6983 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
6985 * config/arm/arm-cpus.in: Move information from fpu field of each
6986 cpu definition to the isa field.
6987 * config/arm/parsecpu.awk (fpu): Delete match rule.
6988 (gen_comm_data): Don't add bits from the CPU's FPU entry.
6990 2018-07-11 Richard Biener <rguenther@suse.de>
6993 * dwarf2out.c (init_sections_and_labels): Use
6994 output_asm_line_debug_info consistently.
6995 (dwarf2out_early_finish): Likewise.
6996 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6999 2018-07-11 Richard Biener <rguenther@suse.de>
7001 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
7002 Rework father_bb setting in a way to avoid propagating constants
7003 multiple times on a loop body.
7005 2018-07-10 Mark Wielaard <mark@klomp.org>
7008 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
7010 2018-07-10 Richard Biener <rguenther@suse.de>
7012 * hash-map.h (hash_map::iterator::operator*): Return
7013 references to key and value.
7015 2018-07-10 Jakub Jelinek <jakub@redhat.com>
7018 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
7019 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
7020 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
7021 (gimplify_omp_for): For composite loops, move outer
7022 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
7023 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
7024 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
7025 TREE_LIST for both the original class iterator and the "last" helper
7026 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
7027 loop, remember has_decl_expr from outer composite loops for the
7028 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
7030 2018-07-09 Martin Sebor <msebor@redhat.com>
7034 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
7035 accessing implicitly initialized array elements.
7036 * expr.c (string_constant): Handle string initializers of
7037 character arrays within aggregates.
7038 * gimple-fold.c (fold_array_ctor_reference): Add argument.
7039 Store element offset. As a special case, handle zero size.
7040 (fold_nonarray_ctor_reference): Same.
7041 (fold_ctor_reference): Add argument. Store subobject offset.
7042 * gimple-fold.h (fold_ctor_reference): Add argument.
7044 2018-07-09 Paul Koning <ni1d@arrl.net>
7046 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
7047 (pdp11_insn_cost): New function.
7048 (pdp11_md_asm_adjust): New function.
7049 (TARGET_INVALID_WITHIN_DOLOOP): Define.
7050 (pdp11_rtx_costs): Update to match machine better.
7051 (output_addr_const_pdp11): Correct format mismatch warnings.
7052 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
7053 * config/pdp11/pdp11.md: General change to add base_cost and/or
7054 length attributes for use by new pdp11_insn_cost function.
7055 (MIN_BRANCH): Correct definition.
7057 (doloop_end): Use standard pattern name for looping pattern.
7058 (doloop_end_nocc): New.
7059 (movsf): Add another constraint alternative.
7060 (zero_extendqihi2): Add constraint alternatives for not in place
7062 (zero_extendhisi2): Remove.
7063 (shift patterns): Add CC handling variants.
7067 (define_peephole2): New peephole to recognize mov that sets CC for
7070 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7072 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
7073 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
7076 2018-07-09 Jakub Jelinek <jakub@redhat.com>
7079 * real.c (real_nextafter): Return true if result is denormal.
7081 2018-07-09 Martin Liska <mliska@suse.cz>
7083 * common.opt: Add back wrongly removed attribute.
7085 2018-07-09 Richard Biener <rguenther@suse.de>
7088 * dwarf2out.c (gen_block_die): For an early generated DIE
7089 always output high/low PC attributes.
7091 2018-07-09 Tom de Vries <tdevries@suse.de>
7093 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
7094 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
7095 onto VAR_DECL with abstract origin.
7097 2018-07-07 Jim Wilson <jimw@sifive.com>
7099 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
7101 2018-07-07 Tom de Vries <tdevries@suse.de>
7103 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
7105 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
7107 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
7109 (combine_bound): Use wide-int overflow calculation instead of
7111 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
7113 * fold-const.c (int_const_binop_2): Same.
7114 (extract_muldiv_1): Same.
7115 (fold_div_compare): Same.
7116 (fold_abs_const): Same.
7118 * poly-int.h (add): Same.
7122 * predict.c (predict_iv_comparison): Same.
7123 * profile-count.c (slow_safe_scale_64bit): Same.
7124 * simplify-rtx.c (simplify_const_binary_operation): Same.
7125 * tree-chrec.c (tree_fold_binomial): Same.
7126 * tree-data-ref.c (split_constant_offset_1): Same.
7127 * tree-if-conv.c (idx_within_array_bound): Same.
7128 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
7129 * tree-ssa-phiopt.c (minmax_replacement): Same.
7130 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
7131 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
7132 * vr-values.c (vr_values::adjust_range_with_scev): Same.
7133 * wide-int.cc (wi::add_large): Same.
7134 (wi::mul_internal): Same.
7135 (wi::sub_large): Same.
7136 (wi::divmod_internal): Same.
7137 * wide-int.h: Change overflow type to overflow_type for neg, add,
7138 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
7139 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
7140 mul_internal, divmod_internal.
7141 (overflow_type): New enum.
7142 (accumulate_overflow): New.
7144 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
7146 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
7147 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
7149 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
7151 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
7152 argument is checked for zero before entering loop, avoid checking again.
7154 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
7156 * gimplify.h (generic_expr_could_trap_p): Set as global function.
7157 * gimplify.h (generic_expr_could_trap_p): Likwise.
7158 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
7160 2018-07-06 Jakub Jelinek <jakub@redhat.com>
7162 PR tree-optimization/86401
7163 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
7164 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
7165 (fold_bit_and_mask): ... here. New helper function for match.pd.
7166 * fold-const.h (fold_bit_and_mask): Declare.
7167 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
7169 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
7172 * target.def (translate_mode_attribute): New hook.
7173 * targhooks.h (default_translate_mode_attribute): Declare.
7174 * targhooks.c (default_translate_mode_attribute): New function.
7175 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
7176 * doc/tm.texi: Regenerate.
7177 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
7178 (rs6000_translate_mode_attribute): New function.
7180 2018-07-06 Paul Koning <ni1d@arrl.net>
7182 * doc/md.texi (define_split): Document DONE and FAIL.
7183 (define_peephole2): Ditto.
7185 2018-07-05 Jeff Law <law@redhat.com>
7187 PR tree-optimization/86010
7188 * tree-ssa-dse.c (compute_trims): More aggressively trim at
7189 both the head and tail of mem* and str* calls.
7191 2018-07-05 Jim Wilson <jimw@sifive.com>
7193 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
7195 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
7197 * config/aarch64/aarch64-simd.md: correct flags text for
7198 MIN_EXPR replacement.
7200 2018-07-05 James Clarke <jrtc27@jrtc27.com>
7202 * configure: Regenerated.
7204 2018-07-05 Carl Love <cel@us.ibm.com>
7206 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
7207 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
7208 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
7209 VSX_BUILTIN_DOUBLEL_V4SF.
7211 2018-07-05 Martin Sebor <msebor@redhat.com>
7214 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
7215 than its domain to compute its the upper bound of a char array.
7217 2018-07-05 Nathan Sidwell <nathan@acm.org>
7219 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
7220 * doc/cpp.texi: Update comment.
7221 * doc/tm.texi: Rebuilt.
7222 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
7223 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
7224 * doc/extend.texi (Backwards Compatibility): Clarify it is system
7225 headers affected by extern "C".
7226 * system.h: Poison NO_IMPLICIT_EXTERN_C.
7227 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
7228 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
7229 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
7230 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
7231 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
7232 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
7233 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
7234 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
7235 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
7236 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
7237 config/sparc/sp64-elf.h, config/spu/spu.h,
7238 config/stormy16/stormy16.h, config/v850/v850.h,
7239 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
7240 define NO_IMPLICIT_EXTERN_C.
7241 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
7243 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7246 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
7247 instead of GET_MODE_SIZE when comparing Units.
7249 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7252 * rtlanal.c (set_noop_p): Constrain on mode change,
7253 include hard-reg-set.h
7255 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7257 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
7259 2018-07-05 Jakub Jelinek <jakub@redhat.com>
7262 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
7265 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
7267 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
7269 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
7272 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
7274 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
7276 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
7279 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
7281 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
7283 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
7284 neg_*_op* variables.
7286 2018-07-04 Martin Liska <mliska@suse.cz>
7288 * tree-switch-conversion.c: Define
7289 max_ratio_for_speed and max_ratio_for_size constants.
7291 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
7292 Martin Liska <mliska@suse.cz>
7297 * common.opt: Rename align options with 'str_' prefix.
7298 * common/config/i386/i386-common.c (set_malign_value): New
7300 (ix86_handle_option): Use it to set -falign-* options/
7301 * config/aarch64/aarch64-protos.h (struct tune_params): Change
7302 type from int to string.
7303 * config/aarch64/aarch64.c: Update default values from int
7305 * config/alpha/alpha.c (alpha_override_options_after_change):
7307 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
7308 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7309 max skip conditionally.
7310 * config/i386/freebsd.h (SUBALIGN_LOG): New.
7311 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7312 max skip conditionally.
7313 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7314 max skip conditionally.
7315 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
7316 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7317 max skip conditionally.
7318 * config/i386/i386.c (struct ptt): Change type from int to
7320 (ix86_default_align): Set default values.
7321 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
7322 max skip conditionally.
7323 * config/i386/iamcu.h (SUBALIGN_LOG): New.
7324 (ASM_OUTPUT_MAX_SKIP_ALIGN):
7325 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
7326 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7327 max skip conditionally.
7328 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
7329 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
7330 * config/i386/x86-64.h (SUBALIGN_LOG): New.
7331 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7332 max skip conditionally.
7333 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7334 * config/ia64/ia64.c (ia64_option_override): Set default values
7335 for alignment options.
7336 * config/m68k/m68k.c: Handle new str_align_* options.
7337 * config/mips/mips.c (mips_set_compression_mode): Change
7339 (mips_option_override): Set default values for options.
7340 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
7342 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7344 * config/rx/rx.c (rx_option_override): Likewise.
7345 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
7346 (LABEL_ALIGN): Use align_labels_log.
7347 (LOOP_ALIGN): Use align_loops_align.
7348 * config/s390/s390.c (s390_asm_output_function_label): Use new
7350 * config/sh/sh.c (sh_override_options_after_change):
7351 Change type of constants.
7352 * config/spu/spu.c (spu_sched_init): Likewise.
7353 * config/sparc/sparc.c (sparc_option_override): Set default
7355 * config/visium/visium.c (visium_option_override): Likewise.
7356 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
7357 emit p2align format with last argument if it's not needed.
7358 * doc/invoke.texi: Document extended format of -falign-*.
7359 * final.c: Use align_labels alignment.
7360 * flags.h (struct target_flag_state): Change type to use
7362 (struct align_flags_tuple): New.
7363 (struct align_flags): Likewise.
7364 (align_loops_log): Redefine macro to use new types.
7365 (align_loops_max_skip): Redefine macro to use new types.
7366 (align_jumps_log): Redefine macro to use new types.
7367 (align_jumps_max_skip): Redefine macro to use new types.
7368 (align_labels_log): Redefine macro to use new types.
7369 (align_labels_max_skip): Redefine macro to use new types.
7370 (align_functions_log): Redefine macro to use new types.
7371 (align_loops): Redefine macro to use new types.
7372 (align_jumps): Redefine macro to use new types.
7373 (align_labels): Redefine macro to use new types.
7374 (align_functions): Redefine macro to use new types.
7375 (align_functions_max_skip): Redefine macro to use new types.
7376 (align_loops_value): New macro.
7377 (align_jumps_value): New macro.
7378 (align_labels_value): New macro.
7379 (align_functions_value): New macro.
7380 * function.c (invoke_set_current_function_hook): Propagate
7381 alignment values from flags to global variables default in
7383 * ipa-icf.c (sem_function::equals_wpa): Use
7384 cl_optimization_option_eq instead of memcmp.
7385 * lto-streamer.h (cl_optimization_stream_out): Support streaming
7387 (cl_optimization_stream_in): Likewise.
7388 * optc-save-gen.awk: Support strings in cl_optimization.
7389 * opth-gen.awk: Likewise.
7390 * opts.c (finish_options): Remove error checking of invalid
7392 (MAX_CODE_ALIGN): Remove.
7393 (MAX_CODE_ALIGN_VALUE): Likewise.
7394 (parse_and_check_align_values): New function.
7395 (check_alignment_argument): Likewise.
7396 (common_handle_option): Use check_alignment_argument.
7397 * opts.h (parse_and_check_align_values): Declare.
7398 * toplev.c (init_alignments): Remove.
7399 (read_log_maxskip): New.
7400 (parse_N_M): Likewise.
7401 (parse_alignment_opts): Likewise.
7402 (backend_init_target): Remove usage of init_alignments.
7403 * toplev.h (parse_alignment_opts): Declare.
7404 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
7406 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
7407 * tree.c (cl_option_hasher::equal): New.
7408 * varasm.c: Use new global macros.
7410 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
7412 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
7413 Use a simpler align directive also if MAXSKIP = ALIGN-1.
7414 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7415 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7416 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7417 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7418 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
7419 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
7420 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
7421 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7422 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7423 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7424 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7426 2018-07-04 Martin Liska <mliska@suse.cz>
7427 Jonathan Wakely <jwakely@redhat.com>
7429 * coverage.c: Use correct type.
7430 * doc/invoke.texi: Language correction.
7432 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
7435 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
7436 ENDBRANCH for non-tail call which may return via indirect branch.
7437 * doc/extend.texi: Document indirect_return attribute.
7439 2018-07-03 Martin Sebor <msebor@redhat.com>
7441 PR tree-optimization/86274
7442 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
7444 (format_floating): Correct handling of infinities and NaNs.
7446 2018-07-03 Martin Sebor <msebor@redhat.com>
7448 * print-tree.c (print_real_cst): New function.
7449 (print_node_brief): Call it.
7450 (print_node): Ditto.
7452 2018-07-03 Jeff Law <law@redhat.com>
7454 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
7455 into a single pattern.
7457 * config/h8300/h8300.md (ors code_iterator): New.
7458 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
7459 a single pattern and single splitter.
7460 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
7461 (iorqi3_1, xorqi3_1): Likewise.
7462 (iorqi3, xorqi3 expanders): Similarly.
7464 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
7465 (movmd_internal) into a single pattern using the P mode iterator.
7466 (movmd splitters): Similarly.
7467 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
7468 (movsd splitters): Similarly.
7470 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
7471 ADDB, ADDW and ADDL into a single ADD attribute which selects the
7472 right table based on the size of the operand.
7473 * config/h8300/h8300.md (length_table): Corresponding changes. All
7474 references to "addb", "addw" and "addl" changed to "add".
7475 (btst patterns): Merge two variants into a single pattern.
7476 (tstqi, tsthi): Likewise.
7477 (addhi3_incdec, addsi3_incdec): Likewise.
7478 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
7479 (mulhi3, mulsi3): Likewise.
7480 (udivhi3, udivsi3): Likewise.
7481 (divhi3, divsi3): Likewise.
7482 (andorqi3, andorhi3, andorsi3): Likewise.
7484 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
7487 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
7488 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
7490 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7492 PR tree-optimization/85694
7493 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
7494 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
7496 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
7497 (<u>avg<mode>3_ceil): New patterns.
7499 2018-07-03 David Malcolm <dmalcolm@redhat.com>
7501 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
7502 scan-tree-dump directive.
7503 * gcc.dg/vect/slp-perm-2.c: Likewise.
7504 * gcc.dg/vect/slp-perm-3.c: Likewise.
7505 * gcc.dg/vect/slp-perm-5.c: Likewise.
7506 * gcc.dg/vect/slp-perm-6.c: Likewise.
7507 * gcc.dg/vect/slp-perm-7.c: Likewise.
7508 * gcc.dg/vect/slp-perm-8.c: Likewise.
7510 2018-07-03 Marek Polacek <polacek@redhat.com>
7513 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
7515 2018-07-03 Richard Biener <rguenther@suse.de>
7518 * tree-ssa-structalias.c (find_func_clobbers): Properly
7519 handle indirect calls.
7521 2018-07-03 Jeff Law <law@redhat.com>
7523 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
7524 (shifts): New code iterator.
7525 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
7526 expander. Fix HImode handling on H8/SX.
7527 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
7528 (subqi3, subhi3, subsi3 expanders): Likewise.
7529 (andqi3, andhi3, andsi3 expanders): Likewise.
7530 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
7531 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
7532 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
7533 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
7534 (zero_extendqihi2, zero_extendqisi2): Likewise.
7535 (extendqihi2, extendqisi2): Likewise.
7536 (rotlqi3, rotlhi3, rotlsi3): Likewise.
7537 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
7538 (rotlqi3_1, rotlhi3_1): Likewise.
7539 (logicalhi3_sn, logicalsi3_sn): Likewise.
7540 (logicalhi3, logicalsi3): Likewise.
7542 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7544 * tree-vect-patterns.c (vect_recog_rotate_pattern)
7545 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7546 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
7547 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
7548 type to append_pattern_def_seq instead of creating a stmt_vec_info
7550 (build_mask_conversion): Likewise. Remove vinfo argument.
7551 (vect_add_conversion_to_patterm): Likewise, renaming to...
7552 (vect_add_conversion_to_pattern): ...this.
7553 (vect_recog_mask_conversion_pattern): Update call to
7554 build_mask_conversion. Pass the vector type to
7555 append_pattern_def_seq here too.
7556 (vect_recog_gather_scatter_pattern): Update call to
7557 vect_add_conversion_to_pattern.
7559 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7561 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
7562 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7563 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
7564 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
7565 STMT_VINFO_PATTERN_DEF_SEQ to null here.
7566 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
7567 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
7568 append_pattern_def_seq instead of new_pattern_def_seq.
7569 (vect_recog_divmod_pattern): Do both of the above.
7570 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
7573 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7575 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
7576 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
7577 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
7578 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
7579 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
7580 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7581 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
7582 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7583 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7584 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
7585 parameter with a single stmt_vec_info.
7586 (vect_recog_func_ptr): Likewise.
7587 (vect_recog_gather_scatter_pattern): Likewise, folding in...
7588 (vect_try_gather_scatter_pattern): ...this.
7589 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
7590 the stmt_vec_info of the statement to be matched. Don't clear
7591 STMT_VINFO_RELATED_STMT.
7592 (vect_pattern_recog): Update call accordingly.
7594 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7596 PR tree-optimization/85694
7597 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
7598 (uavgM3_ceil): Document new optabs.
7599 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
7600 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
7602 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
7603 (savg_ceil_optab): New optabs.
7604 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
7605 (vect_vect_recog_func_ptrs): Add it.
7606 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
7607 constant directly from the associated lhs.
7609 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7611 * tree-vect-patterns.c (vect_split_statement): New function.
7612 (vect_convert_input): Use it to try to split an existing cast.
7614 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7616 * poly-int.h (print_hex): New function.
7617 * dumpfile.h (dump_dec, dump_hex): Declare.
7618 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
7619 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
7620 min_input_precision, operation_precision and operation_sign.
7621 * tree-vect-patterns.c (vect_get_range_info): New function.
7622 (vect_same_loop_or_bb_p, vect_single_imm_use)
7623 (vect_operation_fits_smaller_type): Delete.
7624 (vect_look_through_possible_promotion): Add an optional
7625 single_use_p parameter.
7626 (vect_recog_over_widening_pattern): Rewrite to use new
7627 stmt_vec_info infomration. Handle one operation at a time.
7628 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
7629 (vect_truncatable_operation_p, vect_set_operation_type)
7630 (vect_set_min_input_precision): New functions.
7631 (vect_determine_min_output_precision_1): Likewise.
7632 (vect_determine_min_output_precision): Likewise.
7633 (vect_determine_precisions_from_range): Likewise.
7634 (vect_determine_precisions_from_users): Likewise.
7635 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
7636 (vect_vect_recog_func_ptrs): Put over_widening first.
7638 (vect_pattern_recog): Call vect_determine_precisions.
7640 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7642 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
7643 statements that have been replaced by further pattern statements.
7644 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
7646 2018-07-03 Richard Biener <rguenther@suse.de>
7648 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
7649 always set *dt. Dump vectype in vectype overload.
7650 * dumpfile.h (dump_gimple_expr): New function.
7651 (dump_gimple_expr_loc): Likewise.
7652 * dumpfile.c (dump_gimple_expr): New function.
7653 (dump_gimple_expr_loc): Likewise.
7655 2018-07-02 Jeff Law <law@redhat.com>
7657 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
7658 the H8/300, H8/300H and H8/S variants into a single pattern.
7659 (movhi_h8300, movqi_h8300hs): Similarly.
7660 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
7661 (QHI mode iterator): New.
7663 * config/h8300/h8300.md: Remove trailing whitespace.
7665 2018-07-02 Jim Wilson <jimw@sifive.com>
7667 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
7668 instead of emit_insn for interrupt returns.
7669 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
7670 (riscv_sret, riscv_uret): Likewise.
7672 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7674 * pretty-print.c (selftest::test_pp_format): Move save and restore
7675 of quotes to class auto_fix_quotes, and add an instance.
7676 * selftest.c: Include "intl.h".
7677 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
7678 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
7679 * selftest.h (selftest::auto_fix_quotes): New class.
7681 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
7683 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
7684 (aarch64_sve_prepare_conditional_op): Remove.
7685 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
7686 Allow aarch64_simd_reg_or_zero as select operand; remove
7687 the aarch64_sve_prepare_conditional_op call.
7688 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
7689 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7690 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
7691 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
7692 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
7693 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
7694 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
7695 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
7696 and a splitters to match all of the *_any patterns.
7697 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
7699 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
7700 (SVE_COND_FP_BINARY_REV): Remove.
7701 (sve_int_op_rev, sve_fp_op_rev): New.
7702 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
7703 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
7704 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
7705 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
7706 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
7707 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
7708 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
7709 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
7710 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
7712 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
7713 Remove match_dup 1 from the inner unspec.
7714 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7716 * config/aarch64/aarch64.md (movprfx): New attr.
7717 (length): Default movprfx to 8.
7718 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
7719 (*madd<SVE_I>, *msub<SVE_I): Likewise.
7720 (*<su>mul<SVE_I>3_highpart): Likewise.
7721 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
7722 (*v<ASHIFT><SVE_I>3): Likewise.
7723 (*<su><MAXMIN><SVE_I>3): Likewise.
7724 (*<su><MAXMIN><SVE_F>3): Likewise.
7725 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
7726 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
7727 (*div<SVE_F>4): Likewise.
7729 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
7731 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
7734 2018-07-02 Richard Biener <rguenther@suse.de>
7736 PR tree-optimization/86363
7737 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
7738 memset argument refers to a non-variable address.
7740 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7742 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
7743 {PLUS,MINUS}_EXPR code to...
7744 (adjust_symbolic_bound): ...here,
7745 (combine_bound): ...here,
7746 (set_value_range_with_overflow): ...and here.
7748 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7750 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
7752 (extract_range_from_abs_expr): ...here.
7754 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
7756 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
7757 -fno-omit-frame-pointer when not optimizing.
7759 2018-07-02 Martin Liska <mliska@suse.cz>
7762 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
7763 (propagate_nothrow): Likewise.
7765 2018-07-02 Martin Liska <mliska@suse.cz>
7768 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
7770 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7772 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
7773 function in r262149, changing "loc" param from source_location to
7774 const dump_location_t &.
7775 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
7776 declaration, as above.
7778 2018-07-01 Paul Koning <ni1d@arrl.net>
7780 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7781 -munit-asm, -mgnu-asm, -mdec-asm.
7782 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
7783 (pdp11_output_labelref): New.
7784 (pdp11_output_def): New.
7785 (pdp11_output_addr_vec_elt): New.
7786 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
7787 %# and %@ format codes.
7788 (pdp11_option_override): New.
7789 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
7790 (pdp11_output_ident): New.
7791 (pdp11_asm_named_section): New.
7792 (pdp11_asm_init_sections): New.
7793 (pdp11_file_start): New.
7794 (pdp11_file_end): New.
7795 (output_ascii): Use .ascii/.asciz for -mdec-asm.
7796 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
7797 %o, like %c but octal.
7798 (pdp11_option_override): New.
7799 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
7801 (DATA_SECTION_ASM_OP): Ditto.
7802 (READONLY_DATA_SECTION_ASM_OP): New.
7803 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
7804 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
7805 (ASM_OUTPUT_LABELREF): Ditto.
7806 (ASM_OUTPUT_DEF): Ditto.
7807 (ASM_OUTPUT_EXTERNAL): New.
7808 (ASM_OUTPUT_SOURCE_FILENAME): New.
7809 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
7810 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
7811 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
7812 %# and %@ format codes.
7813 * config/pdp11/pdp11.opt (mgnu-asm): New.
7814 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
7815 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
7816 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
7818 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
7820 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
7821 dereferencing path[] beyond its length.
7823 (debug_all_paths): New.
7824 (rewire_first_differing_edge): New.
7825 (adjust_paths_after_duplication): New.
7826 (duplicate_thread_path): Call adjust_paths_after_duplication.
7828 (thread_through_all_blocks): Add new argument to
7829 duplicate_thread_path.
7831 2018-06-30 Jim Wilson <jimw@sifive.com>
7833 * config/riscv/predicates.md (p2m1_shift_operand): New.
7834 (high_mask_shift_operand): New.
7835 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
7836 pattern using p2m1_shift_operand.
7837 (lshsi3_zero_extend_3+2): New combiner pattern using
7838 high_mask_shift_operand.
7840 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7842 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
7844 (vect_recog_rotate_pattern): ...here.
7845 (vect_convert_input): Try to insert casts of invariants in the
7847 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
7848 preheader to be empty.
7850 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7852 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
7853 vector type. If given, install it in the new statement's
7855 (vect_element_precision): New function.
7856 (vect_unpromoted_value): New struct.
7857 (vect_unpromoted_value::vect_unpromoted_value): New function.
7858 (vect_unpromoted_value::set_op): Likewise.
7859 (vect_look_through_possible_promotion): Likewise.
7860 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
7861 (vect_widened_op_tree, vect_convert_input): Likewise.
7862 (vect_convert_inputs, vect_convert_output): Likewise.
7863 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7864 to handle the optional cast of the multiplication result and
7865 vect_widened_op_tree to detect the widened multiplication itself.
7866 Do not require the input and output of promotion casts to have
7867 the same sign, but base the signedness of the operation on the
7868 input rather than the result. If the pattern includes two
7869 promotions, check that those promotions have the same sign.
7870 Do not restrict the MULT_EXPR handling to a double-width result;
7871 handle quadruple-width results and wider. Use vect_convert_inputs
7872 to convert the inputs to the common type.
7873 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
7874 to handle the optional cast of the ABS result. Also allow a sign
7875 change or a sign extension between the ABS and MINUS.
7876 Use vect_widened_op_tree to detect the widened subtraction and use
7877 vect_convert_inputs to convert the inputs to the common type.
7878 (vect_handle_widen_op_by_const): Delete.
7879 (vect_recog_widen_op_pattern): New function.
7880 (vect_recog_widen_mult_pattern): Use it.
7881 (vect_recog_widen_shift_pattern): Likewise.
7882 (vect_recog_widen_sum_pattern): Use
7883 vect_look_through_possible_promotion to handle the promoted
7886 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7888 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7889 the containing gimple_seq *.
7890 * gimple-iterator.h (gsi_for_stmt): Declare it.
7891 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7892 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7893 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7894 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7895 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7897 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7899 (vect_mark_pattern_stmts): ...here. Handle cases in which the
7900 statement being replaced is part of an existing pattern
7901 definition sequence, inserting the new pattern statements before
7903 (vect_pattern_recog_1): Don't return a bool. If the statement
7904 is already part of a pattern, instead apply pattern matching
7905 to the pattern definition statements. Don't clear the
7906 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7907 (vect_pattern_recog): Don't break after the first match;
7908 continue processing the pattern definition statements instead.
7909 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7911 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7913 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7914 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7915 (vect_recog_widen_sum_pattern): Use it.
7917 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7919 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7920 phi is not a pattern statement and has not been replaced by
7921 a pattern statement.
7922 * tree-vect-patterns.c (type_conversion_p): Don't check
7923 STMT_VINFO_IN_PATTERN_P.
7924 (vect_recog_vector_vector_shift_pattern): Likewise.
7925 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7926 the pattern statement rather than the original statement; check
7927 directly for a WIDEN_MULT_EXPR here.
7928 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7929 vect_is_simple_use to return the pattern statement rather
7930 than the original statement; use is_pattern_stmt_p to check
7931 for such a pattern statement.
7932 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7933 to return the pattern statement rather than the original statement;
7934 don't do the same transformation here.
7935 (vect_is_simple_use): If the defining statement has been replaced
7936 by a pattern statement, return the pattern statement instead.
7937 Remove the corresponding (local) transformation from the vectype
7940 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7942 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7943 end and default to null.
7944 * tree-vect-loop.c (vect_create_epilog_for_reduction)
7945 (vectorizable_reduction): Update calls accordingly, dropping the
7946 gimple ** argument if the passed-back statement isn't needed.
7947 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7948 (vect_recog_rotate_pattern): Likewise.
7949 (vect_recog_mask_conversion_pattern): Likewise.
7950 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7951 (vect_mask_constant_operand_p): Likewise.
7952 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7953 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7954 (get_group_load_store_type, get_load_store_type): Likewise.
7955 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7956 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7957 (vectorizable_conversion, vectorizable_assignment): Likewise.
7958 (vectorizable_shift, vectorizable_operation): Likewise.
7959 (vectorizable_store, vect_is_simple_cond): Likewise.
7960 (vectorizable_condition, vectorizable_comparison): Likewise.
7961 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7962 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7963 and move it to the end. Cope with null def_stmt_outs.
7965 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7967 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7969 2018-06-29 Jeff Law <law@redhat.com>
7971 * config/v850/v850.c (v850_legitimate_address_p): Handle large
7972 displacements for TARGET_V850E2V3 and newer.
7973 (TARGET_LRA_P): Remove. Defaults to LRA now.
7974 * config/v850/v850.md (sign23byte_load): Remove.
7975 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7976 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7978 2018-06-29 Martin Liska <mliska@suse.cz>
7981 * coverage.c (coverage_init): Mangle full path name.
7982 * doc/invoke.texi: Document the change.
7983 * gcov-io.c (mangle_path): New.
7984 * gcov-io.h (mangle_path): Likewise.
7985 * gcov.c (mangle_name): Use mangle_path for path mangling.
7987 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7989 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7990 if starting source register is not even.
7992 2018-06-29 Martin Liska <mliska@suse.cz>
7994 PR tree-optimization/86263
7995 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7996 Make edge redirection.
7998 2018-06-29 David Malcolm <dmalcolm@redhat.com>
8000 * dumpfile.c (dump_loc): Add indentation based on scope depth.
8001 (dump_scope_depth): New variable.
8002 (get_dump_scope_depth): New function.
8003 (dump_begin_scope): New function.
8004 (dump_end_scope): New function.
8005 * dumpfile.h (get_dump_scope_depth): New declaration.
8006 (dump_begin_scope): New declaration.
8007 (dump_end_scope): New declaration.
8008 (class auto_dump_scope): New class.
8009 (AUTO_DUMP_SCOPE): New macro.
8010 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
8013 2018-06-29 Richard Biener <rguenther@suse.de>
8015 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
8016 compute_all_dependences succeeds.
8017 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
8018 exceed --param loop-max-datarefs-for-datadeps.
8020 2018-06-29 Jakub Jelinek <jakub@redhat.com>
8022 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
8024 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
8027 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
8028 alternative 0 in preferred_for_speed attribute.
8030 2018-06-28 Paul Koning <ni1d@arrl.net>
8032 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
8033 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
8034 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
8035 * config/pdp11/pdp11.md: Correct "length" attribute calculation
8036 for shift insn patterns.
8038 2018-06-28 David Malcolm <dmalcolm@redhat.com>
8040 * cgraph.c (cgraph_node::get_body): Replace assignments to
8041 "dump_file" with calls to set_dump_file.
8042 * dumpfile.c (alt_dump_file): Make static, and group with...
8043 (alt_flags): ...this definition.
8044 (dumps_are_enabled): New variable.
8045 (refresh_dumps_are_enabled): New function.
8046 (set_dump_file): New function.
8047 (set_alt_dump_file): New function.
8048 (gcc::dump_manager::dump_start): Replace assignments to
8049 "dump_file" and "alt_dump_file" with calls to set_dump_file and
8051 (gcc::dump_manager::dump_finish): Likewise.
8052 * dumpfile.h (alt_dump_file): Delete decl.
8053 (dumps_are_enabled): New variable decl.
8054 (set_dump_file): New function decl.
8055 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
8057 * tree-nested.c (lower_nested_functions): Replace assignments to
8058 "dump_file" with calls to set_dump_file.
8060 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
8062 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
8063 goto_locus of each outgoing edge of each basic block.
8065 2018-06-28 Richard Biener <rguenther@suse.de>
8067 * dwarf2out.c (decl_scope_table): Remove.
8068 (push_decl_scope): Likewise.
8069 (pop_decl_scope): Likewise.
8070 (gen_type_die_for_member): Do not call push/pop_decl_scope.
8071 (gen_struct_or_union_type_die): Likewise.
8072 (gen_tagged_type_die): Likewise.
8073 (dwarf2out_init): Do not initialize decl_scope_table.
8074 (dwarf2out_c_finalize): Do not free it.
8076 2018-06-28 Richard Biener <rguenther@suse.de>
8078 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
8079 deciding whether to not re-use a DIE.
8081 2018-06-28 Richard Biener <rguenther@suse.de>
8083 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
8084 DW_AT_abstract_origin attribute.
8086 2018-06-28 Martin Liska <mliska@suse.cz>
8088 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8089 Use newly introduced constants.
8090 * tree-switch-conversion.h (struct jump_table_cluster):
8091 Define max_ratio_for_size and max_ratio_for_speed.
8093 2018-06-28 Martin Liska <mliska@suse.cz>
8095 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8096 Add new checking assert to catch invalid state.
8097 (jump_table_cluster::can_be_handled): Handle single case
8099 (jump_table_cluster::is_beneficial): Bail out for such case.
8100 (bit_test_cluster::find_bit_tests):
8101 Add new checking assert to catch invalid state.
8102 (bit_test_cluster::can_be_handled): Handle single case
8104 (bit_test_cluster::is_beneficial): Bail out for such case.
8105 (switch_decision_tree::analyze_switch_statement):
8108 2018-06-28 Martin Liska <mliska@suse.cz>
8110 * common.opt: Introduce -completion option.
8111 * gcc.c (driver_handle_option): Handle it.
8112 (driver::main): Print completions if completion
8114 * opt-suggestions.c (option_proposer::get_completions):
8116 (option_proposer::suggest_completion): Likewise.
8117 (option_proposer::find_param_completions): Likewise.
8118 (verify_autocompletions): Likewise.
8119 (test_completion_valid_options): Likewise.
8120 (test_completion_valid_params): Likewise.
8121 (in_completion_p): Likewise.
8122 (empty_completion_p): Likewise.
8123 (test_completion_partial_match): Likewise.
8124 (test_completion_garbage): Likewise.
8125 (opt_proposer_c_tests): Likewise.
8126 * opt-suggestions.h: Declare new functions.
8127 * opts.c (common_handle_option): Handle OPT__completion_.
8128 * selftest-run-tests.c (selftest::run_tests): Add
8129 opt_proposer_c_tests.
8130 * selftest.c (assert_str_startswith): New.
8131 * selftest.h (assert_str_startswith): Likewise.
8132 (opt_proposer_c_tests): New.
8133 (ASSERT_STR_STARTSWITH): Likewise.
8135 2018-06-28 Martin Liska <mliska@suse.cz>
8137 * Makefile.in: Add opt-suggestions.o.
8138 * gcc-main.c: Include opt-suggestions.h.
8139 * gcc.c (driver::driver): Likewise.
8140 (driver::~driver): Remove m_option_suggestions.
8141 (driver::build_option_suggestions): Moved to option_proposer.
8142 (driver::suggest_option): Likewise.
8143 (driver::handle_unrecognized_options): Use option_proposer.
8144 * gcc.h (class driver): Add new memver m_option_proposer.
8145 * opt-suggestions.c: New file.
8146 * opt-suggestions.h: New file.
8148 2018-06-28 Martin Liska <mliska@suse.cz>
8150 * vec.h (class auto_string_vec): New (moved from auto_argvec).
8151 (auto_string_vec::~auto_string_vec): Likewise.
8153 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
8155 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
8156 prevent_decl_creation_for_types fields up and add reset_location field.
8157 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
8158 statement if id->reset_location is true.
8159 (copy_edges_for_bb): Do not set goto_locus on the new edges if
8160 id->reset_location is true.
8161 (copy_phis_for_bb): Force input_location on the arguments if
8162 id->reset_location is true.
8163 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
8164 is set on the function to be inlined.
8166 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
8168 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
8170 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
8172 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
8173 registers for Pmode.
8174 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
8175 hard registers for the clobbered pseudo.
8177 2018-06-27 Paul Koning <ni1d@arrl.net>
8179 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
8180 mutually exclusive options.
8181 * config/pdp11/constraints.md (h): New constraint.
8182 (O): Update definition to match shift code generation.
8183 (D): New constraint.
8184 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
8186 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
8188 (output_jump): Change arguments.
8189 (pdp11_fixed_cc_regs): New function.
8190 (pdp11_cc_mode): Ditto.
8191 (pdp11_expand_shift): Ditto.
8192 (pdp11_assemble_shift): Ditto.
8193 (pdp11_small_shift): Ditto.
8194 (pdp11_branch_cost): Remove.
8195 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
8197 (pdp11_register_move_cost): Update for CC registers.
8198 (pdp11_rtx_costs): Add case for LSHIFTRT.
8199 (pdp11_output_jump): Add CCNZ mode conditional branches.
8200 (notice_update_cc_on_set): Remove.
8201 (pdp11_cc_mode): New function.
8202 (simple_memory_operand): Correct pre/post decrement case.
8203 (no_side_effect_operand): New function.
8204 (pdp11_regno_reg_class): Add CC_REGS class.
8205 (pdp11_fixed_cc_regs): New function.
8206 (pdp11_small_shift): New function.
8207 (pdp11_expand_shift): New function to expand shift insns.
8208 (pdp11_assemble_shift): New function to output shifts.
8209 (pdp11_branch_cost): Remove.
8210 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
8211 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
8212 (WCHAR_TYPE): Ditto.
8213 (PTRDIFF_TYPE): Ditto.
8214 (ADJUST_INSN_LENGTH): New macro.
8215 (FIXED_REGISTERS): Add CC registers.
8216 (CALL_USED_REGISTERS): Ditto.
8218 (REG_CLASS_NAMES): Ditto.
8219 (REG_CLASS_CONTENTS): Ditto.
8220 (SELECT_CC_MODE): Use new function.
8221 (TARGET_FLAGS_REGNUM): New macro.
8222 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
8223 (cc0_reg_rtx): Remove.
8224 (CC_STATUS_MDEP): Remove.
8225 (CC_STATUS_MDEFP_INIT): Remove.
8226 (CC_IN_FPU): Remove.
8227 (NOTICE_UPDATE_CC): Remove.
8228 (REGISTER_NAMES): Add CC registers.
8229 (BRANCH_COST): Change to constant 1.
8230 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
8232 * config/pdp11/pdp11.opt (mbcopy): Remove.
8233 (mbcopy-builtin): Remove.
8234 (mbranch-cheap): Remove.
8235 (mbranch-expensive): Remove.
8236 * config/pdp11/predicates.md (expand_shift_operand): Update to
8237 match shift code generation.
8238 (ccnz_operator): New predicate.
8239 * doc/invoke.texi (PDP-11 Options): Remove deleted options
8240 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
8241 Remove non-existent option -mabshi, -mno-abshi. Document mutually
8243 * doc/md.texi (PDP-11): Document new D and h constraints. Update
8244 description of O constraint.
8246 2018-06-27 Jeff Law <law@redhat.com>
8247 Austin Law <austinklaw@gmail.com>
8249 * config/v850/v850.md (addsi3_set_flags): New pattern.
8250 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
8251 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
8252 (zero_extendhisi2_v850_set_flags): Likewise.
8253 (zero_extendqisi2_v850_set_flags): Likewise.
8254 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
8255 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
8256 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
8258 * config/v850/v850-protos.h (notice_update_cc): Remove.
8259 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
8260 (v850_print_operand): Handle 'D' and "d".
8261 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
8262 Add handling of arithmetic/logical operations compared against zero.
8263 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
8264 Do not look at v850_compare_op, instead get mode from last argument.
8265 (v850_gen_compare): Remove
8266 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
8267 after reload for prologue insns.
8268 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
8270 (construct_save_jarl): Likewise.
8271 (TARGET_FLAGS_REGNUM): Define.
8272 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
8273 (NOTICE_UPDATE_CC): Remove.
8274 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
8275 than cc0. Conditionalize on reload_completed.
8276 (cmpsi_insn, setfcc_insn): Likewise.
8277 (tst1 splitter): Turn into define_and_split which sets the flags
8279 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
8280 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
8281 (cstoresf4, cstoredf4): Clobber the flags.
8282 (cmpsi, cmpsf, cmpdf): Remove expanders.
8283 (setf_insn): Remove pattern.
8284 (addsi3): Turn into define_and_split which clobbers the flags after
8285 reload and a suitable pattern (addsi3_clobber_flags) for use after
8287 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
8288 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
8289 (ashrsi3, ashrsi3_v850e2): Likewise.
8290 (bins): Clobber the flags.
8291 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
8292 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
8293 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
8294 (call_value_internal_short, call_value_internal_long): Likewise.
8295 (callt_save_interrupt, callt_return_interrupt): Likewise.
8296 (save_interrupt, return_interrupt): Likewise.
8297 (callt_save_all_interrupt, save_all_interrupt): Likewise.
8298 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
8299 (restore_all_interrupt, _restore_all_interrupt): Likewise.
8300 (All FP comparisons): Only allow after reload has completed.
8302 (divh, divhu): Tweak output template.
8303 (branch_z_normal, branch_z_invert): Remove
8304 (branch_nz_normal, branch_nz_invert): Likewise.
8305 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
8307 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
8308 * config/v850/v850.c (notice_update_cc): Remove.
8309 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
8310 (CC_NO_CARRY): Likewise.
8311 (NOTICE_UPDATE_CC): Define to nothing.
8312 * config/v850/v850.md: Remove block comment on cc0 handling
8313 Remove "cc" attribute from all patterns. Remove cc_status handling
8314 from all patterns. Minor formatting fixes.
8316 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8318 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
8319 (cortex-a76.cortex-a55): Likewise.
8320 * config/aarch64/aarch64-tune.md: Regenerate.
8321 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
8322 cortex-a76.cortex-a55.
8324 2018-06-27 Jeff Law <law@redhat.com>
8326 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
8327 (MULTILIB_DIRNAMES): Similarly.
8329 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
8331 * gimple.h (gimple_return_retbnd): Delete.
8332 (gimple_return_set_retbnd): Likewise.
8333 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
8334 gimple_return_set_retbnd.
8335 * gimple-pretty-print.c (dump_gimple_return): Remove call to
8336 gimple_return_retbnd and adjust.
8337 * tree-inline.h (struct copy_body_data): Remove retbnd field.
8338 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
8339 Explicitly return NULL in a couple more cases. Move assertion
8340 on debug statements and remove unreachable code.
8341 (reset_debug_binding): Do not test id->retbnd.
8342 (expand_call_inline): Do not set it.
8344 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8346 * configure.ac: Add --disable-gcov option.
8347 * configure: Regenerate.
8348 * Makefile.in: Honour @enable_gcov@.
8349 * doc/install.texi: Document --disable-gcov.
8351 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8353 * config/arm/arm-cpus.in (cortex-a76): New entry.
8354 (cortex-a76.cortex-a55): Likewise.
8355 * config/arm/arm-tables.opt: Regenerate.
8356 * config/arm/arm-tune.md: Likewise.
8357 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
8358 * doc/invoke.texi (ARM Options): Document cortex-a76 and
8359 cortex-a76.cortex-a55.
8361 2018-06-27 Tamar Christina <tamar.christina@arm.com>
8364 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
8366 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
8368 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
8370 (EPILOGUE_USES): Likewise.
8372 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
8374 * tree-inline.c (remap_location): New function extracted from...
8375 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
8376 (copy_phis_for_bb): ...here. Call remap_location.
8377 (copy_cfg_body): Adjust call to copy_edges_for_bb.
8379 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
8381 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
8382 unaligned vsx for 16B memset.
8384 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
8387 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
8388 ieee128_float_type_node to long_double_type_node unless
8389 TARGET_LONG_DOUBLE_128 is set.
8391 2018-06-26 David Malcolm <dmalcolm@redhat.com>
8393 * cfgloop.c (get_loop_location): Convert return type from
8394 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
8395 by implicit construction from rtx_insn *, and using
8396 dump_user_location_t::from_function_decl for the fallback case.
8397 * cfgloop.h (get_loop_location): Convert return type from
8398 location_t to dump_user_location_t.
8399 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
8400 dump_printf_loc to pass in a dump_location_t rather than a
8401 location_t, via the gimple stmt.
8402 * coverage.c (get_coverage_counts): Update calls to
8403 dump_printf_loc to pass in dump_location_t rather than a
8405 * doc/optinfo.texi (Dump types): Convert example of
8406 dump_printf_loc from taking "locus" to taking "insn". Update
8407 description of the "_loc" calls to cover dump_location_t.
8408 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
8410 (dump_user_location_t::dump_user_location_t): New constructors,
8411 from gimple *stmt and rtx_insn *.
8412 (dump_user_location_t::from_function_decl): New function.
8413 (dump_loc): Make static.
8414 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
8415 const dump_location_t &.
8416 (dump_generic_expr_loc): Delete.
8417 (dump_printf_loc): Convert param "loc" from location_t to
8418 const dump_location_t &.
8419 (selftest::test_impl_location): New function.
8420 (selftest::dumpfile_c_tests): New function.
8421 * dumpfile.h: Include "profile-count.h".
8422 (class dump_user_location_t): New class.
8423 (struct dump_impl_location_t): New struct.
8424 (class dump_location_t): New class.
8425 (dump_printf_loc): Convert 2nd param from source_location to
8426 const dump_location_t &.
8427 (dump_generic_expr_loc): Delete.
8428 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
8429 const dump_location_t &.
8430 * gimple-fold.c (fold_gimple_assign): Update call to
8431 dump_printf_loc to pass in a dump_location_t rather than a
8432 location_t, via the gimple stmt.
8433 (gimple_fold_call): Likewise.
8434 * gimple-loop-interchange.cc
8435 (loop_cand::analyze_iloop_reduction_var): Update for change to
8436 check_reduction_path.
8437 (tree_loop_interchange::interchange): Update for change to
8439 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
8440 change in return-type of find_loop_location.
8441 (graphite_regenerate_ast_isl): Likewise.
8442 * graphite-optimize-isl.c (optimize_isl): Likewise.
8443 * graphite.c (graphite_transform_loops): Likewise.
8444 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
8445 pass in a dump_location_t rather than a location_t, via the
8447 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8448 * ipa.c (walk_polymorphic_call_targets): Likewise.
8449 * loop-unroll.c (report_unroll): Convert "locus" param from
8450 location_t to dump_location_t.
8451 (decide_unrolling): Update for change to get_loop_location's
8453 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
8454 location_t to dump_user_location_t.
8455 (grid_find_single_omp_among_assignments_1): Updates calls to
8456 dump_printf_loc to pass in a dump_location_t rather than a
8457 location_t, via the gimple stmt.
8458 (grid_parallel_clauses_gridifiable): Convert "tloc" from
8459 location_t to dump_location_t. Updates calls to dump_printf_loc
8460 to pass in a dump_location_t rather than a location_t, via the
8462 (grid_inner_loop_gridifiable_p): Likewise.
8463 (grid_dist_follows_simple_pattern): Likewise.
8464 (grid_gfor_follows_tiling_pattern): Likewise.
8465 (grid_target_follows_gridifiable_pattern): Likewise.
8466 (grid_attempt_target_gridification): Convert initialization
8467 of local "grid" from memset to zero-initialization; FIXME: does
8468 this require C++11? Update call to dump_printf_loc to pass in a
8469 optinfo_location rather than a location_t, via the gimple stmt.
8470 * profile.c (read_profile_edge_counts): Updates call to
8471 dump_printf_loc to pass in a dump_location_t rather than a
8473 (compute_branch_probabilities): Likewise.
8474 * selftest-run-tests.c (selftest::run_tests): Call
8476 * selftest.h (dumpfile_c_tests): New decl.
8477 * tree-loop-distribution.c (pass_loop_distribution::execute):
8478 Update for change in return type of find_loop_location.
8479 * tree-parloops.c (parallelize_loops): Likewise.
8480 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
8481 "locus" from location_t to dump_user_location_t.
8482 (canonicalize_loop_induction_variables): Likewise.
8483 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
8484 for change in return type of find_loop_location.
8485 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
8486 to dump_printf_loc to pass in a dump_location_t rather than a
8487 location_t, via the stmt.
8488 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
8490 * tree-vect-loop-manip.c (find_loop_location): Convert return
8491 type from source_location to dump_user_location_t.
8492 (vect_do_peeling): Update for above change.
8493 (vect_loop_versioning): Update for change in type of
8495 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
8496 from location_t to dump_user_location_t.
8497 (vect_estimate_min_profitable_iters): Update for change in type
8499 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
8500 location_t to dump_location_t.
8501 (vect_slp_bb): Update for change in type of vect_location.
8502 * tree-vectorizer.c (vect_location): Convert from source_location
8503 to dump_user_location_t.
8504 (try_vectorize_loop_1): Update for change in vect_location's type.
8505 (vectorize_loops): Likewise.
8506 (increase_alignment): Likewise.
8507 * tree-vectorizer.h (vect_location): Convert from source_location
8508 to dump_user_location_t.
8509 (find_loop_location): Convert return type from source_location to
8510 dump_user_location_t.
8511 (check_reduction_path): Convert 1st param from location_t to
8512 dump_user_location_t.
8513 * value-prof.c (check_counter): Update call to dump_printf_loc to
8514 pass in a dump_user_location_t rather than a location_t; update
8515 call to error_at for change in type of "locus".
8516 (check_ic_target): Update call to dump_printf_loc to
8517 pass in a dump_user_location_t rather than a location_t, via the
8520 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
8522 * config/s390/s390.h (enum processor_flags): Do not use
8523 default tune parameter when -march was specified.
8525 2018-06-26 Jakub Jelinek <jakub@redhat.com>
8528 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
8529 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
8532 2018-06-26 Richard Biener <rguenther@suse.de>
8534 PR tree-optimization/86287
8536 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
8537 (vect_analyze_loop): Initialize n_stmts.
8539 2018-06-26 Richard Biener <rguenther@suse.de>
8542 * fold-const.c (fold_convertible_p): Pointer extension
8545 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
8548 * dwarf2out.c (loc_list_has_views): Adjust comments.
8549 (dw_loc_list): Split single cross-partition range with
8552 2018-06-25 Jeff Law <law@redhat.com>
8554 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
8555 on -mbig-switch by default.
8557 * config/v850/predicates.md (const_float_1_operand): Fix match_code
8559 (const_float_0_operand): Remove unused predicate.
8560 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
8561 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
8562 (recipsf2): New expander. Original pattern now called
8564 (recipdf2, recipdf2_insn): Similarly.
8565 (rsqrtsf2, rsqrtsf2_insn): Similarly
8566 (rsqrtdf2, rsqrtdf2_insn): Similarly
8568 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
8570 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
8571 Simplify logic for FreeBSD (twice).
8573 2018-06-25 Martin Sebor <msebor@redhat.com>
8575 PR tree-optimization/86204
8576 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
8577 a strnlen result if it's less than the length of the string.
8579 2018-06-25 Martin Sebor <msebor@redhat.com>
8581 PR tree-optimization/85700
8582 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
8583 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
8584 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
8586 2018-06-25 Martin Sebor <msebor@redhat.com>
8588 * doc/extend.texi (Zero-length arrays): Update and clarify.
8590 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
8592 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
8593 added IEEE/IBM long double multilib support on PowerPC little
8594 endian Linux systems.
8595 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
8596 (MULTILIB_DEFAULTS): Likewise.
8597 * config/rs6000/rs6000.c (rs6000_option_override_internal):
8599 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
8600 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
8601 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
8603 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
8606 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
8607 (REORDER_45): Likewise.
8609 2018-06-25 Jeff Law <law@redhat.com>
8611 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
8612 dividend to 32 bits. Adjust length.
8613 (udivmodhi4): Cleanup output template. Fix length.
8615 2018-06-25 Carl Love <cel@us.ibm.com>
8617 * config/rs6000/vsx.md: Change word selector to prefered location.
8619 2018-06-25 Richard Biener <rguenther@suse.de>
8621 PR tree-optimization/86304
8622 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
8623 epilogue-if-converted loops as well.
8625 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
8627 * lto-section-out.c (lto_begin_section): Do not print section
8628 name for noaddr and unnumbered dumps.
8630 2018-06-25 Richard Biener <rguenther@suse.de>
8632 * tree-vectorizer.h (struct vec_info_shared): New structure
8633 with parts split out from struct vec_info and loop_nest from
8634 struct _loop_vec_info.
8635 (struct vec_info): Adjust accordingly.
8636 (struct _loop_vec_info): Likewise.
8637 (LOOP_VINFO_LOOP_NEST): Adjust.
8638 (LOOP_VINFO_DATAREFS): Likewise.
8639 (LOOP_VINFO_DDRS): Likewise.
8640 (struct _bb_vec_info): Likewise.
8641 (BB_VINFO_DATAREFS): Likewise.
8642 (BB_VINFO_DDRS): Likewise.
8643 (struct _stmt_vec_info): Add dr_aux member.
8644 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
8645 (DR_MISALIGNMENT_UNINITIALIZED): New.
8646 (set_dr_misalignment): Adjust.
8647 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
8648 (vect_analyze_loop): Adjust prototype.
8649 (vect_analyze_loop_form): Likewise.
8650 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8651 Compute dependences lazily.
8652 (vect_record_base_alignments): Use shared datarefs/ddrs.
8653 (vect_verify_datarefs_alignment): Likewise.
8654 (vect_analyze_data_refs_alignment): Likewise.
8655 (vect_analyze_data_ref_accesses): Likewise.
8656 (vect_analyze_data_refs): Likewise.
8657 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
8658 constructor parameter for shared part.
8659 (vect_analyze_loop_form): Pass in shared part and adjust.
8660 (vect_analyze_loop_2): Pass in storage for the number of
8661 stmts. Move loop nest finding to the caller. Compute
8663 (vect_analyze_loop): Pass in shared part.
8664 (vect_transform_loop): Verify shared datarefs are unchanged.
8665 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
8666 constructor parameter for shared part.
8667 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
8668 (vect_slp_bb): Verify shared datarefs are unchanged before
8670 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
8672 (new_stmt_vec_info): Initialize DR_AUX misalignment to
8673 DR_MISALIGNMENT_UNINITIALIZED.
8674 * tree-vectorizer.c (vec_info::vec_info): Add constructor
8675 parameter for shared part.
8676 (vec_info::~vec_info): Adjust.
8677 (vec_info_shared::vec_info_shared): New.
8678 (vec_info_shared::~vec_info_shared): Likewise.
8679 (vec_info_shared::save_datarefs): Likewise.
8680 (vec_info_shared::check_datarefs): Likewise.
8681 (try_vectorize_loop_1): Construct shared part live for analyses
8682 of a single loop for multiple vector sizes.
8683 * tree-parloops.c (gather_scalar_reductions): Adjust.
8685 2018-06-25 Richard Biener <rguenther@suse.de>
8687 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
8688 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
8689 (vect_analyze_data_refs): Remove similar code from here and
8690 simplify accordingly.
8692 2018-06-25 Richard Biener <rguenther@suse.de>
8694 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
8695 for reverse storage order accesses rather than asserting
8696 they cannot happen here.
8698 2018-06-25 Tom de Vries <tdevries@suse.de>
8701 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
8702 Use data16 instead of .byte for insn prefix.
8704 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
8707 * parser.c (make_char_string_pack): Pass this literal chars
8708 through cpp_interpret_string.
8709 (cp_parser_userdef_numeric_literal): Check the result of
8710 make_char_string_pack.
8712 2018-06-24 Maya Rashish <coypu@sdf.org>
8714 * ginclude/stddef.h: Simplify conditions around avoiding
8715 re-definition of __size_t.
8717 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8719 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
8720 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
8722 2018-06-22 Maya Rashish <coypu@sdf.org>
8724 * doc/invoke.texi (mno-fancy-math-387): Update for changes
8725 made to OpenBSD and NetBSD through the years.
8727 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
8729 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8730 behavior of vec_pack (vector double, vector double) to match
8731 behavior of vec_float2 (vector double, vector double).
8733 2018-06-22 Olivier Hainque <hainque@adacore.com>
8735 * gimplify.c (gimplify_function_tree): Prevent creation
8736 of a trampoline for the address of the current function
8737 passed to entry/exit instrumentation hooks.
8739 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
8742 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
8745 2018-06-22 Martin Liska <mliska@suse.cz>
8747 PR tree-optimization/86263
8748 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8749 Bail out if is_enabled is false.
8750 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
8752 (jump_table_cluster::is_enabled): New function.
8754 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8756 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8757 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
8758 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
8759 (lto_input_ts_binfo_tree_pointers): Likewise.
8760 * tree-streamer-out.c (streamer_write_tree_bitfields,
8761 write_ts_binfo_tree_pointers): Likewise.
8762 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
8764 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8766 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
8768 2018-06-22 Martin Liska <mliska@suse.cz>
8770 * symbol-summary.h (get): Make it pure and inline move
8771 functionality from ::get function.
8772 (get): Remove and inline into ::get and ::get_create.
8773 (get_create): Move code from ::get function.
8775 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8778 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
8779 -x assembler-with-cpp.
8781 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8783 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
8784 _FILE_OFFSET_BITS=64 for C++.
8786 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
8788 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
8789 conversion insn that shows up when pr85657-3.c is compiled using
8790 IEEE 128-bit long double.
8791 (neg<mode>2_internal): Use the correct mode to check whether the
8792 mode is IBM extended.
8793 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
8794 multiply and divide external functions from being created more
8797 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8799 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
8801 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
8802 the edge can be forwarded.
8803 (cfg_layout_merge_blocks): Likewise.
8805 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8807 * except.c (finish_eh_generation): Commit edge insertions only after
8808 the EH edges have been redirected from post-landing to landing pads.
8810 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8812 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
8813 create_tmp_var_for to create the FRAME decl.
8814 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
8816 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8818 * tree-inline.c (copy_edges_for_bb): Minor tweak.
8819 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
8820 debug statement when resetting its value.
8821 (expand_call_inline): Copy the locus of the call onto the assignment
8822 of the return value, if any. Use local variable in more cases.
8824 2018-06-21 Martin Liska <mliska@suse.cz>
8826 * ipa-pure-const.c (propagate_nothrow): Use
8827 funct_state_summaries->get.
8828 (dump_malloc_lattice): Likewise.
8829 (propagate_malloc): Likewise.
8831 2018-06-21 Richard Biener <rguenther@suse.de>
8833 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
8834 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
8835 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
8837 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
8838 BLOCK_ABSTRACT_ORIGIN unconditionally.
8840 2018-06-21 David Malcolm <dmalcolm@redhat.com>
8842 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
8844 * ipa-reference.c (ipa_reference_c_finalize): Delete
8845 ipa_ref_opt_sum_summaries and set it to NULL.
8847 2018-06-21 Tom de Vries <tdevries@suse.de>
8849 PR tree-optimization/85859
8850 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
8851 test with comment from bb_no_side_effects_p.
8853 2018-06-21 Richard Biener <rguenther@suse.de>
8855 PR tree-optimization/86232
8856 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
8857 max for constant niter.
8859 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8861 * config/aarch64/aarch64-simd.md
8862 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
8864 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8866 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8867 Make opernads of the unspec commutative.
8869 2018-06-21 Richard Biener <rguenther@suse.de>
8871 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8872 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8873 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8874 (vect_analyze_data_ref_dependence): Re-order checks to deal with
8876 (vect_record_base_alignments): Do not record base alignment
8877 for gathers or scatters.
8878 (vect_compute_data_ref_alignment): Drop return value that is always
8879 true. Bail out early for gathers or scatters.
8880 (vect_enhance_data_refs_alignment): Bail out early for gathers
8882 (vect_find_same_alignment_drs): Likewise.
8883 (vect_analyze_data_refs_alignment): Remove dead code.
8884 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8885 (vect_analyze_data_refs): For possible gathers or scatters do
8886 not create an alternate DR, just check their possible validity
8887 and mark them. Adjust DECL_NONALIASED handling to not rely
8889 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8890 update inits of gathers or scatters.
8891 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8892 Also copy gather/scatter flag to pattern vinfo.
8894 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
8896 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8897 behavior of vec_packsu (vector unsigned long long, vector unsigned
8898 long long) to match behavior of vec_packs with same signature.
8900 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
8901 Thomas Schwinge <thomas@codesourcery.com>
8902 Cesar Philippidis <cesar@codesourcery.com>
8904 * gimplify.c (gimplify_scan_omp_clauses): Add support for
8905 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8906 (gimplify_adjust_omp_clauses): Likewise.
8907 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8908 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8909 (gimplify_omp_target_update): Update handling of acc update and
8911 * omp-low.c (install_var_field): Remove unused parameter
8912 base_pointers_restrict.
8913 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8914 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8916 (omp_target_base_pointers_restrict_p): Delete.
8917 (scan_omp_target): Update call to scan_sharing_clauses.
8918 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8920 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8921 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8922 (convert_local_omp_clauses): Likewise.
8923 * tree-pretty-print.c (dump_omp_clause): Likewise.
8924 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
8926 (omp_clause_code_name): Likewise.
8928 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8931 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8934 PR tree-optimization/86231
8935 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
8936 anti-range don't overwrite *vr0min before using it to compute *vr0max.
8938 2018-06-20 Tom de Vries <tdevries@suse.de>
8940 PR tree-optimization/86097
8941 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8942 iv type if signedness of iv type is not the same as that of *nit.
8944 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8946 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
8947 EDGE_EH edges, verify they are all EDGE_EH.
8949 2018-06-20 Maya Rashish <coypu@sdf.org>
8951 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8953 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8955 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8956 * config/aarch64/aarch64.c (xgene1_tunings): Add
8957 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8958 (aarch64_mode_valid_for_sched_fusion_p):
8959 Allow 16-byte modes.
8960 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8961 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8963 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8965 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8966 * config/aarch64/iterators.md (VQ2): New mode iterator.
8968 2018-06-20 Martin Liska <mliska@suse.cz>
8970 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8971 Change default ratio from 10 to 8.
8973 2018-06-20 Martin Liska <mliska@suse.cz>
8975 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8977 (bit_test_cluster::find_bit_tests): Likewise.
8978 (switch_decision_tree::analyze_switch_statement): Find clusters.
8979 * tree-switch-conversion.h (struct jump_table_cluster): Document
8982 2018-06-20 Martin Liska <mliska@suse.cz>
8984 * tree-switch-conversion.c (switch_conversion::collect):
8985 Record m_uniq property.
8986 (switch_conversion::expand): Bail out for special conditions.
8987 (group_cluster::~group_cluster): New.
8988 (group_cluster::group_cluster): Likewise.
8989 (group_cluster::dump): Likewise.
8990 (jump_table_cluster::emit): New.
8991 (switch_decision_tree::fix_phi_operands_for_edges): New.
8992 (struct case_node): Remove struct.
8993 (jump_table_cluster::can_be_handled): New.
8994 (case_values_threshold): Moved to header.
8995 (reset_out_edges_aux): Likewise.
8996 (jump_table_cluster::is_beneficial): New.
8997 (bit_test_cluster::can_be_handled): Likewise.
8998 (add_case_node): Remove.
8999 (bit_test_cluster::is_beneficial): New.
9000 (case_bit_test::cmp): New.
9001 (bit_test_cluster::emit): New.
9002 (expand_switch_as_decision_tree_p): Remove.
9003 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
9004 (fix_phi_operands_for_edge): Likewise.
9005 (switch_decision_tree::analyze_switch_statement): New.
9006 (compute_cases_per_edge): Move ...
9007 (switch_decision_tree::compute_cases_per_edge): ... here.
9008 (try_switch_expansion): Likewise.
9009 (switch_decision_tree::try_switch_expansion): Likewise.
9010 (record_phi_operand_mapping): Likewise.
9011 (switch_decision_tree::record_phi_operand_mapping): Likewise.
9012 (emit_case_decision_tree): Likewise.
9013 (switch_decision_tree::emit): Likewise.
9014 (balance_case_nodes): Likewise.
9015 (switch_decision_tree::balance_case_nodes): Likewise.
9016 (dump_case_nodes): Likewise.
9017 (switch_decision_tree::dump_case_nodes): Likewise.
9018 (emit_jump): Likewise.
9019 (switch_decision_tree::emit_jump): Likewise.
9020 (emit_cmp_and_jump_insns): Likewise.
9021 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
9022 (emit_case_nodes): Likewise.
9023 (switch_decision_tree::emit_case_nodes): Likewise.
9024 (conditional_probability): Remove.
9025 * tree-switch-conversion.h (enum cluster_type): New.
9027 (struct cluster): Likewise.
9028 (cluster::cluster): Likewise.
9029 (struct simple_cluster): Likewise.
9030 (simple_cluster::simple_cluster): Likewise.
9031 (struct group_cluster): Likewise.
9032 (struct jump_table_cluster): Likewise.
9033 (struct bit_test_cluster): Likewise.
9034 (struct min_cluster_item): Likewise.
9035 (struct case_tree_node): Likewise.
9036 (case_tree_node::case_tree_node): Likewise.
9037 (jump_table_cluster::case_values_threshold): Likewise.
9038 (struct case_bit_test): Likewise.
9039 (struct switch_decision_tree): Likewise.
9040 (struct switch_conversion): Likewise.
9041 (switch_decision_tree::reset_out_edges_aux): Likewise.
9043 2018-06-20 Martin Liska <mliska@suse.cz>
9045 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
9046 (hoist_edge_and_branch_if_true): Likewise.
9047 (expand_switch_using_bit_tests_p): Likewise.
9048 (struct case_bit_test): Likewise.
9049 (case_bit_test_cmp): Likewise.
9050 (emit_case_bit_tests): Likewise.
9051 (switch_conversion::switch_conversion): New class.
9052 (struct switch_conv_info): Remove old struct.
9053 (collect_switch_conv_info): More to ...
9054 (switch_conversion::collect): ... this.
9055 (check_range): Likewise.
9056 (switch_conversion::check_range): Likewise.
9057 (check_all_empty_except_final): Likewise.
9058 (switch_conversion::check_all_empty_except_final): Likewise.
9059 (check_final_bb): Likewise.
9060 (switch_conversion::check_final_bb): Likewise.
9061 (create_temp_arrays): Likewise.
9062 (switch_conversion::create_temp_arrays): Likewise.
9063 (free_temp_arrays): Likewise.
9064 (gather_default_values): Likewise.
9065 (switch_conversion::gather_default_values): Likewise.
9066 (build_constructors): Likewise.
9067 (switch_conversion::build_constructors): Likewise.
9068 (constructor_contains_same_values_p): Likewise.
9069 (switch_conversion::contains_same_values_p): Likewise.
9070 (array_value_type): Likewise.
9071 (switch_conversion::array_value_type): Likewise.
9072 (build_one_array): Likewise.
9073 (switch_conversion::build_one_array): Likewise.
9074 (build_arrays): Likewise.
9075 (switch_conversion::build_arrays): Likewise.
9076 (gen_def_assigns): Likewise.
9077 (switch_conversion::gen_def_assigns): Likewise.
9078 (prune_bbs): Likewise.
9079 (switch_conversion::prune_bbs): Likewise.
9080 (fix_phi_nodes): Likewise.
9081 (switch_conversion::fix_phi_nodes): Likewise.
9082 (gen_inbound_check): Likewise.
9083 (switch_conversion::gen_inbound_check): Likewise.
9084 (process_switch): Use the newly created class.
9085 (switch_conversion::expand): New.
9086 (switch_conversion::~switch_conversion): New.
9087 * tree-switch-conversion.h: New file.
9089 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9091 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
9092 tree-vect-patterns.c.
9093 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
9094 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
9095 (vect_recog_sad_pattern): Likewise.
9096 (vect_recog_widen_sum_pattern): Likewise.
9097 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
9098 (vect_recog_widen_shift_pattern): Remove the type_in argument.
9099 (vect_recog_rotate_pattern): Likewise.
9100 (vect_recog_mult_pattern): Likewise.
9101 (vect_recog_vector_vector_shift_pattern): Likewise.
9102 (vect_recog_divmod_pattern): Likewise.
9103 (vect_recog_mixed_size_cond_pattern): Likewise.
9104 (vect_recog_bool_pattern): Likewise.
9105 (vect_recog_mask_conversion_pattern): Likewise.
9106 (vect_try_gather_scatter_pattern): Likewise.
9107 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
9108 (vect_recog_over_widening_pattern): Likewise.
9109 (vect_recog_gather_scatter_pattern): Likewise.
9110 (vect_recog_func_ptr): Move from tree-vectorizer.h
9111 (vect_vect_recog_func_ptrs): Move further down the file.
9112 (vect_recog_func): Likewise. Remove the third argument.
9113 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
9114 (vect_pattern_recog_1): Expect the pattern function to do any
9115 necessary target tests. Also expect it to provide a vector type.
9116 Remove the type_in handling.
9118 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9120 * tree-vect-patterns.c (vect_pattern_detected): New function.
9121 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
9122 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
9123 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
9124 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
9125 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9126 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9127 (vect_recog_mask_conversion_pattern)
9128 (vect_try_gather_scatter_pattern): Likewise.
9130 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9132 * tree-vect-patterns.c (vect_get_internal_def): New function.
9133 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9134 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
9135 (search_type_for_mask_1): Use it.
9137 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9139 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
9140 redundant WIDEN_SUM_EXPR handling.
9141 (vect_recog_sad_pattern): Likewise.
9143 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9145 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
9146 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
9147 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
9148 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
9149 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
9151 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9153 * tree-vect-stmts.c (vectorizable_call): Make sure that we
9154 use the stmt_vec_info of the original bb statement for the
9155 new zero assignment, even if the call is part of a pattern.
9157 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9159 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
9160 that the sequence is attached to the original statement rather
9161 than the pattern statement.
9162 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
9163 PATTERN_DEF_SEQ from the original statement rather than
9164 the main pattern statement.
9165 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
9166 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
9167 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
9169 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9171 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
9172 definition statements before the early exit for statements that aren't
9174 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
9176 (vect_transform_loop): ...here. Process pattern definition
9177 statements without first checking whether the main pattern
9178 statement is live or relevant.
9180 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
9182 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
9183 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
9185 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
9187 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
9188 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
9189 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
9190 (expand_block_compare): Change select_block_compare_mode call.
9191 (expand_strncmp_align_check): Use new functions, fix comment.
9192 (emit_final_str_compare_gpr): New function.
9193 (expand_strn_compare): Refactor and clean up code.
9194 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
9196 2018-06-19 Tony Reix <tony.reix@atos.com>
9197 Damien Bergamini <damien.bergamini@atos.com>
9198 David Edelsohn <dje.gcc@gmail.com>
9200 * collect2.c (static_obj): New variable.
9201 (static_libs): New variable.
9202 (is_in_list): Uncomment declaration.
9203 (main): Track AIX libraries linked statically.
9204 (is_in_list): Uncomment definition.
9205 (scan_prog_file): Don't add AIX shared libraries initializer
9206 to constructor list if linking statically.
9208 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
9210 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
9212 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
9214 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
9216 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
9219 2018-06-19 Martin Liska <mliska@suse.cz>
9221 * config/i386/i386.c (ix86_can_inline_p): Do not use
9222 ipa_fn_summaries::get_create.
9223 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
9225 (devirtualization_time_bonus): Likewise.
9226 (ipcp_propagate_stage): Likewise.
9227 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9228 (edge_set_predicate): Likewise.
9229 (evaluate_conditions_for_known_args): Likewise.
9230 (evaluate_properties_for_edge): Likewise.
9231 (ipa_call_summary::reset): Tranform to ...
9232 (ipa_call_summary::~ipa_call_summary): ... this.
9233 (ipa_fn_summary::reset): Transform to ...
9234 (ipa_fn_summary::~ipa_fn_summary): ... this.
9235 (ipa_fn_summary_t::remove): Rename to ...
9236 (ipa_fn_summary_t::remove_callees): ... this.
9237 (ipa_fn_summary_t::duplicate): Use placement new
9238 instead of memory copy.
9239 (ipa_call_summary_t::duplicate): Likewise.
9240 (ipa_call_summary_t::remove): Remove.
9241 (dump_ipa_call_summary): Change get_create to get.
9242 (ipa_dump_fn_summary): Dump only when summary exists.
9243 (analyze_function_body): Use symbol_summary::get instead
9245 (compute_fn_summary): Likewise.
9246 (estimate_edge_devirt_benefit): Likewise.
9247 (estimate_edge_size_and_time): Likewise.
9248 (inline_update_callee_summaries): Likewise.
9249 (remap_edge_change_prob): Likewise.
9250 (remap_edge_summaries): Likewise.
9251 (ipa_merge_fn_summary_after_inlining): Likewise.
9252 (write_ipa_call_summary): Likewise.
9253 (ipa_fn_summary_write): Likewise.
9254 (ipa_free_fn_summary): Likewise.
9255 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
9256 (struct ipa_call_summary): Likewise.
9257 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
9259 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
9260 (estimate_size_after_inlining): Likewise.
9261 (estimate_growth): Likewise.
9262 (growth_likely_positive): Likewise.
9263 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9264 (inline_call): Likewise.
9265 * ipa-inline.c (caller_growth_limits): Likewise.
9266 (can_inline_edge_p): Likewise.
9267 (can_inline_edge_by_limits_p): Likewise.
9268 (compute_uninlined_call_time): Likewise.
9269 (compute_inlined_call_time): Likewise.
9270 (want_inline_small_function_p): Likewise.
9271 (edge_badness): Likewise.
9272 (update_caller_keys): Likewise.
9273 (update_callee_keys): Likewise.
9274 (inline_small_functions): Likewise.
9275 (inline_to_all_callers_1): Likewise.
9276 (dump_overall_stats): Likewise.
9277 (early_inline_small_functions): Likewise.
9278 (early_inliner): Likewise.
9279 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9280 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9281 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9282 * ipa-split.c (execute_split_functions): Likewise.
9283 * symbol-summary.h: Likewise.
9284 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9286 2018-06-19 Richard Biener <rguenther@suse.de>
9288 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
9289 (vectorize_loops): ... here. Fix dbgcnt handling.
9290 (try_vectorize_loop): Wrap try_vectorize_loop_1.
9292 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
9295 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
9296 ieee128 argument takes up only one (vector) register, not two (floating
9299 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
9301 * gimplify.c (gimplify_init_constructor): Really never clear for an
9302 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
9304 2018-06-19 Richard Biener <rguenther@suse.de>
9306 PR tree-optimization/86179
9307 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
9308 after failed recognition.
9310 2018-06-18 Martin Sebor <msebor@redhat.com>
9313 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
9314 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
9315 Handle integer subtraction.
9316 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
9317 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
9319 2018-06-18 David Malcolm <dmalcolm@redhat.com>
9321 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
9322 param from rtx to rtx_insn *.
9323 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
9325 (frv_ifcvt_modify_insn): Likwise.
9326 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
9327 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
9328 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
9329 as_a <rtx_insn *> cast to local "unprotected_region" once
9330 it's been established that it's not NULL or pc_rtx.
9331 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
9332 param "sethi" from rtx to rtx_insn *.
9333 (nds32_group_float_insns): Likewise for param "insn".
9334 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
9336 (vax_output_int_subtract): Likewise.
9337 * config/vax/vax.c (vax_output_int_add): Likewise for param
9339 (vax_output_int_subtract): Likewise.
9340 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
9341 (emit_pattern_after): Likewise for param "after".
9342 (emit_insn_after): Likewise.
9343 (emit_jump_insn_after): Likewise.
9344 (emit_call_insn_after): Likewise.
9345 (emit_debug_insn_after): Likewise.
9346 (emit_pattern_before): Likewise for param "before".
9347 (emit_insn_before): Likewise.
9348 (emit_jump_insn_before): Likewise.
9349 * final.c (get_insn_template): Likewise for param "insn", removing
9351 * output.h (get_insn_template): Likewise for 2nd param.
9352 * rtl.h (emit_insn_before): Likewise.
9353 (emit_jump_insn_before): Likewise.
9354 (emit_debug_insn_before_noloc): Likewise.
9355 (emit_insn_after): Likewise.
9356 (emit_jump_insn_after): Likewise.
9357 (emit_call_insn_after): Likewise.
9358 (emit_debug_insn_after): Likewise.
9359 (set_insn_deleted): Likewise for param.
9361 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
9364 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
9365 floating point modes, so that IFmode is numerically greater than
9366 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
9367 to declare the ordering. This prevents IFmode from being
9368 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
9369 machine. Include rs6000-modes.h to share the fractional values
9370 between genmodes* and the rest of the compiler.
9374 * config/rs6000/rs6000-modes.h: New file.
9375 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
9376 meaning of rs6000_long_double_size so that 126..128 selects an
9377 appropriate 128-bit floating point type.
9378 (rs6000_option_override_internal): Likewise.
9379 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
9380 (TARGET_LONG_DOUBLE_128): Change the meaning of
9381 rs6000_long_double_size so that 126..128 selects an appropriate
9382 128-bit floating point type.
9383 (LONG_DOUBLE_TYPE_SIZE): Update comment.
9384 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
9385 source and destination to match the standard usage.
9386 (truncifkf2): Likewise.
9387 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
9388 ISA 2.07 to use an explicit clobber, instead of passing in a
9390 (copysign<mode>3_soft): Likewise.
9392 2018-06-18 David Malcolm <dmalcolm@redhat.com>
9394 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
9395 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
9396 (vect_slp_analyze_instance_dependence): Likewise.
9397 (vect_enhance_data_refs_alignment): Likewise.
9398 (vect_analyze_data_refs_alignment): Likewise.
9399 (vect_slp_analyze_and_verify_instance_alignment
9400 (vect_analyze_data_ref_accesses): Likewise.
9401 (vect_prune_runtime_alias_test_list): Likewise.
9402 (vect_analyze_data_refs): Likewise.
9403 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
9404 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
9405 (vect_analyze_scalar_cycles_1): Likewise.
9406 (vect_get_loop_niters): Likewise.
9407 (vect_analyze_loop_form_1): Likewise.
9408 (vect_update_vf_for_slp): Likewise.
9409 (vect_analyze_loop_operations): Likewise.
9410 (vect_analyze_loop): Likewise.
9411 (vectorizable_induction): Likewise.
9412 (vect_transform_loop): Likewise.
9413 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
9414 * tree-vect-slp.c (vect_analyze_slp): Likewise.
9415 (vect_make_slp_decision): Likewise.
9416 (vect_detect_hybrid_slp): Likewise.
9417 (vect_slp_analyze_operations): Likewise.
9418 (vect_slp_bb): Likewise.
9419 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
9420 (vectorizable_bswap): Likewise.
9421 (vectorizable_call): Likewise.
9422 (vectorizable_simd_clone_call): Likewise.
9423 (vectorizable_conversion): Likewise.
9424 (vectorizable_assignment): Likewise.
9425 (vectorizable_shift): Likewise.
9426 (vectorizable_operation): Likewise.
9427 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
9429 2018-06-18 Martin Sebor <msebor@redhat.com>
9431 PR tree-optimization/81384
9432 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
9433 * builtins.c (expand_builtin_strnlen): New function.
9434 (expand_builtin): Call it.
9435 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
9436 * builtins.def (BUILT_IN_STRNLEN): New.
9437 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
9438 Warn for bounds in excess of maximum object size.
9439 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
9440 single-value ranges. Handle strnlen.
9441 (handle_builtin_strlen): Handle strnlen.
9442 (strlen_check_and_optimize_stmt): Same.
9443 * doc/extend.texi (Other Builtins): Document strnlen.
9445 2018-06-18 Maya Rashish <coypu@sdf.org>
9447 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
9448 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
9449 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
9451 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
9453 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
9455 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9457 * tree.c (escaped_string::escape): Replace cast to char * by
9458 const_cast<char *> (unescaped).
9460 2018-06-18 Nick Clifton <nickc@redhat.com>
9463 * tree.c (escaped_string): New class. Converts an unescaped
9464 string into its escaped equivalent.
9465 (warn_deprecated_use): Use the new class to convert the
9466 deprecation message, if present.
9467 (test_escaped_strings): New self test.
9468 (test_c_tests): Add test_escaped_strings.
9469 * doc/extend.texi (deprecated): Add a note that the
9470 deprecation message is affected by the -fmessage-length
9471 option, and that control characters will be escaped.
9472 (#pragma GCC error): Document this pragma.
9473 (#pragma GCC warning): Likewise.
9474 * doc/invoke.texi (-fmessage-length): Document this option's
9475 effect on the #warning and #error preprocessor directives and
9476 the deprecated attribute.
9478 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
9480 * tree.c (decl_value_expr_lookup): Revert latest change.
9481 (decl_value_expr_insert): Likewise.
9483 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
9485 * gimplify.c (nonlocal_vlas): Delete.
9486 (nonlocal_vla_vars): Likewise.
9487 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
9489 (gimplify_body): Do not create and destroy nonlocal_vlas.
9490 * tree-nested.c: Include diagnostic.h.
9491 (use_pointer_in_frame): Tweak.
9492 (lookup_field_for_decl): Add assertion and declare the transformation.
9493 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
9494 internal error when the reference is in a wrong context. Do not
9495 create a debug decl by default.
9496 (note_nonlocal_block_vlas): Delete.
9497 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
9498 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
9499 create a debug decl by default.
9500 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
9501 call is in a wrong context.
9502 (fixup_vla_decls): New function.
9503 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
9504 debug variables were created.
9505 * tree.c (decl_value_expr_lookup): Add checking assertion.
9506 (decl_value_expr_insert): Likewise.
9508 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
9511 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
9512 * tree-scalar-evolution.c (interpret_expr): Likewise.
9513 (expression_expensive_p): Likewise.
9514 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
9515 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
9516 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
9517 (ssa_defined_by_minus_one_stmt_p): New.
9519 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
9522 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
9523 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
9524 * dojump.c (do_jump): Likewise.
9525 * expr.c (expand_expr_real_2): Check operand type's sign.
9526 * fold-const.c (const_unop): Handle ABSU_EXPR.
9527 (fold_abs_const): Likewise.
9528 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
9529 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
9530 (strip_sign_op_1): Likesise.
9531 * match.pd: Add new pattern to generate ABSU_EXPR.
9532 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
9533 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9534 * tree-eh.c (operation_could_trap_helper_p): Likewise.
9535 * tree-inline.c (estimate_operator_cost): Likewise.
9536 * tree-pretty-print.c (dump_generic_node): Likewise.
9537 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
9538 * tree.def (ABSU_EXPR): New.
9540 2018-06-16 Jakub Jelinek <jakub@redhat.com>
9543 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
9544 documented as preserved for backward compatibility only.
9545 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
9547 PR rtl-optimization/86108
9548 * bb-reorder.c (create_forwarder_block): Renamed to ...
9549 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
9550 jump from new landing pad to the second part.
9551 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
9554 2018-06-15 Jakub Jelinek <jakub@redhat.com>
9557 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
9558 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
9559 Only call store_expr for halves if the mode is the same.
9562 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
9563 Fix up comment formatting.
9565 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
9567 * typed-splay-tree.h (typed_splay_tree::remove): New function.
9568 (typed_splay_tree::closure,
9569 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
9570 (typed_splay_tree::typed_splay_tree,
9571 typed_splay_tree::operator =): Declared private.
9572 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
9573 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
9574 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
9575 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
9576 typed_splay_tree::splay_tree_splay,
9577 typed_splay_tree::splay_tree_foreach_helper,
9578 typed_splay_tree::splay_tree_insert,
9579 typed_splay_tree::splay_tree_remove,
9580 typed_splay_tree::splay_tree_lookup,
9581 typed_splay_tree::splay_tree_predecessor,
9582 typed_splay_tree::splay_tree_successor,
9583 typed_splay_tree::splay_tree_min,
9584 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
9585 (typed_splay_tree::root, typed_splay_tree::comp,
9586 typed_splay_tree::delete_key,
9587 typed_splay_tree::delete_value): New data members.
9588 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
9589 typed_splay_tree::remove.
9591 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
9593 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
9594 -mginv and -mno-ginv to the assembler.
9595 * config/mips/mips.opt (-mcrc): New option.
9597 * doc/invoke.text (-mcrc): Document.
9600 2018-06-15 Nick Clifton <nickc@redhat.com>
9603 * tree.c (escaped_string): New class. Converts an unescaped
9604 string into its escaped equivalent.
9605 (warn_deprecated_use): Use the new class to convert the
9606 deprecation message, if present.
9607 (test_escaped_strings): New self test.
9608 (test_c_tests): Add test_escaped_strings.
9609 * doc/extend.texi (deprecated): Add a note that the
9610 deprecation message is affected by the -fmessage-length
9611 option, and that control characters will be escaped.
9612 (#pragma GCC error): Document this pragma.
9613 (#pragma GCC warning): Likewise.
9614 * doc/invoke.texi (-fmessage-length): Document this option's
9615 effect on the #warning and #error preprocessor directives and
9616 the deprecated attribute.
9618 2018-06-15 Richard Biener <rguenther@suse.de>
9620 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
9621 here, also noting vector size used.
9622 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
9623 size used in MSG_OPTIMIZED_LOCATIONS dump.
9624 (pass_slp_vectorize::execute): Adjust.
9626 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
9629 * config/arc/arc.c (arc_return_address_register): Fix
9632 2018-06-15 Richard Biener <rguenther@suse.de>
9635 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
9636 leave useless conversion stripping to force_gimple_operand_gsi.
9637 (gimplify_build2): Likewise.
9638 (gimplify_build1): Likewise.
9640 2018-06-15 Richard Biener <rguenther@suse.de>
9643 * tree-cfg.c (move_stmt_op): unshare invariant addresses
9644 before adjusting their block.
9646 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
9648 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
9649 multilibs for *-*-rtems*.
9650 * config/riscv/t-rtems: New file.
9652 2018-06-14 Jakub Jelinek <jakub@redhat.com>
9655 * match.pd ((A +- CST1) +- CST2): Punt if last resort
9656 unsigned_type_for returns NULL.
9659 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
9660 subregs of multi-word pseudos unless the float mode has word size.
9662 2018-06-14 Richard Biener <rguenther@suse.de>
9665 * tree-vect-generic.c (build_word_mode_vector_type): Remove
9666 duplicate and harmful type_hash_canon.
9667 * tree.c (type_hash_canon): Assert we didn't find ourselves.
9669 2018-06-14 Richard Biener <rguenther@suse.de>
9672 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
9675 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
9677 * config/rtems.h (STDINT_LONG32): Define.
9679 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
9680 Prachi Godbole <prachi.godbole@imgtec.com>
9682 * config/mips/mips-cpus.def: Define P6600.
9683 * config/mips/mips-tables.opt: Regenerate.
9684 * config/mips/mips.c (mips_ucbranch_type): New enum.
9685 (mips_rtx_cost_data): Add support for P6600.
9686 (mips_issue_rate): Likewise.
9687 (mips_multipass_dfa_lookahead): Likewise.
9688 (mips_avoid_hazard): Likewise.
9689 (mips_reorg_process_insns): Likewise.
9690 (mips_classify_branch_p6600): New function.
9691 * config/mips/mips.h (TUNE_P6600): New define.
9692 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
9693 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
9694 * config/mips/mips.md: Include p6600.md.
9695 (processor): Add p6600.
9696 * config/mips/p6600.md: New file.
9697 * doc/invoke.texi: Add p6600 to supported architectures.
9699 2018-06-13 Martin Sebor <msebor@redhat.com>
9701 PR tree-optimization/86114
9702 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
9704 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
9706 2018-06-13 Richard Biener <rguenther@suse.de>
9708 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
9709 Properly set vector type of the intermediate stmt.
9710 * tree-vect-stmts.c (vectorizable_operation): The destination
9711 var always has vectype_out type.
9713 2018-06-13 Jeff Law <law@redhat.com>
9715 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
9716 integer 0 for argument to print_rtl_with_bb.
9717 (rl78_reorg): Likewise.
9719 2018-06-13 David Malcolm <dmalcolm@redhat.com>
9721 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
9722 from rtx to rtx_insn *.
9723 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
9725 (add_sched_insns_for_speculation): Likewise for local "target",
9726 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9727 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
9728 from rtx_insn ** to rtx_code_label **.
9729 (reorg_emit_nops): Likewise.
9730 (c6x_reorg): Likewise for local "call_labels".
9731 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
9733 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
9734 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
9735 the loops over LABEL_REFS.
9736 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
9738 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9739 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
9740 (split_branches): Strengthen local "olabel" from rtx to
9741 rtx_insn *, adding a safe_as_a cast.
9742 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
9744 (add_insn_after): Likewise for first two params.
9745 (add_insn_before): Likewise.
9746 (remove_insn): Likewise for param.
9747 (emit_pattern_before_noloc): Likewise for second and third params.
9748 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
9749 (emit_call_insn_before_noloc): Likewise.
9750 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
9752 (emit_barrier_before): Likewise.
9753 (emit_label_before): Strengthen "label" param from "rtx" to
9754 "rtx_code_label *". Strengthen "before" param from "rtx" to
9756 (emit_insn_after_1): Strengthen "after" param from "rtx" to
9758 (emit_pattern_after_noloc): Likewise.
9759 (emit_insn_after_noloc): Likewise.
9760 (emit_jump_insn_after_noloc): Likewise.
9761 (emit_call_insn_after_noloc): Likewise.
9762 (emit_debug_insn_after_noloc): Likewise.
9763 (emit_barrier_after): Likewise.
9764 (emit_label_after): Likewise for both params.
9765 (emit_pattern_after_setloc): Likewise for "after" param. Convert
9766 "loc" param from "int" to "location_t".
9767 (emit_insn_after_setloc): Likewise.
9768 (emit_jump_insn_after_setloc): Likewise.
9769 (emit_call_insn_after_setloc): Likewise.
9770 (emit_debug_insn_after_setloc): Likewise.
9771 (emit_pattern_before_setloc): Likewise for "before" param. Convert
9772 "loc" param from "int" to "location_t".
9773 (emit_pattern_before): Convert NULL_RTX to NULL.
9774 (emit_insn_before_setloc): Convert "loc" param from "int" to
9776 (emit_jump_insn_before_setloc): Likewise.
9777 (emit_call_insn_before_setloc): Likewise.
9778 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
9779 rtx_insn *. Convert "loc" param from "int" to "location_t".
9780 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
9781 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
9782 Convert 3rd param from "int" to "location_t".
9783 (emit_barrier_before, emit_barrier_after, next_real_insn):
9784 Strengthen param from rtx to rtx_insn *.
9785 (emit_label_before): Strengthen 1st param from "rtx" to
9786 "rtx_code_label *". Strengthen 2nd param from "rtx" to
9788 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
9789 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
9790 Strengthen 2nd param from "rtx" to "rtx_insn *".
9791 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
9792 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
9793 Likewise. Convert 3rd param from "int" to "location_t".
9794 (emit_label_after): Strengthen 1st param from "rtx" to
9796 (next_real_insn, remove_insn): Strengthen param from "rtx" to
9798 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
9799 from "rtx" to "rtx_insn *".
9801 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
9803 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
9804 bodies streamed in with -Q.
9805 * dumpfile.c (dump_files): Add lto-stream-out dump file.
9806 * dumpfile.h (tree_dump_index): Add lto_stream_out.
9807 * gimple-streamer-out.c: Include gimple-pretty-print.h
9808 (output_bb): Dump stmts streamed.
9809 * lto-section-out.c: Include print-tree.h
9810 (lto_begin_section): Dump sections created.
9811 (lto_output_decl_index): Dump decl encoded.
9812 * lto-streamer-out.c: Include print-tree.h
9813 (create_output_block): Dump output block created.
9814 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
9815 (output_function): Dump function output.
9816 (output_constructor): Dump constructor streamed.
9817 (write_global_stream): Output indexes encoded.
9818 (produce_asm_for_decls): Dump streams encoded.
9819 * lto-streamer.c (streamer_dump_file): New global var.
9820 * lto-streamer.h (streamer_dump_file): Declare.
9821 * passes.c (ipa_write_summaries): Initialize streamer dump.
9822 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
9825 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
9828 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
9829 offsets for register save directives. Emit a second batch of save
9830 directives, if need be, when the function accesses prior frames.
9832 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9834 * config/arc/fpu.md (fmasf4): Force operand to register.
9835 (fnmasf4): Likewise.
9837 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9839 * config/arc/arc-protos.h (arc_pad_return): Remove.
9840 * config/arc/arc.c (machine_function): Remove force_short_suffix
9842 (arc_print_operand): Adjust printing of '&'.
9843 (arc_verify_short): Remove conditional printing of short suffix.
9844 (arc_final_prescan_insn): Remove reference to size_reason.
9845 (pad_return): New function.
9846 (arc_reorg): Call pad_return.
9847 (arc_pad_return): Remove.
9848 (arc_init_machine_status): Remove reference to force_short_suffix.
9849 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
9850 (attr length): When attribute iscompact is true force to 2
9851 regardless; in the case of maybe check if we want to force the
9852 instruction to have 4 bytes length.
9853 (nopv): Change it to generate 4 byte long nop as well.
9854 (blockage): New pattern.
9855 (simple_return): Remove call to arc_pad_return.
9856 (p_return_i): Likewise.
9858 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9860 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
9862 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9864 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9867 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9869 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9870 for ARC700 and ARCv2.
9872 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
9875 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9876 operands[2] instead of operands[1].
9879 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9881 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9882 case, check whether the outer register overlaps an unallocatable
9883 register, not just whether it fits the required class.
9885 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9887 * poly-int.h (can_div_trunc_p): Add new overload in which all values
9889 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9890 (memrefs_conflict_p): Likewise.
9891 (init_alias_analysis): Likewise.
9892 * cfgexpand.c (expand_debug_expr): Likewise.
9893 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9894 * cse.c (fold_rtx): Likewise.
9895 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9896 * expr.c (emit_block_move_hints): Likewise.
9897 (clear_storage_hints, push_block, emit_push_insn): Likewise.
9898 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9899 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9900 (emit_group_store): Likewise.
9901 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
9902 to read the PRE/POST_MODIFY increment.
9903 * calls.c (store_one_arg): Use strip_offset.
9904 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9906 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9908 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9909 (simplify_binary_operation_1): Extend CONST_INT handling to
9911 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9912 than a HOST_WIDE_INT.
9913 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9915 (adjust_mems, add_stores): Update accodingly.
9916 (vt_canonicalize_addr): Track polynomial offsets.
9917 (emit_note_insn_var_location): Likewise.
9918 (vt_add_function_parameter): Likewise.
9919 (vt_initialize): Likewise.
9921 2018-06-12 Jeff Law <law@redhat.com>
9923 * config.gcc (alpha*-*-freebsd*): Remove.
9924 * config/alpha/freebsd.h: Remove.
9926 2018-06-12 David Malcolm <dmalcolm@redhat.com>
9929 * spellcheck-tree.c (levenshtein_distance): Rename to...
9930 (get_edit_distance): ...this, and update for underlying renaming.
9931 * spellcheck-tree.h (levenshtein_distance): Rename to...
9932 (get_edit_distance): ...this.
9933 * spellcheck.c (levenshtein_distance): Rename to...
9934 (get_edit_distance): ...this. Convert from Levenshtein distance
9935 to Damerau-Levenshtein distance by supporting transpositions of
9936 adjacent characters. Rename "v1" to "v_next" and "v0" to
9938 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9939 (selftest::test_edit_distance_unit_test_oneway): ...this, and
9940 update for underlying renaming.
9941 (selftest::levenshtein_distance_unit_test): Rename to...
9942 (selftest::test_get_edit_distance_unit): ...this, and update for
9943 underlying renaming.
9944 (selftest::test_find_closest_string): Add example from PR 69968
9945 where transposition helps
9946 (selftest::test_metric_conditions): Update for renaming.
9947 (selftest::test_metric_conditions): Likewise.
9948 (selftest::spellcheck_c_tests): Likewise.
9949 * spellcheck.h (levenshtein_distance): Rename both overloads to...
9950 (get_edit_distance): ...this.
9951 (best_match::consider): Update for renaming.
9953 2018-06-12 Martin Sebor <msebor@redhat.com>
9955 PR tree-optimization/85259
9956 * builtins.c (compute_objsize): Handle constant offsets.
9957 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9958 true iff a warning has been issued.
9959 * gimple.h (gimple_nonartificial_location): New function.
9960 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9961 gimple_nonartificial_location and handle -Wno-system-headers.
9962 (handle_builtin_stxncpy): Same.
9964 2018-06-12 Martin Sebor <msebor@redhat.com>
9967 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9969 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
9971 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9972 BUILTIN_VEC_XST entries for pointer to double and long long.
9974 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
9977 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9979 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9982 2018-06-12 Martin Liska <mliska@suse.cz>
9984 * doc/options.texi: Document IntegerRange.
9986 2018-06-12 Martin Liska <mliska@suse.cz>
9988 * config/i386/i386.opt: Make MPX-related options as Deprecated.
9989 * opt-functions.awk: Handle Deprecated flag.
9990 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9992 (read_cmdline_option): Report warning for a deprecated option.
9993 * opts.h (struct cl_option): Add new field cl_deprecated.
9994 (CL_ERR_DEPRECATED): New.
9996 2018-06-12 Martin Liska <mliska@suse.cz>
9998 * doc/options.texi: Document Deprecated option flag.
10000 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
10002 * config/arc/arc-arch.h (arc_extras): New enum.
10003 (arc_cpu_t):Add field extra.
10004 (arc_cpu_types): Consider the extras.
10005 * config/arc/arc-cpus.def: Add extras info.
10006 * config/arc/arc-opts.h (processor_type): Consider extra field.
10007 * config/arc/arc.c (arc_override_options): Handle extra field.
10009 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
10011 * config/arc/arc-arch.h: Update ARC_OPTX macro.
10012 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
10014 * config/arc/arc.c (arc_init): Update pic warning.
10015 (irq_range): Update irq range parsing warnings.
10016 (arc_override_options): Update various warning messages.
10017 (arc_handle_aux_attribute): Likewise.
10019 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
10021 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
10023 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10025 * doc/sourcebuild.texi: Document usage of line number 0 in verify
10026 compiler messages directives.
10028 2018-06-12 Matthew Fortune <mfortune@gmail.com>
10030 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
10031 * config/mips/mips-tables.opt: Regenerate.
10032 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
10034 * doc/invoke.texi: Document -march=i6500.
10036 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
10038 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
10039 (i6400_gpmul): Add cpu_unit.
10040 (i6400_gpdiv): Likewise.
10041 (i6400_msa_add_d): Update reservations.
10042 (i6400_msa_int_add) Likewise.
10043 (i6400_msa_short_logic3) Likewise.
10044 (i6400_msa_short_logic2) Likewise.
10045 (i6400_msa_short_logic) Likewise.
10046 (i6400_msa_move) Likewise.
10047 (i6400_msa_cmp) Likewise.
10048 (i6400_msa_short_float2) Likewise.
10049 (i6400_msa_div_d) Likewise.
10050 (i6400_msa_long_logic1) Likewise.
10051 (i6400_msa_long_logic2) Likewise.
10052 (i6400_msa_mult) Likewise.
10053 (i6400_msa_long_float2) Likewise.
10054 (i6400_msa_long_float4) Likewise.
10055 (i6400_msa_long_float5) Likewise.
10056 (i6400_msa_long_float8) Likewise.
10057 (i6400_fpu_fadd): Include frint type.
10058 (i6400_fpu_store): New define_insn_reservation.
10059 (i6400_fpu_load): Likewise.
10060 (i6400_fpu_move): Likewise.
10061 (i6400_fpu_fcmp): Likewise.
10062 (i6400_fpu_fmadd): Likewise.
10063 (i6400_int_mult): Include imul3nc type and update reservation.
10064 (i6400_int_div): Include idiv3 type and update reservation.
10065 (i6400_int_load): Update to check type not move_type.
10066 (i6400_int_store): Likewise.
10067 (i6400_int_prefetch): Set zero latency.
10069 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
10071 * gcc.c: Document new %@{...} sequence.
10072 (LINK_COMMAND_SPEC): Use it for the -L switches.
10073 (cpp_unique_options): Use it for the -I switches.
10074 (at_file_argbuf): New global variable.
10075 (in_at_file): Likewise.
10076 (alloc_args): Create at_file_argbuf.
10077 (clear_args): Truncate at_file_argbuf.
10078 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
10079 (open_at_file): New function.
10080 (close_at_file): Likewise.
10081 (create_at_file): Delete.
10082 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
10085 (validate_switches_from_spec): Deal with %@{...} sequence.
10086 (validate_switches): Likewise.
10087 (driver::finalize): Call clear_args.
10089 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
10091 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
10093 2018-06-11 Martin Sebor <msebor@redhat.com>
10095 * doc/invoke.texi (-Wall): List -Wc++17-compat.
10096 (Wno-class-memaccess): Add @opindex.
10097 (Wno-templates, Wno-multiple-inheritance): Same.
10098 (Wno-virtual-inheritance, Wno-namespaces): Same.
10099 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
10100 (Wno-format-overflow, Wno-format-truncation): Same.
10101 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
10102 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
10103 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
10104 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
10105 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
10106 (Wno-misspelled-isr): Same.
10108 2018-06-11 Martin Sebor <msebor@redhat.com>
10110 * PR tree-optimization/86083
10111 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
10113 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
10115 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
10117 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
10120 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
10121 on the correct operand.
10122 (*movdi_internal64): Ditto.
10124 2018-06-11 Martin Liska <mliska@suse.cz>
10126 PR tree-optimization/86089
10127 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
10129 2018-06-11 Julia Koval <julia.koval@intel.com>
10131 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
10132 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
10133 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
10135 2018-06-11 Olivier Hainque <hainque@adacore.com>
10137 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
10138 for Ada with strict dwarf2.
10140 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
10143 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
10146 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
10148 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
10150 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
10152 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
10155 2018-06-08 Martin Liska <mliska@suse.cz>
10157 * tree-cfg.h (debug_function): Fix argument type to match
10160 2018-06-08 Martin Liska <mliska@suse.cz>
10162 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
10163 Remove usage of MPX-related (and removed) fields.
10164 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
10166 2018-06-08 David Malcolm <dmalcolm@redhat.com>
10168 * cfg.c (debug): Use TDF_NONE rather than 0.
10169 * cfghooks.c (debug): Likewise.
10170 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
10171 (struct dump_option_value_info): Convert to...
10172 (struct kv_pair): ...this template type.
10173 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
10175 (optinfo_verbosity_options): Likewise.
10176 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
10178 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
10179 than int for "optgroup_flags" param.
10180 (dump_generic_expr_loc): Use dump_flags_t rather than int for
10182 (dump_dec): Likewise.
10183 (dump_finish): Use TDF_NONE rather than 0.
10184 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
10185 rather than int for "optgroup_flags" param. Use TDF_NONE rather
10186 than 0. Update for change to option_ptr.
10187 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
10188 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
10189 0. Update for changes to optinfo_verbosity_options and
10191 (opt_info_switch_p): Convert optgroup_flags from int to
10193 (dump_basic_block): Use dump_flags_t rather than int
10194 for "dump_kind" param.
10195 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
10196 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
10197 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
10198 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
10199 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
10200 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
10201 TDF_NONE): Convert from macros to...
10202 (enum dump_flag): ...this new enum.
10203 (dump_flags_t): Update to use enum.
10204 (operator|, operator&, operator~, operator|=, operator&=):
10205 Implement for dump_flags_t.
10206 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
10207 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
10208 Convert from macros to...
10209 (enum optgroup_flag): ...this new enum.
10210 (optgroup_flags_t): New typedef.
10211 (operator|, operator|=): Implement for optgroup_flags_t.
10212 (struct dump_file_info): Convert field "alt_flags" to
10213 dump_flags_t. Convert field "optgroup_flags" to
10215 (dump_basic_block): Use dump_flags_t rather than int for param.
10216 (dump_generic_expr_loc): Likewise.
10217 (dump_dec): Likewise.
10218 (dump_register): Convert param "optgroup_flags" to
10220 (opt_info_enable_passes): Likewise.
10221 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
10223 * gimple-pretty-print.c (debug): Likewise.
10224 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
10225 (merged_store_group::apply_stores): Likewise.
10226 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
10227 * gimple.c (verify_gimple_pp): Likewise.
10228 * graphite-poly.c (print_pbb_body): Likewise.
10229 * passes.c (pass_manager::register_one_dump_file): Convert
10230 local "optgroup_flags" to optgroup_flags_t.
10231 * print-tree.c (print_node): Use TDF_NONE rather than 0.
10233 (debug_body): Likewise.
10234 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
10235 to optgroup_flags_t.
10236 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
10238 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
10239 (convert_mult_to_fma): Likewise.
10240 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
10241 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
10242 * tree-vect-data-refs.c (dump_lower_bound): Convert param
10243 "dump_kind" to dump_flags_t.
10245 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
10247 * config/rs6000/rs6000.c (min, max): Delete.
10249 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
10251 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
10252 -mabi=spe and -mabi=no-spe.
10254 2018-06-08 Martin Liska <mliska@suse.cz>
10256 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
10257 where we expect an existing summary.
10259 2018-06-08 Martin Liska <mliska@suse.cz>
10261 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
10262 * ipa-inline.h (estimate_edge_growth): Likewise.
10264 2018-06-08 Martin Liska <mliska@suse.cz>
10266 * cgraph.c (function_version_hasher::hash): Use
10267 cgraph_node::get_uid ().
10268 (function_version_hasher::equal):
10269 * cgraph.h (cgraph_node::get_uid): New method.
10270 * ipa-inline.c (update_caller_keys): Use
10271 cgraph_node::get_uid ().
10272 (update_callee_keys): Likewise.
10273 * ipa-utils.c (searchc): Likewise.
10274 (ipa_reduced_postorder): Likewise.
10275 * lto-cgraph.c (input_node): Likewise.
10276 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
10277 * symbol-summary.h (symtab_insertion): Likewise.
10278 (symtab_removal): Likewise.
10279 (symtab_duplication): Likewise.
10280 * tree-pretty-print.c (dump_function_header): Likewise.
10281 * tree-sra.c (convert_callers_for_node): Likewise.
10283 2018-06-08 Martin Liska <mliska@suse.cz>
10285 * cgraph.c (symbol_table::create_edge): Always assign a new
10287 (symbol_table::free_edge): Do not recycle numbers.
10288 * cgraph.h (cgraph_edge::get): New method.
10289 * symbol-summary.h (symtab_removal): Use it.
10290 (symtab_duplication): Likewise.
10291 (call_summary::hashable_uid): Remove.
10293 2018-06-08 Martin Liska <mliska@suse.cz>
10295 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
10296 (initialize_growth_caches): Remove.
10297 (free_growth_caches): Likewise.
10298 (do_estimate_edge_time): Use edge_growth_cache.
10299 (do_estimate_edge_size): Likewise.
10300 (do_estimate_edge_hints): Likewise.
10301 * ipa-inline.c (reset_edge_caches): Likewise.
10302 (recursive_inlining): Likewise.
10303 (inline_small_functions): Likewise.
10304 * ipa-inline.h (initialize_growth_caches): Remove.
10305 (estimate_edge_size): Likewise.
10306 (estimate_edge_time): Likewise.
10307 (estimate_edge_hints): Likewise.
10308 (reset_edge_growth_cache): Likewise.
10309 * symbol-summary.h (call_summary::remove): New method.
10311 2018-06-08 Martin Liska <mliska@suse.cz>
10313 * ipa-cp.c (class edge_clone_summary): New summary.
10314 (grow_edge_clone_vectors): Remove.
10315 (ipcp_edge_duplication_hook): Remove.
10316 (class edge_clone_summary_t): New call_summary class.
10317 (ipcp_edge_removal_hook): Remove.
10318 (edge_clone_summary_t::duplicate): New function.
10319 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
10320 (create_specialized_node): Likewise.
10321 (ipcp_driver): Initialize edge_clone_summaries and do not
10324 2018-06-08 Martin Liska <mliska@suse.cz>
10326 * symbol-summary.h (get): New function.
10327 (call_summary::m_initialize_when_cloning): New class member.
10329 2018-06-08 Martin Liska <mliska@suse.cz>
10331 * cgraph.c (cgraph_node::remove): Do not recycle uid.
10332 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
10333 (symbol_table::allocate_cgraph_symbol): Do not set uid.
10334 * passes.c (uid_hash_t): Record removed_nodes by their uids.
10335 (remove_cgraph_node_from_order): Use the removed_nodes set.
10336 (do_per_function_toporder): Likwise.
10337 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
10338 instead of summary_uid.
10339 (symtab_removal): Likewise.
10340 (symtab_duplication): Likewise.
10342 2018-06-08 Martin Liska <mliska@suse.cz>
10344 * ipa-cp.c (ipcp_store_bits_results): Use
10345 ipcp_transformation_sum.
10346 (ipcp_store_vr_results): Likewise.
10347 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
10349 (ipcp_transformation_initialize): ... this.
10350 (ipa_set_node_agg_value_chain):
10351 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
10352 (write_ipcp_transformation_info): Likewise.
10353 (read_ipcp_transformation_info): Likewise.
10354 (ipcp_update_bits): Likewise.
10355 (ipcp_update_vr): Likewise.
10356 (ipcp_transform_function): Likewise.
10357 * ipa-prop.h: Rename ipcp_transformation_summary to
10358 ipcp_transformation.
10359 (class ipcp_transformation_t): New function summary.
10360 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
10361 (ipa_get_agg_replacements_for_node): Likewise.
10363 2018-06-08 Martin Liska <mliska@suse.cz>
10365 * ipa-pure-const.c (struct funct_state_d): Do it class instead
10367 (class funct_state_summary_t): New function_summary class.
10368 (has_function_state): Remove.
10369 (get_function_state): Likewise.
10370 (set_function_state): Likewise.
10371 (add_new_function): Likewise.
10372 (funct_state_summary_t::insert): New function.
10373 (duplicate_node_data): Remove.
10374 (remove_node_data): Remove.
10375 (funct_state_summary_t::duplicate): New function.
10376 (register_hooks): Create new funct_state_summaries.
10377 (pure_const_generate_summary): Use it.
10378 (pure_const_write_summary): Likewise.
10379 (pure_const_read_summary): Likewise.
10380 (propagate_pure_const): Likewise.
10381 (propagate_nothrow): Likewise.
10382 (dump_malloc_lattice): Likewise.
10383 (propagate_malloc): Likewise.
10384 (execute): Do not register hooks, just remove summary
10386 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
10389 2018-06-08 Martin Liska <mliska@suse.cz>
10391 * ipa-reference.c (remove_node_data): Remove.
10392 (duplicate_node_data): Likewise.
10393 (class ipa_ref_var_info_summary_t): New class.
10394 (class ipa_ref_opt_summary_t): Likewise.
10395 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
10396 (get_reference_optimization_summary): Use
10397 ipa_ref_opt_sum_summaries.
10398 (set_reference_vars_info): Remove.
10399 (set_reference_optimization_summary): Likewise.
10400 (ipa_init): Create summaries.
10401 (init_function_info): Use function summary.
10402 (ipa_ref_opt_summary_t::duplicate): New function.
10403 (ipa_ref_opt_summary_t::remove): New function.
10404 (get_read_write_all_from_node): Fix GNU coding style.
10405 (propagate): Use function summary.
10406 (write_node_summary_p): Fix GNU coding style.
10407 (stream_out_bitmap): Likewise.
10408 (ipa_reference_read_optimization_summary): Use function summary.
10409 (ipa_reference_c_finalize): Do not release hooks.
10411 2018-06-08 Martin Liska <mliska@suse.cz>
10413 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
10414 (analyze_function_body): Extract multiple calls of get_create.
10415 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
10416 * ipa-inline.c (recursive_inlining): Use ::get method.
10417 * ipa-inline.h (estimate_edge_growth): Likewise.
10419 2018-06-08 Martin Liska <mliska@suse.cz>
10421 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
10423 (hsa_function_summary::hsa_function_summary): Use the new enum
10425 (hsa_gpu_implementation_p): Use hsa_summaries::get.
10426 * hsa-gen.c (hsa_get_host_function): Likewise.
10427 (get_brig_function_name): Likewise.
10428 * ipa-hsa.c (process_hsa_functions): Likewise.
10429 (ipa_hsa_write_summary): Likewise.
10430 * symbol-summary.h (symtab_duplication): Use ::get function/
10431 (get): New function.
10433 2018-06-08 Martin Liska <mliska@suse.cz>
10435 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
10437 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
10438 (hsa_register_kernel): Likewise.
10439 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
10440 * hsa-gen.c (hsa_get_host_function): Likewise.
10441 (get_brig_function_name): Likewise.
10442 (generate_hsa): Likewise.
10443 (pass_gen_hsail::execute): Likewise.
10444 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
10445 (devirtualization_time_bonus): Likewise.
10446 (ipcp_propagate_stage): Likewise.
10447 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10448 (edge_set_predicate): Likewise.
10449 (evaluate_conditions_for_known_args): Likewise.
10450 (evaluate_properties_for_edge): Likewise.
10451 (ipa_fn_summary::reset): Likewise.
10452 (ipa_fn_summary_t::duplicate): Likewise.
10453 (dump_ipa_call_summary): Likewise.
10454 (ipa_dump_fn_summary): Likewise.
10455 (analyze_function_body): Likewise.
10456 (compute_fn_summary): Likewise.
10457 (estimate_edge_devirt_benefit): Likewise.
10458 (estimate_edge_size_and_time): Likewise.
10459 (estimate_calls_size_and_time): Likewise.
10460 (estimate_node_size_and_time): Likewise.
10461 (inline_update_callee_summaries): Likewise.
10462 (remap_edge_change_prob): Likewise.
10463 (remap_edge_summaries): Likewise.
10464 (ipa_merge_fn_summary_after_inlining): Likewise.
10465 (ipa_update_overall_fn_summary): Likewise.
10466 (read_ipa_call_summary): Likewise.
10467 (inline_read_section): Likewise.
10468 (write_ipa_call_summary): Likewise.
10469 (ipa_fn_summary_write): Likewise.
10470 (ipa_free_fn_summary): Likewise.
10471 * ipa-hsa.c (process_hsa_functions): Likewise.
10472 (ipa_hsa_write_summary): Likewise.
10473 (ipa_hsa_read_section): Likewise.
10474 * ipa-icf.c (sem_function::merge): Likewise.
10475 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
10476 (do_estimate_edge_time): Likewise.
10477 (estimate_size_after_inlining): Likewise.
10478 (estimate_growth): Likewise.
10479 (growth_likely_positive): Likewise.
10480 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
10481 (inline_call): Likewise.
10482 * ipa-inline.c (caller_growth_limits): Likewise.
10483 (can_inline_edge_p): Likewise.
10484 (can_inline_edge_by_limits_p): Likewise.
10485 (compute_uninlined_call_time): Likewise.
10486 (compute_inlined_call_time): Likewise.
10487 (want_inline_small_function_p): Likewise.
10488 (edge_badness): Likewise.
10489 (update_caller_keys): Likewise.
10490 (update_callee_keys): Likewise.
10491 (recursive_inlining): Likewise.
10492 (inline_small_functions): Likewise.
10493 (inline_to_all_callers_1): Likewise.
10494 (dump_overall_stats): Likewise.
10495 (early_inline_small_functions): Likewise.
10496 (early_inliner): Likewise.
10497 * ipa-inline.h (estimate_edge_growth): Likewise.
10498 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
10499 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10500 * ipa-prop.h (IPA_NODE_REF): Likewise.
10501 (IPA_EDGE_REF): Likewise.
10502 * ipa-pure-const.c (malloc_candidate_p): Likewise.
10503 (propagate_malloc): Likewise.
10504 * ipa-split.c (execute_split_functions): Likewise.
10505 * symbol-summary.h: Rename get to get_create.
10507 (get_create): Likewise.
10508 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
10510 2018-06-08 Martin Liska <mliska@suse.cz>
10512 * symbol-summary.h (release): Move definition out of class
10514 (symtab_removal): Likewise.
10515 (symtab_duplication): Likewise.
10517 2018-06-08 Martin Liska <mliska@suse.cz>
10519 * symbol-summary.h (function_summary): Move constructor
10520 implementation out of class declaration.
10521 (release): Likewise.
10522 (symtab_insertion): Likewise.
10523 (symtab_removal): Likewise.
10524 (symtab_duplication): Likewise.
10527 2018-06-08 Martin Liska <mliska@suse.cz>
10529 * Makefile.in: Remove support for MPX (macros, related functions,
10530 fields in cgraph_node, ...).
10531 * builtin-types.def (BT_BND): Likewise.
10532 (BT_FN_BND_CONST_PTR): Likewise.
10533 (BT_FN_CONST_PTR_BND): Likewise.
10534 (BT_FN_VOID_PTR_BND): Likewise.
10535 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
10536 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
10537 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
10538 (expand_builtin_mempcpy_with_bounds): Likewise.
10539 (expand_builtin_memset_with_bounds): Likewise.
10540 (expand_builtin_memset_args): Likewise.
10541 (std_expand_builtin_va_start): Likewise.
10542 (expand_builtin): Likewise.
10543 (expand_builtin_with_bounds): Likewise.
10544 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
10545 (DEF_LIB_BUILTIN_CHKP): Likewise.
10546 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
10547 (DEF_CHKP_BUILTIN): Likewise.
10548 (BUILT_IN_MEMCPY): Likewise.
10549 (BUILT_IN_MEMMOVE): Likewise.
10550 (BUILT_IN_MEMPCPY): Likewise.
10551 (BUILT_IN_MEMSET): Likewise.
10552 (BUILT_IN_STPCPY): Likewise.
10553 (BUILT_IN_STRCAT): Likewise.
10554 (BUILT_IN_STRCHR): Likewise.
10555 (BUILT_IN_STRCPY): Likewise.
10556 (BUILT_IN_STRLEN): Likewise.
10557 (BUILT_IN_MEMCPY_CHK): Likewise.
10558 (BUILT_IN_MEMMOVE_CHK): Likewise.
10559 (BUILT_IN_MEMPCPY_CHK): Likewise.
10560 (BUILT_IN_MEMSET_CHK): Likewise.
10561 (BUILT_IN_STPCPY_CHK): Likewise.
10562 (BUILT_IN_STRCAT_CHK): Likewise.
10563 (BUILT_IN_STRCPY_CHK): Likewise.
10564 * calls.c (store_bounds): Likewise.
10565 (emit_call_1): Likewise.
10566 (special_function_p): Likewise.
10567 (maybe_warn_nonstring_arg): Likewise.
10568 (initialize_argument_information): Likewise.
10569 (finalize_must_preallocate): Likewise.
10570 (compute_argument_addresses): Likewise.
10571 (expand_call): Likewise.
10572 * cfgexpand.c (expand_call_stmt): Likewise.
10573 (expand_return): Likewise.
10574 (expand_gimple_stmt_1): Likewise.
10575 (pass_expand::execute): Likewise.
10576 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
10577 (cgraph_node::remove): Likewise.
10578 (cgraph_node::dump): Likewise.
10579 (cgraph_node::verify_node): Likewise.
10580 * cgraph.h (chkp_function_instrumented_p): Likewise.
10581 (symtab_node::get_alias_target): Likewise.
10582 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
10583 (cgraph_local_p): Likewise.
10584 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
10585 (cgraph_edge::rebuild_references): Likewise.
10586 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
10587 (walk_polymorphic_call_targets): Likewise.
10588 (cgraph_node::expand_thunk): Likewise.
10589 (symbol_table::output_weakrefs): Likewise.
10590 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
10591 (ix86_handle_option): Likewise.
10592 * config/i386/constraints.md: Likewise.
10593 * config/i386/i386-builtin-types.def (BND): Likewise.
10597 * config/i386/i386-builtin.def (BDESC_END): Likewise.
10598 (BDESC_FIRST): Likewise.
10600 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
10601 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
10602 * config/i386/i386.c (enum reg_class): Likewise.
10603 (ix86_target_string): Likewise.
10604 (ix86_option_override_internal): Likewise.
10605 (ix86_conditional_register_usage): Likewise.
10606 (ix86_valid_target_attribute_inner_p): Likewise.
10607 (ix86_set_indirect_branch_type): Likewise.
10608 (ix86_set_current_function): Likewise.
10609 (ix86_function_arg_regno_p): Likewise.
10610 (init_cumulative_args): Likewise.
10611 (ix86_function_arg_advance): Likewise.
10612 (ix86_function_arg): Likewise.
10613 (ix86_pass_by_reference): Likewise.
10614 (ix86_function_value_regno_p): Likewise.
10615 (ix86_function_value_1): Likewise.
10616 (ix86_function_value_bounds): Likewise.
10617 (ix86_return_in_memory): Likewise.
10618 (ix86_setup_incoming_vararg_bounds): Likewise.
10619 (ix86_va_start): Likewise.
10620 (indirect_thunk_need_prefix): Likewise.
10621 (print_reg): Likewise.
10622 (ix86_print_operand): Likewise.
10623 (ix86_expand_call): Likewise.
10624 (ix86_output_function_return): Likewise.
10625 (reg_encoded_number): Likewise.
10626 (BDESC_VERIFYS): Likewise.
10627 (ix86_init_mpx_builtins): Likewise.
10628 (ix86_init_builtins): Likewise.
10629 (ix86_emit_cmove): Likewise.
10630 (ix86_emit_move_max): Likewise.
10631 (ix86_expand_builtin): Likewise.
10632 (ix86_builtin_mpx_function): Likewise.
10633 (ix86_get_arg_address_for_bt): Likewise.
10634 (ix86_load_bounds): Likewise.
10635 (ix86_store_bounds): Likewise.
10636 (ix86_load_returned_bounds): Likewise.
10637 (ix86_store_returned_bounds): Likewise.
10638 (ix86_class_likely_spilled_p): Likewise.
10639 (ix86_hard_regno_mode_ok): Likewise.
10640 (x86_order_regs_for_local_alloc): Likewise.
10641 (ix86_mitigate_rop): Likewise.
10642 (ix86_bnd_prefixed_insn_p): Likewise.
10643 (ix86_mpx_bound_mode): Likewise.
10644 (ix86_make_bounds_constant): Likewise.
10645 (ix86_initialize_bounds): Likewise.
10646 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
10647 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
10648 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
10649 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
10650 (TARGET_CHKP_BOUND_MODE): Likewise.
10651 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
10652 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
10653 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
10654 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
10655 * config/i386/i386.h (TARGET_MPX): Likewise.
10656 (TARGET_MPX_P): Likewise.
10657 (VALID_BND_REG_MODE): Likewise.
10658 (FIRST_BND_REG): Likewise.
10659 (LAST_BND_REG): Likewise.
10660 (enum reg_class): Likewise.
10661 (BND_REG_P): Likewise.
10662 (BND_REGNO_P): Likewise.
10663 (BNDmode): Likewise.
10664 (ADJUST_INSN_LENGTH): Likewise.
10665 * config/i386/i386.md: Likewise.
10666 * config/i386/i386.opt: Likewise.
10667 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
10668 (defined): Likewise.
10669 (LINK_MPX): Likewise.
10670 (MPX_SPEC): Likewise.
10671 (LIBMPX_SPEC): Likewise.
10672 (LIBMPXWRAPPERS_SPEC): Likewise.
10673 (CHKP_SPEC): Likewise.
10674 * config/i386/predicates.md: Likewise.
10675 * dbxout.c (dbxout_type): Likewise.
10676 * doc/extend.texi: Likewise.
10677 * doc/invoke.texi: Likewise.
10678 * doc/md.texi: Likewise.
10679 * doc/tm.texi: Likewise.
10680 * doc/tm.texi.in: Likewise.
10681 * dwarf2out.c (is_base_type): Likewise.
10682 (gen_formal_types_die): Likewise.
10683 (gen_subprogram_die): Likewise.
10684 (gen_type_die_with_usage): Likewise.
10685 (gen_decl_die): Likewise.
10686 (dwarf2out_late_global_decl): Likewise.
10687 * expr.c (expand_assignment): Likewise.
10688 (emit_storent_insn): Likewise.
10689 (store_expr_with_bounds): Likewise.
10690 (store_expr): Likewise.
10691 (expand_expr_real_1): Likewise.
10692 * expr.h (store_expr_with_bounds): Likewise.
10693 * function.c (use_register_for_decl): Likewise.
10694 (struct bounds_parm_data): Likewise.
10695 (assign_parms_augmented_arg_list): Likewise.
10696 (assign_parm_find_entry_rtl): Likewise.
10697 (assign_parm_is_stack_parm): Likewise.
10698 (assign_parm_load_bounds): Likewise.
10699 (assign_bounds): Likewise.
10700 (assign_parms): Likewise.
10701 (expand_function_start): Likewise.
10702 * gcc.c (CHKP_SPEC): Likewise.
10703 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
10704 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
10705 (wrestrict_dom_walker::check_call): Likewise.
10706 * gimple.c (gimple_build_call_from_tree): Likewise.
10707 * gimple.h (enum gf_mask): Likewise.
10708 (gimple_call_with_bounds_p): Likewise.
10709 (gimple_call_set_with_bounds): Likewise.
10710 * gimplify.c (gimplify_init_constructor): Likewise.
10711 * ipa-cp.c (initialize_node_lattices): Likewise.
10712 (propagate_constants_across_call): Likewise.
10713 (find_more_scalar_values_for_callers_subset): Likewise.
10714 * ipa-hsa.c (process_hsa_functions): Likewise.
10715 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
10716 * ipa-icf.c (sem_function::merge): Likewise.
10717 * ipa-inline.c (early_inliner): Likewise.
10718 * ipa-pure-const.c (warn_function_noreturn): Likewise.
10719 (warn_function_cold): Likewise.
10720 (propagate_pure_const): Likewise.
10721 * ipa-ref.h (enum GTY): Likewise.
10722 * ipa-split.c (find_retbnd): Likewise.
10723 (consider_split): Likewise.
10724 (split_function): Likewise.
10725 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
10726 * ipa.c (walk_polymorphic_call_targets): Likewise.
10727 (symbol_table::remove_unreachable_nodes): Likewise.
10728 (process_references): Likewise.
10729 (cgraph_build_static_cdtor_1): Likewise.
10730 * lto-cgraph.c (lto_output_node): Likewise.
10731 (output_refs): Likewise.
10732 (compute_ltrans_boundary): Likewise.
10733 (input_overwrite_node): Likewise.
10734 (input_node): Likewise.
10735 (input_cgraph_1): Likewise.
10736 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
10737 * passes.c (pass_manager::execute_early_local_passes): Likewise.
10738 (class pass_chkp_instrumentation_passes): Likewise.
10739 (make_pass_chkp_instrumentation_passes): Likewise.
10740 * passes.def: Likewise.
10741 * rtl.h (struct GTY): Likewise.
10742 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
10743 * stor-layout.c (layout_type): Likewise.
10744 * symtab.c: Likewise.
10745 * target.def: Likewise.
10746 * targhooks.c (default_chkp_bound_type): Likewise.
10747 (default_chkp_bound_mode): Likewise.
10748 (default_builtin_chkp_function): Likewise.
10749 (default_chkp_function_value_bounds): Likewise.
10750 (default_chkp_make_bounds_constant): Likewise.
10751 (default_chkp_initialize_bounds): Likewise.
10752 * targhooks.h (default_chkp_bound_type): Likewise.
10753 (default_chkp_bound_mode): Likewise.
10754 (default_builtin_chkp_function): Likewise.
10755 (default_chkp_function_value_bounds): Likewise.
10756 (default_chkp_make_bounds_constant): Likewise.
10757 (default_chkp_initialize_bounds): Likewise.
10758 * toplev.c (compile_file): Likewise.
10759 (process_options): Likewise.
10760 * tree-core.h (DEF_BUILTIN): Likewise.
10761 (DEF_BUILTIN_CHKP): Likewise.
10762 * tree-inline.c (declare_return_variable): Likewise.
10763 (remap_gimple_stmt): Likewise.
10764 (copy_bb): Likewise.
10765 (initialize_inlined_parameters): Likewise.
10766 (expand_call_inline): Likewise.
10767 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
10768 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
10769 (make_pass_ipa_chkp_produce_thunks): Likewise.
10770 (make_pass_chkp): Likewise.
10771 (make_pass_chkp_opt): Likewise.
10772 (make_pass_chkp_instrumentation_passes): Likewise.
10773 * tree-pretty-print.c (dump_generic_node): Likewise.
10774 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
10775 * tree-ssa-dce.c (propagate_necessity): Likewise.
10776 (eliminate_unnecessary_stmts): Likewise.
10777 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
10778 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
10779 * tree-ssa-sccvn.h: Likewise.
10780 * tree-ssa-strlen.c (get_string_length): Likewise.
10781 (valid_builtin_call): Likewise.
10782 (adjust_last_stmt): Likewise.
10783 (handle_builtin_strchr): Likewise.
10784 (handle_builtin_strcpy): Likewise.
10785 (handle_builtin_stxncpy): Likewise.
10786 (handle_builtin_memcpy): Likewise.
10787 (handle_builtin_strcat): Likewise.
10788 (strlen_check_and_optimize_stmt): Likewise.
10789 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
10790 * tree-streamer-in.c: Likewise.
10791 * tree-streamer.c (record_common_node): Likewise.
10792 * tree.c (tree_code_size): Likewise.
10793 (wide_int_to_tree_1): Likewise.
10794 (type_contains_placeholder_1): Likewise.
10795 (build_common_tree_nodes): Likewise.
10796 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
10797 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
10798 (POINTER_BOUNDS_P): Likewise.
10799 (BOUNDED_TYPE_P): Likewise.
10800 (BOUNDED_P): Likewise.
10801 (CALL_WITH_BOUNDS_P): Likewise.
10802 (pointer_bounds_type_node): Likewise.
10803 * value-prof.c (gimple_ic): Likewise.
10804 * var-tracking.c (vt_add_function_parameters): Likewise.
10805 * varasm.c (make_decl_rtl): Likewise.
10806 (assemble_start_function): Likewise.
10807 (output_constant): Likewise.
10808 (maybe_assemble_visibility): Likewise.
10809 * varpool.c (ctor_for_folding): Likewise.
10810 * chkp-builtins.def: Remove.
10811 * ipa-chkp.c: Remove.
10812 * ipa-chkp.h: Remove.
10813 * rtl-chkp.c: Remove.
10814 * rtl-chkp.h: Remove.
10815 * tree-chkp-opt.c: Remove.
10816 * tree-chkp.c: Remove.
10817 * tree-chkp.h: Remove.
10819 2018-06-07 Carl Love <cel@us.ibm.com>
10821 * config/rs6000/vsx.md (vextract_fp_from_shorth,
10822 vextract_fp_from_shortl): Add BE support.
10824 2018-06-07 Paul Koning <ni1d@arrl.net>
10826 * compare-elim.c (try_merge_compare): Don't merge compare if
10827 address contains a side effect.
10828 (try_eliminate_compare): Likewise.
10830 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
10832 * config.gcc: Support "tremont".
10833 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
10834 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10836 * config/i386/i386.c (m_TREMONT): Define.
10837 (processor_target_table): Add "tremont".
10838 (PTA_TREMONT): Define.
10839 (ix86_lea_outperforms): Add TARGET_TREMONT.
10840 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
10841 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
10842 and M_INTEL_GOLDMONT_PLUS.
10843 (fold_builtin_cpu): Add "tremont".
10844 (ix86_add_stmt_cost): Add TARGET_TREMONT.
10845 (ix86_option_override_internal): Add "tremont".
10846 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
10847 (processor_type): Add PROCESSOR_TREMONT.
10848 * config/i386/x86-tune.def: Add m_TREMONT.
10849 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
10851 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10853 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
10854 symbol defined for msp430i* devices to be lower case.
10856 2018-06-07 Richard Biener <rguenther@suse.de>
10858 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
10859 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
10860 Properly wrap signed arithmetic if overflow wraps.
10862 2018-06-07 Jakub Jelinek <jakub@redhat.com>
10864 PR tree-optimization/69615
10865 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10866 of a cast from a same precision integral SSA_NAME in a bb dominated
10867 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
10868 cast to utype if rhs2 has already a compatible type.
10870 2018-06-07 Richard Biener <rguenther@suse.de>
10872 PR tree-optimization/85935
10873 * graphite-scop-detection.c (find_params_in_bb): Analyze
10874 condition operands with respect to the correct loop. Assert
10875 the analysis doesn't fail.
10877 2018-06-04 Carl Love <cel@us.ibm.com>
10879 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10880 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
10881 as it is slightly cheaper.
10882 (first_match_or_eos_index_<mode>):
10883 Calculate index using natural element order.
10884 (first_match_index_<mode>):
10885 Calculate index using natural element order.
10886 (first_match_or_eos_index_<mode>):
10887 Calculate index using natural order.
10888 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10889 for BE and LE modes.
10890 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10891 P9V_BUILTIN_VCLZLSBB_V16QI.
10892 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10895 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10897 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10898 indentation and line wrap for many prototypes. Add missing
10899 @smallexample directives around block of prototypes for vec_xl and
10902 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
10904 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10905 track if we pass or return IEEE 128-bit floating point.
10906 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10907 C++ mangling that is compatible with GCC 8.1.
10908 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10909 (init_cumulative_args): Note if we pass or return IEEE 128-bit
10910 floating point types.
10911 (rs6000_function_arg_advance_1): Likewise.
10912 (rs6000_mangle_type): Optionally generate mangled names that match
10913 what GCC 8.1 generated for IEEE 128-bit floating point types.
10914 (rs6000_globalize_decl_name): If we have an external function that
10915 passes or returns IEEE 128-bit types, generate a weak reference
10916 from the mangled name used in GCC 8.1 to the current mangled
10918 (rs6000_init_builtins): Make __ibm128 use the long double type if
10919 long double is IBM extended double. Make __float128 use the long
10920 double type if long double is IEEE 128-bit.
10923 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10924 macro for __ibm128 built-in functions.
10925 (PACK_IF): Add __ibm128 pack/unpack functions.
10926 (UNPACK_IF): Likewise.
10927 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10928 enable long double built-in functions if long double is IEEE
10929 128-bit floating point.
10930 (rs6000_invalid_builtin): Update long double built-in function
10932 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10933 functions, adjust the built-in function to use the long double
10934 built-in function if __ibm128 and long double are the same type.
10935 * doc/extend.texi (PowerPC builtins): Update documention for
10936 __builtin_{,un}pack_longdouble. Add documentation for
10937 __builtin_{,un}pack_ibm128.
10939 2018-06-06 Jim Wilson <jimw@sifive.com>
10941 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10942 (struct machine_function): New field interrupt_mode.
10943 (riscv_handle_type_attribute): New function. Add forward declaration.
10944 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10945 (riscv_expand_epilogue): Check interrupt_mode field.
10946 (riscv_set_current_function): Check interrupt attribute args and
10947 set interrupt_mode field.
10948 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10949 (riscv_sret, riscv_uret): New.
10950 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10951 new arguments to interrupt attribute.
10953 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
10956 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10957 Don't handle -mcpu=power8 if -mpower9-vector is also used.
10959 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10961 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10962 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10963 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10964 several redundant entries.
10966 2018-06-06 David Malcolm <dmalcolm@redhat.com>
10968 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10969 type from "rtx" to "rtx_insn *".
10970 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10971 for local "call_insn", removing cast.
10972 (ix86_expand_call): Likewise, introducing a "call_insn" local.
10974 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
10976 PR tree-optimization/86066
10977 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10978 for BIT_INSERT_EXPR stores.
10980 2018-06-06 Richard Biener <rguenther@suse.de>
10982 PR tree-optimization/86062
10983 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10984 component refs ontop
10985 of to be offsetted base.
10987 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10989 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10990 to be static and remove check on interrupt attribute name.
10992 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
10994 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10995 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10997 2018-06-05 Steve Ellcey <sellcey@cavium.com>
11000 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
11002 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
11003 Remove second argument, change how error is called.
11004 (aarch64_layout_arg): Remove second argument from
11005 aarch64_err_no_fpadvsimd call.
11006 (aarch64_init_cumulative_args): Ditto.
11007 (aarch64_gimplify_va_arg_expr): Ditto.
11008 * config/aarch64/aarch64.md (mov<mode>): Ditto.
11010 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
11012 * config/i386/i386.md (simple_return_indirect_internal): New expander.
11013 (*simple_return_indirect_internal<mode>): Rename from
11014 simple_return_indirect_internal. Use W mode iterator.
11015 (rstorssp): New expander.
11016 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
11017 (clrssbsy): New expander.
11018 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
11020 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
11022 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
11024 (cmse_check_pointed_object): Likewise.
11026 2018-06-05 Martin Liska <mliska@suse.cz>
11028 PR gcov-profile/47618
11029 * doc/invoke.texi: Document how -fprofile-dir format
11032 2018-06-05 Richard Biener <rguenther@suse.de>
11034 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
11035 removal pretend DOM info isn't available so we do not update
11036 it and only remove edges, not dominated blocks. Actually free
11037 DOM info in case we removed something. Remove unreachable blocks.
11038 (mfb_keep_latches): Work with either DOM info or marked backedges.
11039 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
11040 first. Mark backedges if DOM info isn't available.
11041 (Re-)compute DOM info after cleanup_control_flow_pre.
11043 2018-06-05 Richard Biener <rguenther@suse.de>
11045 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
11046 (locus_discrim_hasher::hash): Adjust.
11047 (locus_discrim_hasher::equal): Likewise.
11048 (next_discriminator_for_locus): Work on line directly.
11049 (same_line_p): Pass in expanded locus1 as well.
11050 (assign_discriminators): Avoid redundant location expansions.
11052 2018-06-05 Richard Biener <rguenther@suse.de>
11054 PR tree-optimization/86046
11055 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
11056 if required after clearing TREE_ADDRESSABLE.
11058 2018-06-05 Richard Biener <rguenther@suse.de>
11060 PR tree-optimization/86047
11061 * tree-ssa-loop.c (for_each_index): Glob handling of all
11062 decls and constants and really handle all of them.
11064 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11067 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
11068 qualifier_void_pointer and qualifier_const_void_pointer.
11069 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
11070 (arm_init_builtins): Handle the above.
11071 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
11072 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
11073 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
11076 2018-06-05 Martin Liska <mliska@suse.cz>
11078 * auto-profile.c (read_autofdo_file): Do not use
11079 gcov_ctr_summary struct.
11080 (afdo_callsite_hot_enough_for_early_inline): Likewise.
11081 * coverage.c (struct counts_entry): Likewise.
11082 (read_counts_file): Read just single summary entry.
11083 (get_coverage_counts): Use gcov_summary struct.
11084 * coverage.h (get_coverage_counts): Likewise.
11085 * gcov-dump.c (dump_working_sets): Likewise.
11086 (tag_summary): Dump just single summary.
11087 * gcov-io.c (gcov_write_summary): Write just histogram
11089 (gcov_read_summary): Read just single summary.
11090 (compute_working_sets): Use gcov_summary struct.
11091 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
11092 of GCOV_COUNTERS_SUMMABLE.
11093 (GCOV_COUNTERS_SUMMABLE): Remove.
11094 (GCOV_FIRST_VALUE_COUNTER): Replace with
11095 GCOV_COUNTER_V_INTERVAL.
11096 (struct gcov_ctr_summary): Remove.
11097 (struct gcov_summary): Directly use fields of former
11099 (compute_working_sets): Use gcov_summary struct.
11100 * gcov.c (read_count_file): Do not use ctrs fields.
11101 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
11103 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
11105 * profile.c: Likewise.
11106 * profile.h: Likewise.
11108 2018-06-05 Martin Liska <mliska@suse.cz>
11110 PR gcov-profile/84846
11111 * gcov.c (output_lines): Print working directory only
11112 in intermediate format.
11114 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
11116 * config/s390/s390-builtin-types.def: Add void function type.
11117 * config/s390/s390-builtins.def: Use the function type for the
11120 2018-06-04 Jim Wilson <jimw@sifive.com>
11122 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
11124 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
11125 and maybe_eh_return. Change regno to unsigned int. Use new args to
11126 handle EH_RETURN_DATA_REGNO registers properly.
11127 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
11128 (riscv_expand_epilogue): Update comment. Change argument name and
11129 type. Update code to use new name and type. Pass new args to
11130 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
11132 * config/riscv/riscv.md (NORMAL_RETURN): New.
11133 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
11134 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
11135 (eh_return): Call gen_eh_return_internal and emit barrier.
11136 (eh_return_internal): Call riscv_expand_epilogue.
11138 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
11140 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
11141 bit_insertion field and declare can_be_merged_into method.
11142 (merged_store_group::can_be_merged_into): New method.
11143 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
11144 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
11145 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
11147 2018-06-04 Richard Biener <rguenther@suse.de>
11149 PR tree-optimization/85955
11150 * builtins.c (fold_builtin_sincos): Convert pointers to
11151 destination to appropriate type before dereferencing.
11153 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
11155 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
11157 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
11159 * expr.c (expand_expr_real_1): Force the operand into memory if
11160 its TYPE_MODE is BLKmode and if there is no integer mode for
11161 the number of bits being extracted.
11163 2018-06-04 Jakub Jelinek <jakub@redhat.com>
11167 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11168 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
11170 2018-06-04 Richard Biener <rguenther@suse.de>
11172 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
11173 (cleanup_tree_cfg_noloop): ... single caller. Do
11174 start_recording_case_labels later.
11176 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
11178 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
11179 to _IMMINTRIN_H_INCLUDED.
11180 * config/i386/pconfigintrin.h: Ditto.
11181 * config/i386/waitpkgintrin.h: Ditto.
11182 * config/i386/immintrin.h: Add includes for sgxintrin.h,
11183 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
11184 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
11185 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
11186 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
11187 waitpkgintrin.h and cldemoteintrin.h.
11189 2018-06-04 Richard Biener <rguenther@suse.de>
11191 PR tree-optimization/86038
11192 * tracer.c (find_best_successor): Check probability for
11193 being initialized, bail out if not.
11195 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
11198 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
11199 of bits to ignore when comparing architectures.
11201 2018-06-04 Jakub Jelinek <jakub@redhat.com>
11203 PR tree-optimization/69615
11204 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
11205 maximum or minimum of the type, try to merge it also as if
11206 range1 is + [-, x - 1] or + [x + 1, -].
11209 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
11211 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
11213 PR tree-optimization/86034
11214 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
11215 the unsigned bitfield type in a bit insertion sequence if it does not
11216 have a larger precision than the bitfield size.
11217 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
11219 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
11221 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
11223 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
11225 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
11226 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
11227 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
11228 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
11230 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
11232 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
11233 Disable -fdelete-null-pointer-checks for ELF toolchain.
11235 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
11236 Kito Cheng <kito.cheng@gmail.com>
11238 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
11239 (nds32le-*-*, nds32be-*-*): Integrate checking process.
11240 (nds32*-*-*): Add glibc and uclibc conditions.
11241 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
11242 (TARGET_EXCEPT_UNWIND_INFO): Define.
11243 * config/nds32/elf.h: New file.
11244 * config/nds32/linux.h: New file.
11245 * config/nds32/nds32-elf.opt: New file.
11246 * config/nds32/nds32-linux.opt: New file.
11247 * config/nds32/nds32-fp-as-gp.c
11248 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
11249 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
11251 (nds32_asm_file_end): Ditto.
11252 (nds32_print_operand): Ditto.
11253 (nds32_insert_attributes): Ditto.
11254 (nds32_init_libfuncs): New function.
11255 (TARGET_HAVE_TLS): Define.
11256 (TARGET_INIT_LIBFUNCS): Define.
11257 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
11259 (TARGET_ELF): Apply different mcmodel setting.
11260 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
11261 been migrated into elf.h and linux.h files.
11262 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
11263 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
11264 (mcmodel): The content has been migrated into nds32-elf.opt and
11265 nds32-linux.opt files.
11266 * config/nds32/t-elf: New file.
11267 * config/nds32/t-linux: New file.
11269 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
11270 Shiva Chen <shiva0217@gmail.com>
11272 * config/nds32/constants.md (unspec_volatile_element): Add
11273 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
11274 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
11276 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
11277 (make_pass_nds32_fp_as_gp): Declare.
11278 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
11280 (nds32_asm_function_end_prologue): Remove unused asm output.
11281 (nds32_asm_function_begin_epilogue): Remove unused asm output.
11282 (nds32_asm_file_start): Output necessary fp_as_gp information.
11283 (nds32_option_override): Adjust register usage.
11284 (nds32_expand_prologue): Consider fp_as_gp situation.
11285 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
11286 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
11289 (simple_return): Ditto.
11290 (omit_fp_begin): Output special directive for fp_as_gp.
11291 (omit_fp_end): Output special directive for fp_as_gp.
11292 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
11293 mforbid-fp-as-gp): New options.
11295 2018-06-01 Mark Wielaard <mark@klomp.org>
11297 * dwarf2out.c (dwarf2out_finish): Remove generation of
11298 DW_AT_loclists_base.
11300 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
11302 * gimple-ssa-store-merging.c: Include gimple-fold.h.
11303 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
11304 (struct merged_store_group): Add bit_insertion field.
11305 (dump_char_array): Use standard hexadecimal format.
11306 (merged_store_group::merged_store_group): Set bit_insertion to false.
11307 (merged_store_group::apply_stores): Use optimal buffer size. Deal
11308 with BIT_INSERT_EXPR stores. Move up code updating the mask and
11309 also print the mask in the dump file.
11310 (pass_store_merging::gate): Minor tweak.
11311 (imm_store_chain_info::coalesce_immediate): Fix wrong association
11312 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
11313 stores with INTEGER_CST stores.
11314 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
11315 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
11316 and use it throughout. Generate bit insertion sequences if need be.
11317 (pass_store_merging::process_store): Remove redundant condition.
11318 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
11320 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
11322 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
11323 the 128-bit floating point types. Fix function comment.
11325 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11327 * config/aarch64/aarch64-simd.md
11328 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
11330 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
11333 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
11335 PR tree-optimization/85989
11336 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
11338 (backprop::intersect_uses): Check it when deciding whether this
11339 is a backedge reference.
11340 (backprop::process_block): Add each phi to m_visited_phis
11341 after visiting it, then clear it at the end.
11343 2018-06-01 Richard Biener <rguenther@suse.de>
11345 * tree-vectorizer.h (vect_dr_stmt): New function.
11346 (vect_get_load_cost): Adjust.
11347 (vect_get_store_cost): Likewise.
11348 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
11349 Use vect_dr_stmt instead of DR_SMTT.
11350 (vect_record_base_alignments): Likewise.
11351 (vect_calculate_target_alignment): Likewise.
11352 (vect_compute_data_ref_alignment): Likewise and make static.
11353 (vect_update_misalignment_for_peel): Likewise.
11354 (vect_verify_datarefs_alignment): Likewise.
11355 (vector_alignment_reachable_p): Likewise.
11356 (vect_get_data_access_cost): Likewise. Pass down
11357 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
11358 (vect_get_peeling_costs_all_drs): Likewise.
11359 (vect_peeling_hash_get_lowest_cost): Likewise.
11360 (vect_enhance_data_refs_alignment): Likewise.
11361 (vect_find_same_alignment_drs): Likewise.
11362 (vect_analyze_data_refs_alignment): Likewise.
11363 (vect_analyze_group_access_1): Likewise.
11364 (vect_analyze_group_access): Likewise.
11365 (vect_analyze_data_ref_access): Likewise.
11366 (vect_analyze_data_ref_accesses): Likewise.
11367 (vect_vfa_segment_size): Likewise.
11368 (vect_small_gap_p): Likewise.
11369 (vectorizable_with_step_bound_p): Likewise.
11370 (vect_prune_runtime_alias_test_list): Likewise.
11371 (vect_analyze_data_refs): Likewise.
11372 (vect_supportable_dr_alignment): Likewise.
11373 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11374 (vect_gen_prolog_loop_niters): Likewise.
11375 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11376 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
11378 (vect_recog_mask_conversion_pattern): Likewise.
11379 (vect_try_gather_scatter_pattern): Likewise.
11380 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
11381 to vect_get_store_cost.
11382 (vect_get_store_cost): Get stmt_info instead of DR.
11383 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
11384 (vect_get_load_cost): Get stmt_info instead of DR.
11386 2018-06-01 Richard Biener <rguenther@suse.de>
11388 PR middle-end/86017
11389 * gimple-fold.c (var_decl_component_p): Also allow offsetted
11390 vars wrapped in MEM_REFs.
11392 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
11394 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11395 Fix subreg tests so that we only return a choice between
11396 GENERAL_REGS and FP_REGS if the original classes included both.
11398 2018-06-01 Richard Biener <rguenther@suse.de>
11401 * tree-ssa-structalias.c (get_function_part_constraint):
11402 Handle NULL fi->decl.
11403 (find_func_aliases_for_call): Properly handle indirect
11404 fi from direct call.
11405 (find_func_clobbers): Likewise.
11406 (ipa_pta_execute): Likewise.
11407 (create_variable_info_for): For functions that are ifunc_resolver
11408 resolve to a varinfo that contains the result of the resolver call.
11409 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
11412 2018-05-31 Michael Collison <michael.collison@arm.com>
11414 * config/aarch64/aarch64.md:
11415 (*fix_to_zero_extenddfdi2): New pattern.
11416 * gcc.target/aarch64/fix_extend1.c: New testcase.
11418 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
11420 PR middle-end/78809
11421 PR middle-end/83026
11422 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
11423 and BUILT_IN_STRNCMP_EQ.
11424 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
11425 BUILT_IN_STRNCMP_EQ.
11426 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
11427 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
11428 (gimple_fold_builtin): Likewise.
11429 * tree-ssa-strlen.c (compute_string_length): New function.
11430 (determine_min_obsize): New function.
11431 (handle_builtin_string_cmp): New function to handle calls to
11432 string compare functions.
11433 (strlen_optimize_stmt): Add handling to builtin string compare
11435 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
11436 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
11437 * tree.c (build_common_builtin_nodes): Add new defines of
11438 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
11440 2018-05-31 Jakub Jelinek <jakub@redhat.com>
11443 * bb-reorder.c (pass_partition_blocks::gate): Return false for
11444 functions with naked attribute.
11446 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
11448 * config/i386/sse.md (avx_vec_concat<mode>):
11449 Substitute concat_tg_mode mode attribute with xtg_mode.
11450 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
11451 (concat_tg_mode): Remove mode attribute.
11453 2018-05-31 Martin Sebor <msebor@redhat.com>
11456 * calls.c (alloc_max_size): Correct a logic error/typo.
11457 Treat excessive arguments as infinite. Warn for invalid arguments.
11458 * doc/invoke.texi (-Walloc-size-larger-than): Update.
11460 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
11463 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
11464 and movx for Haswell.
11466 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
11467 Cesar Philippidis <cesar@codesourcery.com>
11469 PR middle-end/85879
11470 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
11471 when emitting error on private/firstprivate reductions.
11472 * omp-low.c (lower_omp_target): Avoid reference-type processing
11473 on pointers for firstprivate clause.
11475 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
11477 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
11480 * config/aarch64/aarch64-simd.md
11481 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
11482 (aarch64_ld1_x3_<mode>): Likewise
11483 (aarch64_st1x2<VALLDIF:mode>): Likewise
11484 (aarch64_st1_x2_<mode>): Likewise
11485 (aarch64_st1x3<VALLDIF:mode>): Likewise
11486 (aarch64_st1_x3_<mode>): Likewise
11487 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
11488 (vld1_s8_x3): Likewise.
11489 (vld1_u16_x3): Likewise.
11490 (vld1_s16_x3): Likewise.
11491 (vld1_u32_x3): Likewise.
11492 (vld1_s32_x3): Likewise.
11493 (vld1_u64_x3): Likewise.
11494 (vld1_s64_x3): Likewise.
11495 (vld1_f16_x3): Likewise.
11496 (vld1_f32_x3): Likewise.
11497 (vld1_f64_x3): Likewise.
11498 (vld1_p8_x3): Likewise.
11499 (vld1_p16_x3): Likewise.
11500 (vld1_p64_x3): Likewise.
11501 (vld1q_u8_x3): Likewise.
11502 (vld1q_s8_x3): Likewise.
11503 (vld1q_u16_x3): Likewise.
11504 (vld1q_s16_x3): Likewise.
11505 (vld1q_u32_x3): Likewise.
11506 (vld1q_s32_x3): Likewise.
11507 (vld1q_u64_x3): Likewise.
11508 (vld1q_s64_x3): Likewise.
11509 (vld1q_f16_x3): Likewise.
11510 (vld1q_f32_x3): Likewise.
11511 (vld1q_f64_x3): Likewise.
11512 (vld1q_p8_x3): Likewise.
11513 (vld1q_p16_x3): Likewise.
11514 (vld1q_p64_x3): Likewise.
11515 (vst1_s64_x2): Likewise.
11516 (vst1_u64_x2): Likewise.
11517 (vst1_f64_x2): Likewise.
11518 (vst1_s8_x2): Likewise.
11519 (vst1_p8_x2): Likewise.
11520 (vst1_s16_x2): Likewise.
11521 (vst1_p16_x2): Likewise.
11522 (vst1_s32_x2): Likewise.
11523 (vst1_u8_x2): Likewise.
11524 (vst1_u16_x2): Likewise.
11525 (vst1_u32_x2): Likewise.
11526 (vst1_f16_x2): Likewise.
11527 (vst1_f32_x2): Likewise.
11528 (vst1_p64_x2): Likewise.
11529 (vst1q_s8_x2): Likewise.
11530 (vst1q_p8_x2): Likewise.
11531 (vst1q_s16_x2): Likewise.
11532 (vst1q_p16_x2): Likewise.
11533 (vst1q_s32_x2): Likewise.
11534 (vst1q_s64_x2): Likewise.
11535 (vst1q_u8_x2): Likewise.
11536 (vst1q_u16_x2): Likewise.
11537 (vst1q_u32_x2): Likewise.
11538 (vst1q_u64_x2): Likewise.
11539 (vst1q_f16_x2): Likewise.
11540 (vst1q_f32_x2): Likewise.
11541 (vst1q_f64_x2): Likewise.
11542 (vst1q_p64_x2): Likewise.
11543 (vst1_s64_x3): Likewise.
11544 (vst1_u64_x3): Likewise.
11545 (vst1_f64_x3): Likewise.
11546 (vst1_s8_x3): Likewise.
11547 (vst1_p8_x3): Likewise.
11548 (vst1_s16_x3): Likewise.
11549 (vst1_p16_x3): Likewise.
11550 (vst1_s32_x3): Likewise.
11551 (vst1_u8_x3): Likewise.
11552 (vst1_u16_x3): Likewise.
11553 (vst1_u32_x3): Likewise.
11554 (vst1_f16_x3): Likewise.
11555 (vst1_f32_x3): Likewise.
11556 (vst1_p64_x3): Likewise.
11557 (vst1q_s8_x3): Likewise.
11558 (vst1q_p8_x3): Likewise.
11559 (vst1q_s16_x3): Likewise.
11560 (vst1q_p16_x3): Likewise.
11561 (vst1q_s32_x3): Likewise.
11562 (vst1q_s64_x3): Likewise.
11563 (vst1q_u8_x3): Likewise.
11564 (vst1q_u16_x3): Likewise.
11565 (vst1q_u32_x3): Likewise.
11566 (vst1q_u64_x3): Likewise.
11567 (vst1q_f16_x3): Likewise.
11568 (vst1q_f32_x3): Likewise.
11569 (vst1q_f64_x3): Likewise.
11570 (vst1q_p64_x3): Likewise.
11572 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11574 * config/msp430/msp430.c (msp430_output_labelref): Prepend
11575 user_label_prefix to name.
11577 * tree-core.h: Update comment about the format of NAME string
11578 passed to handler in attribute_spec.
11580 * config/msp430/msp430.md: Remove erroneous subreg expression from
11581 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
11582 zero_extend{q,h}isi2.
11584 2018-05-30 Borislav Petkov <bp@suse.de>
11586 * doc/extend.texi: Document some architecture specific
11587 constraints and sort entries.
11589 2018-05-30 Martin Sebor <msebor@redhat.com>
11591 PR middle-end/85369
11592 * builtins.c (expand_builtin_stpcpy_1): New function.
11593 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
11594 only if the former succeeds.
11596 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
11598 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
11601 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11603 * doc/invoke.texi (-flinker-output): Document
11605 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11607 * passes.c (ipa_write_summaries): Only modify statements if body
11609 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
11610 incrementally linking.
11611 (ipa_passes): Likewise.
11612 * lto-cgraph.c (lto_output_node): When incrementally linking do not
11613 pass down resolution info.
11614 * common.opt (flag_incremental_link): Update info.
11615 * gcc.c (plugin specs): Turn flinker-output=* to
11616 -plugin-opt=-linker-output-known
11617 * toplev.c (compile_file): Also cut compilation when doing incremental
11619 * flag-types. (enum lto_partition_model): Add
11620 LTO_LINKER_OUTPUT_NOLTOREL.
11621 (invoke.texi): Add -flinker-output docs.
11622 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
11623 link same way as WPA; do not stream in dead initializers.
11625 * dwarf2out.c (dwarf2out_die_ref_for_decl,
11626 darf2out_register_external_decl): Support incremental link.
11628 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11630 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
11632 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11634 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
11635 it down to simple_object_copy_lto_debug_sections.
11636 (run_gcc): Determine incremental LTO link time and configure
11637 lto1 into non-wpa mode, disable renaming of debug sections.
11639 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
11641 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
11642 descriptions of various incorrectly documented functions.
11644 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
11647 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11648 address check not strict.
11650 2018-05-30 Richard Biener <rguenther@suse.de>
11652 PR tree-optimization/85964
11653 * tracer.c (better_p): Drop initialized count check, we only
11654 call the function with initialized counts now.
11655 (find_best_successor): Do find a best edge if one
11656 has uninitialized count.
11657 (find_best_predecessor): Likewise. Do BB frequency check only
11658 if count is initialized.
11660 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
11662 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
11663 (aarch64_ldrstr_offset_compare): New.
11664 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
11665 load/store orderings.
11666 (aarch64_gen_adjusted_ldpstp): Likewise.
11668 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
11670 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11671 Check for subset of GENERAL_REGS and FP_REGS.
11672 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
11675 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
11677 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
11678 and wi::to_poly_offset. Add the current offset and then check
11679 whether the sum fits, rather than using an unchecked addition of
11680 a checked term. Check for a shwi rather than a uhwi.
11681 * expr.c (get_bit_range): Use tree_to_poly_uint64.
11682 (store_constructor): Use poly_int_tree_p.
11683 (expand_expr_real_1): Likewise.
11684 * function.c (assign_temp): Likewise.
11685 * fold-const.c (const_binop): Use poly_int_tree_p and
11686 wi::to_poly_offset.
11687 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
11689 * ipa-icf-gimple.c (func_checker::compare_operand): Use
11690 to_poly_offset for MEM offsets.
11691 * ipa-icf.c (sem_variable::equals): Likewise.
11692 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
11693 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
11694 wi::to_poly_offset for BIT_FIELD_REF offsets.
11695 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
11696 wi::to_poly_offset.
11697 * var-tracking.c (emit_note_insn_var_location): Use
11698 tree_to_poly_uint64.
11700 2018-05-29 Jim Wilson <jimw@sifive.com>
11702 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
11704 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
11707 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
11708 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
11710 (sse4_1_round<mode>2): Use nonimmediate_operand
11711 for operand 1 predicate.
11713 2018-05-29 Martin Sebor <msebor@redhat.com>
11714 Richard Biener <rguenther@suse.de>
11717 * calls.c (get_size_range): Call determine_value_range instead
11718 of get_value_range..
11719 * tree-vrp.h (determine_value_range): Declared new function.
11720 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
11722 2018-05-29 Richard Biener <rguenther@suse.de>
11724 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
11725 sure to use non-pattern stmts for get_earlier_stmt arguments.
11726 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
11727 called on pattern stmts.
11728 (get_later_stmt): Likewise.
11730 2018-05-29 Martin Liska <mliska@suse.cz>
11732 PR gcov-profile/85759
11733 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
11736 2018-05-29 Jakub Jelinek <jakub@redhat.com>
11738 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
11740 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
11744 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11745 VEC_PACK_FLOAT_EXPR): New tree codes.
11746 * tree-pretty-print.c (op_code_prio): Handle
11747 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11748 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11749 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11750 * tree-inline.c (estimate_operator_cost): Likewise.
11751 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
11752 * fold-const.c (const_binop): Likewise.
11753 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
11754 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11755 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11756 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
11757 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11758 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11759 * expr.c (expand_expr_real_2): Likewise.
11760 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
11761 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
11762 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
11764 * optabs.c (expand_widen_pattern_expr): For
11765 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
11766 sign from result type rather than operand's type.
11767 (expand_binop_directly): For vec_packu_float_optab and
11768 vec_packs_float_optab allow result type to be different from operand's
11770 * optabs-tree.c (optab_for_tree_code): Handle
11771 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11772 VEC_PACK_FLOAT_EXPR. Formatting fixes.
11773 * tree-vect-generic.c (expand_vector_operations_1): Handle
11774 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11775 VEC_PACK_FLOAT_EXPR.
11776 * tree-vect-stmts.c (supportable_widening_operation): Handle
11778 (supportable_narrowing_operation): Handle FLOAT_EXPR.
11779 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
11780 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
11781 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
11782 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
11784 (vec_pack<floatprefix>_float_<mode>): New expander.
11785 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
11787 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
11788 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
11789 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
11790 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
11791 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
11793 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
11794 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
11795 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11796 VEC_PACK_FLOAT_EXPR): Document.
11798 2018-05-29 Richard Biener <rguenther@suse.de>
11800 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
11802 (stmt_vec_info_vec): Make pointer.
11803 (init_stmt_vec_info_vec): Remove.
11804 (free_stmt_vec_info_vec): Likewise.
11805 (set_stmt_vec_info_vec): New function.
11806 (free_stmt_vec_infos): Likewise.
11807 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
11808 (set_vinfo_for_stmt): Likewise.
11809 (get_earlier_stmt): Likewise.
11810 (get_later_stmt): Likewise.
11811 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
11812 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
11813 (vec_info::~vec_info): Free stmt_vec_infos.
11814 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
11815 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
11816 (pass_slp_vectorize::execute): Likewise.
11817 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
11818 (free_stmt_vec_info_vec): Likewise.
11819 (set_stmt_vec_info_vec): New function.
11820 (free_stmt_vec_infos): Likewise.
11821 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
11822 the global stmt_vec_info_vec.
11823 * tree-parloops.c (gather_scalar_reductions): Use
11824 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
11827 2018-05-29 Richard Biener <rguenther@suse.de>
11829 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
11831 2018-05-29 Martin Liska <mliska@suse.cz>
11832 David Malcolm <dmalcolm@redhat.com>
11834 * vec.c (test_reverse): New.
11835 (vec_c_tests): Add new test.
11836 * vec.h (vl_ptr>::reverse): New function.
11838 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
11840 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
11842 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
11845 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
11847 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
11849 2018-05-28 Richard Biener <rguenther@suse.de>
11851 PR tree-optimization/85933
11852 * tree-vect-data-refs.c (vect_record_base_alignments): Only
11853 look at stmts marked as vectorizable.
11855 2018-05-28 Richard Biener <rguenther@suse.de>
11857 PR tree-optimization/85934
11858 * tree-vect-generic.c (expand_vector_operations_1): Hoist
11859 vector boolean check before scalar optimization.
11861 2018-05-28 Jakub Jelinek <jakub@redhat.com>
11863 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11866 2018-05-28 Mark Wielaard <mark@klomp.org>
11868 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11869 if it is an expression containing a minus sign.
11871 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
11873 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11875 2018-05-27 Paul Koning <ni1d@arrl.net>
11877 * config/pdp11/pdp11.md (truncsihi2): Remove.
11879 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
11880 Chung-Ju Wu <jasonwucj@gmail.com>
11882 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11884 (unaligned_store_dw): Ditto.
11885 * config/nds32/nds32-memory-manipulation.c
11886 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11887 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11888 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11889 (emit_setmem_word_loop): Rename to ...
11890 (emit_setmem_doubleword_loop): ... this.
11891 (nds32_gen_dup_4_byte_to_word_value): New function.
11892 (nds32_gen_dup_8_byte_to_double_word_value): New function.
11893 (nds32_expand_setmem_loop): Refine implementation.
11894 (nds32_expand_setmem_loop_v3m): Ditto.
11895 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11898 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11900 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11902 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11904 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11905 (nds32_init_machine_status): Initialize machine->attr_naked_p and
11906 machine->attr_no_prologue_p.
11907 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11908 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11909 (nds32_expand_epilogue): Consider attr_naked_p.
11910 (nds32_expand_epilogue_v3pop): Likewise.
11911 (nds32_can_use_return_insn): Likewise.
11912 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11913 attr_no_prologue_p fields.
11914 * config/nds32/nds32.opt (mret-in-naked-func): New option.
11916 2018-05-27 Jakub Jelinek <jakub@redhat.com>
11919 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11921 * config/i386/sse.md
11922 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11924 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11926 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11928 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11930 (*<floatsuffix>floatv2div2sf2): Rename to ...
11931 (*float<floatunssuffix>v2div2sf2): ... this.
11932 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11933 (float<floatunssuffix>v2div2sf2_mask): ... this.
11934 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11935 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11936 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11938 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11940 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11942 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11944 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11946 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11948 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11949 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11950 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11951 gen_ufix_truncv8dfv8si2.
11952 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11953 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11954 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11955 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11956 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11957 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11958 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11959 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11961 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11965 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11967 2018-05-25 Jim Wilson <jimw@sifive.com>
11969 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11970 * config/riscv/riscv.c (struct machine_function): Add
11971 interrupt_handler_p and attribute_checked_p fields.
11972 (riscv_attribute_table): Add interrupt.
11973 (riscv_interrupt_type_p): New.
11974 (riscv_save_reg_p): Save extra regs for interrupt handler.
11975 (riscv_use_save_libcall): Return false for interrupt handler.
11976 (riscv_first_stack_step): Add forward declaration.
11977 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
11978 for interrupt handler with large frame. Use it for saved reg list.
11979 (riscv_expand_prologue): Move flag_stack_usage_info support to
11980 eliminate duplication.
11981 (riscv_expand_epilogue): Generate mret for interrupt handler.
11982 (riscv_epilogue_uses): New.
11983 (riscv_can_use_return_insn): Return false for interrupt handler.
11984 (riscv_function_ok_for_sibcall): Likewise.
11985 (riscv_set_current_function): Add interrupt handler support.
11986 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11987 * config/riscv/riscv.md (UNSPECV_MRET): New.
11989 (riscv_frflags, riscv_fsflags): Use tab after opcode.
11991 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11993 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
11995 PR tree-optimization/85712
11996 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11997 this candidate has already been replaced in-situ by a copy.
11999 2018-05-25 Jason Merrill <jason@redhat.com>
12001 PR c++/80485 - inline function non-zero address.
12002 * symtab.c (nonzero_address): Check DECL_COMDAT.
12004 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
12007 * config/alpha/alpha.md (ashlsi3): New insn pattern.
12008 (*ashlsi_se): Rename from *ashldi_se. Define as sign
12009 extension of SImode operation. Use const123_operand predicate.
12010 (*saddsi_1): Remove.
12011 (*saddl_se_1): Ditto.
12012 (*ssubsi_1): Ditto.
12013 (*ssubl_se_1): Ditto.
12014 * config/alpha/predicates.md (const123_operand): New predicate.
12015 * config/alpha/constraints.md (P): Use IN_RANGE.
12017 2018-05-25 Richard Biener <rguenther@suse.de>
12019 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
12021 (ref_maybe_used_by_stmt_p): Likewise.
12022 (stmt_may_clobber_ref_p): Likewise.
12023 (stmt_may_clobber_ref_p_1): Likewise.
12024 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
12026 (ref_maybe_used_by_stmt_p): Likewise.
12027 (stmt_may_clobber_ref_p): Likewise.
12028 (stmt_may_clobber_ref_p_1): Likewise.
12029 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
12030 the alias oracle to disambiguate DRs with stmts DR analysis
12032 (vect_analyze_data_refs): Do not give up on not analyzable
12033 DRs for BB vectorization. Remove code truncating the dataref
12036 2018-05-25 Jakub Jelinek <jakub@redhat.com>
12039 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
12040 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
12041 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
12043 2018-05-25 Richard Biener <rguenther@suse.de>
12045 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
12046 function, combining stmt data ref gathering and fatal analysis
12048 (vect_analyze_data_refs): Remove now redudnant code and simplify.
12049 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
12050 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
12051 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
12052 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
12054 2018-05-25 Bin Cheng <bin.cheng@arm.com>
12056 PR tree-optimization/85720
12057 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
12058 SCC if all partitions are builtins.
12059 (version_loop_by_alias_check): New parameter. Generate cancelable
12060 runtime alias check if all partitions are builtins.
12061 (distribute_loop): Update call to above function.
12063 2018-05-25 Bin Cheng <bin.cheng@arm.com>
12065 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
12066 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
12067 (parm_default_def_partition_arg): Ditto.
12068 (set_parm_default_def_partition): Ditto.
12069 (get_parm_default_def_partitions): Ditto and make it static.
12070 (get_undefined_value_partitions): Ditto and make it static.
12071 (remove_ssa_form): Refactor call to init_var_map here.
12072 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
12073 computation for loop region.
12074 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
12075 (register_default_def): Delete.
12076 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
12077 (parm_default_def_partition_arg): Ditto.
12078 (set_parm_default_def_partition): Ditto.
12079 (get_parm_default_def_partitions): Ditto and make it static.
12080 (get_undefined_value_partitions): Ditto and make it static.
12081 (coalesce_with_default, coalesce_with_default): Update comment.
12082 (create_coalesce_list_for_region): New func factored out from
12083 create_outofssa_var_map.
12084 (populate_coalesce_list_for_outofssa): New func factored out from
12085 create_outofssa_var_map and coalesce_ssa_name.
12086 (create_outofssa_var_map): Delete.
12087 (coalesce_ssa_name): Refactor to support live range computation.
12088 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
12089 (get_parm_default_def_partitions): Delete.
12090 (get_undefined_value_partitions): Ditto.
12091 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
12092 computation for loop region.
12093 (new_tree_live_info, loe_visit_block): Ditto.
12094 (live_worklist, set_var_live_on_entry): Ditto.
12095 (calculate_live_on_exit, verify_live_on_entry): Ditto.
12096 * tree-ssa-live.h (struct _var_map): New fields.
12097 (init_var_map): Change decl.
12098 (region_contains_p): New.
12100 2018-05-25 Bin Cheng <bin.cheng@arm.com>
12102 * tree-ssa-live.h (live_merge_and_clear): Delete.
12104 2018-05-25 Richard Biener <rguenther@suse.de>
12107 * tree-dump.c (dequeue_and_dump): Remove access to removed
12108 operand 2 of a SWITCH_EXPR.
12110 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12112 * doc/sourcebuild.texi (vect_double_cond_arith): Include
12113 multiplication and division.
12114 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
12115 (cond_udiv@var{m}, cond_umod@var{m}): Document.
12116 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
12117 (cond_udiv_optab, cond_umod_optab): New optabs.
12118 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
12119 (IFN_COND_RDIV): New internal functions.
12120 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
12121 TRUNC_MOD_EXPR and RDIV_EXPR.
12122 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
12123 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
12125 (SVE_INT_BINARY): Include mult.
12126 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
12127 (optab, sve_int_op): Handle mult.
12128 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
12130 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
12131 for SVE_INT_BINARY_SD.
12133 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12135 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
12136 (optab, sve_int_op): Handle div and udiv.
12137 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
12138 for SVE_INT_BINARY_SD.
12139 (*<optab><mode>3): New insn for the same.
12141 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12143 * tree-vect-patterns.c: Include predict.h.
12144 (vect_recog_divmod_pattern): Restrict check for division support
12145 to when optimizing for size.
12147 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12149 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
12150 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
12151 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
12152 (gimple_match_op::set_op): Likewise.
12153 (gimple_resimplify4): Declare.
12154 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
12155 (expr::gen_transform): Likewise.
12156 (decision_tree::gen): Generate a simplification routine for 4 operands.
12157 * gimple-match-head.c (gimple_simplify): Add an overload for
12158 4 operands. In the top-level function, handle up to 4 call
12159 arguments and call gimple_resimplify4.
12160 (gimple_resimplify4): New function.
12161 (build_call_internal): Pass a fourth operand.
12162 (maybe_push_to_seq): Likewise.
12163 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
12164 Fold VEC_COND_EXPRs of an operation and a default value into
12165 an IFN_COND_* function if possible.
12166 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
12168 (SVE_COND_FP_BINARY): Include them.
12169 (optab, sve_fp_op): Handle them.
12170 (SVE_INT_BINARY_REV): New code iterator.
12171 (SVE_COND_FP_BINARY_REV): New int iterator.
12172 (commutative): New int attribute.
12173 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
12175 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
12177 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
12178 (*cond_<optab><mode>): New patterns for reversed operands.
12180 2018-05-25 Richard Biener <rguenther@suse.de>
12182 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
12183 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
12184 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
12185 (STMT_VINFO_GROUPED_ACCESS): Adjust.
12186 * tree-vect-data-refs.c (everywhere): Adjust users.
12187 * tree-vect-loop.c (everywhere): Likewise.
12188 * tree-vect-slp.c (everywhere): Likewise.
12189 * tree-vect-stmts.c (everywhere): Likewise.
12190 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
12192 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12194 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
12196 (gcc_cv_as_section_exclude): ... this.
12197 Try Solaris as #exclude syntax.
12198 * configure: Regenerate.
12199 * config.in: Regenerate.
12200 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
12202 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
12203 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
12205 * varasm.c (default_elf_asm_named_section): Don't check if
12206 HAVE_GAS_SECTION_EXCLUDE is defined.
12208 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12210 * doc/md.texi: Update the documentation of the cond_* optabs
12211 to mention the new final operand. Fix GET_MODE_NUNITS call.
12212 Describe the scalar case too.
12213 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
12214 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
12216 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
12217 (get_conditional_internal_fn): Update comment.
12218 * tree-vect-loop.c (vectorizable_reduction): Pass the original
12219 accumulator value as a final argument to conditional functions.
12220 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
12221 a define_expand and add an "else" operand. Assert for now that
12222 the else operand is equal to operand 2. Use SVE_INT_BINARY and
12223 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
12224 (*cond_<optab><mode>): New patterns.
12225 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
12226 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
12227 (UNSPEC_COND_EOR): Delete.
12228 (optab): Remove associated mappings.
12229 (SVE_INT_BINARY): New code iterator.
12230 (sve_int_op): Remove int attribute and add "minus" to the code
12232 (SVE_COND_INT_OP): Delete.
12233 (SVE_COND_FP_OP): Rename to...
12234 (SVE_COND_FP_BINARY): ...this.
12236 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12238 * optabs.c (can_reuse_operands_p): New function.
12239 (maybe_legitimize_operands): Try to reuse the results for
12242 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
12244 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
12245 Add {q} suffix to insn mnemonic.
12247 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12249 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
12250 (msp430_warn_func_return): New.
12252 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
12254 * fold-const.c (tree_nonzero_bits): New function.
12255 * fold-const.h (tree_nonzero_bits): Likewise.
12256 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
12257 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
12259 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
12263 * varasm.c (assemble_alias): Check ifunc_resolver only on
12266 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
12269 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
12270 when memory input operand is handled.
12272 2018-05-24 Luis Machado <luis.machado@linaro.org>
12274 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
12276 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
12278 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
12280 * match.pd: Delay FMA folds until after vectorization.
12282 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
12285 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12286 address check not strict.
12288 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
12290 * gimple-match.h (gimple_match_op): New class.
12291 (mprts_hook): Replace parameters with a gimple_match_op *.
12292 (maybe_build_generic_op): Likewise.
12293 (gimple_simplified_result_is_gimple_val): Replace parameters with
12294 a const gimple_match_op *.
12295 (gimple_simplify): Replace code_helper * and tree * parameters with
12296 a gimple_match_op * parameter.
12297 (gimple_resimplify1): Replace code_helper *, tree and tree *
12298 parameters with a gimple_match_op * parameter.
12299 (gimple_resimplify2): Likewise.
12300 (gimple_resimplify3): Likewise.
12301 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
12302 parameters with a gimple_match_op * parameter.
12303 * gimple-match-head.c (gimple_simplify): Change prototypes of
12304 auto-generated functions to take a gimple_match_op * instead of
12305 separate code_helper * and tree * parameters. Make the same
12306 change in the top-level overload and update calls to the
12307 gimple_resimplify routines. Update calls to the auto-generated
12308 functions and to maybe_push_res_to_seq in the publicly-facing
12309 operation-specific gimple_simplify overloads.
12310 (gimple_match_op::MAX_NUM_OPS): Define.
12311 (gimple_resimplify1): Replace rcode and ops with a single res_op
12312 parameter. Update call to gimple_simplify.
12313 (gimple_resimplify2): Likewise.
12314 (gimple_resimplify3): Likewise.
12315 (mprts_hook): Replace parameters with a gimple_match_op *.
12316 (maybe_build_generic_op): Likewise.
12317 (build_call_internal): Replace type, nargs and ops with
12318 a gimple_match_op *.
12319 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
12320 with a single gimple_match_op *. Update calls to mprts_hook,
12321 build_call_internal and gimple_simplified_result_is_gimple_val.
12322 Factor out code that is common to the tree_code and combined_fn cases.
12323 * genmatch.c (expr::gen_transform): Replace tem_code and
12324 tem_ops with a gimple_match_op called tem_op. Update calls
12325 to the gimple_resimplify functions and maybe_push_res_to_seq.
12326 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
12327 res_ops. Update call to the gimple_resimplify functions.
12328 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
12329 (decision_tree::gen): Make the functions take a gimple_match_op *
12330 called res_op instead of separate res_code and res_ops parameters.
12331 Update call accordingly.
12332 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
12333 and ops with a single res_op parameter. Update calls to
12334 maybe_build_generic_op and maybe_push_res_to_seq.
12335 (fold_stmt_1): Update calls to gimple_simplify and
12336 replace_stmt_with_simplification.
12337 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
12338 and gimple_simplified_result_is_gimple_val.
12339 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
12341 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
12342 with a gimple_match_op *.
12343 (vn_nary_build_or_lookup): Likewise. Update call to
12344 vn_nary_build_or_lookup_1.
12345 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
12346 gimple_match_op *. Update calls to the gimple_resimplify routines
12347 and to gimple_simplified_result_is_gimple_val.
12348 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
12349 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
12350 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
12351 (visit_nary_op): Likewise.
12352 (visit_reference_op_load): Likewise.
12354 2018-05-23 Luis Machado <luis.machado@linaro.org>
12356 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
12357 modifier for printing the step amount.
12359 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
12362 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
12365 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
12367 * doc/sourcebuild.texi (Endianness): New subsubsection.
12369 2018-05-23 Luis Machado <luis.machado@linaro.org>
12371 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12372 <prefetch_dynamic_strides>: New const bool field.
12373 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12374 prefetch_dynamic_strides.
12375 (exynosm1_prefetch_tune): Likewise.
12376 (thunderxt88_prefetch_tune): Likewise.
12377 (thunderx_prefetch_tune): Likewise.
12378 (thunderx2t99_prefetch_tune): Likewise.
12379 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
12381 (aarch64_override_options_internal): Update to set
12382 PARAM_PREFETCH_DYNAMIC_STRIDES.
12383 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12384 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12385 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12386 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12387 prefetch-dynamic-strides setting.
12389 2018-05-23 Luis Machado <luis.machado@linaro.org>
12391 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12392 <minimum_stride>: New const int field.
12393 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12394 minimum_stride field defaulting to -1.
12395 (exynosm1_prefetch_tune): Likewise.
12396 (thunderxt88_prefetch_tune): Likewise.
12397 (thunderx_prefetch_tune): Likewise.
12398 (thunderx2t99_prefetch_tune): Likewise.
12399 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
12400 <default_opt_level>: Set to 3.
12401 (aarch64_override_options_internal): Update to set
12402 PARAM_PREFETCH_MINIMUM_STRIDE.
12403 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12404 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12405 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12406 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12407 stride is constant and is below the minimum stride threshold.
12409 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12411 * config/arm/arm-cpus.in (mode26): Delete.
12412 (armv4): Delete mode26 reference.
12413 * config/arm/arm.c (arm_configure_build_target): Delete use of
12416 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
12418 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
12420 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
12421 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
12423 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
12424 (floatunsdidf2): Ditto.
12426 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
12428 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
12429 (fixuns_trunc<mode>si2_avx512f): Ditto.
12430 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
12431 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
12432 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
12434 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
12436 PR rtl-optimization/79985
12437 * df-scan.c (df_insn_refs_collect): Remove special case for
12438 global registers and asm statements.
12440 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
12442 * extend.texi (Global Register Variables): Rewrite the bullet list.
12443 Note that the register is available for allocation. Note that access
12444 via inline asm must use constraints. Add note about async-signal
12445 handlers. Remove paragraph about automagic register selection.
12447 2018-05-23 Richard Biener <rguenther@suse.de>
12449 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
12450 of fixed offset from memset VN.
12452 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
12454 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
12455 first_interp field.
12456 (alloc_cand_and_find_basis): Initialize first_interp field.
12457 (slsr_process_mul): Modify first_interp field.
12458 (slsr_process_add): Likewise.
12459 (slsr_process_cast): Modify first_interp field for each new
12461 (slsr_process_copy): Likewise.
12462 (dump_candidate): Dump first_interp field.
12463 (replace_mult_candidate): Process all interpretations, not just
12465 (replace_rhs_if_not_dup): Likewise.
12466 (replace_one_candidate): Likewise.
12468 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
12470 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
12472 (aarch64_needs_frame_chain): New function.
12473 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
12475 2018-05-23 Sudakshina Das <sudi.das@arm.com>
12478 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
12479 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
12480 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
12481 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
12482 as true for strict-align.
12483 (aarch64_can_inline_p): Perform checks even when callee has no
12484 attributes to check for strict alignment.
12485 * doc/extend.texi (AArch64 Function Attributes): Document
12487 * doc/invoke.texi: (AArch64 Options): Likewise.
12489 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
12491 PR tree-optimization/85853
12492 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
12493 the handling of the root of the node to...
12494 (vect_slp_analyze_node_operations_1): ...this new function,
12495 and run the whole thing with the child nodes' def types
12496 set according to their SLP node's def type.
12498 2018-05-23 Richard Biener <rguenther@suse.de>
12500 PR middle-end/85874
12501 * tree-data-ref.c (create_runtime_alias_checks): Defer
12502 and ignore overflow warnings.
12504 2018-05-23 Yury Gribov <tetra2005@gmail.com>
12506 PR tree-optimization/85822
12507 * tree-vrp.c (is_masked_range_test): Fix handling of negative
12510 2018-05-23 Richard Biener <rguenther@suse.de>
12512 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12513 memset constants via native_interpret_expr.
12515 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
12518 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
12520 (cgraph_node::create_alias): Likewise.
12521 (cgraph_node::get_availability): Check ifunc_resolver instead
12522 of looking up ifunc attribute.
12523 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
12524 * varasm.c (do_assemble_alias): Likewise.
12525 (assemble_alias): Likewise.
12526 (default_binds_local_p_3): Likewise.
12527 * cgraph.h (cgraph_node): Add ifunc_resolver.
12528 (cgraph_node::only_called_directly_or_aliased_p): Return false
12529 for IFUNC resolver.
12530 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
12532 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
12533 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
12534 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
12535 instead of looking up ifunc attribute.
12537 2018-05-22 Luis Machado <luis.machado@linaro.org>
12539 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
12541 2018-05-22 Martin Sebor <msebor@redhat.com>
12543 PR middle-end/85359
12544 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
12545 only when expasion succeeds.
12546 (expand_builtin_strcmp): Same.
12547 (expand_builtin_strncmp): Same.
12549 2018-05-22 Martin Sebor <msebor@redhat.com>
12551 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
12553 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
12554 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12556 * config/aarch64/aarch64-ldpstp.md: Replace uses of
12557 aarch64_mem_pair_operand with memory_operand and delete operand swapping
12559 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12560 Add check for legitimate_address.
12561 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
12562 (aarch64_swap_ldrstr_operands): New.
12563 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
12566 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
12567 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12569 * config/aarch64/aarch64.md: New patterns to generate stp
12571 (store_pair_sw, store_pair_dw): New patterns to generate stp for
12572 single words and double words.
12573 (load_pair_sw, load_pair_dw): Likewise.
12574 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
12576 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
12578 * config/aarch64/aarch64-ldpstp.md: Modify peephole
12579 for different mode ldpstp and add peephole for merged zero stores.
12580 Likewise for loads.
12581 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12583 (aarch64_gen_store_pair): Rename calls to match new patterns.
12584 (aarch64_gen_load_pair): Rename calls to match new patterns.
12585 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
12586 (load_pair<DREG:mode><DREG2:mode>): ... This.
12587 (store_pair<mode>): Rename to...
12588 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
12589 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
12590 New mode iterators.
12591 (V_INT_EQUIV): Handle SImode.
12592 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
12595 2018-05-22 Martin Sebor <msebor@redhat.com>
12598 * calls.c (maybe_warn_nonstring_arg): Use string length to set
12599 or ajust the presumed bound on an operation to avoid unnecessary
12602 2018-05-22 Martin Sebor <msebor@redhat.com>
12604 PR tree-optimization/85826
12605 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
12606 assuming that a DECL necesarily has a constant size.
12608 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
12610 PR middle-end/85862
12611 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
12613 2018-05-22 Richard Biener <rguenther@suse.de>
12615 PR tree-optimization/85834
12616 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
12617 non-constant and non-zero memset arguments.
12619 2018-05-22 Martin Liska <mliska@suse.cz>
12622 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
12624 2018-05-22 Richard Biener <rguenther@suse.de>
12626 PR tree-optimization/85863
12627 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
12628 comparisons when vectype is specified.
12629 (vectorizable_condition): Do not specify vectype for
12630 vect_is_simple_cond when SLP vectorizing.
12632 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
12635 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
12636 define __ibm128 as long double.
12637 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
12638 as a distinct type when IEEE 128-bit support is enabled.
12639 (init_float128_ieee): Fix up conversions between IFmode and IEEE
12640 128-bit types to use the correct functions.
12641 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
12642 convert between 128-bit floating point types that have different
12643 modes but the same representation, instead of using gen_lowpart to
12645 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
12647 (IFKF_reg): New attributes to give the register constraints for
12649 (extend<mode>tf2_internal): New insns to mark an explicit
12650 conversion between 128-bit floating point types that have a
12651 different mode but share the same representation.
12653 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
12655 PR tree-optimization/85814
12656 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
12657 a null return from get_strinfo when unsharing the next
12658 strinfo in the chain.
12660 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12663 * varasm.c (weak_finish): Clean up weak_decls.
12665 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12667 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
12668 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
12669 UNSPEC_UADALP values.
12670 * config/aarch64/iterators.md (ABAL): New int iterator.
12673 (sur): Add mappings for the above.
12674 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
12676 (aarch64_<sur>abal<mode>_4): Likewise.
12677 (aarch64_<sur>adalp<mode>_3): Likewise.
12678 (<sur>sadv16qi): New define_expand.
12680 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
12682 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
12683 (*movdf_internal): Ditto.
12684 (*rcpsf2_sse): Ditto.
12685 (*rsqrtsf2_sse): Ditto.
12686 (*sqrt<mode>2_sse): Ditto.
12688 2018-05-21 Tamar Christina <tamar.christina@arm.com>
12690 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
12692 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
12693 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
12694 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
12695 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
12697 * config/aarch64/arm_neon.h: Likewise.
12698 * config/aarch64/iterators.md (VQ_I): New.
12700 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
12702 * config.gcc: Add arc/t-multilib-linux to tmake_file for
12704 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
12707 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12709 * config/nds32/constraints.md (S): New constraint.
12710 * config/nds32/nds32.md (call_internal): Use constraint S.
12711 (call_value_internal): Likewise.
12712 (sibcall_internal): Likewise.
12713 (sibcall_value_internal): Likewise.
12715 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12716 Chung-Ju Wu <jasonwucj@gmail.com>
12718 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
12719 into consideration.
12721 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12722 Chung-Ju Wu <jasonwucj@gmail.com>
12724 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
12725 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
12726 (nds32_rtx_costs_impl): Simplify.
12727 (nds32_address_cost_impl): Simplify.
12728 (nds32_init_rtx_costs): New function.
12729 (nds32_rtx_costs_speed_prefer): Likewise.
12730 (nds32_rtx_costs_size_prefer): Likewise.
12731 (nds32_address_cost_speed_prefer): Likewise.
12732 (nds32_address_cost_speed_fwprop): Likewise.
12733 (nds32_address_cost_size_prefer): Likewise.
12734 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
12735 * config/nds32/nds32.c (nds32_option_override): Use
12736 nds32_init_rtx_costs function.
12738 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12740 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
12741 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
12742 (TARGET_PIPELINE_N8): Likewise.
12743 (TARGET_PIPELINE_N10): Likewise.
12744 (TARGET_PIPELINE_N13): Likewise.
12745 (TARGET_PIPELINE_GRAYWOLF): Likewise.
12747 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
12749 * config/nds32/nds32-fpu.md: Update copyright year.
12751 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12753 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
12755 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12757 * config/nds32/nds32.c
12758 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
12759 * config/nds32/nds32.opt (minline-asm-r15): New option.
12761 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12763 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
12765 * config/nds32/nds32.md (abssi2): New pattern.
12767 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
12769 * config/i386/i386.md (rex64namesuffix): New mode attribute.
12770 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
12771 Merge insn pattern from sse_cvtsi2ss<round_name> and
12772 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
12773 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
12774 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
12775 using SWI48 mode iterator.
12776 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
12777 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
12778 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
12779 pattern from sse_cvttss2si<round_saeonly_name>
12780 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
12781 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
12782 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
12783 using SWI48 mode iterator.
12784 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
12785 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
12786 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
12787 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
12788 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
12789 using SWI48 mode iterator.
12790 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
12791 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
12792 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
12793 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
12794 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
12795 SWI48 mode iterator.
12796 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
12797 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
12798 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
12799 pattern from sse_cvttsd2si<round_saeonly_name>
12800 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
12802 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12804 * config/nds32/nds32-md-auxiliary.c
12805 (nds32_valid_smw_lwm_base_p): Refine.
12806 (nds32_output_smw_single_word): Refine.
12807 (nds32_output_smw_double_word): New.
12808 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
12810 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12812 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
12813 (nds32_output_stack_pop): Refine.
12814 (nds32_expand_unaligned_load): Refine.
12815 (nds32_expand_unaligned_store): Refine.
12817 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12818 Chung-Ju Wu <jasonwucj@gmail.com>
12820 * config/nds32/constants.md: Add TP_REGNUM constant.
12821 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
12822 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
12824 * config/nds32/nds32-doubleword.md: Consider flag_pic.
12825 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
12826 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
12827 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
12828 and PIC code generation.
12829 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
12831 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
12833 * config/nds32/nds32.md: Support TLS and PIC.
12834 * config/nds32/nds32.c: Support TLS and PIC.
12835 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
12836 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
12839 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12841 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
12842 mode with E_ prefix.
12844 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12845 Chung-Ju Wu <jasonwucj@gmail.com>
12847 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
12848 * config/nds32/nds32-md-auxiliary.c
12849 (symbolic_reference_mentioned_p): New.
12850 (nds32_legitimize_ict_address): New.
12851 (nds32_expand_ict_move): New.
12852 (nds32_indirect_call_referenced_p): New.
12853 (nds32_symbol_binds_local_p): Delete.
12854 (nds32_long_call_p): Modify.
12855 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
12856 * config/nds32/nds32-protos.h
12857 (symbolic_reference_mentioned_p): Declare.
12858 (nds32_legitimize_ict_address): Declare.
12859 (nds32_expand_ict_move): Declare.
12860 (nds32_indirect_call_referenced_p): Declare.
12861 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
12862 (nds32_relax_group): Use nds32_ict_const_p as condition.
12863 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12864 (nds32_asm_file_start): Output ict_model directive in asm code.
12865 (nds32_legitimate_address_p): Consider indirect call.
12866 (nds32_print_operand): Consider indirect call.
12867 (nds32_print_operand_address): Consider indirect call.
12868 (nds32_insert_attributes): Handle "indirect_call" attribute.
12869 (TARGET_LEGITIMATE_ADDRESS_P): Define.
12870 (TARGET_LEGITIMATE_CONSTANT_P): Define.
12871 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12872 (TARGET_DELEGITIMIZE_ADDRESS): Define.
12873 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12874 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12875 (TARGET_ICT_MODEL_SMALL): Define.
12876 (TARGET_ICT_MODEL_LARGE): Define.
12877 * config/nds32/nds32.md (movsi): Consider ict model.
12878 (call, call_value): Consider ict model.
12879 (sibcall, sibcall_value): Consider ict model.
12880 * config/nds32/nds32.opt (mict-model): New option.
12881 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12884 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
12885 Monk Chiang <sh.chiang04@gmail.com>
12886 Jim Wilson <jimw@sifive.com>
12888 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12889 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
12890 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12891 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12892 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
12893 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12894 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12895 compute save_libcall_adjustment properly.
12896 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12897 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12898 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12899 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12900 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12901 (ABI_SPEC): Handle mabi=ilp32e.
12902 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12903 (RVE): Add RVE mask.
12904 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12905 <-march>: Add rv32e as an example.
12907 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
12910 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12911 (intra_create_variable_infos): Handle C++ constructors.
12913 2018-05-18 Martin Liska <mliska@suse.cz>
12915 * passes.def: Remove a redundant pass.
12917 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
12920 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12922 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12924 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12926 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12928 (armv2, armv2a, armv3, armv3m): Delete architectures.
12929 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12930 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12931 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12933 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12934 (*mulsidi3adddi): Likewise.
12935 (mulsidi3): Likewise.
12936 (*mulsidi3_nov6): Likewise.
12937 (umulsidi3): Likewise.
12938 (umulsidi3_nov6): Likewise.
12939 (umaddsidi4): Likewise.
12940 (*umulsidi3adddi): Likewise.
12941 (smulsi3_highpart): Likewise.
12942 (*smulsi3_highpart_nov6): Likewise.
12943 (umulsi3_highpart): Likewise.
12944 (*umulsi3_highpart_nov6): Likewise.
12945 * config/arm/arm.h (arm_arch3m): Delete.
12946 * config/arm/arm.c (arm_arch3m): Delete.
12947 (arm_option_override_internal): Update armv3-related comment.
12948 (arm_configure_build_target): Delete use of isa_bit_mode32.
12949 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12950 (arm_rtx_costs_internal): Delete check of arm_arch3m.
12951 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12952 (mulsa3): Likewise.
12953 (mulusa3): Likewise.
12954 * config/arm/arm-protos.h (arm_arch3m): Delete.
12955 * config/arm/arm-tables.opt: Regenerate.
12956 * config/arm/arm-tune.md: Likewise.
12957 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12958 deleted architectures.
12960 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12962 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12963 (armv5t, armv5te): New features.
12964 (ARMv5, ARMv5e): Delete fgroups.
12965 (ARMv5t, ARMv5te): Adjust for above changes.
12966 (ARMv6m): Likewise.
12967 (armv5, armv5e): Delete arches.
12968 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12970 (*call_reg_arm): Likewise.
12971 (*call_value_reg_armv5): Likewise.
12972 (*call_value_reg_arm): Likewise.
12973 (*call_symbol): Likewise.
12974 (*call_value_symbol): Likewise.
12975 (*sibcall_insn): Likewise.
12976 (*sibcall_value_insn): Likewise.
12977 (clzsi2): Likewise.
12978 (prefetch): Likewise.
12979 (define_split and define_peephole2 dependent on arm_arch5):
12981 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12983 (TARGET_ARM_QBIT): Likewise.
12984 (TARGET_DSP_MULTIPLY): Likewise.
12985 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12986 (arm_arch5, arm_arch5e): Delete.
12987 (arm_arch5t, arm_arch5te): Declare.
12988 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12989 (arm_arch5t): Declare.
12990 (arm_option_reconfigure_globals): Update for the above.
12991 (arm_options_perform_arch_sanity_checks): Update comment, replace
12992 use of arm_arch5 with arm_arch5t.
12993 (use_return_insn): Likewise.
12994 (arm_emit_call_insn): Likewise.
12995 (output_return_instruction): Likewise.
12996 (arm_final_prescan_insn): Likewise.
12997 (arm_coproc_builtin_available): Likewise.
12998 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12999 arm_arch5e with arm_arch5t and arm_arch5te.
13000 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
13001 (arm_arch5t, arm_arch5te): Declare.
13002 * config/arm/arm-tables.opt: Regenerate.
13003 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
13004 * config/arm/t-multilib: Likewise.
13005 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
13006 instead of arm_arch5.
13007 (*call_reg_thumb1): Likewise.
13008 (*call_value_reg_thumb1_v5): Likewise.
13009 (*call_value_reg_thumb1): Likewise.
13010 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
13012 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
13014 2018-05-18 Martin Liska <mliska@suse.cz>
13016 PR gcov-profile/84846
13017 * doc/gcov.texi: Document -t option of gcov tool.
13019 2018-05-18 Martin Liska <mliska@suse.cz>
13021 PR gcov-profile/84846
13022 * gcov.c (print_usage): Add new -t option.
13023 (process_args): Handle the option.
13024 (generate_results): Use stdout as output when requested by
13027 2018-05-18 Martin Liska <mliska@suse.cz>
13029 PR gcov-profile/84846
13030 * coverage.c (coverage_init): Write PWD to .gcno file.
13031 * doc/gcov.texi: Document how working directory is printed.
13032 * gcov-dump.c (dump_gcov_file): Print PWD.
13033 * gcov.c (output_intermediate_file): Likewise.
13034 (read_graph_file): Read PWD string.
13035 (output_lines): Print PWD.
13037 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13039 PR middle-end/85817
13040 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
13041 for retval and return false if all args to phi are zero.
13043 2018-05-18 Richard Biener <rguenther@suse.de>
13045 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
13047 (evrp_dom_walker::before_dom_children): Call it.
13049 2018-05-18 Richard Biener <rguenther@suse.de>
13051 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
13052 results when processing array refs with variable index.
13054 2018-05-18 Toon Moene <toon@moene.org>
13056 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
13057 directly after that of -floop-interchange. Indicate that both
13058 options are enabled by default when specifying -O3.
13060 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13062 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
13063 iterator. Delete separate integer-mode vec_set<mode> expander.
13064 (aarch64_simd_vec_setv2di): Delete.
13065 (vec_setv2di): Delete.
13066 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
13067 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
13068 the "w, r" alternative.
13070 2018-05-18 Martin Liska <mliska@suse.cz>
13072 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
13073 * tree-pass.h (make_pass_lower_switch_O0): New function.
13074 * tree-switch-conversion.c (node_has_low_bound): Remove.
13075 (node_has_high_bound): Likewise.
13076 (node_is_bounded): Likewise.
13077 (class pass_lower_switch): Make it a template type and create
13079 (pass_lower_switch::execute): Add template argument.
13080 (make_pass_lower_switch): New function.
13081 (make_pass_lower_switch_O0): New function.
13082 (do_jump_if_equal): Remove.
13083 (emit_case_nodes): Simplify to just handle all 3 cases and leave
13084 all the hard work to tree optimization passes.
13086 2018-05-18 Martin Liska <mliska@suse.cz>
13088 * dbgcnt.c (limit_low): Renamed from limit.
13089 (limit_high): New variable.
13090 (dbg_cnt_is_enabled): Check for upper limit.
13091 (dbg_cnt): Adjust dumping.
13092 (dbg_cnt_set_limit_by_index): Add new argument for high
13094 (dbg_cnt_set_limit_by_name): Likewise.
13095 (dbg_cnt_process_single_pair): Parse new format.
13096 (dbg_cnt_process_opt): Use strtok.
13097 (dbg_cnt_list_all_counters): Remove 'value' and add
13099 * doc/invoke.texi: Document changes.
13101 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
13103 * doc/sourcebuild.texi (scalar_all_fma): Document.
13104 * tree.def (FMA_EXPR): Delete.
13105 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
13106 * internal-fn.c (ternary_direct): New macro.
13107 (expand_ternary_optab_fn): Likewise.
13108 (direct_ternary_optab_supported_p): Likewise.
13109 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
13110 * builtins.c (fold_builtin_fma): Delete.
13111 (fold_builtin_3): Don't call it.
13112 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
13113 * expr.c (expand_expr_real_2): Likewise.
13114 * fold-const.c (operand_equal_p): Likewise.
13115 (fold_ternary_loc): Likewise.
13116 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
13117 * gimple.c (DEFTREECODE): Likewise.
13118 * gimplify.c (gimplify_expr): Likewise.
13119 * optabs-tree.c (optab_for_tree_code): Likewise.
13120 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
13121 * tree-eh.c (operation_could_trap_p): Likewise.
13122 (stmt_could_throw_1_p): Likewise.
13123 * tree-inline.c (estimate_operator_cost): Likewise.
13124 * tree-pretty-print.c (dump_generic_node): Likewise.
13125 (op_code_prio): Likewise.
13126 * tree-ssa-loop-im.c (stmt_cost): Likewise.
13127 * tree-ssa-operands.c (get_expr_operands): Likewise.
13128 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
13129 * fold-const-call.h (fold_fma): Delete.
13130 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
13131 CFN_FNMA and CFN_FNMS.
13132 (fold_fma): Delete.
13133 * genmatch.c (combined_fn): New enum.
13134 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
13135 (commutative_op): New function.
13136 (commutate): Use it. Handle more than 2 operands.
13137 (dt_operand::gen_gimple_expr): Use commutative_op.
13138 (parser::parse_expr): Allow :c to be used with non-binary
13139 operators if the commutative operand is known.
13140 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
13141 CFN_FMS, CFN_FNMA and CFN_FNMS.
13142 (backprop::process_assign_use): Remove FMA_EXPR handling.
13143 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
13144 (gen_hsa_fma): New function.
13145 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
13146 IFN_FNMA and IFN_FNMS.
13147 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
13148 * gimple-fold.h (follow_all_ssa_edges): Declare.
13149 * gimple-fold.c (follow_all_ssa_edges): New function.
13150 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
13151 gimple_build interface and use follow_all_ssa_edges to fold the result.
13152 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
13153 instead of checking for optabs directly.
13154 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
13155 rather than FMA_EXPRs.
13156 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
13157 call to IFN_FMA instead of an FMA_EXPR.
13159 2018-05-17 Jim Wilson <jimw@sifive.com>
13161 * expr.c (do_tablejump): When converting index to Pmode, if we have a
13162 sign extended promoted subreg, and the range does not have the sign bit
13163 set, then do a sign extend.
13165 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
13166 test, check for sign extended subreg and/or constant operands, and
13167 do a sign extend in that case.
13169 2018-05-17 Steve Ellcey <sellcey@cavium.com>
13171 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
13172 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
13174 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
13175 Change logics_shift_reg to logics_shift_imm.
13176 (thunderx2t99_fp_loadpair_basic): Delete.
13177 (thunderx2t99_fp_storepair_basic): Delete.
13178 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
13179 (thunderx2t99_asimd_polynomial): Delete.
13180 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
13181 and neon_fp_mul_d_scalar_q.
13182 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
13183 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
13184 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
13185 (thunderx2t99_asimd_lut): Add missing tbl types.
13186 (thunderx2t99_asimd_ext): Delete.
13187 (thunderx2t99_asimd_load1_1_mult): Delete.
13188 (thunderx2t99_asimd_load1_2_mult): Delete.
13189 (thunderx2t99_asimd_load1_ldp): New.
13190 (thunderx2t99_asimd_load1): New.
13191 (thunderx2t99_asimd_load2): Add missing *load2* types.
13192 (thunderx2t99_asimd_load3): New.
13193 (thunderx2t99_asimd_load4): New.
13194 (thunderx2t99_asimd_store1_1_mult): Delete.
13195 (thunderx2t99_asimd_store1_2_mult): Delete.
13196 (thunderx2t99_asimd_store2_mult): Delete.
13197 (thunderx2t99_asimd_store2_onelane): Delete.
13198 (thunderx2t99_asimd_store_stp): New.
13199 (thunderx2t99_asimd_store1): New.
13200 (thunderx2t99_asimd_store2): New.
13201 (thunderx2t99_asimd_store3): New.
13202 (thunderx2t99_asimd_store4): New.
13204 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
13206 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
13207 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
13209 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
13210 Segher Boessenkool <segher@kernel.crashing.org>
13213 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
13216 2018-05-17 Richard Biener <rguenther@suse.de>
13218 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
13219 for pruning loop and prune defs feeding only already visited PHIs.
13221 2018-05-17 Richard Biener <rguenther@suse.de>
13223 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
13225 2018-05-17 Bin Cheng <bin.cheng@arm.com>
13226 Richard Biener <rguenther@suse.de>
13228 PR tree-optimization/85793
13229 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
13230 for VMAT_ELEMENTWISE.
13232 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
13234 * internal-fn.h (lookup_internal_fn): Declare
13235 * internal-fn.c (lookup_internal_fn): New function.
13236 * gimple.c (gimple_build_call_from_tree): Handle calls to
13237 internal functions.
13238 * gimple-pretty-print.c (dump_gimple_call): Print "." before
13239 internal function names.
13240 * tree-pretty-print.c (dump_generic_node): Likewise.
13241 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
13243 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
13245 * gimple-fold.h (gimple_build): Make the function forms take
13246 combined_fn rather than built_in_function.
13247 (gimple_simplify): Likewise.
13248 * gimple-match-head.c (gimple_simplify): Likewise.
13249 * gimple-fold.c (gimple_build): Likewise.
13250 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
13251 rather than gimple_build_call_internal.
13252 (get_initial_defs_for_reduction): Likewise.
13253 (vect_create_epilog_for_reduction): Likewise.
13254 (vectorizable_live_operation): Likewise.
13256 2018-05-17 Martin Liska <mliska@suse.cz>
13258 * gimple-ssa-sprintf.c (format_directive): Do not use
13259 space in between 'G_' and '('.
13261 2018-05-17 Jakub Jelinek <jakub@redhat.com>
13264 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
13265 even if the mask is not all ones.
13268 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
13270 (ix86_gimple_fold_builtin): Likewise.
13273 * config/i386/i386.c: Include tree-vector-builder.h.
13274 (ix86_vector_shift_count): New function.
13275 (ix86_fold_builtin): Fold shift builtins by scalar count.
13276 (ix86_gimple_fold_builtin): Likewise.
13278 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
13279 _mm512_setzero): New intrinsics.
13281 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
13282 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13284 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
13285 code generation for cases where splatting a value is not useful.
13286 * simplify-rtx.c (simplify_ternary_operation): Simplify
13287 vec_merge across a vec_duplicate and a paradoxical subreg forming
13288 a vector mode to a vec_concat.
13290 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
13292 * config.gcc: Support "goldmont-plus".
13293 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13295 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13296 PROCESSOR_GOLDMONT_PLUS.
13297 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
13298 (processor_target_table): Add "goldmont-plus".
13299 (PTA_GOLDMONT_PLUS): Define.
13300 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
13301 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
13302 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
13303 (fold_builtin_cpu): Add "goldmont-plus".
13304 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
13305 (ix86_option_override_internal): Add "goldmont-plus".
13306 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
13307 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
13308 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
13309 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
13311 2018-05-17 Richard Biener <rguenther@suse.de>
13313 PR tree-optimization/85757
13314 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
13315 remove defs that only feed that PHI from further processing.
13317 2018-05-16 Jim Wilson <jimw@sifive.com>
13319 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
13321 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
13323 2018-05-16 Mark Wielaard <mark@klomp.org>
13325 * dwarf2out.c (count_index_strings): New function.
13326 (output_indirect_strings): Call count_index_strings and generate
13327 header for dwarf_version >= 5.
13329 2018-05-16 Mark Wielaard <mark@klomp.org>
13331 * dwarf2out.c (dwarf_FORM): New function.
13332 (set_indirect_string): Use dwarf_FORM.
13333 (reset_indirect_string): Likewise.
13334 (size_of_die): Likewise.
13335 (value_format): Likewise.
13336 (output_die): Likewise.
13337 (add_skeleton_AT_string): Likewise.
13338 (output_macinfo_op): Likewise.
13339 (index_string): Likewise.
13340 (output_index_string_offset): Likewise.
13341 (output_index_string): Likewise.
13342 (count_index_strings): Likewise.
13344 2018-05-16 Carl Love <cel@us.ibm.com>
13346 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13347 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
13349 2018-05-16 Martin Jambor <mjambor@suse.cz>
13351 * ipa-prop.c (ipa_free_all_edge_args): Remove.
13352 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
13354 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
13356 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
13357 (fnma<mode>4): Likewise.
13358 (fms<mode>4): Likewise.
13359 (fnms<mode>4): Likewise.
13360 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
13361 (aarch64_fnma<mode>4): Likewise.
13362 (aarch64_fms<mode>4): Likewise.
13363 (aarch64_fnms<mode>4): Likewise.
13364 (aarch64_fnmadd<mode>4): Likewise.
13366 2018-05-16 Jason Merrill <jason@redhat.com>
13368 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
13370 2018-05-16 Richard Biener <rguenther@suse.de>
13372 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
13373 (dump_stmt_cost): Declare.
13374 (add_stmt_cost): Dump cost we add.
13375 (add_stmt_costs): New function.
13376 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
13377 No longer exported.
13378 (vect_analyze_stmt): Adjust prototype.
13379 (vectorizable_condition): Likewise.
13380 (vectorizable_live_operation): Likewise.
13381 (vectorizable_reduction): Likewise.
13382 (vectorizable_induction): Likewise.
13383 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
13384 cost vector to pass to vectorizable_ and record afterwards.
13385 (vect_model_reduction_cost): Take cost vector argument and adjust.
13386 (vect_model_induction_cost): Likewise.
13387 (vectorizable_reduction): Likewise.
13388 (vectorizable_induction): Likewise.
13389 (vectorizable_live_operation): Likewise.
13390 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
13391 SLP_TREE_NUMBER_OF_VEC_STMTS.
13392 (vect_analyze_slp_cost_1): Remove.
13393 (vect_analyze_slp_cost): Likewise.
13394 (vect_slp_analyze_node_operations): Take visited args and
13395 a target cost vector. Avoid processing already visited stmt sets.
13396 (vect_slp_analyze_operations): Use a local cost vector to gather
13397 costs and register those of non-discarded instances.
13398 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
13399 (vect_schedule_slp_instance): Remove copying of
13400 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
13402 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
13403 adding cost. Record cost entry location.
13404 (vect_prologue_cost_for_slp_op): Function to compute cost of
13405 a constant or invariant generated for SLP vect in the prologue,
13406 split out from vect_analyze_slp_cost_1.
13407 (vect_model_simple_cost): Make static. Adjust for SLP costing.
13408 (vect_model_promotion_demotion_cost): Likewise.
13409 (vect_model_store_cost): Likewise, make static.
13410 (vect_model_load_cost): Likewise.
13411 (vectorizable_bswap): Add cost vector arg and adjust.
13412 (vectorizable_call): Likewise.
13413 (vectorizable_simd_clone_call): Likewise.
13414 (vectorizable_conversion): Likewise.
13415 (vectorizable_assignment): Likewise.
13416 (vectorizable_shift): Likewise.
13417 (vectorizable_operation): Likewise.
13418 (vectorizable_store): Likewise.
13419 (vectorizable_load): Likewise.
13420 (vectorizable_condition): Likewise.
13421 (vectorizable_comparison): Likewise.
13422 (can_vectorize_live_stmts): Likewise.
13423 (vect_analyze_stmt): Likewise.
13424 (vect_transform_stmt): Adjust calls to vectorizable_*.
13425 * tree-vectorizer.c: Include gimple-pretty-print.h.
13426 (dump_stmt_cost): New function.
13428 2018-05-16 Richard Biener <rguenther@suse.de>
13430 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
13431 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
13432 * tree-ssa-dse.c: Include tree-ssa-loop.h.
13433 (check_name): New callback.
13434 (dse_classify_store): Track cycles via a visited bitmap of PHI
13435 defs and simplify handling of in-loop and across loop dead stores
13436 and properly fail for loop-variant refs. Handle byte-tracking with
13437 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
13440 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
13442 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
13443 (vect_get_mask_type_for_stmt): Likewise.
13444 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
13446 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
13447 to determine the statement's vector type and the vector type that
13448 should be used for calculating nunits. Deal with cases in which
13449 the type has to be deferred.
13450 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
13451 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
13452 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
13453 (vect_determine_vf_for_stmt): New functions, split out from...
13454 (vect_determine_vectorization_factor): ...here.
13455 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
13456 (vect_get_mask_type_for_stmt): New functions, split out from
13457 vect_determine_vectorization_factor.
13459 2018-05-16 Richard Biener <rguenther@suse.de>
13461 * tree-cfg.c (verify_gimple_assign_ternary): Properly
13462 verify the [VEC_]COND_EXPR embedded comparison.
13464 2018-05-15 Martin Sebor <msebor@redhat.com>
13466 PR tree-optimization/85753
13467 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
13468 RECORD_TYPE in addition to ARRAY_TYPE.
13470 2018-05-15 Martin Sebor <msebor@redhat.com>
13472 PR middle-end/85643
13473 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
13475 2018-05-15 Richard Biener <rguenther@suse.de>
13477 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
13478 add by_clobber_p one. Change algorithm to collect all defs
13479 representing uses we need to walk and try reducing them to
13480 a single one before failing.
13481 (dse_dom_walker::dse_optimize_stmt): Adjust.
13483 2018-05-13 Mark Wielaard <mark@klomp.org>
13485 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
13486 (size_of_loc_descr): Likewise.
13487 (output_loc_operands): Likewise.
13488 (output_loc_operands_raw): Likewise.
13489 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
13490 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
13491 (hash_loc_operands): Likewise.
13492 (compare_loc_operands): Likewise.
13494 2018-05-14 Mark Wielaard <mark@klomp.org>
13496 * dwarf2out.c (count_index_addrs): New function.
13497 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
13499 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13501 PR tree-optimization/83648
13502 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
13503 return value as malloc candidate.
13505 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13508 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
13509 param as true in call to suggest_attribute.
13511 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
13513 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
13514 -mreadonly-in-sdata.
13516 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13518 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
13520 (aarch64_crypto_aesd_fused): Likewise.
13522 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
13524 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
13525 (movsi_aarch64): Likewise.
13526 (load_pairsi): Likewise.
13527 (load_pairdi): Likewise.
13528 (store_pairsi): Likewise.
13529 (store_pairdi): Likewise.
13530 (load_pairsf): Likewise.
13531 (load_pairdf): Likewise.
13532 (store_pairsf): Likewise.
13533 (store_pairdf): Likewise.
13534 (zero_extend): Likewise.
13535 (trunc): Swap alternatives.
13536 (fcvt_target): Add '?' to prefer w over r.
13538 2018-05-14 Jakub Jelinek <jakub@redhat.com>
13541 * config/i386/i386.md: Disallow non-commutative arithmetics in
13542 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
13543 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
13544 in the peephole2 before it.
13546 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
13548 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
13549 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
13550 (ix86_handle_option): Handle -mcldemote.
13551 * config.gcc: New header.
13552 * config/i386/cldemoteintrin.h: New file.
13553 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
13554 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13556 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13557 OPTION_MASK_ISA_CLDEMOTE.
13558 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
13559 (ix86_valid_target_attribute_inner_p): Ditto.
13560 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
13561 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
13562 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
13563 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
13564 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
13566 * config/i386/i386.opt: Add -mcldemote.
13567 * config/i386/x86intrin.h: New header.
13568 * doc/invoke.texi: Add -mcldemote.
13570 2018-05-14 Richard Biener <rguenther@suse.de>
13572 * doc/match-and-simplify.texi: Adjust :s documentation.
13574 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
13576 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
13577 intended memcpy size.
13578 (REORDER_45): Likewise.
13580 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
13582 * sort.cc: New file.
13583 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
13584 * vec.c (qsort_chk): Use gcc_qsort.
13585 * Makefile.in (OBJS-libcommon): Add sort.o.
13586 (build/sort.o): New target. Use it...
13587 (BUILD_RTL): ... here, and...
13588 (build/gencfn-macros): ... here, and...
13589 (build/genmatch): ... here.
13591 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13592 Chung-Ju Wu <jasonwucj@gmail.com>
13594 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
13595 * config/nds32/nds32-graywolf.md: New file.
13596 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
13597 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
13599 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
13600 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
13601 * config/nds32/nds32.md (pipeline_model): Add graywolf.
13602 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
13603 * config/nds32/pipelines.md: Include n15 settings.
13605 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13606 Chung-Ju Wu <jasonwucj@gmail.com>
13608 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
13609 * config/nds32/nds32-n13.md: New file.
13610 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
13611 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
13613 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
13614 * config/nds32/nds32.md (pipeline_model): Add n13.
13615 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
13616 * config/nds32/pipelines.md: Include n13 settings.
13618 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13619 Chung-Ju Wu <jasonwucj@gmail.com>
13621 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
13622 * config/nds32/nds32-n10.md: New file.
13623 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
13624 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
13626 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
13627 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
13628 * config/nds32/nds32.md (pipeline_model): Add n10.
13629 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
13630 * config/nds32/pipelines.md: Include n10 settings.
13632 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
13633 Kito Cheng <kito.cheng@gmail.com>
13634 Chung-Ju Wu <jasonwucj@gmail.com>
13636 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
13637 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13638 Add enum values for DSP extension instructions.
13639 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
13641 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
13642 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
13643 New code iterators.
13644 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
13645 * config/nds32/nds32-dspext.md: New file for DSP implementation.
13646 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
13647 * config/nds32/nds32-intrinsic.md: Likewise.
13648 * config/nds32/nds32_intrinsic.h: Likewise.
13649 * config/nds32/nds32-md-auxiliary.c: Likewise.
13650 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
13651 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
13652 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
13653 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
13654 * config/nds32/nds32-protos.h: New declarations for DSP extension.
13655 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
13656 TYPE_DMAC in switch statement.
13657 * config/nds32/nds32.c: New checking and implementation for DSP
13658 extension instructions.
13659 * config/nds32/nds32.h: Likewise.
13660 * config/nds32/nds32.md: Likewise.
13661 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
13662 * config/nds32/predicates.md: Implement new predicates for DSP
13665 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
13667 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
13668 Reformat alternatives and attributes so it is easier to identify
13669 which constraints/attributes go with which instruction.
13670 (mov<mode>_hardfloat32, FMOVE64): Likewise.
13671 (mov<mode>_softfloat32, FMOVE64): Likewise.
13672 (mov<mode>_hardfloat64, FMOVE64): Likewise.
13673 (mov<mode>_softfloat64, FMOVE64): Likewise.
13675 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
13677 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13679 (Basic PowerPC Built-in Functions): The new name of the
13680 subsection previously known as "PowerPC Built-in Functions".
13681 (Basic PowerPC Built-in Functions Available on all Configurations):
13683 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
13684 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
13685 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
13686 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
13688 2018-05-11 Martin Jambor <mjambor@suse.cz>
13691 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
13694 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13697 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
13699 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
13701 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
13702 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
13703 (ix86_handle_option): Handle -mwaitpkg.
13704 * config.gcc: New header.
13705 * config/i386/cpuid.h (bit_WAITPKG): New bit.
13706 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
13707 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
13709 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13710 OPTION_MASK_ISA_WAITPKG.
13711 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
13712 (ix86_option_override_internal): Add PTA_WAITPKG.
13713 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
13714 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
13715 IX86_BUILTIN_TPAUSE.
13716 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
13717 __builtin_ia32_umwait and __builtin_ia32_tpause.
13718 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
13719 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
13720 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
13721 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
13722 UNSPECV_TPAUSE): New.
13723 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
13724 * config/i386/i386.opt: Add -mwaitpkg.
13725 * config/i386/waitpkgintrin.h: New file.
13726 * config/i386/x86intrin.h: New header.
13727 * doc/invoke.texi: Add -mwaitpkg.
13729 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13732 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
13734 (cortex-m0): Use armv6s-m isa.
13735 (cortex-m0plus): Likewise.
13736 (cortex-m1): Likewise.
13737 (cortex-m0.small-multiply): Likewise.
13738 (cortex-m0plus.small-multiply): Likewise.
13739 (cortex-m1.small-multiply): Likewise.
13741 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
13742 Jakub Jelinek <jakub@redhat.com>
13744 PR tree-optimization/85692
13745 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
13746 source permute as well.
13748 2018-05-11 Martin Liska <mliska@suse.cz>
13751 * doc/extend.texi: Document LLVM style format for no_sanitize
13754 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
13756 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
13757 mode_supports_vsx_dform_quad to mode_supports_dq_form.
13758 (mode_supports_vsx_dform_quad): Likewise.
13759 (mode_supports_vmx_dform): Move these functions to be next to the
13760 other mode_supports functions.
13761 (mode_supports_dq_form): Likewise.
13762 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
13763 mode_supports_dq_form.
13764 (reg_offset_addressing_ok_p): Likewise.
13765 (offsettable_ok_by_alignment): Likewise.
13766 (rs6000_legitimate_offset_address_p): Likewise.
13767 (legitimate_lo_sum_address_p): Likewise.
13768 (rs6000_legitimize_address): Likewise.
13769 (rs6000_legitimize_reload_address): Likewise.
13770 (rs6000_secondary_reload_inner): Likewise.
13771 (rs6000_preferred_reload_class): Likewise.
13772 (rs6000_output_move_128bit): Likewise.
13774 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13776 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
13777 Generate SImode target register for null target.
13778 <case IX86_BUILTIN_XGETBV>: Ditto.
13779 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
13780 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
13782 2018-05-10 Carl Love <cel@us.ibm.com>
13784 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13785 dcbtt and dcbtstt if operands[2] is 0.
13787 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13790 * config/i386/sse.md (usadv64qi): New expander.
13792 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
13794 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
13795 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
13796 -maltivec=be support.
13797 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
13798 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
13799 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
13800 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
13801 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
13802 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
13803 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
13804 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
13805 altivec_vsumsws): Adjust.
13806 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
13807 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
13808 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
13810 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
13811 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
13812 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
13813 (altivec_lve<VI_char>x): Delete expand.
13814 (*altivec_lve<VI_char>x_internal): Rename to...
13815 (altivec_lve<VI_char>x): ... this.
13816 (altivec_lvxl_<mode>): Delete expand.
13817 (*altivec_lvxl_<mode>_internal): Rename to ...
13818 (altivec_lvxl_<mode>): ... this.
13819 (altivec_stvxl_<mode>): Delete expand.
13820 (*altivec_stvxl_<mode>_internal): Rename to ...
13821 (altivec_stvxl_<mode>): ... this.
13822 (altivec_stve<VI_char>x): Delete expand.
13823 (*altivec_stve<VI_char>x_internal): Rename to ...
13824 (altivec_stve<VI_char>x): ... this.
13825 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
13826 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
13827 reduc_plus_scal_<mode>): Adjust.
13828 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
13830 (rs6000_cpu_cpp_builtins): Adjust.
13831 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
13832 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
13833 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
13834 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
13835 -maltivec=be support.
13836 (rs6000_split_vec_extract_var): Adjust.
13837 (rs6000_split_v4si_init): Adjust.
13838 (swap_selector_for_mode): Delete.
13839 (altivec_expand_lvx_be, altivec_expand_stvx_be,
13840 altivec_expand_stvex_be): Delete.
13841 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
13842 -maltivec=be support.
13843 (rs6000_gimple_fold_builtin): Ditto.
13844 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
13846 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
13847 (TARGET_DIRECT_MOVE_64BIT): Adjust.
13848 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
13849 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
13850 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
13851 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
13852 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
13853 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
13854 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
13855 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
13856 anonymous split): Adjust.
13857 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
13858 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
13860 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
13862 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
13863 when --with-gxx-include-dir is also specified.
13864 * configure: Regenerate.
13866 2018-05-09 Jim Wilson <jimw@sifive.com>
13869 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13870 * config/riscv/t-withmultilib: New.
13871 * config/riscv/withmultilib.h: New.
13872 * doc/install.texi: Document RISC-V --with-multilib-list support.
13874 2018-05-09 Richard Biener <rguenther@suse.de>
13876 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13878 (vect_bb_vectorization_profitable_p): Adjust. Compute
13879 actual scalar cost using the cost vector and the add_stmt_cost
13882 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13884 PR rtl-optimization/85645
13885 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13886 in the REG_CFA_REGISTER note for LR, don't leave it empty.
13888 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13890 PR rtl-optimization/85645
13891 * shrink-wrap.c (spread_components): Return a boolean saying if
13892 anything was changed.
13893 (try_shrink_wrapping_separate): Iterate spread_components until
13894 nothing changes anymore.
13896 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13898 PR rtl-optimization/85645
13899 * regrename.c (build_def_use): Also kill the chains that include the
13900 destination of a REG_CFA_REGISTER note.
13902 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13904 PR rtl-optimization/85645
13905 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13906 insn that has a REG_CFA_REGISTER note.
13908 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
13910 * cfgexpand.c (expand_clobber): New function.
13911 (expand_gimple_stmt_1): Use it.
13912 * tree-vect-stmts.c (vect_clobber_variable): New function,
13914 (vectorizable_simd_clone_call): ...here.
13915 (vectorizable_store): Emit a clobber either side of an
13916 IFN_STORE_LANES sequence.
13917 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13919 2018-05-09 Tom de Vries <tom@codesourcery.com>
13922 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13923 (define_insn "trap_if_false"): Add exit after trap.
13925 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
13927 PR rtl-optimization/85638
13928 * bb-reorder.c: Include common/common-target.h.
13929 (create_forwarder_block): New function extracted from...
13930 (fix_up_crossing_landing_pad): ...here. Rename into...
13931 (dw2_fix_up_crossing_landing_pad): ...this.
13932 (sjlj_fix_up_crossing_landing_pad): New function.
13933 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13934 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13935 from both partitions and exit the loop after one iteration.
13937 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13940 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13942 (Basic PowerPC Built-in Functions): The new name of the
13943 subsection previously known as "PowerPC Built-in Functions".
13944 (Basic PowerPC Built-in Functions Available on all Configurations):
13946 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13948 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13950 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13952 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13955 2018-05-08 Jim Wilson <jimw@sifive.com>
13957 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13958 (LD_EMUL_SUFFIX): New.
13959 (LINK_SPEC): Use it.
13961 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13963 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13965 (Basic PowerPC Built-in Functions): The new name of the
13966 subsection previously known as "PowerPC Built-in Functions".
13967 (Basic PowerPC Built-in Functions Available on all Configurations):
13969 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13971 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13973 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13975 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13978 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13981 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13982 after cmpelim optimization.
13984 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
13986 * config.gcc: Support "goldmont".
13987 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13988 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13989 PROCESSOR_GOLDMONT.
13990 * config/i386/i386.c (m_GOLDMONT): Define.
13991 (processor_target_table): Add "goldmont".
13992 (PTA_GOLDMONT): Define.
13993 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13994 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13995 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13996 (fold_builtin_cpu): Add "goldmont".
13997 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13998 (ix86_option_override_internal): Add "goldmont".
13999 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
14000 (processor_type): Add PROCESSOR_GOLDMONT.
14001 * config/i386/i386.md: Add CPU "glm".
14002 * config/i386/glm.md: New file.
14003 * config/i386/x86-tune.def: Add m_GOLDMONT.
14004 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
14006 2018-05-08 Jakub Jelinek <jakub@redhat.com>
14009 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
14011 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
14012 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
14013 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
14016 * config/i386/i386.c (ix86_fold_builtin): Handle
14017 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
14020 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
14021 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
14023 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
14026 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
14027 (check_arch): Likewise.
14028 (check_fpu): Return the result rather than printing it.
14029 (end arch): Fix operator precedence.
14030 (end cpu): Likewise.
14031 (END): Print the result from check_fpu.
14033 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
14034 Alan Hayward <alan.hayward@arm.com>
14035 David Sherwood <david.sherwood@arm.com>
14037 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
14038 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
14039 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
14040 (*fcmuo<mode>_and): New patterns.
14042 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
14044 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
14045 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
14046 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
14047 (cmp_op, sve_imm_con): New code attributes.
14048 (SVE_COND_INT_CMP, imm_con): Delete.
14049 (cmp_op): Remove above unspecs from int attribute.
14050 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
14052 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
14053 comparison-specific unspecs.
14054 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
14055 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
14056 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
14057 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
14058 (*vec_fcm<cmp_op><mode>): Rename to...
14059 (*fcm<cmp_op><mode>): ...this and adjust likewise.
14060 (*vec_fcmuo<mode>): Rename to...
14061 (*fcmuo<mode>): ...this and adjust likewise.
14062 (*pred_fcm<cmp_op><mode>): New pattern.
14063 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
14064 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
14066 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
14068 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
14069 (aarch64_emit_sve_predicated_cond): New function.
14070 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
14071 (aarch64_emit_unspec_cond_or): Replace with...
14072 (aarch64_emit_sve_or_conds): ...this new function. Use
14073 aarch64_emit_sve_ptrue_op for the individual comparisons and
14074 aarch64_emit_binop to OR them together.
14075 (aarch64_emit_inverted_unspec_cond): Replace with...
14076 (aarch64_emit_sve_inverted_cond): ...this new function. Use
14077 aarch64_emit_sve_ptrue_op for the comparison and
14078 aarch64_emit_unop to invert the result.
14079 (aarch64_expand_sve_vec_cmp_float): Update after the above
14080 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
14082 2018-05-07 Nathan Sidwell <nathan@acm.org>
14084 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
14085 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
14086 (Backwards Compatibility): Likewise.
14088 2018-05-07 Luis Machado <luis.machado@linaro.org>
14092 2018-05-07 Luis Machado <luis.machado@linaro.org>
14094 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14095 <prefetch_dynamic_strides>: New const bool field.
14096 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14097 prefetch_dynamic_strides.
14098 (exynosm1_prefetch_tune): Likewise.
14099 (thunderxt88_prefetch_tune): Likewise.
14100 (thunderx_prefetch_tune): Likewise.
14101 (thunderx2t99_prefetch_tune): Likewise.
14102 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
14104 (aarch64_override_options_internal): Update to set
14105 PARAM_PREFETCH_DYNAMIC_STRIDES.
14106 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14107 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14108 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14109 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14110 prefetch-dynamic-strides setting.
14112 2018-05-07 Luis Machado <luis.machado@linaro.org>
14114 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14115 <minimum_stride>: New const int field.
14116 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14117 minimum_stride field.
14118 (exynosm1_prefetch_tune): Likewise.
14119 (thunderxt88_prefetch_tune): Likewise.
14120 (thunderx_prefetch_tune): Likewise.
14121 (thunderx2t99_prefetch_tune): Likewise.
14122 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
14123 (aarch64_override_options_internal): Update to set
14124 PARAM_PREFETCH_MINIMUM_STRIDE.
14125 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14126 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14127 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14128 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14129 stride is constant and is below the minimum stride threshold.
14131 2018-05-07 Luis Machado <luis.machado@linaro.org>
14133 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
14136 2018-05-07 Luis Machado <luis.machado@linaro.org>
14138 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14139 <prefetch_dynamic_strides>: New const bool field.
14140 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14141 prefetch_dynamic_strides.
14142 (exynosm1_prefetch_tune): Likewise.
14143 (thunderxt88_prefetch_tune): Likewise.
14144 (thunderx_prefetch_tune): Likewise.
14145 (thunderx2t99_prefetch_tune): Likewise.
14146 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
14148 (aarch64_override_options_internal): Update to set
14149 PARAM_PREFETCH_DYNAMIC_STRIDES.
14150 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14151 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14152 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14153 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14154 prefetch-dynamic-strides setting.
14156 2018-05-07 Luis Machado <luis.machado@linaro.org>
14158 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14159 <minimum_stride>: New const int field.
14160 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14161 minimum_stride field.
14162 (exynosm1_prefetch_tune): Likewise.
14163 (thunderxt88_prefetch_tune): Likewise.
14164 (thunderx_prefetch_tune): Likewise.
14165 (thunderx2t99_prefetch_tune): Likewise.
14166 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
14167 (aarch64_override_options_internal): Update to set
14168 PARAM_PREFETCH_MINIMUM_STRIDE.
14169 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14170 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14171 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14172 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14173 stride is constant and is below the minimum stride threshold.
14175 2018-05-06 Jakub Jelinek <jakub@redhat.com>
14178 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
14179 the type is addressable. Don't force op into register if it has
14182 2018-05-05 Roland McGrath <mcgrathr@google.com>
14185 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
14186 any section for which we don't know a specific type it should have,
14187 regardless of name. Previously this was done only for the exact
14188 names ".init_array", ".fini_array", and ".preinit_array".
14189 (default_elf_asm_named_section): Add comment about
14190 relationship with default_section_type_flags and SECTION_NOTYPE.
14191 (get_section): Don't consider it a type conflict if one side has
14192 SECTION_NOTYPE and the other doesn't, as long as neither has the
14193 SECTION_BSS et al used in the default_section_type_flags logic.
14195 2018-05-05 Tom de Vries <tom@codesourcery.com>
14198 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
14199 (workaround_barsyncs): New function.
14200 (nvptx_reorg): Use workaround_barsyncs.
14201 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14202 (define_expand "nvptx_membar_cta"): New define_expand.
14203 (define_insn "*nvptx_membar_cta"): New insn.
14205 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
14207 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
14208 To improve optimization opportunities.
14209 * builtin-types.def: The new needed builtin types for the above.
14211 2018-05-04 Richard Biener <rguenther@suse.de>
14213 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
14214 * gimple-ssa-store-merging.c
14215 (imm_store_chain_info::output_merged_store): Remove redundant create,
14216 release split_store vector contents on failure.
14217 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
14218 scalar stmt vector on cache hit.
14220 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
14222 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
14224 * config.gcc (powerpc-xilinx-eabi*): Remove.
14225 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
14227 (fusion_addis_mem_combo_load): Ditto.
14228 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
14230 (rs6000_cpu_cpp_builtins): Ditto.
14231 * config/rs6000/rs6000-linux.c
14232 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
14233 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
14234 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
14236 (rs6000_setup_reg_addr_masks): Ditto.
14237 (rs6000_init_hard_regno_mode_ok): Ditto.
14238 (rs6000_option_override_internal): Ditto.
14239 (legitimate_lo_sum_address_p): Ditto.
14240 (rs6000_legitimize_address): Ditto.
14241 (rs6000_legitimize_reload_address): Ditto.
14242 (rs6000_legitimate_address_p): Ditto.
14243 (abi_v4_pass_in_fpr): Ditto.
14244 (setup_incoming_varargs): Ditto.
14245 (rs6000_gimplify_va_arg): Ditto.
14246 (rs6000_split_multireg_move): Ditto.
14247 (rs6000_savres_strategy): Ditto.
14248 (rs6000_emit_prologue_components): Ditto.
14249 (rs6000_emit_epilogue_components): Ditto.
14250 (rs6000_emit_prologue): Ditto.
14251 (rs6000_emit_epilogue): Ditto.
14252 (rs6000_elf_file_end): Ditto.
14253 (rs6000_function_value): Ditto.
14254 (rs6000_libcall_value): Ditto.
14255 * config/rs6000/rs6000.h: Ditto.
14256 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
14257 (TARGET_MINMAX): ... this. New.
14258 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
14259 * config/rs6000/rs6000.md: Remove Xilinx FP support.
14260 (*movsi_internal1_single): Delete.
14261 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
14262 mfpu=, mxilinx-fpu): Delete.
14263 * config/rs6000/singlefp.h: Delete.
14264 * config/rs6000/sysv4.h: Remove Xilinx FP support.
14265 * config/rs6000/t-rs6000: Ditto.
14266 * config/rs6000/t-xilinx: Delete.
14267 * config/rs6000/titan.md: Adjust for fp_type removal.
14268 * config/rs6000/vsx.md: Remove Xilinx FP support.
14269 (VStype_simple): Delete.
14270 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
14271 * config/rs6000/xfpu.h: Delete.
14272 * config/rs6000/xfpu.md: Delete.
14273 * config/rs6000/xilinx.h: Delete.
14274 * config/rs6000/xilinx.opt: Delete.
14275 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
14276 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
14278 2018-05-04 Tom de Vries <tom@codesourcery.com>
14281 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
14284 2018-05-04 Richard Biener <rguenther@suse.de>
14286 PR middle-end/85627
14287 * tree-complex.c (update_complex_assignment): We are always in SSA form.
14288 (expand_complex_div_wide): Likewise.
14289 (expand_complex_operations_1): Likewise.
14290 (expand_complex_libcall): Preserve EH info of the original stmt.
14291 (tree_lower_complex): Handle removed blocks.
14292 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
14293 on complex multiplication and division libcall builtins.
14295 2018-05-04 Richard Biener <rguenther@suse.de>
14297 PR middle-end/85574
14298 * fold-const.c (negate_expr_p): Restrict negation of operand
14299 zero of a division to when we know that can happen without
14301 (fold_negate_expr_1): Likewise.
14303 2018-05-04 Jakub Jelinek <jakub@redhat.com>
14306 * real.h (real_nextafter): Declare.
14307 * real.c (real_nextafter): New function.
14308 * fold-const-call.c (fold_const_nextafter): New function.
14309 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
14310 CASE_CFN_NEXTTOWARD.
14311 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
14312 even when arg1_mode is different from arg0_mode.
14314 2018-05-03 Nathan Sidwell <nathan@acm.org>
14316 * doc/extend.texi (Deprecated Features): Remove
14317 -ffriend-injection.
14318 (Backwards Compatibility): Likewise.
14319 * doc/invoke.texi (C++ Language Options): Likewise.
14320 (C++ Dialect Options): Likewise.
14322 2018-05-03 Jakub Jelinek <jakub@redhat.com>
14325 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
14326 _mm512_mask_mullox_epi64): New intrinsics.
14328 2018-05-03 Tom de Vries <tom@codesourcery.com>
14331 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14332 dump files): Add offload-tree.
14334 2018-05-03 Richard Biener <rguenther@suse.de>
14336 PR tree-optimization/85615
14337 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
14338 to loops not nested in BBs loop father to avoid creating multi-entry
14341 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14343 PR tree-optimization/70291
14344 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
14345 arguments. Change return type to tree. Emit libcall as a new
14346 statement rather than replacing existing one when inplace_p is true.
14347 (expand_complex_multiplication_components): New function.
14348 (expand_complex_multiplication): Expand floating-point complex
14349 multiplication using the above.
14350 (expand_complex_division): Rename inner_type parameter to type.
14351 Update expand_complex_libcall call-site.
14352 (expand_complex_operations_1): Update expand_complex_multiplication
14353 and expand_complex_division call-sites.
14355 2018-05-02 Jakub Jelinek <jakub@redhat.com>
14358 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
14359 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
14360 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
14361 the highest significant bit of the shift count mask is clear. In
14362 check whether and[sq]i3 is needed verify that all significant bits
14363 of the shift count other than the highest are set.
14365 2018-05-02 Tom de Vries <tom@codesourcery.com>
14368 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
14369 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
14370 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
14371 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
14372 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
14373 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
14374 __builtin_goacc_parlevel_size.
14376 2018-05-02 Richard Biener <rguenther@suse.de>
14378 PR tree-optimization/85597
14379 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
14380 do not use split vect_get_vec_defs call but call vect_get_slp_defs
14383 2018-05-02 Tom de Vries <tom@codesourcery.com>
14386 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14387 dump files): Add ltrans-tree.
14389 2018-05-02 Tom de Vries <tom@codesourcery.com>
14392 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14393 dump files): Add wpa-ipa.
14395 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
14397 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
14398 powerpc*-*-linux*paired* target.
14399 * config/rs6000/750cl.h: Delete.
14400 * config/rs6000/paired.h: Delete.
14401 * config/rs6000/paired.md: Delete.
14402 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
14404 * config/rs6000/rs6000-builtin.def: Remove paired float support.
14405 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
14406 comment. Remove paired float support.
14407 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
14408 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
14410 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
14411 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
14413 * config/rs6000/rs6000.c: Remove paired float support.
14414 (paired_expand_vector_init, paired_expand_vector_move,
14415 paired_emit_vector_compare, paired_emit_vector_cond_expr,
14416 (paired_expand_lv_builtin, paired_expand_stv_builtin,
14417 paired_expand_builtin, paired_expand_predicate_builtin,
14418 paired_init_builtins): Delete.
14419 * config/rs6000/rs6000.h: Remove paired float support.
14420 * config/rs6000/rs6000.md: Remove paired float support.
14421 (move_from_CR_ov_bit): Delete.
14422 * config/rs6000/rs6000.opt (mpaired): Delete.
14423 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
14424 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
14426 2018-05-02 Richard Biener <rguenther@suse.de>
14428 PR middle-end/85567
14429 * gimplify.c (gimplify_save_expr): When in SSA form allow
14430 SAVE_EXPRs to compute to SSA vars.
14432 2018-05-02 Jakub Jelinek <jakub@redhat.com>
14435 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
14436 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
14437 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
14438 clobber operands[2], instead use a new pseudo. Formatting fixes.
14440 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
14442 PR tree-optimization/85586
14443 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
14444 exit early for statements in the same group if the accesses are
14447 2018-05-02 Tom de Vries <tom@codesourcery.com>
14450 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
14453 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
14455 PR tree-optimization/85143
14456 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
14458 2018-05-01 Tom de Vries <tom@codesourcery.com>
14461 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
14462 not found" error message.
14464 2018-05-01 Tom de Vries <tom@codesourcery.com>
14467 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
14468 * vec.c (test_ordered_remove_if): New function.
14469 (vec_c_tests): Call test_ordered_remove_if.
14470 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
14471 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
14472 * tree-vect-patterns.c (vect_pattern_recog_1): Use
14473 VEC_ORDERED_REMOVE_IF.
14475 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14477 PR tree-optimization/82665
14478 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
14479 pointer subtraction where arguments come from a memchr call.
14481 2018-05-01 Jakub Jelinek <jakub@redhat.com>
14483 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
14484 --push-state --as-needed and --pop-state instead of --as-needed and
14485 --no-as-needed if ld supports it.
14486 * configure: Regenerated.
14489 * doc/install.texi2html: Replace _002d with - and _002a with * in
14490 generated html files using sed.
14492 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14495 * gcc-rich-location.c (blank_line_before_p): New function.
14496 (use_new_line): New function.
14497 (gcc_rich_location::add_fixit_insert_formatted): New function.
14498 * gcc-rich-location.h
14499 (gcc_rich_location::add_fixit_insert_formatted): New function.
14501 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14503 * selftest.c (assert_streq): Rename "expected" and "actual" to
14504 "val1" and "val2". Extend NULL-handling to cover both inputs
14505 symmetrically, while still requiring both to be non-NULL for a pass.
14506 * selftest.h (assert_streq): Rename "expected" and "actual" to
14508 (ASSERT_EQ): Likewise.
14509 (ASSERT_EQ_AT): Likewise.
14510 (ASSERT_KNOWN_EQ): Likewise.
14511 (ASSERT_KNOWN_EQ_AT): Likewise.
14512 (ASSERT_NE): Likewise.
14513 (ASSERT_MAYBE_NE): Likewise.
14514 (ASSERT_MAYBE_NE_AT): Likewise.
14515 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
14516 the assertion to pass.
14517 (ASSERT_STREQ_AT): Likewise.
14519 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
14521 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
14522 interaction with -pie.
14524 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14526 * selftest.h: Fix alphabetization of per-source-file selftest
14529 2018-04-30 Jason Merrill <jason@redhat.com>
14531 PR c++/61982 - dead stores to destroyed objects.
14532 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
14535 2018-04-30 Jason Merrill <jason@redhat.com>
14537 * tree.c (build_clobber): New.
14538 * tree.h: Declare it.
14539 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
14541 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14543 * diagnostic-show-locus.c (layout::layout): Update for
14544 location_get_source_line returning a char_span.
14545 (struct char_span): Move to input.h.
14546 (struct correction): Update for fields in char_span becoming
14548 (struct source_line): Update for location_get_source_line
14549 returning a char_span.
14550 (layout::print_line): Likewise.
14551 * edit-context.c (edited_file::print_content): Likewise.
14552 (edited_file::print_diff_hunk): Likewise.
14553 (edited_file::print_run_of_changed_lines): Likewise.
14554 (edited_file::get_num_lines): Likewise.
14555 (edited_line::edited_line): Likewise.
14556 * final.c (asm_show_source): Likewise.
14557 * input.c (location_get_source_line): Convert return type
14558 from const char * to char_span, losing the final "line_len"
14560 (dump_location_info): Update for the above.
14561 (get_substring_ranges_for_loc): Likewise. Use a char_span
14562 when handling the literal within the line.
14563 (test_reading_source_line): Update for location_get_source_line
14564 returning a char_span.
14565 * input.h (class char_span): Move here from
14566 diagnostic-show-locus.c, converting from a struct to a class.
14567 Make data members private.
14568 (char_span::operator bool): New.
14569 (char_span::length): New.
14570 (char_span::get_buffer): New.
14571 (char_span::operator[]): New.
14572 (char_span::subspan): Make const.
14573 (char_span::xstrdup): New.
14574 (location_get_source_line): Convert return type from const char *
14575 to char_span, losing the final "line_size" param.
14577 2018-04-30 Jan Hubicka <jh@suse.cz>
14579 * lto-wrapper.c (ltrans_priorities): New static var.
14580 (cmp_priority): New.
14581 (run_gcc): Read priorities and if doing parallel build order
14582 the Makefile by them.
14584 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14586 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
14588 2018-04-30 Richard Biener <rguenther@suse.de>
14590 * tree-cfg.c (verify_address): Remove base argument, add
14591 flag whether to check TREE_ADDRESSABLE and do that.
14592 (verify_expr): Remove.
14593 (verify_types_in_gimple_reference): Add pieces from verify_expr.
14594 (verify_gimple_assign_single): Likewise.
14595 (verify_gimple_switch): Likewise.
14596 (verify_expr_location_1): Dereference tp once. Add (disabled)
14597 piece from verify_expr.
14598 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
14600 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14602 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
14604 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14606 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
14607 (small_data_pattern): Likewise.
14608 (arc_rewrite_small_data): Likewise.
14609 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
14610 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
14611 (get_symbol_alignment): New function.
14612 (legitimate_small_data_address_p): Likewise.
14613 (legitimate_scaled_address): Update, call
14614 legitimate_small_data_address_p.
14615 (output_sdata): New static variable.
14616 (arc_print_operand): Update how we handle small data operands.
14617 (arc_print_operand_address): Likewise.
14618 (arc_legitimate_address_p): Update, use
14619 legitimate_small_data_address_p.
14620 (arc_rewrite_small_data_p): Remove.
14621 (arc_rewrite_small_data_1): Likewise.
14622 (arc_rewrite_small_data): Likewise.
14623 (small_data_pattern): Likewise.
14624 (compact_sda_memory_operand): Update to use
14625 legitimate_small_data_address_p and get_symbol_alignment.
14626 (prepare_move_operands): Don't rewite sdata pattern.
14627 (prepare_extend_operands): Remove.
14628 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
14630 (zero_extendqisi2): Likewise.
14631 (zero_extendhisi2): Likewise.
14632 (extendqihi2): Likewise.
14633 (extendqisi2): Likewise.
14634 (extendhisi2): Likewise.
14635 (addsi3): Likewise.
14636 (subsi3): Likewise.
14637 (andsi3): Likewise.
14638 * config/arc/constraints.md (Usd): Change it to memory constraint.
14640 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14642 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
14643 as source of std instructions.
14644 * config/arc/arc.md (movsi_insn): Update pattern predicate to
14645 allow 6-bit constants as source for store instructions.
14646 (movdi_insn): Update instruction pattern to allow 6-bit constants
14647 as source for store instructions.
14649 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
14651 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
14653 2018-04-30 Nathan Sidwell <nathan@acm.org>
14654 Sandra Loosemore <sandra@codesourcery.com>
14656 * dumpfile.c (dump_open): Allow '-' for stdout.
14657 * doc/invoke.texi (Developer Options): Document dump filename
14658 determination early. Document stdin/stdout selection.
14660 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
14662 Microblaze Target: PIC data text relative
14664 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
14665 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
14667 * config/microblaze/microblaze.h (microblaze_constant_address_p):
14668 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
14669 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
14670 New addressing mode for data-text relative position indepenedent code.
14671 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
14672 'ADDRESS_SYMBOLIC_TXT_REL'.
14673 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
14674 (microblaze_legitimate_pic_operand): Exclude function calls from
14675 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
14676 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
14678 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14679 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14680 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
14681 for 'address + offset'.
14682 (microblaze_expand_prologue): Add new function prologue call for
14684 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
14685 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
14686 table in case of TARGET_PIC_DATA_TEXT_REL.
14687 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
14688 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
14689 Add new macros 'UNSPEC_TEXT',
14690 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
14691 + exclude function calls from 'UNSPEC_PLT' in case of data text
14693 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14694 new target hook for generating address diff vector tables in case of
14696 * doc/tm.texi : Regenerate.
14697 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
14698 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
14699 of addr diff vector generation.
14700 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14701 target hook definition.
14702 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
14703 Add default function for generate_pic_addr_diff_vec -> flag_pic.
14704 * doc/invoke.texi (Add new pic option): Add new microblaze pic
14705 option for data text relative.
14707 2018-04-30 Richard Biener <rguenther@suse.de>
14709 * tree-chrec.h (evolution_function_is_constant_p): Remove
14711 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
14713 2018-04-30 Richard Biener <rguenther@suse.de>
14716 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
14718 2018-04-30 Richard Biener <rguenther@suse.de>
14720 PR tree-optimization/28364
14721 PR tree-optimization/85275
14722 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
14723 copying first exit test.
14725 2018-04-28 Mark Wielaard <mark@klomp.org>
14727 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
14728 dwarf_version >= 5.
14729 (dwarf_AT): Handle DW_AT_addr_base.
14730 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
14732 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
14735 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
14736 (*ashl<dwi>3_doubleword_mask_1): Ditto.
14737 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
14738 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
14740 2018-04-28 Richard Biener <rguenther@suse.de>
14742 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
14743 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
14744 to reflect use. Only add interesting stmts.
14746 2018-04-27 Martin Jambor <mjambor@suse.cz>
14749 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
14750 the jump function allows for passing through aggregate values.
14752 2018-04-27 David Malcolm <dmalcolm@redhat.com>
14754 * input.h (in_system_header_at): Convert from macro to inline
14756 (from_macro_expansion_at): Likewise.
14757 (from_macro_definition_at): Likewise.
14759 2018-04-27 Jeff Law <law@redhat.com>
14761 * config.gcc: Mark tile* targets as deprecated/obsolete.
14763 2018-04-27 Richard Biener <rguenther@suse.de>
14765 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
14768 2018-04-27 Richard Biener <rguenther@suse.de>
14770 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
14772 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
14774 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
14775 with Yd constraint. Set "preferred_for_speed" attribute from
14776 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
14777 with Yd constraint.
14778 (*movdi_internal): Ditto.
14779 (movti_interunit splitters): Remove
14780 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
14781 (movdi_interunit splitters): Ditto.
14782 * config/i386/constraints.md (Ye): Remove.
14783 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
14785 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14788 * config/aarch64/constraints.md (Usg): Limit to 31.
14789 (Usj): Limit to 63.
14791 2018-04-27 Jakub Jelinek <jakub@redhat.com>
14793 PR tree-optimization/85529
14794 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
14795 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
14796 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
14797 zero extension or masking of the MSB bit.
14798 (optimize_range_tests): Add FIRST_BB argument, pass it through
14799 to optimize_range_tests_var_bound.
14800 (maybe_optimize_range_tests, reassociate_bb): Adjust
14801 optimize_range_tests callers.
14803 2018-04-26 Richard Biener <rguenther@suse.de>
14804 Jakub Jelinek <jakub@redhat.com>
14806 * cgraph.h (symbol_table): Just declare debug method here.
14807 * symtab.c (symbol_table::debug): Define.
14809 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
14811 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
14813 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
14815 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
14816 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
14817 (*movdi_internal): Substitute Yi and Yj constraint with x
14818 and Ym and Yn constraint with y constraint. Update "isa"
14819 attribute and set "preferred_for_speed" attribute from
14820 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
14821 (*movsi_internal): Ditto.
14822 (*movdf_internal): Ditto.
14823 (*movsf_internal): Ditto.
14824 (*zero_extendsidi2): Ditto.
14825 * config/i386/sse.md (vec_set<mode>_0): Ditto.
14826 (sse2_loadld): Ditto.
14827 (*vec_extract<ssevecmodelower>_0): Ditto.
14828 (*vec_extractv4si_0_zext_sse4): Ditto.
14829 (vec_concatv2di): Ditto.
14830 (*vec_dup<mode>): Ditto.
14831 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
14832 * config/i386/constraints.md (Yi): Remove.
14837 2018-04-26 Nathan Sidwell <nathan@acm.org>
14839 * dumpfile.c (dump_open): New.
14840 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
14841 (dump_finish): Detect stdio/stderr by value not name.
14843 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
14845 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
14847 2018-04-26 Tom de Vries <tom@codesourcery.com>
14850 * config/nvptx/nvptx.c (verify_neutering_jumps)
14851 (verify_neutering_labels): New function
14852 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
14854 2018-04-26 Tom de Vries <tom@codesourcery.com>
14857 * config/nvptx/nvptx.c (needs_neutering_p): New function.
14858 (nvptx_single): Use needs_neutering_p to skip over insns that do not
14861 2018-04-26 Richard Biener <rguenther@suse.de>
14862 Tom de Vries <tom@codesourcery.com>
14865 * lto-streamer-out.c (output_function): Fixup loops if required to match
14866 discovery done in the reader.
14868 2018-04-26 Richard Biener <rguenther@suse.de>
14870 PR tree-optimization/85116
14871 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14872 have a loop exit from the single latch predecessor. Remove
14873 case of header with just condition.
14874 (ch_base::copy_headers): Exclude infinite loops from any
14876 (pass_ch::execute): Record exits.
14878 2018-04-26 Richard Biener <rguenther@suse.de>
14880 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14881 prologue cost vector and pass it to vect_get_load_cost.
14882 (vect_get_peeling_costs_all_drs): Likewise.
14883 (vect_peeling_hash_get_lowest_cost): Likewise.
14884 (vect_enhance_data_refs_alignment): Likewise.
14886 2018-04-26 Richard Biener <rguenther@suse.de>
14888 PR middle-end/85450
14889 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14890 checking of integer<->pointer conversions.
14891 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14892 sign-/zero-extending pointer types.
14893 (expand_omp_for_static_chunk): Likewise.
14895 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
14896 Jean Lee <xiaoyur347@gmail.com>
14898 * config/mips/mips.c (mips_asan_shadow_offset): New function.
14899 (TARGET_ASAN_SHADOW_OFFSET): Define.
14900 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14901 true for -fsanitize=address.
14903 2018-04-25 Mark Wielaard <mark@klomp.org>
14905 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14908 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14910 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14911 than "alu", remove explicit "memory" and "imm_disp" attributes.
14912 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14914 PR middle-end/85414
14915 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14916 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14917 gen_lowpart_no_emit.
14919 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
14922 * config/i386/i386.c (ix86_expand_builtin): Change memory
14923 operand to XI, extend p0 to Pmode.
14924 * config/i386/i386.md: Change unspec volatile and operand
14925 1 mode to XI, change operand 0 mode to P.
14927 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14929 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14930 GET_MODE_MASK before any checking.
14931 (nds32_can_use_bset_p): Likewise.
14932 (nds32_can_use_btgl_p): Likewise.
14934 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14936 * config/nds32/nds32-doubleword.md: New define_split pattern for
14937 illegal register number.
14939 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14941 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14943 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14945 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14947 2018-04-25 Richard Biener <rguenther@suse.de>
14949 * lto-streamer.h (LTO_major_version): Bump to 8.
14951 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14953 * BASE-VER: Set to 9.0.0.
14955 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
14957 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14958 in __abskf2 and __powikf2.
14960 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14963 * config/aarch64/constraints.md (Usg, Usj): New constraints.
14964 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14965 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14966 Use the above on operand 2. Reindent.
14967 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14969 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14972 * common/config/i386/i386-common.c (ix86_handle_option): Don't
14974 * config/i386/i386.opt (mcet): Removed.
14975 * doc/install.texi: Remove -mcet documentation.
14976 * doc/invoke.texi: Likewise.
14978 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14981 * doc/install.texi: Remove -mcet from bootstrap-cet.
14983 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14986 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14987 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14991 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14992 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14993 containing a CONST_VECTOR.
14995 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
14997 * doc/install.texi: Update newlib dependency for nvptx.
14999 2018-04-24 Jakub Jelinek <jakub@redhat.com>
15002 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
15003 instead of INTVAL when shifting x left.
15005 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
15007 PR tree-optimization/85478
15008 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
15009 vect_grouped_store_supported for single element vectors.
15011 2018-04-24 Richard Biener <rguenther@suse.de>
15014 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
15015 load cost increase to the case of non-constant step.
15017 2018-04-24 Jakub Jelinek <jakub@redhat.com>
15020 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
15021 destination if any_malformed_asm.
15023 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
15025 PR middle-end/85496
15026 * expr.c (store_field): In the bitfield case, if the value comes from
15027 a function call and is returned in registers by means of a PARALLEL,
15028 do not change the mode of the temporary unless BLKmode and VOIDmode.
15030 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
15032 PR rtl-optimization/85423
15033 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
15034 dependencies to debug insns when the previous insn is non-debug.
15036 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
15038 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
15039 enums into a single definition.
15040 (fls): Fix predicates and printing.
15043 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
15045 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
15046 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
15047 and short u6 immediate.
15048 (check_if_valid_sleep_operand): Remove.
15049 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
15051 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15053 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
15054 flag_always_save_lp condition.
15055 * config/nds32/nds32.opt (malways-save-lp): New option.
15057 2018-04-22 Shiva Chen <shiva0217@gmail.com>
15059 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
15060 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
15061 * config/nds32/nds32.h
15062 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
15063 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
15065 2018-04-22 Shiva Chen <shiva0217@gmail.com>
15067 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
15068 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
15070 2018-04-22 Shiva Chen <shiva0217@gmail.com>
15071 Chung-Ju Wu <jasonwucj@gmail.com>
15073 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
15075 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
15076 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
15078 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15080 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
15082 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15084 * config/nds32/nds32-protos.h (nds32_data_alignment,
15085 nds32_local_alignment): Declare.
15086 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
15087 nds32_local_alignment): New functions.
15088 (TARGET_CONSTANT_ALIGNMENT): Define.
15089 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
15091 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15093 * config/nds32/nds32.c
15094 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
15095 (TARGET_MODES_TIEABLE_P): Likewise.
15097 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15099 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
15100 level Ofast and Og.
15102 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
15103 Chung-Ju Wu <jasonwucj@gmail.com>
15105 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15106 for unaligned access.
15107 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15109 * config/nds32/nds32-intrinsic.md: Likewise.
15110 * config/nds32/nds32_intrinsic.h: Likewise.
15111 * config/nds32/nds32.h (nds32_builtins): Likewise.
15112 * config/nds32/nds32.opt (munaligned-access): New option.
15113 * config/nds32/nds32.c (nds32_asm_file_start): Display
15114 flag_unaligned_access status.
15116 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
15118 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
15119 -mno-relax is present.
15120 * config/riscv/linux.h (LINK_SPEC): Ditto.
15122 2018-04-20 Martin Sebor <msebor@redhat.com>
15125 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
15127 (gimple_fold_builtin_stxcpy_chk): Same.
15128 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
15130 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
15133 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
15134 __powikf2 when long double is IEEE 128-bit.
15136 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
15138 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
15139 step to make sure stack always aligned.
15141 2018-04-20 Carl Love <cel@us.ibm.com>
15144 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
15145 size check for arg0.
15147 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
15148 Tom de Vries <tom@codesourcery.com>
15151 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
15152 Emit insns for calls too.
15153 (nvptx_find_par): Always look for worker-level predecessor insn.
15154 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
15156 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
15157 (nvptx_process_pars): Propagate frames for calls.
15159 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
15162 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
15164 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
15165 (ix86_handle_option): Don't handle OPT_mibt.
15166 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
15168 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
15170 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
15171 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
15172 (ix86_target_macros): Define __CET__ with flag_cf_protection
15173 for -fcf-protection.
15174 * config/i386/i386.c (isa2_opts): Remove -mibt.
15175 * config/i386/i386.h (TARGET_IBT): Removed.
15176 (TARGET_IBT_P): Likewise.
15177 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
15178 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
15179 * config/i386/i386.opt (mcet): Update help message.
15180 (mshstk): Likewise.
15182 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
15183 -mcet as an alias for -mshstk.
15185 2018-04-20 Richard Biener <rguenther@suse.de>
15187 PR middle-end/85475
15188 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
15189 complexity by forcing a single use of the multiply operand.
15191 2018-04-20 Martin Jambor <mjambor@suse.cz>
15194 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
15195 recursion dependency to only apply to non-clones.
15197 2018-04-20 Martin Jambor <mjambor@suse.cz>
15200 * ipa-cp.c (create_specialized_node): Check that clones of
15201 self-recursive edges exist during IPA-CP.
15203 2018-04-19 Toon Moene <toon@moene.org>
15205 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
15208 2018-04-19 Jakub Jelinek <jakub@redhat.com>
15210 PR tree-optimization/85467
15211 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
15212 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
15213 VECTOR_CST element to type.
15215 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15218 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
15219 * config/i386/i386.md (builtin_setjmp_setup): Removed.
15220 (builtin_longjmp): Likewise.
15221 (save_stack_nonlocal): New pattern.
15222 (restore_stack_nonlocal): Likewise.
15224 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15227 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
15228 Replace ASM_OUTPUT_LABEL with fprintf.
15230 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15233 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
15234 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
15235 * config/i386/i386-c.c (ix86_target_macros_internal): Also
15236 define __IBT__ and __SHSTK__ for -fcf-protection.
15237 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
15239 (ix86_trampoline_init): Likewise.
15240 (x86_output_mi_thunk): Likewise.
15241 (ix86_notrack_prefixed_insn_p): Likewise.
15242 (ix86_option_override_internal): Don't disallow -fcf-protection.
15243 * config/i386/i386.md (rdssp<mode>): Also enable for
15245 (incssp<mode>): Likewise.
15246 (nop_endbr): Likewise.
15247 * config/i386/i386.opt (mcet): Change help message to built-in
15250 (mshstk): Likewise.
15251 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
15252 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
15253 enable CET built-in functions.
15255 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
15257 * common/config/i386/i386-common.c
15258 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
15259 OPTION_MASK_ISA_MOVDIRI_UNSET,
15260 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
15261 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
15262 * config.gcc (movdirintrin.h): New header.
15263 * config/i386/cpuid.h (bit_MOVDIRI,
15264 bit_MOVDIR64B): New bits.
15265 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
15267 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
15268 (VOID, PVOID, PCVOID)): New function types.
15269 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
15270 __builtin_ia32_directstoreu_u64,
15271 __builtin_ia32_movdir64b): New builtins.
15272 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
15273 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
15275 (ix86_valid_target_attribute_inner_p): Ditto.
15276 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
15277 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
15278 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
15279 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
15280 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
15281 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
15282 (movdiri<mode>, movdir64b_<mode>): New.
15283 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
15284 * config/i386/immintrin.h: Include movdirintrin.h.
15285 * config/i386/movdirintrin.h: New file.
15286 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
15288 2018-04-19 Richard Biener <rguenther@suse.de>
15290 PR middle-end/85455
15291 * cfg.c (clear_bb_flags): When loop state says we have
15292 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
15294 2018-04-19 Richard Biener <rguenther@suse.de>
15296 PR tree-optimization/84737
15297 * tree-vect-data-refs.c (vect_copy_ref_info): New function
15298 copying restrict info.
15299 (vect_setup_realignment): Use it.
15300 * tree-vectorizer.h (vect_copy_ref_info): Declare.
15301 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
15302 the first DR to all generated stores.
15303 (vectorizable_load): Likewise for loads.
15305 2018-04-19 Jakub Jelinek <jakub@redhat.com>
15307 PR tree-optimization/85446
15308 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
15309 the integral and pointer types to have the same precision.
15311 * doc/install.texi: Document --disable-cet being the default and
15314 2018-04-18 Martin Liska <mliska@suse.cz>
15316 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
15319 2018-04-18 Martin Liska <mliska@suse.cz>
15322 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
15325 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15326 arguments if they are comparable.
15328 2018-04-18 Martin Liska <mliska@suse.cz>
15331 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
15334 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15337 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
15340 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
15341 ENDBR after calling __morestack.
15343 2018-04-18 David Malcolm <dmalcolm@redhat.com>
15346 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
15347 by using gcc_base_ver to generate a gcc_driver_version, and use
15348 it when generating GCC_DRIVER_NAME.
15349 * configure: Regenerate.
15351 2018-04-18 Jakub Jelinek <jakub@redhat.com>
15354 * config.gcc: Obsolete powerpc*-*-*spe*.
15356 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15359 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
15360 (stabstr_D): Change type of unum from unsigned int to
15361 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
15364 2018-04-17 Jim Wilson <jimw@sifive.com>
15367 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
15368 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
15369 Set arg_pointer_offset after using pretend_args_size.
15371 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15373 PR rtl-optimization/85431
15374 * dse.c (record_store): Ignore zero width stores.
15377 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
15378 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
15379 __builtin_stack_restore rather than after it.
15380 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
15381 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
15382 argument instead of virtual_dynamic_stack_rtx.
15384 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
15386 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
15388 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
15389 Add note to error message to explain internal mapping of overloaded
15390 built-in function name to non-overloaded built-in function name.
15391 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
15394 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
15397 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
15398 where the inputs overlap with the output.
15400 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15402 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
15403 (=v, v) alternative and explicit "memory" attribute.
15404 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
15405 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15407 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
15408 "sselog1" type instead of "sselog".
15409 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
15410 "sselog". Remove explicit "memory" attribute.
15411 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
15412 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15414 (vec_extract_hi_v32hi): Merge all alternatives into one, use
15415 "sselog1" type instead of "sselog". Remove explicit "memory"
15417 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
15418 use "sselog1" type instead of "sselog". Remove explicit "memory"
15420 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
15421 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15423 (vec_extract_hi_v64qi): Merge all alternatives into one, use
15424 "sselog1" type instead of "sselog". Remove explicit "memory"
15426 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
15427 use "sselog1" type instead of "sselog". Remove explicit "memory"
15431 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
15433 PR middle-end/85414
15434 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
15437 2018-04-17 Martin Jambor <mjambor@suse.cz>
15440 * ipa-cp.c (create_specialized_node): Call
15441 expand_all_artificial_thunks if necessary.
15443 2018-04-17 Martin Liska <mliska@suse.cz>
15446 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
15447 in message, remote space in between '_G' and '('.
15449 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15452 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
15453 avx512f_vmcmp<mode>3<round_saeonly_name>,
15454 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
15455 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
15456 avx512f_rndscale<mode><round_saeonly_name>,
15457 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
15458 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
15459 Use %<iptr>2 instead of %2 for -masm=intel.
15460 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
15461 avx512f_vcvttss2usi<round_saeonly_name>,
15462 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
15464 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
15465 avx512f_vcvttsd2usi<round_saeonly_name>,
15466 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
15467 Use %q1 instead of %1 for -masm=intel.
15468 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
15469 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
15470 of %3 for -masm=intel.
15471 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
15473 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
15475 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
15477 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
15478 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
15480 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
15482 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
15483 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
15484 %g1 and one with %0 and %1.
15485 (avx512er_vmrcp28<mode><round_saeonly_name>,
15486 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
15487 %1 for -masm=intel.
15488 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
15489 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
15490 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
15491 of %0 and %{%4%} for -masm=intel.
15492 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
15493 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
15494 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
15495 order of %0 and %{%5%}%{z%} for -masm=intel.
15497 2018-04-17 Jan Hubicka <jh@suse.cz>
15500 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
15502 2018-04-17 Martin Liska <mliska@suse.cz>
15505 * multiple_target.c (create_dispatcher_calls): Set apostrophes
15506 for target_clone error message. Make default implementation
15507 clone to be a local declaration.
15508 (separate_attrs): Add new argument and check for an empty
15510 (expand_target_clones): Handle it.
15511 (ipa_target_clone): Make redirection just for target_clones
15514 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
15515 Tom de Vries <tom@codesourcery.com>
15517 PR middle-end/84955
15518 * omp-expand.c (expand_oacc_for): Add dummy false branch for
15519 tiled basic blocks without omp continue statements.
15521 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
15524 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
15525 vec_extract expression as having side effects to make sure it gets
15528 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
15531 * config/i386/i386.c (get_builtin_code_for_version): Check
15534 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
15537 * config.gcc: Support "skylake".
15538 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15540 * config/i386/i386.c (m_SKYLAKE): Define.
15541 (processor_target_table): Add "skylake".
15542 (ix86_option_override_internal): Add "skylake".
15543 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
15544 PROCESSOR_CANNONLAKE.
15545 (get_builtin_code_for_version): Fix priority for
15546 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
15547 PROCESSOR_SKYLAKE-AVX512.
15548 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
15549 (processor_type): Add PROCESSOR_SKYLAKE.
15551 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
15552 Jason Merrill <jason@redhat.com>
15555 * convert.c (convert_to_integer_1): Use direct recursion for
15556 enumeral types and types with a precision less than the number
15557 of bits in their mode.
15559 2018-04-16 Julia Koval <julia.koval@intel.com>
15562 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
15563 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
15565 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
15568 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
15569 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
15570 and -mno-direct-move.
15572 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
15575 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
15576 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
15577 Ensure negative shifts result in {0}.
15579 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
15581 PR rtl-optimization/79916
15582 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
15583 regs (if any) to define how to gnerate SD moves when LRA is in
15586 2018-04-13 Jakub Jelinek <jakub@redhat.com>
15588 PR rtl-optimization/85393
15589 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
15590 * except.c (expand_dw2_landing_pad_for_region): Make static.
15591 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
15592 a label and unconditional jump to old_bb, rather than
15593 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
15596 PR rtl-optimization/85376
15597 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
15598 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
15599 instead of a specific value.
15601 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
15602 Bin Cheng <bin.cheng@arm.com>
15604 PR tree-optimization/82965
15605 PR tree-optimization/83991
15606 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
15607 by_profile_only parameter.
15608 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
15609 information if the loop was predicted to iterate too many times.
15610 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
15612 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
15615 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
15618 2018-04-13 Martin Liska <mliska@suse.cz>
15619 Jakub Jelinek <jakub@redhat.com>
15621 PR middle-end/81657
15622 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
15623 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
15624 * builtins.c (expand_builtin_memory_copy_args): Use
15625 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
15626 handle dest_addr == pc_rtx.
15628 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
15631 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
15632 asked to not generate direct moves.
15633 (fix_trunc<mode>si2_stfiwx): Similar.
15634 (fix_trunc<mode>si2_internal): Similar.
15636 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15639 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
15640 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
15641 lookup if dest in some wider mode is known to be const0_rtx and
15642 if so, record permanent equivalence for it to be ZERO_EXTEND of
15643 the narrower mode destination.
15645 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
15647 * lto-streamer-out.c (output_function): Revert 259346.
15648 * omp-expand.c (expand_oacc_for): Likewise.
15650 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
15652 PR rtl-optimization/85354
15653 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
15654 * sel-sched.c (sel_global_init): ... here.
15656 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
15659 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
15660 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
15661 mode for PE-COFF targets.
15662 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
15663 (i386_pe_asm_lto_end): Likewise.
15664 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
15665 (TARGET_ASM_LTO_END): Likewise.
15666 * config/i386/winnt.c (saved_debug_info_level): New static variable.
15667 (i386_pe_asm_lto_start): New function.
15668 (i386_pe_asm_lto_end): Likewise.
15670 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
15671 Richard Biener <rguenther@suse.de>
15673 PR middle-end/84955
15674 * lto-streamer-out.c (output_function): Fix CFG loop state before
15676 * omp-expand.c (expand_oacc_for): Handle calls to internal
15677 functions like regular functions.
15679 2018-04-12 Richard Biener <rguenther@suse.de>
15682 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
15683 for the early LTO debug to properly generate references to it
15684 during DIE emission. Do not re-use that for the skeleton for
15686 (dwarf2out_early_finish): Likewise.
15688 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15691 * config/i386/sse.md
15692 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
15693 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
15694 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
15695 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
15696 and output is a reg, avoid creating invalid lowpart subreg, but
15697 instead split into a 512-bit move. Don't split if not AVX512VL,
15698 input is xmm16+ reg and output is a mem.
15699 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
15700 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
15701 xmm16+ reg and output is a mem.
15703 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15705 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
15706 also for flag_dwarf2_cfi_asm.
15708 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15710 PR rtl-optimization/85342
15711 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
15712 a bool scalar var inside of the loop instead. Don't try to update
15713 recog_data.operand after failed apply_change_group.
15715 2018-04-12 Tom de Vries <tom@codesourcery.com>
15718 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
15719 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
15720 array with flexible array member as array without given dimension.
15721 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
15722 argument for undefined param to true.
15724 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
15727 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15728 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
15729 from PowerPC section.
15730 * config/rs6000/sysv4.opt (mcall-): Improve help text.
15731 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
15732 help text that is too long.
15733 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
15734 help text that is too long.
15735 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
15736 help text that is too long.
15738 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
15740 * config/alpha/alpha.md (stack_probe_internal): Rename
15741 from "probe_stack". Update all callers.
15743 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15745 PR rtl-optimization/84566
15746 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
15747 sched_macro_fuse_insns.
15749 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15752 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
15753 (compute_block_dependences): ... from here.
15755 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15757 PR tree-optimization/85331
15758 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
15759 from int to HOST_WIDE_INT.
15761 2018-04-11 Martin Jambor <mjambor@suse.cz>
15764 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
15765 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
15766 not the same as the source val.
15767 (cgraph_edge_brings_value_p): New parameter.
15768 (gather_edges_for_value): Pass destination value to
15769 cgraph_edge_brings_value_p.
15770 (perhaps_add_new_callers): Likewise.
15771 (get_info_about_necessary_edges): Likewise and exclude values brought
15772 only by self-recursive edges.
15773 (create_specialized_node): Redirect only clones of self-calling edges.
15774 (+self_recursive_pass_through_p): New function.
15775 (find_more_scalar_values_for_callers_subset): Use it.
15776 (find_aggregate_values_for_callers_subset): Likewise.
15777 (known_aggs_to_agg_replacement_list): Removed.
15778 (decide_whether_version_node): Re-calculate known constants for all
15779 remaining context clones.
15781 2018-04-11 Richard Biener <rguenther@suse.de>
15784 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
15785 from early DWARF output.
15786 (dwarf2out_early_finish): Output line info unconditionally into
15787 early DWARF and add reference to it.
15789 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15792 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
15793 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
15794 other than V2DFmode using iptr mode attribute.
15795 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
15797 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15799 PR rtl-optimization/84659
15800 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
15802 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15805 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
15807 (output_loc_list): Pass address of a dummy size variable even in the
15808 locview handling loop.
15809 (index_location_lists): Add comment on why skip_loc_list_entry can't
15812 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
15815 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
15818 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
15821 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15822 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
15823 and -mstring-compare-inline-limit.
15825 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15828 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
15829 for stack clash protection in a register whenever we need it to be in
15832 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15834 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
15835 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
15837 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15840 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
15842 (mlong-double-): Ditto.
15843 * config/rs6000/sysv4.opt (msdata=): Ditto.
15844 (mtls-size=): Ditto.
15846 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
15848 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15849 erroneous entries for
15850 "vector int vec_ldl (int, long int *)", and
15851 "vector unsigned int vec_ldl (int, unsigned long int *)".
15852 Add comments and entries for
15853 "vector bool char vec_ldl (int, bool char *)",
15854 "vector bool short vec_ldl (int, bool short *)",
15855 "vector bool int vec_ldl (int, bool int *)",
15856 "vector bool long long vec_ldl (int, bool long long *)",
15857 "vector pixel vec_ldl (int, pixel *)",
15858 "vector long long vec_ldl (int, long long *)",
15859 "vector unsigned long long vec_ldl (int, unsigned long long *)".
15860 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
15861 type tree bool_long_long_type_node and correct definition of
15862 bool_V2DI_type_node to make reference to this new type tree.
15863 (rs6000_mangle_type): Replace erroneous reference to
15864 bool_long_type_node with bool_long_long_type_node.
15865 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15866 comments to emphasize sign distinctions for char and int types and
15867 replace RS6000_BTI_bool_long constant with
15868 RS6000_BTI_bool_long_long constant. Also add comment to restrict
15869 use of RS6000_BTI_pixel.
15870 (bool_long_type_node): Remove this macro definition.
15871 (bool_long_long_type_node): New macro definition
15873 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15875 PR rtl-optimization/85300
15876 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15877 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15878 simplify_unary_operation fails.
15880 2018-04-10 Martin Liska <mliska@suse.cz>
15882 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15883 cgraph_edge and ipa_ref.
15885 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15889 * config/i386/sse.md
15890 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15891 computation of the VEC_MERGE selector from mask.
15892 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15893 Fix decoding of the VEC_MERGE selector into mask.
15895 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15897 PR tree-optimization/85286
15898 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15900 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15902 * final.c (final_1): Set insn_last_address as well as
15903 insn_current_address.
15905 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15908 * explow.c (emit_stack_probe): Call validize_mem on memory location
15909 before passing it to gen_probe_stack. Create address operand and
15910 legitimize it for the probe_stack_address case.
15912 2018-04-09 Jan Hubicka <jh@suse.cz>
15915 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15916 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15917 * tree.c (free_lang_data_in_type): Fix handling of binfos;
15919 (free_lang_data): Rebuild type inheritance graph.
15921 2018-04-09 Martin Sebor <msebor@redhat.com>
15923 * invoke.texi (-finline-small-functions): Mention other optimization
15925 (-findirect-inlining, -fpartial-inlining): Same.
15926 (-finline-functions-called-once): Same.
15927 (-freorder-blocks-and-partition): Same.
15929 2018-04-09 Jan Hubicka <jh@suse.cz>
15932 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15933 jumps; choose last target that matches the criteria (i.e.
15934 no partition changes for non-crossing jumps).
15935 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15936 support for redirecting crossing jumps to non-crossing.
15938 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
15940 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15941 also for naked functions.
15943 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
15945 * config/arc/arc.md (add_shift): New pattern.
15946 (add_shift2): Likewise.
15947 (sub_shift): Likewise.
15948 (sub_shift_cmp0_noout): Likewise.
15949 (compare_si_ashiftsi): Likewise.
15950 (xbfu_cmp0_noout): New combine pattern.
15951 (xbfu_cmp0"): Likewise.
15952 (movsi_set_cc_insn): Place the predicable variant first.
15953 (commutative_binary_cmp0_noout): Remove clobber.
15954 (commutative_binary_cmp0): New pattern.
15955 (noncommutative_binary_cmp0): Likewise.
15956 (noncommutative_binary_cmp0_noout): Likewise.
15957 (noncommutative_binary_comparison_result_used): Removed.
15958 (rsub_cmp0): New pattern.
15959 (rsub_cmp0_noout): Likewise.
15960 (extzvsi): Changed, keep only meaningful variants.
15961 (SQH, SEZ): New iterators.
15962 (SQH_postfix): New mode attribute.
15963 (SEZ_prefix): New code attribute.
15964 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15965 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15966 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15967 of numerical value.
15968 (noncommutative_operator): Check the availability of barrel
15971 2018-04-09 Richard Biener <rguenther@suse.de>
15973 PR tree-optimization/85284
15974 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15975 Only use the niter constraining form of simple_iv when the exit
15976 is always executed.
15978 2018-04-09 Tom de Vries <tom@codesourcery.com>
15981 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15982 (define_expand "*memory_barrier"): New define_expand.
15983 (define_insn "memory_barrier"): New insn.
15985 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15987 PR rtl-optimization/80463
15988 PR rtl-optimization/83972
15989 PR rtl-optimization/83480
15991 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15992 correct producer for the insn.
15993 (tidy_control_flow): Fixup seqnos in case of debug insns.
15995 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15997 PR rtl-optimization/83913
15999 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
16000 different sched-times when merging exprs.
16002 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
16004 PR rtl-optimization/83962
16006 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
16007 tidy_fallthru_edge and tidy_control_flow.
16009 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
16011 PR rtl-optimization/83530
16013 * sel-sched.c (force_next_insn): New global variable.
16014 (remove_insn_for_debug): When force_next_insn is true, also leave only
16015 next insn in the ready list.
16016 (sel_sched_region): When the region wasn't scheduled, make another pass
16017 over it with force_next_insn set to 1.
16019 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
16021 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
16023 * config/nds32/constants.md (unspec_volatile_element): Add enum values
16024 for interrupt control.
16025 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
16026 functions for interrupt control.
16027 * config/nds32/nds32-intrinsic.md: Likewise.
16028 * config/nds32/nds32_intrinsic.h: Likewise.
16029 * config/nds32/nds32.h (nds32_builtins): Likewise.
16031 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
16033 * config/nds32/nds32.c (nds32_init_machine_status,
16034 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
16035 strict_aligned_p field.
16036 (nds32_expand_to_rtl_hook): New function.
16037 (TARGET_EXPAND_TO_RTL_HOOK): Define.
16038 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
16040 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
16041 Chung-Ju Wu <jasonwucj@gmail.com>
16043 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
16044 * config/nds32/nds32-n7.md: New file.
16045 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
16046 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
16048 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
16049 * config/nds32/nds32.md (pipeline_model): Add n7.
16050 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
16051 * config/nds32/pipelines.md: Include n7 settings.
16053 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
16054 Chung-Ju Wu <jasonwucj@gmail.com>
16056 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
16057 * config/nds32/nds32-e8.md: New file.
16058 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
16059 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
16061 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
16062 * config/nds32/nds32.md (pipeline_model): Add e8.
16063 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
16064 * config/nds32/pipelines.md: Include e8 settings.
16066 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
16067 Chung-Ju Wu <jasonwucj@gmail.com>
16069 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
16070 * config/nds32/nds32-n8.md: New file.
16071 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
16072 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
16074 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
16075 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
16076 * config/nds32/nds32.md (pipeline_model): Add n8.
16077 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
16078 * config/nds32/pipelines.md: Include n8 settings.
16080 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
16081 Chung-Ju Wu <jasonwucj@gmail.com>
16083 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
16084 * config/nds32/nds32-n9-2r1w.md: New file.
16085 * config/nds32/nds32-n9-3r2w.md: New file.
16086 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
16087 nds32_register_ports): New or modify for cpu n9.
16088 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
16090 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
16091 * config/nds32/nds32-utils.c: New file.
16092 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
16093 TARGET_MUL_SLOW): Define.
16094 * config/nds32/nds32.md (pipeline_model): New attribute.
16095 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
16096 New options that support cpu n9.
16097 * config/nds32/pipelines.md: Include n9 settings.
16098 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
16100 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
16102 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
16103 information if necessary.
16104 (output_cond_branch_compare_zero): Likewise.
16105 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
16106 (nds32_target_alignment): Refine for alignment.
16107 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
16108 (FUNCTION_BOUNDARY): Modify.
16109 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
16111 * config/nds32/nds32.opt (malways-align, malign-functions): New.
16113 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
16115 * config/nds32/constants.md (unspec_volatile_element): Add values for
16116 TLB operation and data prefetch.
16117 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
16118 functions for TLB operation and data prefetch.
16119 * config/nds32/nds32-intrinsic.md: Likewise.
16120 * config/nds32/nds32_intrinsic.h: Likewise.
16121 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
16122 (nds32_print_operand): Likewise.
16123 * config/nds32/nds32.h (nds32_builtins): Likewise.
16125 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
16126 Andrew Pinski <pinsika@gcc.gnu.org>
16128 PR middle-end/82976
16129 * match.pd: Use constant_boolean_node of correct type instead of
16130 boolean_true_node or boolean_false_node for simplifying
16131 pointer comparisons to zero.
16133 2018-04-07 Jakub Jelinek <jakub@redhat.com>
16135 PR tree-optimization/80021
16136 * tree.c (verify_type_variant): Make error call in verify_variant_match
16137 translatable and remove final full stop.
16139 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16141 * config/nds32/constants.md (unspec_volatile_element): Add
16142 UNSPEC_VOLATILE_EH_RETURN.
16143 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
16144 nds32_output_stack_pop): Support dwarf exception handling process.
16145 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
16146 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
16147 exception handling process.
16148 (nds32_compute_stack_frame): Likewise.
16149 (nds32_return_addr_rtx): Likewise.
16150 (nds32_initial_elimination_offset): Likewise.
16151 (nds32_expand_prologue): Likewise.
16152 (nds32_expand_epilogue): Likewise.
16153 (nds32_dynamic_chain_address): New function.
16154 * config/nds32/nds32.h (machine_function): Add fields for dwarf
16155 exception handling.
16156 (DYNAMIC_CHAIN_ADDRESS): Define.
16157 (EH_RETURN_DATA_REGNO): Define.
16158 (EH_RETURN_STACKADJ_RTX): Define.
16159 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
16160 patterns for dwarf exception handling.
16162 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16164 * config/nds32/nds32.h: Clean up obsolete macros.
16166 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16168 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16169 Add enum values for particular instructions.
16170 * config/nds32/nds32-intrinsic.c: Implementation of expanding
16171 particular intrinsic functions.
16172 * config/nds32/nds32-intrinsic.md: Likewise.
16173 * config/nds32/nds32_intrinsic.h: Likewise.
16174 * config/nds32/nds32.h (nds32_builtins): Likewise.
16175 * config/nds32/nds32.md (type): Add pbsad and pbsada.
16176 (btst, ave): New patterns for particular instructions.
16178 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16180 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16181 Add enum values for atomic load/store and memory sync.
16182 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
16184 * config/nds32/nds32-intrinsic.md: Likewise.
16185 * config/nds32/nds32_intrinsic.h: Likewise.
16186 * config/nds32/nds32.h (nds32_builtins): Likewise.
16188 2018-04-07 Jakub Jelinek <jakub@redhat.com>
16190 PR tree-optimization/85257
16191 * fold-const.c (native_encode_vector): If not all elts could fit
16192 and off is -1, return 0 rather than offset.
16193 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
16194 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
16195 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
16196 adjust buffer in native_interpret_expr call.
16198 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16200 * config/nds32/constants.md (unspec_volatile_element): Add cache
16201 control enum values.
16202 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
16203 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
16204 * config/nds32/nds32.c (nds32_cctl_names): New.
16205 (nds32_print_operand): Handle cache control register names.
16206 * config/nds32/nds32.h (nds32_builtins): New enum values.
16207 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
16209 * config/nds32/nds32.md (type): Add mmu.
16210 * config/nds32/pipelines.md (simple_insn): Add mmu.
16212 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16214 * config/nds32/nds32.md (type): Remove call.
16215 * config/nds32/pipelines.md (simple_insn): Likewise.
16217 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16219 * config/nds32/constants.md (unspec_volatile_element): Add
16220 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
16221 UNSPEC_VOLATILE_FMFCFG.
16222 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
16223 description for fmfcfg and fmfcsr.
16224 (bdesc_1arg): Add fmtcsr.
16225 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
16226 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
16227 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
16228 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
16229 unspec_fmfcfg): New patterns.
16230 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
16231 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
16232 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
16233 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
16234 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
16235 __nds32__fmfcfg): Define.
16237 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16239 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
16240 intrinsic register names.
16241 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
16242 intrinsic register enum values and macros.
16244 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16246 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
16247 for load/store addressing form.
16248 (nds32_print_operand_address): Likewise.
16250 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
16253 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
16254 based on LABEL_REF. Remove useless assertion.
16255 (pic_address_needs_scratch): Fix formatting.
16256 (sparc_legitimize_pic_address): Minor tweaks.
16257 (sparc_delegitimize_address): Adjust assertion accordingly.
16258 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
16259 into symbolic_operand.
16260 (movsi_high_pic_label_ref): Likewise.
16261 (movsi_lo_sum_pic_label_ref): Likewise.
16262 (movdi_pic_label_ref): Likewise.
16263 (movdi_high_pic_label_ref): Likewise.
16264 (movdi_lo_sum_pic_label_ref): Likewise.
16266 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
16268 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
16269 custom LIB_SPEC setup.
16271 2018-04-06 Ruslan Bukin <br@bsdpad.com>
16272 Kito Cheng <kito.cheng@gmail.com>
16274 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
16275 * config/riscv/freebsd.h: New.
16277 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16279 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
16280 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
16283 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16284 Kito Cheng <kito.cheng@gmail.com>
16286 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
16287 nds32_output_call, nds32_symbol_binds_local_p): New functions.
16288 * config/nds32/nds32-protos.h (nds32_output_call,
16289 nds32_output_return): Declare.
16290 * config/nds32/nds32.md: Refine all the call and return patterns.
16292 2018-04-06 Jakub Jelinek <jakub@redhat.com>
16295 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
16296 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
16298 PR rtl-optimization/84872
16299 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
16300 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
16301 EDGE_CROSSING edge.
16303 2018-04-06 Tamar Christina <tamar.christina@arm.com>
16305 * expr.c (copy_blkmode_to_reg): Revert 254862.
16306 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
16308 2018-04-06 Richard Biener <rguenther@suse.de>
16310 PR middle-end/85244
16311 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
16312 after seeing a component reference with an adjacent field. Treat
16313 refs to arrays at struct end of external decls similar to
16314 refs to unconstrained commons.
16316 2018-04-06 Jakub Jelinek <jakub@redhat.com>
16319 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
16320 look through SAVE_EXPRs with non-side-effects argument. Adjust
16322 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
16325 2018-04-06 Richard Biener <rguenther@suse.de>
16327 PR middle-end/85180
16328 * alias.c (find_base_term): New wrapper around find_base_term
16329 unwinding CSELIB_VAL_PTR changes.
16330 (find_base_term): Do not restore CSELIB_VAL_PTR during the
16333 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16335 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
16337 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
16338 constant definitions.
16339 ("nop"): lr 0,0 -> nopr r0
16340 ("nop_lr0", "nop_lr1"): New insn definitions.
16342 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16344 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
16345 NDS32_V3PUSH_AVAILABLE_P macro.
16347 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
16348 Chung-Ju Wu <jasonwucj@gmail.com>
16350 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
16351 (nds32*-*-*): Add float and fpu_config into supported_defaults.
16352 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
16353 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
16354 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
16355 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
16356 * config/nds32/constraints.md: New constraints and checking for hard
16357 float configuration.
16358 * config/nds32/iterators.md: New mode iterator and attribute for hard
16359 float configuration.
16360 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
16362 * config/nds32/nds32-fpu.md: New file.
16363 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
16364 deal with hard float code generation.
16365 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
16367 (abi_type, float_reg_number): New enum type.
16368 * config/nds32/nds32-predicates.c: New predicates for hard float.
16369 * config/nds32/nds32-protos.h: Declare functions for hard float.
16370 * config/nds32/nds32.c: Implementation for hard float configuration.
16371 * config/nds32/nds32.h: Definitions for hard float configuration.
16372 * config/nds32/nds32.md: Include hard float machine description and
16373 modify patterns for hard float configuration.
16374 * config/nds32/nds32.opt: New options for hard float configuration.
16375 * config/nds32/predicates.md: New predicates for hard float
16378 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16380 * common/config/nds32/nds32-common.c
16381 (nds32_option_optimization_table): Enable -mreleax-hint by default.
16383 2018-04-05 Jakub Jelinek <jakub@redhat.com>
16385 PR middle-end/85195
16386 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
16387 CONSTRUCTOR_ELT (ctor, ...)->value.
16389 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
16392 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
16394 2018-04-05 Tom de Vries <tom@codesourcery.com>
16397 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
16400 2018-04-05 Shiva Chen <shiva0217@gmail.com>
16401 Kito Cheng <kito.cheng@gmail.com>
16403 * config/nds32/constraints.md (U33): Fine-tune checking condition.
16404 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
16405 * config/nds32/nds32.h (nds32_16bit_address_type): Add
16406 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
16408 2018-04-05 Shiva Chen <shiva0217@gmail.com>
16409 Kito Cheng <kito.cheng@gmail.com>
16411 * config/nds32/constraints.md (Ufe): New memory constraint.
16412 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
16413 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
16414 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
16416 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
16417 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
16419 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16421 * config/nds32/nds32.md: Use optimize_size in the condition for
16422 alu-shift instructions.
16424 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16426 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
16428 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16430 * config/nds32/nds32.md (negsi2): Refine pattern.
16432 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
16433 Chung-Ju Wu <jasonwucj@gmail.com>
16435 * config/nds32/iterators.md (shift_rotate): New code iterator.
16436 (shift): New code attribute.
16437 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
16438 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
16439 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
16440 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
16441 bit-wise operations.
16442 (andsi3, *andsi3): Ditto.
16443 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
16444 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
16445 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
16446 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
16447 nds32_ior_operand, nds32_xor_operand): New predicates.
16449 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16451 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
16452 (addsi3, subsi3): ... this.
16454 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16456 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
16458 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16460 * config/nds32/nds32.md: Adjust indention.
16462 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
16464 * config/nds32/nds32.md (feature): New attribute.
16466 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16468 * config/nds32/nds32.md (subtype): New attribute.
16470 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
16473 * config/arm/arm-builtins.c (arm_expand_builtin): Change
16474 expansion to perform a bitwise AND of the argument followed by a
16475 boolean negation of the result.
16477 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
16479 PR rtl-optimization/84878
16480 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
16481 the basic block. Assert the use reference is not artificial and that
16482 it has an associated insn.
16484 2018-04-04 Michael Matz <matz@suse.de>
16486 * builtins.c (compute_objsize): Pass correct operand
16487 to array_at_struct_end_p.
16489 2018-04-04 Richard Biener <rguenther@suse.de>
16492 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
16493 from contexts for DINFO_LEVEL_TERSE and below.
16495 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16497 * config/nds32/nds32-doubleword.md (move_<mode>): Require
16498 resiter_operand condition.
16499 * config/nds32/nds32.md (*move<mode>): Ditto.
16501 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16502 Monk Chiang <sh.chiang04@gmail.com>
16504 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
16506 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16508 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
16510 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16511 Kito Cheng <kito.cheng@gmail.com>
16513 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
16514 nds32_cond_code_str, output_cond_branch,
16515 output_cond_branch_compare_zero, nds32_expand_cbranch,
16516 nds32_expand_cstore, nds32_expand_movcc,
16517 nds32_output_cbranchsi4_equality_zero,
16518 nds32_output_cbranchsi4_equality_reg,
16519 nds32_output_cbranchsi4_equality_reg_or_const_int,
16520 nds32_output_cbranchsi4_greater_less_zero: New functions.
16521 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
16522 nds32_expand_cstore, nds32_expand_movcc,
16523 nds32_output_cbranchsi4_equality_zero,
16524 nds32_output_cbranchsi4_equality_reg,
16525 nds32_output_cbranchsi4_equality_reg_or_const_int,
16526 nds32_output_cbranchsi4_greater_less_zero): Declare.
16527 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
16528 nds32_rimm11s_operand): New predicates.
16529 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
16530 * config/nds32/nds32.md: Rewrite all the branch and conditional move
16533 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16535 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
16536 * config/nds32/nds32.md: Ditto.
16537 * config/nds32/pipelines.md: Ditto.
16539 2018-04-04 Richard Biener <rguenther@suse.de>
16541 PR tree-optimization/85168
16542 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
16543 propagating abnormals.
16545 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16547 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
16549 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16550 Kito Cheng <kito.cheng@gmail.com>
16552 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
16553 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
16554 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
16555 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
16556 * config/nds32/nds32.md (sibcall_internal): New.
16557 (sibcall_register): Remove.
16558 (sibcall_immediate): Remove.
16559 (sibcall_value_internal): New.
16560 (sibcall_value_register): Remove.
16561 (sibcall_value_immediate): Remove.
16562 * config/nds32/predicates.md (nds32_general_register_operand): New.
16563 (nds32_call_address_operand): New.
16565 2018-04-03 Jakub Jelinek <jakub@redhat.com>
16567 PR rtl-optimization/85167
16568 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
16569 bb_defs if *split_p, instead preinitialize it to NULL.
16571 PR tree-optimization/85156
16572 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
16573 evaluating the argument multiple times.
16575 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
16577 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
16579 (_mm_cvtpd_ps): Likewise.
16580 (_mm_cvttpd_epi32): Likewise.
16581 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
16582 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
16583 vector, pixel, and bool following altivec.h include.
16585 2018-04-03 Martin Sebor <msebor@redhat.com>
16587 * doc/extend.texi (Common Function Attributes): Clarify.
16588 (const attribute): Likewise.
16589 (pure attribute): Likewise.
16591 2018-04-03 Jakub Jelinek <jakub@redhat.com>
16594 * config/i386/i386.c (ix86_expand_vector_set): Use
16595 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
16597 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
16599 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
16600 instructions when changing rounding bits to preserve precision bits
16601 in the x87 control word.
16603 2018-04-03 Martin Liska <mliska@suse.cz>
16605 PR tree-optimization/82491
16606 * rtl.h (strip_offset_and_add): Replace += suboffset with
16607 poly_uint64 () + suboffset.
16609 2018-03-29 Martin Liska <mliska@suse.cz>
16610 Martin Jambor <mjambor@suse.cz>
16613 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
16614 param_type is not an integral or pointer type.
16616 2018-04-03 Richard Biener <rguenther@suse.de>
16618 * sese.h (recompute_all_dominators): Remove.
16620 2018-04-02 Martin Sebor <msebor@redhat.com>
16622 * doc/invoke.texi (-Wrestrict): Fix typos.
16624 2018-04-02 Jim Wilson <jimw@sifive.com>
16626 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
16627 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
16628 (<optab>di3, <optab>si3_extend): Likewise.
16629 (<optab>si3_mask, <optab>si3_mask_1): New.
16630 (<optab>di3_mask, <optab>di3_mask_1): New.
16631 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
16632 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
16633 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
16635 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
16637 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
16640 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
16642 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
16643 (nds32_canonicalize_comparison): New function.
16645 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16646 Kito Cheng <kito.cheng@gmail.com>
16647 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16649 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
16650 * config/nds32/constants.md (unspec_volatile_element): Add
16651 UNSPEC_VOLATILE_RELAX_GROUP.
16652 * config/nds32/nds32-relax-opt.c: New file.
16653 * config/nds32/nds32-predicates.c
16654 (nds32_symbol_load_store_p): New function.
16655 * config/nds32/nds32-protos.h
16656 (nds32_symbol_load_store_p): Declare function.
16657 (make_pass_nds32_relax_opt): Declare new rtl pass function.
16658 * config/nds32/nds32.c
16659 (nds32_register_pass): New function to register pass.
16660 (nds32_register_passes): New function to register passes.
16661 * config/nds32/nds32.md (relax_group): New pattern.
16662 * config/nds32/nds32.opt (mrelax-hint): New option.
16663 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
16665 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
16667 * config/nds32/t-nds32: Modify files dependency.
16669 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16671 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
16672 (PROFILE_HOOK): Define its implementation.
16674 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16676 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
16677 type and 32-bit size.
16679 2018-04-01 Jakub Jelinek <jakub@redhat.com>
16681 PR middle-end/85090
16682 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
16683 (V_128_256): New mode iterator.
16684 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
16685 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
16686 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
16688 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
16689 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
16691 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
16694 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
16695 NaN inputs correctly.
16697 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
16700 * config/rs6000/vsx.md (??r): New mode attribute.
16701 (*vsx_mov<mode>_64bit): Use it.
16702 (*vsx_mov<mode>_32bit): Likewise.
16704 2018-03-30 Martin Sebor <msebor@redhat.com>
16706 PR tree-optimization/84818
16707 * builtins.c (check_access): Use warning_n.
16709 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16712 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
16714 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
16717 2018-03-30 Julia Koval <julia.koval@intel.com>
16720 * x86-tune.def (movx, partial_reg_dependency): Enable for
16723 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
16725 PR inline-asm/84985
16726 * lra-constraints.c (process_alt_operands): Move setting
16727 this_alternative_matches below.
16729 2018-03-29 Martin Liska <mliska@suse.cz>
16732 * doc/invoke.texi: Document how LTO works with debug info.
16733 Describe auto-load support of binutils. Mention 'x86-64'
16734 as valid option value of -march option.
16736 2018-03-29 Jakub Jelinek <jakub@redhat.com>
16738 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
16741 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
16742 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
16743 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
16746 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16749 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
16750 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
16751 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
16752 for RS6000_BTM_POWERPC64.
16753 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
16754 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
16755 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
16758 (DIVDEU): Likewise.
16760 2018-03-28 Carl Love <cel@us.ibm.com>
16763 2017-09-27 Carl Love <cel@us.ibm.com>
16765 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
16766 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
16767 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
16770 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16772 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
16773 instead of __vector bool.
16774 (_mm_max_pu8): Likewise.
16775 (_mm_min_pi16): Likewise.
16777 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16780 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
16781 (DIVWEUO): Likewise.
16782 (DIVDEO): Likewise.
16783 (DIVDEUO): Likewise.
16784 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
16785 DIVWEUO and DIVDEUO.
16786 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
16787 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
16788 (div_extend): Likewise.
16789 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
16791 (__builtin_divweuo): Likewise.
16792 (__builtin_divdeo): Likewise.
16793 (__builtin_divdeuo): Likewise.
16795 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16798 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
16799 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
16801 PR tree-optimization/82004
16802 * gimple-match-head.c (optimize_pow_to_exp): New function.
16803 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
16804 Don't fold to exp if optimize_pow_to_exp is false.
16806 2018-03-28 Martin Liska <mliska@suse.cz>
16809 * calls.c (initialize_argument_information): Fix trailing space.
16810 * common.opt: Fix typo and provide better explanation for
16811 -fsanitize-coverage option.
16812 * config/i386/i386.opt: Fix typo.
16814 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16815 Martin Liska <mliska@suse.cz>
16818 * gimplify.c (asan_poison_variable): Don't do the check for
16819 gimplify_omp_ctxp here.
16820 (gimplify_decl_expr): Do it here.
16821 (gimplify_target_expr): Likewise.
16823 2018-03-28 Martin Liska <mliska@suse.cz>
16826 * config/i386/i386.c (ix86_function_arg_advance): Do not call
16827 chkp_type_bounds_count if MPX is not enabled.
16829 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
16831 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
16833 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
16836 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
16837 function to create the function decl for complex long double
16838 multiply and divide for -mabi=ieeelongdouble.
16839 (init_float128_ieee): Call it.
16841 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
16844 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
16845 -fcf-protection=branch -mibt.
16846 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
16848 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16851 * config/arm/arm.c (arm_valid_symbolic_address): Handle
16852 arm_word_relocations.
16854 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
16857 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
16858 extern array declarations.
16860 2018-03-27 Richard Biener <rguenther@suse.de>
16862 PR middle-end/84067
16863 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16864 explicit single_use checks.
16866 2018-03-27 Richard Biener <rguenther@suse.de>
16868 PR tree-optimization/85082
16869 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16872 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16874 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16875 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16876 Turn on fasynchronous-unwind-tables and funwind-tables.
16878 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
16881 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16882 (*bmi_blsr_<mode>_ccz): Ditto.
16884 2018-03-26 Tom de Vries <tom@codesourcery.com>
16886 PR tree-optimization/85063
16887 * omp-general.c (offloading_function_p): New function. Factor out
16889 * omp-offload.c (pass_omp_target_link::gate): ... here.
16890 * omp-general.h (offloading_function_p): Declare.
16891 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16892 with attribute omp declare target for offloading functions.
16894 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
16896 PR tree-optimization/84005
16897 * tree-data-ref.h (get_base_for_alignment): Declare.
16898 * tree-data-ref.c (get_base_for_alignment_1): New function.
16899 (get_base_for_alignment): Likewise.
16900 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16901 get_base_for_alignment to find a suitable base object, instead
16902 of always using drb->base_address.
16904 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16906 PR inline-asm/85022
16907 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16908 known size by default.
16910 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
16912 PR inline-asm/85030
16913 * lra-constraints.c (process_alt_operands): Don't match BLKmode
16914 and non BLKmode operands.
16916 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16919 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16920 Clean up attributes.
16922 2018-03-23 Richard Biener <rguenther@suse.de>
16925 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16926 we are going to emit early debug for LTO.
16928 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16930 PR inline-asm/85034
16931 * function.c (match_asm_constraints_1): Don't optimize if input
16932 doesn't satisfy general_operand predicate for output's mode.
16934 PR inline-asm/85022
16935 * alias.c (write_dependence_p): Don't require for x_canonicalized
16936 non-VOIDmode if x has VOIDmode.
16939 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16940 just don't try to optimize it rather than assert it never happens.
16942 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16944 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16945 macro expansions for definition of ST_INTERNAL_<mode> and
16946 LD_INTERNAL_<mode> builtins.
16947 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16949 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16951 (altivec_expand_st_builtin): Likewise.
16952 (altivec_expand_builtin): Remove calls to deleted functions.
16953 (rs6000_address_for_altivec): Delete this function.
16954 * config/rs6000/vector.md: Remove expands for
16955 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16957 2018-03-22 Sudakshina Das <sudi.das@arm.com>
16960 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16961 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16962 re-computing once computed.
16963 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16964 (arm_init_machine_status): Initialize
16965 machine->static_chain_stack_bytes.
16967 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16970 * doc/extend.texi: Add four new prototypes for vec_ld.
16971 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16972 definitions for more logical presentation.
16973 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16974 entries for V1TI variants of __builtin_altivec_ld builtin.
16975 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16976 handling of V1TI variant of LVX icode pattern.
16977 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16978 (rs6000_gimple_fold_builtin): Likewise.
16979 (altivec_init_builtins): Add code to define
16980 __builtin_altivec_lvx_v1ti function.
16982 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16984 PR inline-asm/84941
16985 * function.c (match_asm_constraints_1): Don't do the optimization
16986 if input isn't a REG, SUBREG, MEM or constant.
16988 2018-03-22 Tom de Vries <tom@codesourcery.com>
16990 PR tree-optimization/84956
16991 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16992 bb_has_abnormal_pred.
16994 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16997 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16998 DECL_INITIAL (decl) to decl at the end.
16999 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
17000 adjust the comment.
17002 2018-03-21 Joseph Myers <joseph@codesourcery.com>
17004 * doc/extend.texi (__builtin_tgmath): Document when complex
17005 integer types are treated as _Complex _Float64.
17007 2018-03-21 Tom de Vries <tom@codesourcery.com>
17009 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
17011 2018-03-21 Jakub Jelinek <jakub@redhat.com>
17013 PR tree-optimization/84960
17014 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
17015 if it is ENTRY block, move them into single succ of ENTRY in that case.
17017 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
17019 PR tree-optimization/84811
17020 * poly-int.h (poly_span_traits): Remove the T3 parameter and
17021 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
17022 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
17023 (known_subrange_p): Update accordingly. Cast each value involved
17024 in the size comparison, rather than casting the result of the
17027 2018-03-21 Jakub Jelinek <jakub@redhat.com>
17029 PR tree-optimization/84982
17030 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
17031 by flipping the least significant bit rather than all bits from
17032 bitpos to bitpos + bitsize - 1.
17034 2018-03-21 Nathan Sidwell <nathan@acm.org>
17036 * doc/extend.texi (Deprecated Features): Remove mention of
17037 long-deleted deprecations.
17039 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17042 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
17043 * configure: Regenerate.
17045 2018-03-21 Tom de Vries <tom@codesourcery.com>
17047 PR tree-optimization/83126
17048 * tree-parloops.c (num_phis): New function.
17049 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
17051 2018-03-21 Nathan Sidwell <nathan@acm.org>
17053 * doc/extend.texi (Deprecated Features): Update deprecated flags,
17054 mention anon-struct/union members and trailing attributes.
17056 2018-03-21 Bin Cheng <bin.cheng@arm.com>
17058 PR tree-optimization/84969
17059 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
17060 builtin memset partitions if they set different rhs values.
17062 2018-03-21 Jakub Jelinek <jakub@redhat.com>
17064 PR rtl-optimization/84989
17065 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
17066 VEC_DUPLICATE with scalar result mode.
17068 2018-03-21 Martin Liska <mliska@suse.cz>
17071 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
17072 not intended return statement.
17074 2018-03-21 Martin Liska <mliska@suse.cz>
17077 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
17078 (chkp_find_bound_slots_1): Limit number of iterations.
17080 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
17083 * Minor grammar fixes for x86 options.
17085 2018-03-20 Jakub Jelinek <jakub@redhat.com>
17088 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
17089 holding REG_CFA_RESTORE notes, instead turn them into a USE.
17091 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
17094 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
17095 (altivec_lvx_<mode>_1op): Likewise.
17096 (altivec_stvx_<mode>_2op): Likewise.
17097 (altivec_stvx_<mode>_1op): Likewise.
17098 (altivec_lvx_<VM2:mode>): New define_expand.
17099 (altivec_stvx_<VM2:mode>): Likewise.
17100 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
17101 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
17102 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
17103 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
17104 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
17105 (rs6000_gen_lvx): Likewise.
17106 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
17107 (altivec_expand_stv_builtin): Likewise.
17108 (altivec_expand_builtin): Likewise.
17109 * config/rs6000/vector.md: Likewise.
17111 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17114 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
17117 2018-03-20 Richard Biener <rguenther@suse.de>
17120 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
17121 sign-conversions as zero, fall back to standard scalar_stmt
17124 2018-03-20 Martin Liska <mliska@suse.cz>
17127 * predict.c (rebuild_frequencies): Handle case when we have
17128 PROFILE_ABSENT, but flag_guess_branch_prob is false.
17130 2018-03-20 Jakub Jelinek <jakub@redhat.com>
17133 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
17134 flag_section_anchors.
17135 * varasm.c (use_blocks_for_decl_p): Remove hack for
17136 dw2_force_const_mem.
17139 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
17141 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
17142 be created, use lowpart_subreg of operands[0] rather than operands[0]
17144 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
17145 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
17146 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
17147 and n constraint instead of aarch64_shift_imm_di and Usd.
17148 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
17149 (*aarch64_<optab>_reg_minus<mode>3): ... this.
17151 2018-03-20 Sudakshina Das <sudi.das@arm.com>
17154 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
17155 to favor GPR over NEON registers.
17156 (<shift>di3_neon): Likewise.
17158 2018-03-20 Tom de Vries <tom@codesourcery.com>
17161 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
17162 (nvptx_process_pars): Emit bar.sync asap and alap.
17164 2018-03-20 Tom de Vries <tom@codesourcery.com>
17167 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
17168 seen_label if seen_label is already set.
17170 2018-03-20 Jakub Jelinek <jakub@redhat.com>
17173 * config/i386/i386.c (fold_builtin_cpu): For features above 31
17174 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
17175 Use 1U instead of 1. Formatting fixes.
17178 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
17179 instead of TREE_TYPE (s1) for the return value.
17181 2018-03-19 Jakub Jelinek <jakub@redhat.com>
17183 PR tree-optimization/84946
17184 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
17185 bitsize + bitsize in poly_uint64 rather than poly_int64.
17188 * dwarf2asm.c: Include fold-const.c.
17189 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
17190 of decl rather than decl itself.
17192 PR rtl-optimization/84643
17193 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
17195 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
17198 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
17199 calling assemble_variable.
17201 2018-03-19 Sudakshina Das <sudi.das@arm.com>
17204 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
17205 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
17207 2018-03-19 Jim Wilson <jimw@sifive.com>
17210 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
17211 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
17212 (riscv_first_stack_step): Likewise.
17213 (riscv_option_override): Use STACK_BOUNDARY instead of
17214 MIN_STACK_BOUNDARY.
17215 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
17216 MIN_STACK_BOUNDARY.
17217 (BIGGEST_ALIGNMENT): Set to 128.
17218 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
17219 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
17222 2018-03-19 Richard Biener <rguenther@suse.de>
17224 PR tree-optimization/84933
17225 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
17226 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
17228 2018-03-19 Richard Biener <rguenther@suse.de>
17230 PR tree-optimization/84859
17231 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
17232 (cond_if_else_store_replacement): Perform sinking operation on
17233 single-store BBs regardless of MAX_STORES_TO_SINK setting.
17234 Generalize what a BB with a single eligible store is.
17236 2018-03-19 Richard Biener <rguenther@suse.de>
17238 PR tree-optimization/84929
17239 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
17240 chrec_is_positive against non-chrec arg.
17242 2018-03-19 Tamar Christina <tamar.christina@arm.com>
17245 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
17247 2018-03-18 Martin Liska <mliska@suse.cz>
17249 PR rtl-optimization/84635
17250 * regrename.c (build_def_use): Use matches_mode only when
17253 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
17255 PR tree-optimization/84913
17256 * tree-vect-loop.c (vectorizable_reduction): Don't try to
17257 vectorize chains of COND_EXPRs.
17259 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17261 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
17263 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17265 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
17267 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17269 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
17271 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
17272 Kito Cheng <kito.cheng@gmail.com>
17274 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
17275 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
17276 (nds32_adjust_reg_alloc_order): New function.
17277 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
17279 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
17281 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
17282 nds32_print_operand, nds32_print_operand_address): Use
17283 HOST_WIDE_INT_PRINT_DEC instead.
17285 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
17287 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
17289 2018-03-17 Jakub Jelinek <jakub@redhat.com>
17292 * config/i386/i386.c (initial_ix86_tune_features,
17293 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
17294 unsigned long long.
17295 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
17296 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
17297 rather than 1u << ix86_tune. Formatting fix.
17298 (ix86_option_override_internal): Change ix86_arch_mask from
17299 unsigned int to unsigned HOST_WIDE_INT, initialize to
17300 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
17301 (ix86_function_specific_restore): Likewise.
17303 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17306 * postreload.c (reload_combine_recognize_pattern): Perform
17307 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
17308 truncate_int_for_mode the result for the destination's mode.
17311 * hsa-gen.c (mem_type_for_type): Fix comment typo.
17312 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
17314 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17317 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
17320 * lra-assigns.c (lra_split_hard_reg_for): Don't use
17321 regno_allocno_class_array and sorted_pseudos.
17322 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
17323 insns where regno is used.
17325 2018-03-16 Martin Liska <mliska@suse.cz>
17328 * multiple_target.c (create_dispatcher_calls): Redirect
17329 reference in the symbol table.
17331 2018-03-16 Martin Liska <mliska@suse.cz>
17334 * multiple_target.c (create_dispatcher_calls): Redirect also
17337 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17341 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
17342 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
17343 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
17345 2018-03-16 Julia Koval <julia.koval@intel.com>
17347 * doc/invoke.texi (Skylake Server): Add CLWB.
17348 Cannonlake): Remove CLWB.
17350 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17352 PR tree-optimization/84841
17353 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
17355 (FLOAT_ONE_CONST_TYPE): Define.
17356 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
17357 (sort_by_operand_rank): Put entries with higher constant_type last
17358 rather than first to match comments.
17360 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
17362 * config/nios2/nios2.md (movsi_internal): Fix thinko in
17365 2018-03-15 Jakub Jelinek <jakub@redhat.com>
17368 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
17369 check and use address of target always.
17371 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
17374 * config/i386/i386.c (indirect_thunk_needed): Update comments.
17375 (indirect_thunk_bnd_needed): Likewise.
17376 (indirect_thunks_used): Likewise.
17377 (indirect_thunks_bnd_used): Likewise.
17378 (indirect_return_needed): New.
17379 (indirect_return_bnd_needed): Likewise.
17380 (output_indirect_thunk_function): Add a bool argument for
17382 (output_indirect_thunk_function): Don't generate alias for
17383 function return thunk.
17384 (ix86_code_end): Call output_indirect_thunk_function to generate
17385 function return thunks.
17386 (ix86_output_function_return): Set indirect_return_bnd_needed
17387 and indirect_return_needed instead of indirect_thunk_bnd_needed
17388 and indirect_thunk_needed.
17390 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
17392 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
17393 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
17394 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
17396 2018-03-15 David Malcolm <dmalcolm@redhat.com>
17397 Paul Hua <paul.hua.gm@gmail.com>
17400 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
17402 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
17404 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
17405 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
17406 resp. SFmode cases.
17408 2018-03-15 Tamar Christina <tamar.christina@arm.com>
17411 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
17412 instead of GET_MODE_SIZE when comparing Units.
17414 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
17417 * varasm.c (hash_section): Return an unchangeble hash value
17418 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
17419 Return !aarch64_can_use_per_function_literal_pools_p ().
17421 2018-03-15 Jakub Jelinek <jakub@redhat.com>
17424 * optabs.c (emit_conditional_move): Pass address of cmode's copy
17425 rather than address of cmode as last argument to prepare_cmp_insn.
17427 2018-03-15 Julia Koval <julia.koval@intel.com>
17429 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
17430 F_AVX512VNNI, F_AVX512BITALG): New.
17432 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
17435 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
17436 insn for floating-point loads and stores.
17438 2018-03-14 Carl Love <cel@us.ibm.com>
17440 * config/rs6000/rs6000-c.c: Add macro definitions for
17441 ALTIVEC_BUILTIN_VEC_PERMXOR.
17442 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
17443 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
17444 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
17445 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
17447 * config/doc/extend.texi: Add prototypes for vec_permxor.
17449 2018-03-14 David Malcolm <dmalcolm@redhat.com>
17452 * diagnostic-show-locus.c (class layout_point): Convert m_line
17453 from int to linenum_type.
17454 (line_span::comparator): Use linenum "compare" function when
17455 comparing line numbers.
17456 (test_line_span): New function.
17457 (layout_range::contains_point): Convert param "row" from int to
17459 (layout_range::intersects_line_p): Likewise.
17460 (layout::will_show_line_p): Likewise.
17461 (layout::print_source_line): Likewise.
17462 (layout::should_print_annotation_line_p): Likewise.
17463 (layout::print_annotation_line): Likewise.
17464 (layout::print_leading_fixits): Likewise.
17465 (layout::annotation_line_showed_range_p): Likewise.
17466 (struct line_corrections): Likewise for field m_row.
17467 (line_corrections::line_corrections): Likewise for param "row".
17468 (layout::print_trailing_fixits): Likewise.
17469 (layout::get_state_at_point): Likewise.
17470 (layout::get_x_bound_for_row): Likewise.
17471 (layout::print_line): Likewise.
17472 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
17473 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
17474 * input.c (selftest::test_linenum_comparisons): New function.
17475 (selftest::input_c_tests): Call it.
17476 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
17477 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
17478 * selftest.h (ASSERT_GT): New macro.
17479 (ASSERT_GT_AT): New macro.
17480 (ASSERT_LT): New macro.
17481 (ASSERT_LT_AT): New macro.
17483 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
17485 PR rtl-optimization/84780
17486 * combine.c (distribute_links): Don't make a link based on pc_rtx.
17488 2018-03-14 Martin Liska <mliska@suse.cz>
17490 * tree.c (record_node_allocation_statistics): Use
17491 get_stats_node_kind.
17492 (get_stats_node_kind): New function extracted from
17493 record_node_allocation_statistics.
17494 (free_node): Use get_stats_node_kind.
17496 2018-03-14 Richard Biener <rguenther@suse.de>
17498 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
17499 that the value-set of ANTIC_IN doesn't grow.
17502 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17504 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17505 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17507 2018-03-14 Julia Koval <julia.koval@intel.com>
17509 * config.gcc (icelake-client, icelake-server): New.
17511 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
17512 (initial_ix86_arch_features): Ditto.
17513 (PTA_SKYLAKE): Add SGX.
17514 (PTA_ICELAKE): Remove.
17515 (PTA_ICELAKE_CLIENT): New.
17516 (PTA_ICELAKE_SERVER): New.
17517 (ix86_option_override_internal): Split up icelake on icelake client and
17519 (get_builtin_code_for_version): Ditto.
17520 (fold_builtin_cpu): Ditto.
17521 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
17522 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
17523 * config/i386/i386.h (processor_type): Ditto.
17524 * doc/invoke.texi: Ditto.
17526 2018-03-14 Jakub Jelinek <jakub@redhat.com>
17529 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
17530 INTEGER_CST offset, add it together with bitpos / 8 and
17531 sign extend based on POINTER_SIZE.
17535 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
17538 * config/i386/constraints.md (Yc): New register constraint.
17539 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
17540 Use Yc constraint for alternative 2 of operand 0. Remove
17541 preferred_for_speed attribute.
17543 2018-03-14 Richard Biener <rguenther@suse.de>
17545 PR tree-optimization/84830
17546 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
17547 with the old one to avoid oscillations.
17549 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
17552 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
17554 (assign_by_spills): Return a flag of reload assignment failure.
17555 Do not process the reload assignment failures. Do not spill other
17556 reload pseudos if they has the same reg class. Update n if
17558 (lra_assign): Add a return arg. Set up from the result of
17559 assign_by_spills call.
17560 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17561 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17562 usage_insns if it is not NULL.
17563 (spill_hard_reg_in_range): New function.
17564 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17565 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17566 function prototypes.
17567 (lra_assign): Change prototype.
17568 * lra.c (lra): Add code to deal with fails by splitting hard reg
17571 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
17573 * config/riscv/riscv.opt (mrelax): New option.
17574 * config/riscv/riscv.c (riscv_file_start): Emit ".option
17575 "norelax" when riscv_mrelax is disabled.
17576 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
17578 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17581 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
17582 reassociation for int modes.
17584 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17586 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
17587 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
17589 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
17590 * config/aarch64/aarch64-sve.md
17591 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
17592 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
17593 (*extend<mode><Vwide>2): Rename to...
17594 (aarch64_sve_extend<mode><Vwide>2): ...this.
17595 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
17596 renaming the old pattern to...
17597 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
17599 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
17600 define_expand, renaming the old pattern to...
17601 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
17602 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
17603 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
17604 account when deciding which SVE instruction the optab should use.
17605 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
17607 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17609 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
17610 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
17611 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
17612 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
17613 (tlsdesc_small_<mode>): Turn a define_expand and use
17614 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
17615 (tlsdesc_small_advsimd_<mode>): ...this.
17616 (tlsdesc_small_sve_<mode>): New pattern.
17618 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17620 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
17621 (UNSPEC_UMUL_HIGHPART): New constants.
17622 (MUL_HIGHPART): New int iteraor.
17623 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
17624 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
17626 (*<su>mul<mode>3_highpart): New define_insn.
17628 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
17631 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17634 2018-03-13 Martin Liska <mliska@suse.cz>
17637 * (sem_item_optimizer::sem_item_optimizer): Initialize new
17639 (sem_item_optimizer::~sem_item_optimizer): Release it.
17640 (sem_item_optimizer::merge_classes): Register variable aliases.
17641 (sem_item_optimizer::fixup_pt_set): New function.
17642 (sem_item_optimizer::fixup_points_to_sets): Likewise.
17643 * ipa-icf.h: Declare new variables and functions.
17645 2018-03-13 Jakub Jelinek <jakub@redhat.com>
17647 PR middle-end/84834
17648 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
17649 integer_pow2p@2 and test integer_pow2p in condition.
17650 (A < 0 ? C : 0): Similarly for @1.
17652 PR middle-end/84831
17653 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
17654 characters starting at p contain '\0' character, don't look beyond
17658 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
17659 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
17662 * reg-stack.c (change_stack): Change update_end var from int to
17663 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
17664 also call set_block_for_insn on the newly added insns and rescan.
17667 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
17668 on the last operand.
17671 * tree.c (stabilize_reference_1): Return save_expr (e) for
17672 STATEMENT_LIST even if it doesn't have side-effects.
17674 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
17676 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
17678 2018-03-12 Renlin Li <renlin.li@arm.com>
17680 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
17681 aarch64_output_scalar_simd_mov_immediate.
17683 2018-03-12 Martin Sebor <msebor@redhat.com>
17685 PR tree-optimization/83456
17686 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
17687 for perfectly overlapping calls to memcpy.
17688 (gimple_fold_builtin_memory_chk): Same.
17689 (gimple_fold_builtin_strcpy): Handle no-warning.
17690 (gimple_fold_builtin_stxcpy_chk): Same.
17691 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
17693 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17695 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
17696 parameter. Use it for SFmode.
17697 (rs6000_function_arg_advance_1): Adjust.
17698 (rs6000_function_arg): Adjust.
17699 (rs6000_gimplify_va_arg): Pass false for that new parameter.
17701 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17703 PR rtl-optimization/84169
17704 PR rtl-optimization/84780
17705 * combine.c (can_combine_p): Check for a 2-insn combination whether
17706 the destination register is used between the two insns, too.
17708 2018-03-12 Richard Biener <rguenther@suse.de>
17710 PR tree-optimization/84803
17711 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
17712 for refs DR analysis didn't process.
17714 2018-03-12 Richard Biener <rguenther@suse.de>
17716 PR tree-optimization/84777
17717 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
17718 force-vectorize loops ignore whether we are optimizing for size.
17720 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
17722 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
17723 (TARGET_MD_ASM_ADJUST): Define.
17725 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
17726 Kito Cheng <kito.cheng@gmail.com>
17727 Chung-Ju Wu <jasonwucj@gmail.com>
17729 * config/nds32/nds32.c (nds32_compute_stack_frame,
17730 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
17731 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
17732 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
17733 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
17734 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
17735 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
17736 * config/nds32/nds32.md (prologue, epilogue): Use macro
17737 NDS32_V3PUSH_AVAILABLE_P to do checking.
17739 2018-03-11 Jakub Jelinek <jakub@redhat.com>
17742 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
17743 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
17744 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
17745 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
17746 addition of most attributes on !orig_type_die or the attribute not
17747 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
17749 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17750 Chung-Ju Wu <jasonwucj@gmail.com>
17752 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
17753 __NDS32_VH__ macro.
17754 * config/nds32/nds32.opt (mvh): New option.
17756 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17757 Chung-Ju Wu <jasonwucj@gmail.com>
17759 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
17761 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
17762 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
17765 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17766 Chung-Ju Wu <jasonwucj@gmail.com>
17768 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
17770 * config/nds32/nds32-multiple.md (strlensi): New pattern.
17771 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
17773 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
17774 Kito Cheng <kito.cheng@gmail.com>
17775 Chung-Ju Wu <jasonwucj@gmail.com>
17777 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
17778 UNSPEC_FFMISM and UNSPEC_FLMISM.
17779 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
17780 for ffb, ffmism and flmism.
17781 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
17782 (unspec_ffmism): Ditto.
17783 (unspec_flmism): Ditto.
17784 (nds32_expand_builtin_impl): Check if string extension is available.
17785 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
17786 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
17788 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
17791 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17794 * lra-assigns.c (assign_by_spills): Return a flag of reload
17795 assignment failure. Do not process the reload assignment
17796 failures. Do not spill other reload pseudos if they has the same
17798 (lra_assign): Add a return arg. Set up from the result of
17799 assign_by_spills call.
17800 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17801 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17802 usage_insns if it is not NULL.
17803 (spill_hard_reg_in_range): New function.
17804 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17805 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17806 function prototypes.
17807 (lra_assign): Change prototype.
17808 * lra.c (lra): Add code to deal with fails by splitting hard reg
17811 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
17814 * config/i386/i386.opt: Replace Enforcment with Enforcement.
17816 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
17819 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
17820 (dw_val_node): Add val_symbolic_view.
17821 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
17822 (symview_upper_bound): New.
17823 (new_line_info_table): Initialize symviews_since_reset.
17824 (dwarf2out_source_line): Count symviews_since_reset and set
17825 symview_upper_bound.
17826 (dw_val_equal_p): Handle symview.
17827 (add_AT_symview): New.
17828 (print_dw_val): Handle symview.
17829 (attr_checksum, attr_checksum_ordered): Likewise.
17830 (same_dw_val_p, size_of_die): Likewise.
17831 (value_format, output_die): Likewise.
17832 (add_high_low_attributes): Use add_AT_symview for entry_view.
17833 (dwarf2out_finish): Reset symview_upper_bound, clear
17836 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
17839 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
17840 Add strict argument and use it.
17841 (rs6000_split_multireg_move): Update for new strict argument.
17842 (mem_operand_gpr): Disallow all non-offsettable addresses.
17843 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
17845 2018-03-09 Jakub Jelinek <jakub@redhat.com>
17848 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
17849 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
17850 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
17853 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
17854 decl, use remap_type if we want to use the type.
17856 2018-03-09 Martin Sebor <msebor@redhat.com>
17858 PR tree-optimization/84526
17859 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17861 (builtin_access::generic_overlap): Be prepared to handle non-array
17864 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
17866 PR rtl-optimization/84682
17867 * lra-constraints.c (process_address_1): Check is_address flag
17868 for address constraints.
17869 (process_alt_operands): Likewise.
17870 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17871 preprocess_constraints.
17872 * recog.h (preprocess_constraints): Add oploc parameter.
17874 * recog.c (preprocess_constraints): Test address_operand for
17875 CT_ADDRESS constraints.
17877 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17880 * lra-assigns.c (assign_by_spills): Return a flag of reload
17881 assignment failure. Do not process the reload assignment
17882 failures. Do not spill other reload pseudos if they has the same
17884 (lra_assign): Add a return arg. Set up from the result of
17885 assign_by_spills call.
17886 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17887 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17888 usage_insns if it is not NULL.
17889 (spill_hard_reg_in_range): New function.
17890 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17891 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17892 function prototypes.
17893 (lra_assign): Change prototype.
17894 * lra.c (lra): Add code to deal with fails by splitting hard reg
17897 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17900 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17901 Accept complain bool parameter. Only emit errors if it is true.
17902 (arm_parse_cpu_option_name): Likewise.
17903 (arm_target_thumb_only): Adjust callers of the above.
17904 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17905 prototype to take a default true bool parameter.
17906 (arm_parse_arch_option_name): Likewise.
17908 2018-03-09 David Malcolm <dmalcolm@redhat.com>
17909 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
17913 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17914 * configure: Regenerate.
17915 * configure.ac ("linker --version-script option"): New.
17916 ("linker soname option"): New.
17918 2018-03-09 Richard Biener <rguenther@suse.de>
17920 PR tree-optimization/84775
17921 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17922 immediate uses of predicate stmts and mark them modified.
17925 PR tree-optimization/84178
17926 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17928 (version_loop_for_if_conversion): Delay update_ssa call.
17929 (tree_if_conversion): Delay update_ssa until after predicate
17932 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
17935 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17936 when the function accesses prior frames.
17938 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17941 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17942 gen_llsym, otherwise call maybe_gen_llsym.
17944 PR inline-asm/84742
17945 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17946 has ',' character inside of it.
17948 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17951 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17952 as clobbering CC_REGNUM.
17954 2018-03-08 Richard Biener <rguenther@suse.de>
17956 PR middle-end/84552
17957 * tree-scalar-evolution.c: Include tree-into-ssa.h.
17958 (follow_copies_to_constant): Do not follow SSA names registered
17961 2018-03-08 Richard Biener <rguenther@suse.de>
17963 PR tree-optimization/84178
17964 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17966 (version_loop_for_if_conversion): Delay update_ssa call.
17967 (tree_if_conversion): Delay update_ssa until after predicate
17970 2018-03-08 David Malcolm <dmalcolm@redhat.com>
17972 PR tree-optimization/84178
17973 * tree-if-conv.c (release_bb_predicate): Remove the
17974 the assertion that the stmts have NULL use_ops.
17975 Discard the statements, asserting that they haven't
17976 yet been added to a BB.
17978 2018-03-08 Richard Biener <rguenther@suse.de>
17980 PR tree-optimization/84746
17981 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17982 (phi_translate): Pass in destination ANTIC_OUT set.
17983 (phi_translate_1): Likewise. For a simplified result lookup
17984 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17985 (phi_translate_set): Adjust.
17986 (do_pre_regular_insertion): Likewise.
17987 (do_pre_partial_partial_insertion): Likewise.
17989 2018-03-08 Martin Liska <mliska@suse.cz>
17991 PR gcov-profile/84735
17992 * doc/gcov.texi: Document usage of profile files.
17993 * gcov-io.h: Document changes in the format.
17995 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
17999 * dwarf2out.c (struct dw_line_info_table): Update comments for
18001 (FORCE_RESET_NEXT_VIEW): New.
18002 (FORCE_RESETTING_VIEW_P): New.
18003 (RESETTING_VIEW_P): Check for -1 too.
18004 (ZERO_VIEW_P): Likewise.
18005 (new_line_info_table): Force-reset next view.
18006 (dwarf2out_begin_function): Likewise.
18007 (dwarf2out_source_line): Simplify zero_view_p initialization.
18008 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
18009 view directly. Omit view when omitting .loc at line 0.
18011 2018-03-08 Jakub Jelinek <jakub@redhat.com>
18013 PR tree-optimization/84740
18014 * tree-switch-conversion.c (process_switch): Call build_constructors
18015 only if info.phi_count is non-zero.
18017 PR tree-optimization/84739
18018 * tree-tailcall.c (find_tail_calls): Check call arguments against
18019 DECL_ARGUMENTS (current_function_decl) rather than
18020 DECL_ARGUMENTS (func) when checking for tail recursion.
18022 2018-03-07 Jakub Jelinek <jakub@redhat.com>
18024 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
18025 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
18026 Volker Reichelt's entry and add entries for people that perform
18027 GCC fuzzy testing and report numerous bugs.
18029 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
18032 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
18033 readonly data in sdata, if that is disabled.
18034 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
18035 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
18036 -mreadonly-in-sdata option.
18038 2018-03-07 Martin Sebor <msebor@redhat.com>
18040 PR tree-optimization/84468
18041 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
18042 basic block when looking for nul assignment.
18044 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
18047 * except.h (output_function_exception_table): Adjust prototype.
18048 * except.c (output_function_exception_table): Remove FNNAME parameter
18049 and add SECTION parameter. Ouput one part of the table at a time.
18050 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
18051 the first part of the exception table and emit unwind directives.
18052 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
18053 (i386_pe_seh_cold_init): Likewise.
18054 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
18055 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
18056 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
18057 (ix86_output_call_insn): Emit a nop in one more case for SEH.
18058 * config/i386/winnt.c: Include except.h.
18059 (struct seh_frame_state): Add reg_offset, after_prologue and
18060 in_cold_section fields.
18061 (i386_pe_seh_end_prologue): Set seh->after_prologue.
18062 (i386_pe_seh_cold_init): New function.
18063 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
18064 to seh->in_cold_section.
18065 (seh_emit_push): Record the offset of the push.
18066 (seh_emit_save): Record the offet of the save.
18067 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
18068 Test seh->after_prologue to disregard the epilogue.
18069 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
18070 (i386_pe_end_cold_function): New function.
18072 2018-03-07 Jakub Jelinek <jakub@redhat.com>
18075 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
18076 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
18079 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
18081 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
18082 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
18084 PR middle-end/84723
18085 * multiple_target.c: Include tree-inline.h and intl.h.
18086 (expand_target_clones): Diagnose and fail if node->definition and
18087 !tree_versionable_function_p (node->decl).
18089 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
18091 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
18093 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
18094 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
18095 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
18097 2018-03-06 Jakub Jelinek <jakub@redhat.com>
18100 * combine.c (try_combine): Use reg_or_subregno instead of handling
18101 just paradoxical SUBREGs and REGs.
18103 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
18105 * config/arc/arc.c (arc_finalize_pic): Remove function.
18106 (arc_must_save_register): We use single base PIC register, remove
18107 checks to save/restore the PIC register.
18108 (arc_expand_prologue): Likewise.
18109 * config/arc/arc-protos.h (arc_set_default_type_attributes):
18111 (arc_verify_short): Likewise.
18112 (arc_attr_type): Likewise.
18113 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
18114 (walk_stores): Likewise.
18115 (arc_address_cost): Make it static.
18116 (arc_verify_short): Likewise.
18117 (branch_dest): Likewise.
18118 (arc_attr_type): Likewise.
18119 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
18120 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
18121 (arc_final_prescan_insn): Remove inserting the nops due to
18122 hardware hazards. It is done in reorg step.
18123 (insn_length_variant_t): Remove.
18124 (insn_length_parameters_t): Likewise.
18125 (arc_insn_length_parameters): Likewise.
18126 (arc_get_insn_variants): Likewise.
18127 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
18129 2018-03-06 Jakub Jelinek <jakub@redhat.com>
18131 PR inline-asm/84683
18132 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
18135 PR tree-optimization/84687
18136 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
18138 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
18140 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18142 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
18143 Rename to ppc_speculation_barrier.
18144 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
18145 __builtin_ppc_speculation_barrier.
18147 2018-03-05 Jakub Jelinek <jakub@redhat.com>
18150 * combine.c (combine_simplify_rtx): Don't try to simplify if
18151 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
18154 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
18156 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
18157 to 32 bytes when compiling for POWER9.
18159 2018-03-05 Jakub Jelinek <jakub@redhat.com>
18162 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
18163 regparm >= 3 with no arg reg available also for calls with
18164 flag_force_indirect_call. Pass decl to ix86_function_regparm.
18167 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
18169 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
18171 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
18174 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
18176 2018-03-05 Richard Biener <rguenther@suse.de>
18178 PR tree-optimization/84486
18179 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
18180 When inserting a __builtin_assume_aligned call set the LHS
18181 SSA name alignment info accordingly.
18183 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
18185 PR tree-optimization/84114
18186 * config/aarch64/aarch64.c (aarch64_reassociation_width)
18187 Avoid reassociation of FLOAT_MODE addition.
18189 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
18191 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
18192 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
18193 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
18194 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
18195 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
18196 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
18197 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
18199 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
18200 __builtin_ia32_wbinvd): New builtins.
18201 (SPECIAL_ARGS2): New.
18202 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
18203 (SPECIAL_ARGS2): New.
18204 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
18205 (ix86_valid_target_attribute_inner_p): Ditto.
18206 (ix86_init_mmx_sse_builtins): Add special_args2.
18207 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
18208 TARGET_WBNOINVD_P): New.
18209 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
18210 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
18211 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
18212 * config/i386/immintrin.h (_wbinvd): New intrinsic.
18213 * config/i386/pconfigintrin.h: New file.
18214 * config/i386/wbnoinvdintrin.h: Ditto.
18215 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
18217 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
18219 2018-03-05 Richard Biener <rguenther@suse.de>
18221 PR tree-optimization/84670
18222 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
18224 (BB_VISITED_WITH_VISITED_SUCCS): New define.
18225 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
18226 (compute_antic_aux): Only assert the number of values in ANTIC_IN
18227 doesn't grow if all successors (recursively) were visited at least
18230 2018-03-05 Richard Biener <rguenther@suse.de>
18232 PR tree-optimization/84650
18233 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
18234 if executed in the loop pipeline.
18236 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
18238 * doc/configfiles.texi (Configuration Files): Move info about
18239 conditionalizing $target-protos.h to...
18240 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
18241 differs from $target-protos.h.
18243 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
18244 Chung-Ju Wu <jasonwucj@gmail.com>
18246 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
18247 * config/nds32/nds32-multiple.md (setmemsi): Define.
18248 * config/nds32/nds32-memory-manipulation.c
18249 (nds32_gen_dup_4_byte_to_word_value): New.
18250 (emit_setmem_word_loop): New.
18251 (emit_setmem_byte_loop): New.
18252 (nds32_expand_setmem_loop): New.
18253 (nds32_expand_setmem_loop_v3m): New.
18254 (nds32_expand_setmem_unroll): New.
18255 (nds32_expand_setmem): New.
18257 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18258 Chung-Ju Wu <jasonwucj@gmail.com>
18260 * config/nds32/nds32-memory-manipulation.c
18261 (nds32_emit_load_store): New.
18262 (nds32_emit_post_inc_load_store): New.
18263 (nds32_emit_mem_move): New.
18264 (nds32_emit_mem_move_block): New.
18265 (nds32_expand_movmemsi_loop_unknown_size): New.
18266 (nds32_expand_movmemsi_loop_known_size): New.
18267 (nds32_expand_movmemsi_loop): New.
18268 (nds32_expand_movmemsi_unroll): New.
18269 (nds32_expand_movmemqi): Rename ...
18270 (nds32_expand_movmemsi): ... to this.
18271 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
18272 (movmemsi): ... to this.
18273 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
18274 (nds32_expand_movmemsi): ... to this.
18276 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18277 Monk Chiang <sh.chiang04@gmail.com>
18278 Chung-Ju Wu <jasonwucj@gmail.com>
18280 * config/nds32/nds32-protos.h
18281 (nds32_expand_load_multiple): New arguments.
18282 (nds32_expand_store_multiple): Ditto.
18283 (nds32_valid_multiple_load_store): Rename ...
18284 (nds32_valid_multiple_load_store_p): ... to this.
18285 * config/nds32/nds32-memory-manipulation.c
18286 (nds32_expand_load_multiple): Refine implementation.
18287 (nds32_expand_store_multiple): Ditto.
18288 * config/nds32/nds32-multiple.md
18289 (load_multiple): Update nds32_expand_load_multiple interface.
18290 (store_multiple): Update nds32_expand_store_multiple interface.
18291 * config/nds32/nds32-predicates.c
18292 (nds32_valid_multiple_load_store): Rename ...
18293 (nds32_valid_multiple_load_store_p): ... to this and refine
18295 * config/nds32/predicates.md
18296 (nds32_load_multiple_and_update_address_operation): New predicate.
18297 (nds32_store_multiple_and_update_address_operation): New predicate.
18299 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18300 Chung-Ju Wu <jasonwucj@gmail.com>
18302 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
18303 (combo): New attribute.
18304 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
18306 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
18308 * config/nds32/nds32.opt: Change -mcmodel= default value.
18310 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
18311 Monk Chiang <sh.chiang04@gmail.com>
18312 Chung-Ju Wu <jasonwucj@gmail.com>
18314 * config/nds32/constants.md (unspec_element): New enum.
18315 * config/nds32/constraints.md (Umw): New constraint.
18316 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
18317 * config/nds32/nds32-intrinsic.md: Likewise.
18318 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
18319 (nds32_valid_smw_lwm_base_p): New.
18320 (nds32_output_smw_single_word): New.
18321 (nds32_output_lmw_single_word): New.
18322 (nds32_expand_unaligned_load): New.
18323 (nds32_expand_unaligned_store): New.
18324 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
18325 (nds32_output_smw_single_word): Declare.
18326 (nds32_output_lmw_single_word): Declare.
18327 (nds32_expand_unaligned_load): Declare.
18328 (nds32_expand_unaligned_store): Declare.
18329 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
18330 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
18331 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
18332 NDS32_BUILTIN_UASTORE_DW.
18333 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
18336 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
18337 Kito Cheng <kito.cheng@gmail.com>
18338 Chung-Ju Wu <jasonwucj@gmail.com>
18340 * config/nds32/nds32-intrinsic.c
18341 (nds32_expand_builtin_null_ftype_reg): Delete.
18342 (nds32_expand_builtin_reg_ftype_imm): Ditto.
18343 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
18344 (nds32_read_argument): New.
18345 (nds32_legitimize_target): Ditto.
18346 (nds32_legitimize_argument): Ditto.
18347 (nds32_check_constant_argument): Ditto.
18348 (nds32_expand_unop_builtin): Ditto.
18349 (nds32_expand_unopimm_builtin): Ditto.
18350 (nds32_expand_binop_builtin): Ditto.
18351 (nds32_builtin_decl_impl): Ditto.
18352 (builtin_description): Ditto.
18353 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
18354 (nds32_init_builtins_impl): Ditto.
18355 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
18356 (nds32_builtin_decl): New.
18357 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
18358 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
18360 2018-03-02 Jeff Law <law@redhat.com>
18362 * reorg.c (stop_search_p): Handle DEBUG_INSN.
18363 (redundant_insn, fill_simple_delay_slots): Likewise.
18364 (fill_slots_from_thread): Likewise.
18365 * resource.c (mark_referenced_resources): Likewise.
18366 (mark_set_resources, find_dead_or_set_registers): Likewise.
18368 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18370 * substring-locations.h (format_warning_va): Formatting fix for
18371 ATTRIBUTE_GCC_DIAG.
18372 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
18374 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
18375 * substring-locations.c: Include intl.h.
18376 (format_warning_va): Turned into small wrapper around
18377 format_warning_n_va, renamed to ...
18378 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
18379 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
18381 (format_warning_at_substring_n): New function.
18382 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
18383 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
18384 format_warning_at_substring with just a shorter name instead of
18385 const function pointer.
18386 (fmtwarn_n): New function.
18387 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
18388 appropriate, get rid of all the fmtstr temporaries, move conditionals
18389 with G_() wrapped string literals directly into fmtwarn arguments,
18390 cast dir.len to (int), formatting fixes.
18392 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
18394 * doc/invoke.texi: Remove "Cilk Plus" references.
18396 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18397 Richard Biener <rguenther@suse.de>
18400 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
18401 for error or warning attributes if CALL_FROM_THUNK_P is set.
18404 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18407 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
18408 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
18411 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
18412 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
18414 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
18415 instead of -1U in last predictors element's probability member.
18417 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
18420 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18421 arguments if they are comparable.
18423 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
18425 PR tree-optimization/84634
18426 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
18427 masks and masked_loop_p with a single loop_masks, making sure it's
18428 null for bb vectorization.
18430 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
18432 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
18433 (vect_analyze_data_ref_access): Use loop->safe_len rather than
18434 loop->force_vectorize to check whether there is no alias.
18436 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18439 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
18441 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
18443 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
18444 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
18445 instead of a loop around prev_real_insn.
18446 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
18449 PR inline-asm/84625
18450 * config/i386/i386.c (ix86_print_operand): Use conditional
18451 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
18454 2018-03-02 Richard Biener <rguenther@suse.de>
18456 PR tree-optimization/84427
18457 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
18458 (bitmap_set_subtract_values): Rewrite to handle multiple
18461 (prune_clobbered_mems): Likewise.
18462 (phi_translate): Take edge instead of pred/phiblock.
18463 (phi_translate_1): Likewise.
18464 (phi_translate_set): Likewise. Insert all translated
18465 exprs for a value into the set, keeping possibly multiple
18466 expressions per value.
18467 (compute_antic_aux): Adjust for phi_translate changes.
18468 When intersecting union the expressions and prune those
18469 not in the final value set, keeping possibly multiple
18470 expressions per value. Do not use value-insertion
18471 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
18472 all expressions. Add verification that the value-sets
18473 only shrink during iteration.
18474 (compute_partial_antic_aux): Adjust for the phi_translate changes.
18475 (do_pre_regular_insertion): Likewise.
18476 (do_pre_partial_partial_insertion): Likewise.
18478 2018-03-02 Richard Biener <rguenther@suse.de>
18481 * config/darwin.c (saved_debug_info_level): New static global.
18482 (darwin_asm_lto_start): Disable debug info generation for LTO out.
18483 (darwin_asm_lto_end): Restore debug info generation settings.
18485 2018-03-01 Martin Liska <mliska@suse.cz>
18488 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
18489 volatile arguments.
18491 2018-03-01 Richard Biener <rguenther@suse.de>
18494 * dwarf2out.c (gen_variable_die): Properly handle late VLA
18495 type annotation with LTO when debug was disabled at compile-time.
18497 2018-03-01 Matthew Fortune <mfortune@gmail.com>
18499 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
18501 (mips_final_postscan_insn): Likewise.
18503 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
18505 PR rtl-optimization/84528
18506 * alias.c (init_alias_target): Add commentary.
18507 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
18508 a unique base value if the frame pointer is not eliminated
18509 to the stack pointer.
18511 2018-03-01 Tom de Vries <tom@codesourcery.com>
18513 PR rtl-optimization/83327
18514 * lra-int.h (hard_regs_spilled_into): Declare.
18515 * lra.c (hard_regs_spilled_into): Define.
18516 (init_reg_info): Init hard_regs_spilled_into.
18517 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
18518 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
18519 (process_bb_lives): Handle hard_regs_spilled_into.
18520 (lra_create_live_ranges_1): Before doing liveness propagation, clear
18521 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
18523 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
18525 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
18526 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
18527 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
18528 * config/rs6000/aix72.h: New file.
18530 2018-02-28 Jakub Jelinek <jakub@redhat.com>
18532 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
18533 instead of warning_at with conditional singular and plural messages
18537 * stor-layout.c (update_alignment_for_field): For
18538 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
18539 && !DECL_PACKED (field), do the alignment update, just use
18540 only desired_align instead of MAX (type_align, desired_align)
18542 (place_field): Don't do known_align < desired_align handling
18543 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
18544 is non-NULL, instead do it after rli->prev_field handling and
18545 only if not within a bitfield word. For DECL_PACKED (field)
18546 use type_align of BITS_PER_UNIT.
18548 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
18550 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
18551 superfluous parentheses and trailing spaces.
18553 2018-02-28 Richard Biener <rguenther@suse.de>
18555 PR tree-optimization/84584
18556 * graphite-scop-detection.c (scop_detection::add_scop): Discard
18557 SCoPs with fake exit edge.
18559 2018-02-28 Martin Liska <mliska@suse.cz>
18562 * timevar.c (timer::print): Fix format to properly print 100%
18565 2018-02-28 Richard Biener <rguenther@suse.de>
18567 PR middle-end/84607
18568 * genmatch.c (capture_info::walk_match): Do not mark
18569 captured expressions without operands as expr_p given
18570 they act more like predicates and should be subject to
18571 "lost tail" side-effect preserving.
18573 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
18575 PR rtl-optimization/81611
18576 * auto-inc-dec.c (attempt_change): Move dead note from
18577 mem_insn if it's the next use of regno
18578 (find_address): Take address use of reg holding
18579 non-incremented value. Add parm to limit search to the named
18581 (merge_in_block): Attempt to use a mem insn that is the next
18582 use of the original regno.
18584 2018-02-27 Martin Sebor <msebor@redhat.com>
18587 * doc/invoke.texi (-Wmissing-attributes): New option.
18588 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
18590 2018-02-27 Martin Sebor <msebor@redhat.com>
18592 PR translation/84207
18593 * diagnostic-core.h (warning_n, error_n, inform_n): Change
18594 n argument to unsigned HOST_WIDE_INT.
18595 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
18596 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
18597 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
18598 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
18600 2018-02-27 Richard Biener <rguenther@suse.de>
18602 PR tree-optimization/84512
18603 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
18604 Do not use the estimate returned from record_stmt_cost for
18605 the scalar iteration cost but sum properly using add_stmt_cost.
18607 2018-02-27 Richard Biener <rguenther@suse.de>
18609 PR tree-optimization/84466
18610 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18611 Adjust last change to less strictly validate use operands.
18613 2018-02-27 Martin Liska <mliska@suse.cz>
18615 PR gcov-profile/84548
18616 * gcov.c (process_file): Allow partial overlap and consider it
18617 also as group functions.
18618 (output_lines): Properly calculate range of lines for a group.
18620 2018-02-27 Martin Liska <mliska@suse.cz>
18622 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
18623 'ggc' suffixes. Change first column width.
18624 (timer::print): Fix formatting of the column.
18626 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
18628 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
18629 preserve inline entry blocks for the sake of debug inline
18630 entry point markers alone.
18631 (remove_unused_locals): Suggest in comments a better place to
18632 force the preservation of inline entry blocks that are
18633 otherwise unused, but do not preserve them.
18635 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18637 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
18639 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18642 * config/i386/constraints.md (Bs): Replace
18643 ix86_indirect_branch_register with
18644 TARGET_INDIRECT_BRANCH_REGISTER.
18646 * config/i386/i386.md (indirect_jump): Likewise.
18647 (tablejump): Likewise.
18648 (*sibcall_memory): Likewise.
18649 (*sibcall_value_memory): Likewise.
18650 Peepholes of indirect call and jump via memory: Likewise.
18651 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
18652 (*sibcall_value_GOT_32): Likewise.
18653 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18654 (GOT_memory_operand): Likewise.
18655 (call_insn_operand): Likewise.
18656 (sibcall_insn_operand): Likewise.
18657 (GOT32_symbol_operand): Likewise.
18658 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
18660 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
18662 PR rtl-optimization/83496
18663 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
18664 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
18665 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
18666 redundant insn, if any.
18667 (relax_delay_slots): Likewise.
18668 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
18670 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
18672 PR tree-optimization/83965
18673 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
18674 that grouped statements are part of a reduction chain. Return
18675 true if the statement is not marked as a reduction itself but
18676 is part of a group.
18677 (vect_recog_dot_prod_pattern): Don't check whether the statement
18678 is part of a group here.
18679 (vect_recog_sad_pattern): Likewise.
18680 (vect_recog_widen_sum_pattern): Likewise.
18682 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
18685 * final.c (rest_of_clean_state): Also look for calls inside sequences.
18687 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18690 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
18692 (ix86_output_indirect_function_return): New prototype.
18693 (ix86_split_simple_return_pop_internal): Likewise.
18694 * config/i386/i386.c (indirect_return_via_cx): New.
18695 (indirect_return_via_cx_bnd): Likewise.
18696 (indirect_thunk_name): Handle return va CX_REG.
18697 (output_indirect_thunk_function): Create alias for
18698 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
18699 (ix86_output_indirect_jmp): Remove the bool argument.
18700 (ix86_output_indirect_function_return): New function.
18701 (ix86_split_simple_return_pop_internal): Likewise.
18702 * config/i386/i386.md (*indirect_jump): Don't pass false
18703 to ix86_output_indirect_jmp.
18704 (*tablejump_1): Likewise.
18705 (simple_return_pop_internal): Change it to define_insn_and_split.
18706 Call ix86_split_simple_return_pop_internal to split it for
18707 -mfunction-return=.
18708 (simple_return_indirect_internal): Call
18709 ix86_output_indirect_function_return instead of
18710 ix86_output_indirect_jmp.
18712 2018-02-26 Jakub Jelinek <jakub@redhat.com>
18715 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
18716 memset and value initialization afterwards.
18718 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
18720 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
18722 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18725 * common/config/aarch64/aarch64-common.c
18726 (aarch_option_optimization_table[]): Switch
18727 off fomit-frame-pointer
18729 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18730 Chung-Ju Wu <jasonwucj@gmail.com>
18732 * config/nds32/nds32-multiple.md (load_multiple): Disallow
18734 (store_multiple): Ditto.
18736 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18738 * config.gcc: Add --with-cpu support for nds32 target.
18739 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
18740 * config/nds32/nds32.opt: Add -mcpu= option.
18742 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
18744 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
18745 isel=yes): Warn for these deprecated options.
18747 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
18749 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
18750 ISA_2_5_MASKS_EMBEDDED.
18752 2018-02-23 Jakub Jelinek <jakub@redhat.com>
18754 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
18755 p->max as pointers rather than using iterative_hash_expr.
18757 2018-02-23 Carl Love <cel@us.ibm.com>
18759 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
18760 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
18762 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
18763 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
18764 P8V_BUILTIN_VEC_VUNSIGNED2.
18766 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
18769 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
18770 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
18772 * lra-constraints.c (curr_insn_transform): Set up
18773 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
18775 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
18776 * lra-eliminations.c (spill_pseudos): Ditto.
18777 (process_insn_for_elimination): Ditto.
18778 * lra-lives.c (reg_early_clobber_p): Use the new macros.
18779 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
18780 LRA_NON_CLOBBERED_ALT.
18782 2018-02-22 Martin Sebor <msebor@redhat.com>
18784 PR tree-optimization/84480
18785 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
18786 to maybe_diag_stxncpy_trunc. Call it.
18787 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
18788 from gimple_fold_builtin_strcpy. Print inlining stack.
18789 (handle_builtin_stxncpy): Print inlining stack.
18790 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
18792 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
18795 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
18796 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
18797 and -fcheck-pointer-bounds are used together.
18798 (indirect_thunk_prefix): New enum.
18799 (indirect_thunk_need_prefix): New function.
18800 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
18801 "_nt" instead of "_bnd" for NOTRACK prefix.
18802 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
18803 (output_indirect_thunk_function): Likewise.
18805 (ix86_code_end): Update output_indirect_thunk_function calls.
18806 (ix86_output_indirect_branch_via_reg): Replace
18807 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
18808 (ix86_output_indirect_branch_via_push): Likewise.
18809 (ix86_output_function_return): Likewise.
18810 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
18811 incompatible with -fcf-protection=branch and
18812 -fcheck-pointer-bounds.
18814 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18817 * config/aarch64/aarch64.c (aarch64_print_address_internal):
18818 Change gcc_assert call to output_operand_lossage.
18820 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18822 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
18824 2018-02-22 DJ Delorie <dj@redhat.com>
18825 Sebastian Perta <sebastian.perta@renesas.com>
18826 Oleg Endo <olegendo@gcc.gnu.org>
18828 * config/rx/rx.c (rx_rtx_costs): New function.
18829 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
18831 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
18833 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
18835 2018-02-22 Martin Liska <mliska@suse.cz>
18838 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
18839 Add "native" as a possible value.
18841 2018-02-22 Martin Liska <mliska@suse.cz>
18844 * config/i386/i386.c (ix86_option_override_internal):
18845 Add "native" as a possible value for -march and -mtune.
18847 2018-02-22 Jakub Jelinek <jakub@redhat.com>
18850 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
18851 to all type variants.
18853 PR tree-optimization/84503
18854 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
18855 width as info->bitpos + info->bitsize - start.
18856 (merged_store_group::merge_overlapping): Simplify width computation.
18857 (check_no_overlap): New function.
18858 (imm_store_chain_info::try_coalesce_bswap): Compute expected
18859 start + width and last_order of the group, fail if check_no_overlap
18861 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
18862 to group if check_no_overlap fails.
18864 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18866 * config/rs6000/altivec.md: Delete contraint arguments to
18867 define_expand, define_split, and define_peephole2, and in
18868 define_insn_and_split if always unused.
18869 * config/rs6000/darwin.md: Ditto.
18870 * config/rs6000/dfp.md: Ditto.
18871 * config/rs6000/rs6000.md: Ditto.
18872 * config/rs6000/sync.md: Ditto.
18873 * config/rs6000/vector.md: Ditto.
18874 * config/rs6000/vsx.md: Ditto.
18876 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18878 * config/rs6000/altivec.md: Write output control strings as braced
18879 blocks instead of double-quoted strings.
18880 * config/rs6000/darwin.md: Ditto.
18881 * config/rs6000/rs6000.md: Ditto.
18882 * config/rs6000/vector.md: Ditto.
18883 * config/rs6000/vsx.md: Ditto.
18885 2018-02-21 Jason Merrill <jason@redhat.com>
18887 PR c++/84314 - ICE with templates and fastcall attribute.
18888 * attribs.c (build_type_attribute_qual_variant): Remove assert.
18890 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18892 * ipa-cp.c (determine_versionability): Fix comment typos.
18894 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18897 * ipa-cp.c (determine_versionability): Do not version functions caling
18900 2018-02-21 Martin Liska <mliska@suse.cz>
18903 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18904 Add "native" as a possible value.
18905 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
18906 the macro when native cpu detection is available.
18908 2018-02-21 Martin Liska <mliska@suse.cz>
18911 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18912 Add "native" as a possible value.
18913 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18914 when native cpu detection is available.
18916 2018-02-21 Jakub Jelinek <jakub@redhat.com>
18917 Martin Sebor <msebor@redhat.com>
18919 PR tree-optimization/84478
18920 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18922 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18923 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18924 support which is conservatively correct, for 2 only stay conservative
18925 for maxlen. Formatting and comment capitalization fixes. Add STRICT
18926 argument to the 2 argument get_range_strlen, adjust 6 arg
18927 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18929 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18930 (gimple_fold_builtin_strlen): Pass true as last argument to
18933 2018-02-20 Martin Sebor <msebor@redhat.com>
18935 PR middle-end/84095
18936 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18937 (builtin_memref::set_base_and_offset): Same. Handle inner references.
18938 (builtin_memref::builtin_memref): Factor out parts into
18939 set_base_and_offset and call it.
18941 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18943 PR middle-end/84406
18944 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18945 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18946 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
18947 search at the associated MODE_INT.
18949 2018-02-20 Jeff Law <law@redhat.com>
18951 PR middle-end/82123
18952 PR tree-optimization/81592
18953 PR middle-end/79257
18954 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18955 for range data rather than using global data.
18956 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18957 range data rather than using global data.
18958 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18959 pass it to children as needed.
18960 (struct directive::fmtresult): Similarly.
18961 (struct directive::set_width): Similarly.
18962 (struct directive::set_precision): Similarly.
18963 (format_integer, format_directive, parse_directive): Similarly.
18964 (format_none): Accept unnamed vr_values parameter.
18965 (format_percent, format_floating, format_character): Similarly.
18966 (format_string, format_plain): Similarly.
18967 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18968 the EVRP range analyzer for range data rather than using global data.
18969 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18970 gimple-ssa-evrp-analyze.h
18971 (class sprintf_dom_walker): Add after_dom_children member function.
18972 Add evrp_range_analyzer member.
18973 (sprintf_dom_walker::before_dom_children): Call into the EVRP
18974 range analyzer as needed.
18975 (sprintf_dom_walker::after_dom_children): New member function.
18976 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18978 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18979 (evrp_range_analyzer::pop_to_marker): Likewise.
18981 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18983 PR tree-optimization/84419
18984 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18985 with the required type if its current type is compatible but
18988 2018-02-20 Jakub Jelinek <jakub@redhat.com>
18990 PR middle-end/82004
18991 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18992 after vectorization.
18994 2018-02-20 Martin Liska <mliska@suse.cz>
18997 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18998 possible values if we don't have a hint.
19000 2018-02-20 Martin Liska <mliska@suse.cz>
19004 * final.c (shorten_branches): Build align_tab array with one
19006 * opts.c (finish_options): Add alignment option limit check.
19007 (MAX_CODE_ALIGN): Likewise.
19008 (MAX_CODE_ALIGN_VALUE): Likewise.
19009 * doc/invoke.texi: Document maximum allowed option value for
19010 all -falign-* options.
19012 2018-02-19 Jakub Jelinek <jakub@redhat.com>
19015 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
19016 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
19017 * var-tracking.c (emit_note_insn_var_location): Remove all references
19018 to NOTE_INSN_CALL_ARG_LOCATION.
19019 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
19020 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
19021 Use copy_rtx_if_shared.
19022 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
19023 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
19024 (dwarf2out_var_location): Remove handling of
19025 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
19027 * final.c (final_scan_insn): Remove all references to
19028 NOTE_INSN_CALL_ARG_LOCATION.
19029 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
19030 before dumping final insns.
19031 * except.c (emit_note_eh_region_end): Remove all references to
19032 NOTE_INSN_CALL_ARG_LOCATION.
19033 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
19034 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
19035 * config/arc/arc.c (hwloop_optimize): Likewise.
19036 * config/arm/arm.c (create_fix_barrier): Likewise.
19037 * config/s390/s390.c (s390_chunkify_start): Likewise.
19038 * config/sh/sh.c (find_barrier): Likewise.
19039 * config/i386/i386.c (rest_of_insert_endbranch,
19040 ix86_seh_fixup_eh_fallthru): Likewise.
19041 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
19042 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
19043 * config/frv/frv.c (frv_function_prologue): Likewise.
19044 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
19046 (note_outside_basic_block_p): Remove all references to
19047 NOTE_INSN_CALL_ARG_LOCATION.
19048 * gengtype.c (adjust_field_rtx_def): Likewise.
19049 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
19051 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
19052 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
19055 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
19058 PR tree-optimization/84452
19059 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
19060 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
19063 2018-02-19 Martin Liska <mliska@suse.cz>
19066 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
19068 2018-02-19 Martin Liska <mliska@suse.cz>
19069 Richard Sandiford <richard.sandiford@linaro.org>
19071 PR tree-optimization/82491
19072 * gimple-fold.c (get_base_constructor): Make earlier bail out
19075 2018-02-19 Carl Love <cel@us.ibm.com>
19077 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
19078 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
19080 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
19081 P8V_BUILTIN_VEC_NEG.
19083 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
19085 * config/rl78/rl78.md (movdf): New define expand.
19087 2018-02-19 Martin Liska <mliska@suse.cz>
19090 * doc/invoke.texi: Fix typo.
19091 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
19093 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
19095 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
19096 handle rs6000_single_float and rs6000_double_float specially for
19099 2018-02-16 Jeff Law <law@redhat.com>
19101 * config/rx/rx.c (add_pop_cfi_notes): New function.;
19102 (pop_regs): Use it.
19104 2018-02-16 Jakub Jelinek <jakub@redhat.com>
19107 * ipa-inline.c (inline_small_functions): Fix a typo.
19109 2018-02-16 Nathan Sidwell <nathan@acm.org>
19111 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
19113 2018-02-16 Carl Love <cel@us.ibm.com>
19115 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
19116 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
19117 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
19118 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
19119 expansion to P8V_BUILTIN_VEC_FLOAT2.
19121 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
19123 PR rtl-optimization/70023
19124 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
19125 src_regno into account.
19127 2018-02-16 Carl Love <cel@us.ibm.com>
19129 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
19130 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
19131 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
19132 * config/rs6000/rs6000.c: Remove case statements for
19133 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
19134 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
19135 and P9V_BUILTIN_VEC_VINSERT4B.
19136 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
19137 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
19138 * config/rs6000/vsx.md:
19139 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
19142 2018-02-16 Carl Love <cel@us.ibm.com>
19144 * config/rs6000/altivec.h: Add builtin names vec_extract4b
19146 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
19148 * config/rs6000/rs6000-c.c: Add the definitions for
19149 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
19150 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
19151 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
19152 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
19153 definition for insert4b and define insn *insert3b_internal.
19154 * doc/extend.texi: Add documentation for vec_extract4b.
19156 2018-02-16 Nathan Sidwell <nathan@acm.org>
19158 * doc/extend.texi (Backwards Compatibility): Mention friend
19159 injection. Note for-scope is deprecated.
19160 * doc/invoke.texi (-ffriend-injection): Deprecate.
19162 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
19164 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
19165 that moved to I2, also allow destinations that are a paradoxical
19166 subreg (instead of a normal reg).
19168 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
19171 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
19174 2018-02-16 Richard Biener <rguenther@suse.de>
19176 PR tree-optimization/84037
19177 PR tree-optimization/84016
19179 * config/i386/i386.c (ix86_builtin_vectorization_cost):
19180 Adjust vec_construct for the fact we need additional higher latency
19181 128bit inserts for AVX256 and AVX512 vector builds.
19182 (ix86_add_stmt_cost): Scale vector construction cost for
19185 2018-02-16 Richard Biener <rguenther@suse.de>
19187 PR tree-optimization/84417
19188 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
19189 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
19190 (non_rewritable_lvalue_p): Likewise, use poly-ints.
19192 2018-02-16 Martin Liska <mliska@suse.cz>
19195 * internal-fn.def (ASAN_CHECK): Set proper flags.
19196 (ASAN_MARK): Likewise.
19198 2018-02-16 Julia Koval <julia.koval@intel.com>
19200 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
19201 from PTA_CANNONLAKE.
19203 2018-02-16 Jakub Jelinek <jakub@redhat.com>
19206 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
19207 Use ++iter rather than iter++ for std::list iterators.
19208 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
19209 defer deleting them until all nodes in the forest are processed. Do
19210 free even leaf nodes. Change to_process into auto_vec.
19213 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
19214 * vec.h (vec_default_construct): Use memset instead of placement new
19215 if BROKEN_VALUE_INITIALIZATION is defined.
19216 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
19217 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
19220 PR rtl-optimization/83723
19221 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
19222 * lra.c (lra_substitute_pseudo): Likewise. If true, use
19223 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
19225 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
19227 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
19229 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
19231 PR rtl-optimization/81443
19232 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
19233 from inner REGs to paradoxical SUBREGs.
19235 2018-02-16 Richard Biener <rguenther@suse.de>
19237 PR tree-optimization/84399
19238 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
19239 For operands we can analyze at their definition make sure we can
19240 analyze them at each use as well.
19242 2018-02-16 Richard Biener <rguenther@suse.de>
19244 PR tree-optimization/84190
19245 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
19246 volatile accesses if the decl isn't volatile.
19248 2018-02-15 Jason Merrill <jason@redhat.com>
19250 PR c++/84314 - ICE with templates and fastcall attribute.
19251 * attribs.c (build_type_attribute_qual_variant): Don't clobber
19252 TYPE_CANONICAL on an existing type.
19254 2018-02-15 Jakub Jelinek <jakub@redhat.com>
19256 PR tree-optimization/84383
19257 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
19258 dstoff nor call operand_equal_p if dstbase is NULL.
19260 PR tree-optimization/84334
19261 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
19262 also a CONSTANT_CLASS_P, punt.
19264 2018-02-14 Jim Wilson <jimw@sifive.com>
19266 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
19267 first SMALL_OPERAND check. New local min_second_step. Move assert
19268 to where locals are set. Add TARGET_RVC support.
19269 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
19271 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
19273 * doc/invoke.texi: Correct -Wformat-overflow code sample.
19275 2018-02-14 Martin Sebor <msebor@redhat.com>
19277 PR tree-optimization/83698
19278 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
19279 arrays constrain the offset range to their bounds.
19280 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
19281 (builtin_access::overlap): Avoid setting the size of overlap if it's
19283 (maybe_diag_overlap): Also consider arrays when deciding what values
19284 of offsets to include in diagnostics.
19286 2018-02-14 Martin Sebor <msebor@redhat.com>
19289 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
19290 that correspond to the kind of a declaration.
19292 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
19295 * config/pa/pa.md: Load address of PIC label using the linkage table
19296 if the label is nonlocal.
19298 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
19300 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
19301 warning message if user requests -maltivec=be.
19302 * doc/invoke.texi: Document deprecation of -maltivec=be.
19304 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
19307 * config/rs6000/rs6000-c.c: Update definitions for
19308 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
19309 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
19311 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19314 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
19315 add _get_ssp intrinsics. Remove argument from
19316 __builtin_ia32_rdssp[d|q].
19317 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
19318 * config/i386/i386-builtin.def: Remove argument from
19319 __builtin_ia32_rdssp[d|q].
19320 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
19321 ix86_expand_special_args_builtin for _rdssp[d|q].
19322 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
19323 Clear register before usage.
19324 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
19325 Add documentation for new _get_ssp and _inc_ssp intrinsics.
19327 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
19329 PR tree-optimization/84357
19330 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
19331 operand 1 of an ARRAY_REF too.
19333 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
19336 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
19337 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
19339 (set_of_reg): New struct.
19340 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
19341 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
19342 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
19344 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
19345 Split into bitclr, bitset, bitinvert patterns if appropriate.
19346 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
19347 use rx_fuse_in_memory_bitop.
19348 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
19349 to named insn, correct maximum insn length.
19351 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
19354 * machmode.def: Define a complex mode for PARTIAL_INT.
19355 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
19357 * doc/rtl.texi: Document CSPImode.
19358 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
19360 (msp430_hard_regno_nregs_with_padding): Likewise.
19362 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
19365 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
19367 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
19369 PR rtl-optimization/84169
19370 * combine.c (try_combine): New variable split_i2i3. Set it to true if
19371 we generated a parallel as new i3 and we split that to new i2 and i3
19372 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
19373 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
19374 those to i2, not i1. Partially rewrite this scan code.
19376 2018-02-13 Jakub Jelinek <jakub@redhat.com>
19379 * stor-layout.c (place_field): For variable length fields, adjust
19380 offset_align afterwards not just based on the field's alignment,
19381 but also on the size.
19383 PR middle-end/84309
19384 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
19385 of exps and logs in the use_exp2 case.
19387 2018-02-13 Jeff Law <law@redhat.com>
19389 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
19390 entry for "vector".
19392 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
19395 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
19399 * common.opt (gas-loc-support, gas-locview-support): New.
19400 (ginline-points, ginternal-reset-location-views): New.
19401 * doc/invoke.texi: Document them. Use @itemx where intended.
19402 (gvariable-location-views): Adjust.
19403 * target.def (reset_location_view): New.
19404 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
19405 (TARGET_RESET_LOCATION_VIEW): New.
19406 * doc/tm.texi: Rebuilt.
19407 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
19408 (dwarf2out_default_as_locview_support): New.
19409 (output_asm_line_debug_info): Use option variables.
19410 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
19411 (output_loc_list): Likewise.
19412 (add_high_low_attributes): Check option variables.
19413 Don't output entry view attribute in strict mode.
19414 (gen_inlined_subroutine_die): Check option variables.
19415 (dwarf2out_inline_entry): Likewise.
19416 (init_sections_and_labels): Likewise.
19417 (dwarf2out_early_finish): Likewise.
19418 (maybe_reset_location_view): New, from...
19419 (dwarf2out_var_location): ... here. Call it.
19420 * debug.h (dwarf2out_default_as_loc_support): Declare.
19421 (dwarf2out_default_as_locview_support): Declare.
19422 * hooks.c (hook_int_rtx_insn_0): New.
19423 * hooks.h (hook_int_rtx_insn_0): Declare.
19424 * toplev.c (process_options): Take -gas-loc-support and
19425 -gas-locview-support from dwarf2out. Enable
19426 -gvariable-location-views by default only with locview
19427 assembler support. Enable -ginternal-reset-location-views by
19428 default only if the target defines the corresponding hook.
19429 Enable -ginline-points by default if location views are
19430 enabled; force it disabled if statement frontiers are
19432 * tree-inline.c (expand_call_inline): Check option variables.
19433 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
19435 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
19437 PR tree-optimization/84321
19438 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
19439 handling. Also check whether the anti-range contains any values
19440 that satisfy the mask; switch to a VR_RANGE if not.
19442 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
19445 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
19447 2018-02-13 Martin Jambor <mjambor@suse.cz>
19450 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
19451 of call statements, also set location of a load to a temporary.
19453 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
19455 * config/rl78/rl78.c (add_vector_labels): New function.
19456 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
19457 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
19458 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
19459 which checks that no arguments are passed.
19460 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
19461 * doc/extend.texi: Documentation for the new attribute.
19463 2018-02-13 Andreas Schwab <schwab@suse.de>
19465 * config/riscv/linux.h (CPP_SPEC): Define.
19467 2018-02-13 Jakub Jelinek <jakub@redhat.com>
19470 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
19471 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
19472 OPTION_MASK_ISA_AES as first argument to def_builtin_const
19473 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
19474 instead of OPTION_MASK_ISA_PCLMUL as first argument to
19475 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
19476 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
19477 temporarily for AES and PCLMUL builtins.
19479 PR tree-optimization/84339
19480 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
19481 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
19484 PR middle-end/84309
19485 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
19486 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
19487 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
19489 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
19491 * omp-simd-clone.h: New file.
19492 * omp-simd-clone.c: Include omp-simd-clone.h.
19493 (expand_simd_clones): No longer static.
19494 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
19495 cgraph.h and omp-simd-clone.h.
19496 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
19497 (vect_recog_widen_shift_pattern): Formatting fix.
19498 (vect_pattern_recog_1): Don't check optab for calls.
19501 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
19502 operands[2] into a REG before using gen_lowpart on it.
19504 2018-02-12 Jeff Law <law@redhat.com>
19507 * config/sh/sh.c (find_barrier): Consider a sibling call
19510 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
19511 successfully back substituting a reg.
19513 2018-02-12 Richard Biener <rguenther@suse.de>
19515 PR tree-optimization/84037
19516 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
19517 parameter, move visited init to caller.
19518 (vect_slp_analyze_operations): Separate cost from validity
19519 check, initialize visited once for all instances.
19520 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
19522 * tree-vect-stmts.c (vect_model_simple_cost): Make early
19524 (vect_model_promotion_demotion_cost): Likewise.
19525 (vectorizable_bswap): Guard cost modeling with !slp_node
19526 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
19528 (vectorizable_call): Likewise.
19529 (vectorizable_conversion): Likewise.
19530 (vectorizable_assignment): Likewise.
19531 (vectorizable_shift): Likewise.
19532 (vectorizable_operation): Likewise.
19533 (vectorizable_store): Likewise.
19534 (vectorizable_load): Likewise.
19535 (vectorizable_condition): Likewise.
19536 (vectorizable_comparison): Likewise.
19538 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
19541 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
19542 (ASAN_MARK): Fix fnspec to account for return value, change pointer
19543 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
19545 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19547 PR middle-end/83665
19548 * params.def (inline-min-speedup): Increase from 8 to 15.
19549 (max-inline-insns-auto): Decrease from 40 to 30.
19550 * ipa-split.c (consider_split): Add some buffer for function to
19551 be considered inlining candidate.
19552 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
19555 2018-02-12 Richard Biener <rguenther@suse.de>
19557 PR tree-optimization/84037
19558 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
19559 matched stmts if we cannot swap the non-matched ones.
19561 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
19563 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
19564 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
19565 _mm_maskz_scalef_round_ss): New intrinsics.
19566 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
19567 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
19568 __builtin_ia32_scalefss_round): Remove.
19569 (__builtin_ia32_scalefsd_mask_round,
19570 __builtin_ia32_scalefss_mask_round): New intrinsics.
19571 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
19572 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
19573 ((match_operand:VF_128 2 "<round_nimm_predicate>"
19574 "<round_constraint>")): Changed to ...
19575 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
19576 "<round_scalar_constraint>")): ... this.
19577 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
19578 %0, %1, %2<round_op3>}"): Changed to ...
19579 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
19580 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
19581 %2<round_scalar_mask_op3>}"): ... this.
19582 * config/i386/subst.md (round_scalar_nimm_predicate): New.
19584 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
19586 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
19587 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
19588 (_mm_maskz_sqrt_round_ss): New intrinsics.
19589 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
19590 (__builtin_ia32_sqrtsd_mask_round)
19591 (__builtin_ia32_sqrtss_mask_round): New builtins.
19592 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
19593 (__builtin_ia32_sqrtss_round): Remove.
19594 (__builtin_ia32_sqrtsd_mask_round)
19595 (__builtin_ia32_sqrtss_mask_round): New builtins.
19596 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
19597 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
19598 ((match_operand:VF_128 1 "vector_operand"
19599 "xBm,<round_constraint>")): Changed to ...
19600 ((match_operand:VF_128 1 "vector_operand"
19601 "xBm,<round_scalar_constraint>")): ... this.
19602 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
19603 %0, %2, %<iptr>1<round_op3>}): Changed to ...
19604 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
19605 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
19606 %<iptr>1<round_scalar_mask_op3>}): ... this.
19607 ((set_attr "prefix" "<round_prefix>")): Changed to ...
19608 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
19610 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
19613 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
19614 Cast vec_cmpeq result to correct type.
19615 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
19616 Cast vec_cmpgt result to correct type.
19618 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
19620 * final.c (final_scan_insn_1): Renamed from...
19621 (final_scan_insn): ... this. New wrapper, to recover
19622 seen from the outermost call in recursive ones.
19623 * config/sparc/sparc.c (output_return): Drop seen from call.
19624 (output_sibcall): Likewise.
19625 * config/visium/visium.c (output_branch): Likewise.
19627 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
19629 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
19632 2018-02-10 Alan Modra <amodra@gmail.com>
19635 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
19636 Specify LR as an input.
19638 2018-02-10 Jakub Jelinek <jakub@redhat.com>
19641 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
19642 remove_member_access_dummy_vars): New functions.
19643 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
19644 lower_omp_1, execute_lower_omp): Use them.
19646 PR rtl-optimization/84308
19647 * shrink-wrap.c (spread_components): Release todo vector.
19649 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
19651 PR rtl-optimization/57193
19652 * ira-color.c (struct allocno_color_data): Add member
19653 conflict_allocno_hard_prefs.
19654 (update_conflict_allocno_hard_prefs): New.
19655 (bucket_allocno_compare_func): Add a preference based on
19656 conflict_allocno_hard_prefs.
19657 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
19658 (color_allocnos): Remove a dead code. Initiate
19659 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
19661 2018-02-09 Jakub Jelinek <jakub@redhat.com>
19664 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
19665 constraint from =wa to wa. Avoid a subreg on the output operand,
19666 instead use a pseudo and subreg it in a move.
19667 (p9_xxbrd_<mode>): Changed to ...
19668 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
19669 (p9_xxbrd_v2df): New expander.
19670 (p9_xxbrw_<mode>): Changed to ...
19671 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
19672 (p9_xxbrw_v4sf): New expander.
19674 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19676 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
19678 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
19681 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
19682 multiply in 32-bit mode.
19683 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
19684 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
19687 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19689 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
19690 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
19691 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
19692 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
19694 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
19697 * dwarf2out.c (is_trivial_indirect_ref): New function.
19698 (dwarf2out_late_global_decl): Do not generate a location
19699 attribute for variables that have a non-trivial DECL_VALUE_EXPR
19700 and that are not defined in the current unit.
19702 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19704 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
19705 instead of a libcall for UNORDERED.
19707 2018-02-09 Tamar Christina <tamar.christina@arm.com>
19710 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
19711 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
19713 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19716 * config/s390/s390.c (s390_set_current_function): Invoke
19717 s390_indirect_branch_settings also if fndecl didn't change.
19719 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19721 * config/rs6000/rs6000.md (blockage): Set length to zero.
19723 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19725 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
19727 2018-02-09 Jakub Jelinek <jakub@redhat.com>
19730 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
19731 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
19735 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
19736 PARALLEL incoming that failed vt_get_decl_and_offset check.
19738 PR middle-end/84237
19739 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
19740 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
19742 (get_variable_section): For decls in named .bss* sections pass true as
19743 second argument to bss_initializer_p.
19745 2018-02-09 Marek Polacek <polacek@redhat.com>
19746 Jakub Jelinek <jakub@redhat.com>
19749 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
19750 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
19751 Sync some changes from cxx_fold_indirect_ref.
19753 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19755 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
19757 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
19758 (BLOCK_INLINE_ENTRY_LABEL): New.
19759 (dwarf2out_var_location): Disregard inline entry markers.
19760 (inline_entry_data): New struct.
19761 (inline_entry_data_hasher): New hashtable type.
19762 (inline_entry_data_hasher::hash): New.
19763 (inline_entry_data_hasher::equal): New.
19764 (inline_entry_data_table): New variable.
19765 (add_high_low_attributes): Add DW_AT_entry_pc and
19766 DW_AT_GNU_entry_view attributes if a pending entry is found
19767 in inline_entry_data_table. Add old entry_pc attribute only
19768 if debug nonbinding markers are disabled.
19769 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
19770 markers are enabled.
19771 (block_within_block_p, dwarf2out_inline_entry): New.
19772 (dwarf2out_finish): Check that no entries remained in
19773 inline_entry_data_table.
19774 * final.c (reemit_insn_block_notes): Handle inline entry notes.
19775 (final_scan_insn, notice_source_line): Likewise.
19776 (rest_of_clean_state): Skip inline entry markers.
19777 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
19779 * gimple.c (gimple_build_debug_inline_entry): New.
19780 * gimple.h (enum gimple_debug_subcode): Add
19781 GIMPLE_DEBUG_INLINE_ENTRY.
19782 (gimple_build_debug_inline_entry): Declare.
19783 (gimple_debug_inline_entry_p): New.
19784 (gimple_debug_nonbind_marker_p): Adjust.
19785 * insn-notes.def (INLINE_ENTRY): New.
19786 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
19787 inline entry marker notes.
19788 (print_insn): Likewise.
19789 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
19790 (INSN_DEBUG_MARKER_KIND): Likewise.
19791 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
19792 * tree-inline.c (expand_call_inline): Build and insert
19793 debug_inline_entry stmt.
19794 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
19795 inline entry blocks early, if nonbind markers are enabled.
19796 (dump_scope_block): Dump fragment info.
19797 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
19798 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
19799 (gimple_build_debug_inline_entry): New.
19800 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
19801 Enable/disable inline entry points too.
19802 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
19803 (DEBUG_INSN): Describe inline entry markers.
19805 * common.opt (gvariable-location-views): New.
19806 (gvariable-location-views=incompat5): New.
19807 * config.in: Rebuilt.
19808 * configure: Rebuilt.
19809 * configure.ac: Test assembler for view support.
19810 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
19811 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
19812 * dwarf2out.c (var_loc_view): New typedef.
19813 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
19814 (dwarf2out_locviews_in_attribute): New.
19815 (dwarf2out_locviews_in_loclist): New.
19816 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
19817 (enum dw_line_info_opcode): Add LI_adv_address.
19818 (struct dw_line_info_table): Add view.
19819 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
19820 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
19821 (zero_view_p): New variable.
19822 (ZERO_VIEW_P): New macro.
19823 (output_asm_line_debug_info): New.
19824 (struct var_loc_node): Add view.
19825 (add_AT_view_list, AT_loc_list): New.
19826 (add_var_loc_to_decl): Add view param. Test it against last.
19827 (new_loc_list): Add view params. Record them.
19828 (AT_loc_list_ptr): Handle loc and view lists.
19829 (view_list_to_loc_list_val_node): New.
19830 (print_dw_val): Handle dw_val_class_view_list.
19831 (size_of_die): Likewise.
19832 (value_format): Likewise.
19833 (loc_list_has_views): New.
19834 (gen_llsym): Set vl_symbol too.
19835 (maybe_gen_llsym, skip_loc_list_entry): New.
19836 (dwarf2out_maybe_output_loclist_view_pair): New.
19837 (output_loc_list): Output view list or entries too.
19838 (output_view_list_offset): New.
19839 (output_die): Handle dw_val_class_view_list.
19840 (output_dwarf_version): New.
19841 (output_compilation_unit_header): Use it.
19842 (output_skeleton_debug_sections): Likewise.
19843 (output_rnglists, output_line_info): Likewise.
19844 (output_pubnames, output_aranges): Update version comments.
19845 (output_one_line_info_table): Output view numbers in asm comments.
19846 (dw_loc_list): Determine current endview, pass it to new_loc_list.
19847 Call maybe_gen_llsym.
19848 (loc_list_from_tree_1): Adjust.
19849 (add_AT_location_description): Create view list attribute if
19850 needed, check it's absent otherwise.
19851 (convert_cfa_to_fb_loc_list): Adjust.
19852 (maybe_emit_file): Call output_asm_line_debug_info for test.
19853 (dwarf2out_var_location): Reset views as needed. Precompute
19854 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
19855 attribute. Set view.
19856 (new_line_info_table): Reset next view.
19857 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
19858 (dwarf2out_source_line): Likewise. Output view resets and labels to
19859 the assembler, or select appropriate line info opcodes.
19860 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
19861 (optimize_string_length): Catch it. Adjust.
19862 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
19863 dw_val_class_view_list, and remove it if no longer needed.
19864 (hash_loc_list): Hash view numbers.
19865 (loc_list_hasher::equal): Compare them.
19866 (optimize_location_lists): Check whether a view list symbol is
19867 needed, and whether the locview attribute is present, and
19868 whether they match. Remove the locview attribute if no longer
19870 (index_location_lists): Call skip_loc_list_entry for test.
19871 (dwarf2out_finish): Call output_asm_line_debug_info for test.
19872 Use output_dwarf_version.
19873 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19874 (struct dw_val_node): Add val_view_list.
19875 * final.c (SEEN_NEXT_VIEW): New.
19876 (set_next_view_needed): New.
19877 (clear_next_view_needed): New.
19878 (maybe_output_next_view): New.
19879 (final_start_function): Rename to...
19880 (final_start_function_1): ... this. Take pointer to FIRST,
19881 add SEEN parameter. Emit param bindings in the initial view.
19882 (final_start_function): Reintroduce SEEN-less interface.
19883 (final): Rename to...
19884 (final_1): ... this. Take SEEN parameter. Output final pending
19885 next view at the end.
19886 (final): Reintroduce seen-less interface.
19887 (final_scan_insn): Output pending next view before switching
19888 sections or ending a block. Mark the next view as needed when
19889 outputting variable locations. Notify debug backend of section
19890 changes, and of location view changes.
19891 (rest_of_handle_final): Adjust.
19892 * toplev.c (process_options): Autodetect value for debug variable
19893 location views option. Warn on incompat5 without -gdwarf-5.
19894 * doc/invoke.texi (gvariable-location-views): New.
19895 (gvariable-location-views=incompat5): New.
19896 (gno-variable-location-views): New.
19898 2018-02-08 David Malcolm <dmalcolm@redhat.com>
19900 PR tree-optimization/84136
19901 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19902 that the result of find_edge is non-NULL.
19904 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19907 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19908 storing integer register in SImode. Fix cost of 256 and 512
19909 byte aligned SSE register store.
19911 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19913 * config/i386/i386.c (ix86_multiplication_cost): Fix
19914 multiplication cost for TARGET_AVX512DQ.
19916 2018-02-08 Marek Polacek <polacek@redhat.com>
19918 PR tree-optimization/84238
19919 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19922 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19924 PR tree-optimization/84265
19925 * tree-vect-stmts.c (vectorizable_store): Don't treat
19926 VMAT_CONTIGUOUS accesses as grouped.
19927 (vectorizable_load): Likewise.
19929 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19931 PR tree-optimization/81635
19932 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19933 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19934 (test_round_for_mask): New functions.
19935 (wide_int_cc_tests): Call test_round_for_mask.
19936 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19937 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19938 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19939 range returned by get_range_info.
19941 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19944 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19945 * symtab.c: Include builtins.h
19946 (symtab_node::output_to_lto_symbol_table_p): Move here
19947 from lto-streamer-out.c:output_symbol_p.
19948 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19949 (output_symbol_p): Move all logic to symtab.c
19950 (produce_symtab): Update.
19952 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19954 * config/s390/s390-opts.h (enum indirect_branch): Define.
19955 * config/s390/s390-protos.h (s390_return_addr_from_memory)
19956 (s390_indirect_branch_via_thunk)
19957 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19958 (enum s390_indirect_branch_type): Define.
19959 * config/s390/s390.c (struct s390_frame_layout, struct
19960 machine_function): Remove.
19961 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19962 (indirect_branch_table_label_no, indirect_branch_table_name):
19964 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19965 (enum s390_indirect_branch_option): Define.
19966 (s390_return_addr_from_memory): New function.
19967 (s390_handle_string_attribute): New function.
19968 (s390_attribute_table): Add new attribute handler.
19969 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19970 (s390_indirect_branch_via_thunk): New function.
19971 (s390_indirect_branch_via_inline_thunk): New function.
19972 (s390_function_ok_for_sibcall): When jumping via thunk disallow
19973 sibling call optimization for non z10 compiles.
19974 (s390_emit_call): Force indirect branch target to be a single
19975 register. Add r1 clobber for non-z10 compiles.
19976 (s390_emit_epilogue): Emit return jump via return_use expander.
19977 (s390_reorg): Handle JUMP_INSNs as execute targets.
19978 (s390_option_override_internal): Perform validity checks for the
19979 new command line options.
19980 (s390_indirect_branch_attrvalue): New function.
19981 (s390_indirect_branch_settings): New function.
19982 (s390_set_current_function): Invoke s390_indirect_branch_settings.
19983 (s390_output_indirect_thunk_function): New function.
19984 (s390_code_end): Implement target hook.
19985 (s390_case_values_threshold): Implement target hook.
19986 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19988 * config/s390/s390.h (struct s390_frame_layout)
19989 (struct machine_function): Move here from s390.c.
19990 (TARGET_INDIRECT_BRANCH_NOBP_RET)
19991 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19992 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19993 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19994 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19995 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19996 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19997 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19998 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19999 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
20000 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
20001 (mnemonic attribute): Add values which aren't recognized
20003 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
20004 pattern for branch conversion. Fix mnemonic attribute.
20005 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
20006 indirect branch via thunk if requested.
20007 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
20008 ("*indirect_jump"): Disable for branch conversion using out of
20010 ("indirect_jump_via_thunk<mode>_z10")
20011 ("indirect_jump_via_thunk<mode>")
20012 ("indirect_jump_via_inlinethunk<mode>_z10")
20013 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
20014 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
20015 ("casesi_jump_via_inlinethunk<mode>_z10")
20016 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
20017 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
20018 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
20019 ("*indirect2_jump"): Disable for branch conversion.
20020 ("casesi_jump"): Turn into expander and expand patterns for branch
20022 ("return_use"): New expander.
20023 ("*return"): Emit return via thunk and rename it to ...
20024 ("*return<mode>"): ... this one.
20025 * config/s390/s390.opt: Add new options and and enum for the
20028 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
20030 * lra-constraints.c (match_reload): Unconditionally use
20031 gen_lowpart_SUBREG, rather than selecting between that
20032 and equivalent gen_rtx_SUBREG code.
20034 2018-02-08 Richard Biener <rguenther@suse.de>
20036 PR tree-optimization/84233
20037 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
20038 changed flag instead of boguously re-using phi_inserted.
20040 2018-02-08 Martin Jambor <mjambor@suse.cz>
20042 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
20043 static local variables.
20045 2018-02-08 Richard Biener <rguenther@suse.de>
20047 PR tree-optimization/84278
20048 * tree-vect-stmts.c (vectorizable_store): When looking for
20049 smaller vector types to perform grouped strided loads/stores
20050 make sure the mode is supported by the target.
20051 (vectorizable_load): Likewise.
20053 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
20055 * config/aarch64/aarch64.c (aarch64_components_for_bb):
20056 Increase LDP/STP opportunities by adding adjacent callee-saves.
20058 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
20060 PR rtl-optimization/84068
20061 PR rtl-optimization/83459
20062 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
20064 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
20066 PR tree-optimization/84224
20067 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
20068 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
20069 non-zero arguments.
20071 2018-02-07 Iain Sandoe <iain@codesourcery.com>
20074 * config/rs6000/altivec.md (*restore_world): Remove LR use.
20075 * config/rs6000/predicates.md (restore_world_operation): Adjust op
20076 count, remove one USE.
20078 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
20080 * doc/install.texi (Configuration): Document the
20081 --with-long-double-format={ibm,ieee} PowerPC configuration
20085 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
20086 Convert from define_expand to be define_insn_and_split. Rework
20087 float/double/_Float128 conversions to QI/HI/SImode to work with
20088 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
20089 conversions to QI/HImode types did a store and then a load to
20090 truncate the value. For conversions to VSX registers, don't split
20091 the insn, instead emit the code directly. Use the code iterator
20092 any_fix to combine signed and unsigned conversions.
20093 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
20094 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
20095 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
20096 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
20097 (fix_<mode>di2_hw): Likewise.
20098 (fixuns_<mode>di2_hw): Likewise.
20099 (fix_<mode>si2_hw): Likewise.
20100 (fixuns_<mode>si2_hw): Likewise.
20101 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
20102 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
20103 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
20104 fix<uns>_trunc<SFDF:mode>si2_p8.
20105 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
20106 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
20107 (fix<uns>_<mode>_mem): Likewise.
20108 (fctiw<u>z_<mode>_mem): Likewise.
20109 (fix<uns>_<mode>_mem): Likewise.
20110 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
20111 the register allocator from doing a direct move to the GPRs to do
20112 a store, and instead use the ISA 3.0 store byte/half-word from
20113 vector register instruction. For IEEE 128-bit floating point,
20114 also optimize stores of 32-bit ints.
20115 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
20117 2018-02-07 Alan Hayward <alan.hayward@arm.com>
20119 * genextract.c (push_pathstr_operand): New function to support
20121 (walk_rtx): Call push_pathstr_operand.
20122 (print_path): Support [a-zA-Z].
20124 2018-02-07 Richard Biener <rguenther@suse.de>
20126 PR tree-optimization/84037
20127 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
20128 (cse_and_gimplify_to_preheader): Declare.
20129 (vect_get_place_in_interleaving_chain): Likewise.
20130 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20132 (_loop_vec_info::~_loop_vec_info): Delete it.
20133 (cse_and_gimplify_to_preheader): New function.
20134 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
20135 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
20136 (vectorizable_load): Likewise. For grouped stores always base
20137 the IV on the first element.
20138 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
20139 condition before gimplifying.
20141 2018-02-07 Jakub Jelinek <jakub@redhat.com>
20143 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
20144 *DIV_EXPR and *MOD_EXPR.
20146 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
20149 * config/i386/i386.c (ix86_option_override_internal): Mask out
20150 the CF_SET bit when checking -fcf-protection.
20152 2018-02-07 Tom de Vries <tom@codesourcery.com>
20155 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
20158 2018-02-07 Richard Biener <rguenther@suse.de>
20160 PR tree-optimization/84204
20161 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
20164 PR tree-optimization/84205
20165 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
20166 special-case isl_ast_op_zdiv_r.
20168 PR tree-optimization/84223
20169 * graphite-scop-detection.c (gather_bbs::before_dom_children):
20170 Only add conditions from within the region.
20171 (gather_bbs::after_dom_children): Adjust.
20173 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
20176 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
20177 * config/avr/avr.md: Only post-reload split REG-REG moves if
20178 either register is GENERAL_REG_P.
20180 2018-02-07 Jakub Jelinek <jakub@redhat.com>
20182 PR tree-optimization/84235
20183 * tree-ssa-scopedtables.c
20184 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
20185 if the subtraction is performed in floating point type where NaNs are
20186 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
20187 build 1. Formatting fix.
20189 2018-02-06 Jakub Jelinek <jakub@redhat.com>
20192 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
20193 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
20194 and skip it regardless of bb boundaries. Use CALL_P macro,
20195 don't test INSN_P (insn) together with CALL_P or JUMP_P check
20196 unnecessarily, formatting fix.
20198 2018-02-06 Michael Collison <michael.collison@arm.com>
20200 * config/arm/thumb2.md:
20201 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
20202 (*thumb_mov_notscc): Ditto.
20204 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
20207 * config/rs6000/rs6000.md (su code attribute): Use "u" for
20208 unsigned_fix, not "s".
20210 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20212 * configure.ac (gcc_fn_eh_frame_ro): New function.
20213 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
20214 correct .eh_frame permissions.
20215 * configure: Regenerate.
20217 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
20219 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
20220 irrelevant options.
20222 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20224 * config/rs6000/rs6000.c (rs6000_option_override_internal):
20225 Display warning message for -mno-speculate-indirect-jumps.
20227 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
20229 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
20231 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
20233 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
20235 PR tree-optimization/84225
20236 * tree-eh.c (find_trapping_overflow): Only call
20237 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
20239 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
20242 * config/i386/i386.c: Reimplement the check of possible options
20243 -mibt/-mshstk conbination. Change error messages.
20244 * doc/invoke.texi: Fix a typo: remove extra '='.
20246 2018-02-06 Marek Polacek <polacek@redhat.com>
20248 PR tree-optimization/84228
20249 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
20251 2018-02-06 Tamar Christina <tamar.christina@arm.com>
20254 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
20255 emitted arch directives.
20256 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
20257 __ARM_FEATURE_COPROC before changing architectures.
20259 2018-02-06 Richard Biener <rguenther@suse.de>
20261 * config/i386/i386.c (print_reg): Fix typo.
20262 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
20264 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
20266 * configure: Regenerate.
20268 2018-02-05 Martin Sebor <msebor@redhat.com>
20270 PR tree-optimization/83369
20271 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
20274 2018-02-05 Martin Liska <mliska@suse.cz>
20276 * doc/invoke.texi: Cherry-pick upstream r323995.
20278 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
20280 * ira.c (ira_init_register_move_cost): Adjust comment.
20282 2018-02-05 Martin Liska <mliska@suse.cz>
20284 PR gcov-profile/84137
20285 * doc/gcov.texi: Fix typo in documentation.
20287 2018-02-05 Martin Liska <mliska@suse.cz>
20289 PR gcov-profile/83879
20290 * doc/gcov.texi: Document necessity of --dynamic-list-data when
20291 using dlopen functionality.
20293 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
20295 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
20296 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
20297 _mm_maskz_range_ss, _mm_mask_range_round_ss,
20298 _mm_maskz_range_round_ss): New intrinsics.
20299 (__builtin_ia32_rangesd128_round)
20300 (__builtin_ia32_rangess128_round): Remove.
20301 (__builtin_ia32_rangesd128_mask_round,
20302 __builtin_ia32_rangess128_mask_round): New builtins.
20303 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
20304 __builtin_ia32_rangess128_round): Remove.
20305 (__builtin_ia32_rangesd128_mask_round,
20306 __builtin_ia32_rangess128_mask_round): New builtins.
20307 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
20308 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
20309 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
20310 "<round_saeonly_constraint>")): Changed to ...
20311 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
20312 "<round_saeonly_scalar_constraint>")): ... this.
20313 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
20314 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
20315 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
20316 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
20317 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
20319 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
20321 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
20323 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
20324 Remove all values except native, 8540 and 8548.
20326 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
20328 * config/i386/i386.c (ix86_output_function_return): Pass
20329 INVALID_REGNUM, instead of -1, as invalid register number to
20330 indirect_thunk_name and output_indirect_thunk.
20332 2018-02-02 Julia Koval <julia.koval@intel.com>
20334 * config.gcc: Add -march=icelake.
20335 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
20336 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
20337 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
20338 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
20339 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
20340 (processor_target_table): Add icelake.
20341 (ix86_option_override_internal): Handle new PTAs.
20342 (get_builtin_code_for_version): Handle icelake.
20343 (M_INTEL_COREI7_ICELAKE): New.
20344 (fold_builtin_cpu): Handle icelake.
20345 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
20346 * doc/invoke.texi: Add -march=icelake.
20348 2018-02-02 Julia Koval <julia.koval@intel.com>
20350 * config/i386/i386.c (ix86_option_override_internal): Change flags type
20351 to wide_int_bitmask.
20352 * wide-int-bitmask.h: New.
20354 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
20357 * config/i386/i386.md: Replace Pmode with word_mode in
20358 builtin_setjmp_setup and builtin_longjmp to support x32.
20360 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
20364 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
20366 (rs6000_supported_cpu_names): New static variable.
20367 (linux_cpu_translation_table): Likewise.
20368 (elf_platform) <cpu>: Define new static variable and use it.
20369 Translate kernel AT_PLATFORM name to canonical name if needed.
20370 Error if platform name is unknown.
20372 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
20375 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
20377 2018-02-01 Jeff Law <law@redhat.com>
20380 * config/i386/i386.c (release_scratch_register_on_entry): Add new
20381 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
20382 the scratch if RELEASE_VIA_POP is false.
20383 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
20384 If we have to save a temporary register, decrement SIZE appropriately.
20385 Pass new arguments to release_scratch_register_on_entry.
20386 (ix86_adjust_stack_and_probe): Likewise.
20387 (ix86_emit_probe_stack_range): Pass new arguments to
20388 release_scratch_register_on_entry.
20390 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
20392 PR rtl-optimization/84157
20393 * combine.c (change_zero_ext): Use REG_P predicate in
20394 front of HARD_REGISTER_P predicate.
20396 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
20398 * config/avr/avr.c (avr_option_override): Move disabling of
20399 -fdelete-null-pointer-checks to...
20400 * common/config/avr/avr-common.c (avr_option_optimization_table):
20403 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20405 PR tree-optimization/81635
20406 * tree-data-ref.c (split_constant_offset_1): For types that
20407 wrap on overflow, try to use range info to prove that wrapping
20410 2018-02-01 Renlin Li <renlin.li@arm.com>
20413 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
20414 TAILCALL_ADDR_REGS.
20415 (aarch64_register_move_cost): Likewise.
20416 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
20417 TAILCALL_ADDR_REGS.
20418 (REG_CLASS_NAMES): Likewise.
20419 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
20420 TAILCALL_ADDR_REGS. Remove IP registers.
20421 * config/aarch64/aarch64.md (Ucs): Update register constraint.
20423 2018-02-01 Richard Biener <rguenther@suse.de>
20425 * domwalk.h (dom_walker::dom_walker): Add additional constructor
20426 for specifying RPO order and allow NULL for that.
20427 * domwalk.c (dom_walker::dom_walker): Likewise.
20428 (dom_walker::walk): Handle NULL RPO order.
20429 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
20431 (rewrite_update_dom_walker): Likewise.
20432 (mark_def_dom_walker): Likewise.
20434 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20436 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
20437 (aarch64_maybe_expand_sve_subreg_move): Declare.
20438 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
20439 * config/aarch64/predicates.md (aarch64_any_register_operand): New
20441 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
20442 that are semantically a reverse operation.
20443 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
20444 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
20445 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
20447 (aarch64_can_change_mode_class): For big-endian, forbid changes
20448 between two SVE modes if they have different element sizes.
20450 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20452 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
20453 the TImode handling for big-endian targets.
20455 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20457 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
20458 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
20460 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
20461 Remove BSWAP handing for big-endian targets and use the form of
20462 LD1RQ appropariate for the mode.
20464 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20466 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
20467 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
20468 duplicated element.
20470 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20473 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
20474 check for operands that need to go through aarch64_sve_reload_be.
20476 2018-02-01 Jakub Jelinek <jakub@redhat.com>
20478 PR tree-optimization/81661
20479 PR tree-optimization/84117
20480 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
20481 * tree-eh.c: Include gimplify.h.
20482 (find_trapping_overflow, replace_trapping_overflow,
20483 rewrite_to_non_trapping_overflow): New functions.
20484 * tree-vect-loop.c: Include tree-eh.h.
20485 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
20486 * tree-data-ref.c: Include tree-eh.h.
20487 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
20489 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
20491 PR rtl-optimization/84123
20492 * combine.c (change_zero_ext): Check if hard register satisfies
20493 can_change_dest_mode before calling gen_lowpart_SUBREG.
20495 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
20498 * ira.c (ira_init_register_move_cost): Remove assert.
20500 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20502 PR rtl-optimization/84071
20503 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
20504 * doc/tm.texi: Regenerate.
20506 2018-01-31 Richard Biener <rguenther@suse.de>
20508 PR tree-optimization/84132
20509 * tree-data-ref.c (analyze_miv_subscript): Properly
20510 check whether evolution_function_is_affine_multivariate_p
20511 before calling gcd_of_steps_may_divide_p.
20513 2018-01-31 Julia Koval <julia.koval@intel.com>
20516 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
20517 * config/i386/i386.md (rdpid_rex64) New.
20518 (rdpid): Make 32bit only.
20520 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
20523 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
20524 an IDENTIFIER_NODE for FUNCTION_TYPE's.
20526 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20529 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
20531 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20533 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20535 PR rtl-optimization/84071
20536 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
20537 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
20539 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
20541 * config/arc/arc.c (arc_handle_aux_attribute): New function.
20542 (arc_attribute_table): Add 'aux' attribute.
20543 (arc_in_small_data_p): Consider aux like variables.
20544 (arc_is_aux_reg_p): New function.
20545 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
20546 (arc_get_aux_arg): New function.
20547 (prepare_move_operands): Handle aux-register access.
20548 (arc_handle_aux_attribute): New function.
20549 * doc/extend.texi (ARC Variable attributes): Add subsection.
20551 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
20553 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
20554 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
20555 (arc_attribute_table): Add 'uncached' attribute.
20556 (arc_print_operand): Print '.di' flag for uncached memory
20558 (arc_in_small_data_p): Do not consider for small data the uncached
20560 (arc_is_uncached_mem_p): New function.
20561 * config/arc/predicates.md (compact_store_memory_operand): Check
20562 for uncached memory accesses.
20563 (nonvol_nonimm_operand): Likewise.
20564 * doc/extend.texi (ARC Type Attribute): New subsection.
20566 2018-01-31 Jakub Jelinek <jakub@redhat.com>
20569 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
20570 falign-loops=): Add Optimization flag.
20572 2018-01-30 Jeff Law <law@redhat.com>
20575 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
20576 INT_REGISTERS_SAVED. Check it prior to calling
20577 get_scratch_register_on_entry.
20578 (ix86_adjust_stack_and_probe): Similarly.
20579 (ix86_emit_probe_stack_range): Similarly.
20580 (ix86_expand_prologue): Corresponding changes.
20582 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20585 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
20586 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
20588 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
20591 * lra-constraints.c (curr_insn_transform): Process AND in the
20594 2018-01-30 Jakub Jelinek <jakub@redhat.com>
20596 PR rtl-optimization/83986
20597 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
20598 dependence against last_pending_memory_flush in addition to
20599 pending_jump_insns.
20601 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
20603 PR tree-optimization/81611
20604 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
20607 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20610 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
20613 2018-01-30 Richard Biener <rguenther@suse.de>
20614 Jakub Jelinek <jakub@redhat.com>
20616 PR tree-optimization/84111
20617 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
20618 inner loops added during recursion, as they don't have up-to-date
20621 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
20624 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
20625 (can_inline_edge_by_limits_p): ... here.
20626 (can_early_inline_edge_p, check_callers,
20627 update_caller_keys, update_callee_keys, recursive_inlining,
20628 add_new_edges_to_heap, speculation_useful_p,
20629 inline_small_functions,
20630 inline_small_functions, flatten_function,
20631 inline_to_all_callers_1): Update.
20633 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
20635 * profile-count.c (profile_count::combine_with_ipa_count): Handle
20638 2018-01-30 Richard Biener <rguenther@suse.de>
20640 PR tree-optimization/83008
20641 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
20642 invariant and constant vector uses in stmts when they need
20643 more than one stmt.
20645 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20648 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
20649 * configure: Regenerate.
20651 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20653 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
20655 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
20656 Use gen_rtx_REG rather than gen_lowpart.
20658 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20660 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
20661 rather than 0 when creating partial subregs.
20663 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20665 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
20668 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
20671 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
20672 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
20673 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
20674 flags. This restores the settings used before the 2017-07-24.
20675 Turning off pre increment/decrement/modify allows IVOPTS to
20676 optimize DF/SF loops where the index is an int.
20678 2018-01-29 Richard Biener <rguenther@suse.de>
20679 Kelvin Nilsen <kelvin@gcc.gnu.org>
20682 * tree-vect-stmts.c (vectorizable_call): Don't call
20683 targetm.vectorize_builtin_md_vectorized_function if callee is
20686 2018-01-22 Carl Love <cel@us.ibm.com>
20688 * doc/extend.tex: Fix typo in second arg in
20689 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
20691 2018-01-29 Richard Biener <rguenther@suse.de>
20693 PR tree-optimization/84086
20694 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
20695 (flush_ssaname_freelist): When SSA names were released reset
20696 the SCEV hash table.
20698 2018-01-29 Richard Biener <rguenther@suse.de>
20700 PR tree-optimization/84057
20701 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
20702 removed paths when removing edges.
20704 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
20706 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
20707 -mfunction-return=@var{choice}.
20709 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
20711 PR diagnostic/84034
20712 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
20713 Handle CR like TAB.
20714 (layout::print_source_line): Likewise.
20715 (test_get_line_width_without_trailing_whitespace): Add test cases.
20717 2018-01-27 Jakub Jelinek <jakub@redhat.com>
20719 PR middle-end/84040
20720 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
20723 2018-01-26 Jim Wilson <jimw@sifive.com>
20725 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
20727 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
20730 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20732 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
20733 and CMP + SUB-immediate -> SUBS.
20735 2018-01-26 Martin Sebor <msebor@redhat.com>
20737 PR tree-optimization/83896
20738 * tree-ssa-strlen.c (get_string_len): Rename...
20739 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
20740 Avoid assuming length is constant.
20741 (handle_char_store): Use HOST_WIDE_INT for string length.
20743 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
20746 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
20747 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
20749 2018-01-26 Richard Biener <rguenther@suse.de>
20751 PR rtl-optimization/84003
20752 * dse.c (record_store): Only record redundant stores when
20753 the earlier store aliases at least all accesses the later one does.
20755 2018-01-26 Jakub Jelinek <jakub@redhat.com>
20757 PR rtl-optimization/83985
20758 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
20759 REG_CFA_RESTORE insns.
20760 (delete_unmarked_insns): Don't ignore separate shrink wrapping
20761 REG_CFA_RESTORE insns here.
20764 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
20765 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
20767 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20769 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
20770 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
20771 (arc_init): Likewise.
20772 (arc_override_options): Likewise.
20773 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
20775 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
20777 * config/arc/arc.h (TARGET_DBNZ): Define.
20778 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
20779 properly set the tune attribute.
20780 (dbnz): Use TARGET_DBNZ guard.
20781 * config/arc/arc.opt (mtune): Add core3 option.
20783 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20785 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
20786 recognize new pic like addresses.
20787 (arc_delegitimize_address): Clean up.
20789 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20791 * config/arc/arc-arches.def: Option mrf16 valid for all
20793 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
20794 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
20795 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
20796 * config/arc/arc-tables.opt: Regenerate.
20797 * config/arc/arc.c (arc_conditional_register_usage): Handle
20798 reduced register file case.
20799 (arc_file_start): Set must have build attributes.
20800 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
20801 mrf16 option value.
20802 * config/arc/arc.opt (mrf16): Add new option.
20803 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
20804 * config/arc/genmultilib.awk: Handle new mrf16 option.
20805 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
20806 * config/arc/t-multilib: Regenerate.
20807 * doc/invoke.texi (ARC Options): Document mrf16 option.
20809 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20811 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
20812 * config/arc/arc.c (arc_handle_secure_attribute): New function.
20813 (arc_attribute_table): Add 'secure_call' attribute.
20814 (arc_print_operand): Print secure call operand.
20815 (arc_function_ok_for_sibcall): Don't optimize tail calls when
20817 (arc_is_secure_call_p): New function. * config/arc/arc.md
20818 (call_i): Add support for sjli instruction.
20819 (call_value_i): Likewise.
20820 * config/arc/constraints.md (Csc): New constraint.
20822 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20823 John Eric Martin <John.Martin@emmicro-us.com>
20825 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
20826 * config/arc/arc.c (_arc_jli_section): New struct.
20827 (arc_jli_section): New type.
20828 (rc_jli_sections): New static variable.
20829 (arc_handle_jli_attribute): New function.
20830 (arc_attribute_table): Add jli_always and jli_fixed attribute.
20831 (arc_file_end): New function.
20832 (TARGET_ASM_FILE_END): Define.
20833 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
20834 (arc_add_jli_section): New function.
20835 (jli_call_scan): Likewise.
20836 (arc_reorg): Call jli_call_scan.
20837 (arc_output_addsi): Remove 'S' from printing asm operand.
20838 (arc_is_jli_call_p): New function.
20839 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
20841 (movhi_insn): Likewise.
20842 (movsi_insn): Likewise.
20843 (movsi_set_cc_insn): Likewise.
20844 (loadqi_update): Likewise.
20845 (load_zeroextendqisi_update): Likewise.
20846 (load_signextendqisi_update): Likewise.
20847 (loadhi_update): Likewise.
20848 (load_zeroextendhisi_update): Likewise.
20849 (load_signextendhisi_update): Likewise.
20850 (loadsi_update): Likewise.
20851 (loadsf_update): Likewise.
20852 (movsicc_insn): Likewise.
20853 (bset_insn): Likewise.
20854 (bxor_insn): Likewise.
20855 (bclr_insn): Likewise.
20856 (bmsk_insn): Likewise.
20857 (bicsi3_insn): Likewise.
20858 (cmpsi_cc_c_insn): Likewise.
20859 (movsi_ne): Likewise.
20860 (movsi_cond_exec): Likewise.
20861 (clrsbsi2): Likewise.
20862 (norm_f): Likewise.
20872 (call_i): Remove 'S' asm letter, add jli instruction.
20873 (call_value_i): Likewise.
20874 * config/arc/arc.op (mjli-always): New option.
20875 * config/arc/constraints.md (Cji): New constraint.
20876 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20878 (subsf3_fpx): Likewise.
20879 (mulsf3_fpx): Likewise.
20880 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20882 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20883 function attrbutes.
20884 * doc/invoke.texi (ARC): Document mjli-always option.
20886 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
20888 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20889 avoid addition with 0 and use incw and decw where possible.
20891 2018-01-26 Richard Biener <rguenther@suse.de>
20893 PR tree-optimization/81082
20894 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20895 association if it requires casting to unsigned.
20896 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20897 from fold_plusminus_mult_expr to catch important cases late when
20898 range info is available.
20900 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20902 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20903 * configure.ac (hidden_linkonce): New test.
20904 * configure: Regenerate.
20905 * config.in: Regenerate.
20907 2018-01-26 Julia Koval <julia.koval@intel.com>
20909 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20910 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20911 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20912 _mm_mask_bitshuffle_epi64_mask): Fix type.
20913 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20914 USI_FTYPE_V4DI_V4DI_USI): Remove.
20915 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20916 __builtin_ia32_vpshufbitqmb256_mask,
20917 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20918 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20919 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20921 2018-01-26 Alan Modra <amodra@gmail.com>
20924 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20925 UNSPEC_VBPERMQ. Sort other unspecs.
20927 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
20929 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20931 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
20933 PR middle-end/83055
20934 * predict.c (drop_profile): Do not push/pop cfun; update also
20936 (handle_missing_profiles): Fix logic looking for zero profiles.
20938 2018-01-25 Jakub Jelinek <jakub@redhat.com>
20940 PR middle-end/83977
20941 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20942 on functions with #pragma omp declare simd or functions with simd
20944 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20945 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20946 Remove trailing \n from warning_at calls.
20948 2018-01-25 Tom de Vries <tom@codesourcery.com>
20951 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20952 for neutered workers.
20954 2018-01-24 Joseph Myers <joseph@codesourcery.com>
20957 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20958 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20960 2018-01-24 Jeff Law <law@redhat.com>
20963 * i386.c (get_probe_interval): Move to earlier point.
20964 (ix86_compute_frame_layout): If -fstack-clash-protection and
20965 the frame is larger than the probe interval, then use pushes
20966 to save registers rather than reg->mem moves.
20967 (ix86_expand_prologue): Remove conditional for int_registers_saved
20970 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
20973 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20974 min/max for never referenced object.
20976 2018-01-24 Jakub Jelinek <jakub@redhat.com>
20978 PR middle-end/83977
20979 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20981 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20982 attributes from DECL_ATTRIBUTES (decl) without affecting
20983 DECL_ATTRIBUTES (current_function_decl).
20984 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20985 functions with non-NULL DECL_ABSTRACT_ORIGIN.
20987 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
20989 PR tree-optimization/83979
20990 * fold-const.c (fold_comparison): Use constant_boolean_node
20991 instead of boolean_{true,false}_node.
20993 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
20995 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20998 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21000 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21001 Simplify the clause that sets the length attribute.
21002 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21003 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
21004 clause that sets the length attribute.
21005 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21007 2018-01-24 Tom de Vries <tom@codesourcery.com>
21010 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
21011 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
21012 Add strict parameter.
21013 (prevent_branch_around_nothing): Insert dummy insn between branch to
21014 label and label with no ptx insn inbetween.
21015 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
21017 2018-01-24 Tom de Vries <tom@codesourcery.com>
21020 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
21021 for neutered threads in warp.
21022 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
21024 2018-01-24 Richard Biener <rguenther@suse.de>
21026 PR tree-optimization/83176
21027 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
21030 2018-01-24 Richard Biener <rguenther@suse.de>
21032 PR tree-optimization/82819
21033 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
21034 code generating pluses that are no-ops in the target precision.
21036 2018-01-24 Richard Biener <rguenther@suse.de>
21038 PR middle-end/84000
21039 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
21041 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
21043 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
21044 to merge probabilities.
21045 * predict.c (probably_never_executed): Also mark as cold functions
21046 with global 0 profile and guessed local profile.
21047 * profile-count.c (profile_probability::combine_with_count): New
21049 * profile-count.h (profile_probability::operator*,
21050 profile_probability::operator*=, profile_probability::operator/,
21051 profile_probability::operator/=): Reduce precision to adjusted
21052 and set value to guessed on contradictory divisions.
21053 (profile_probability::combine_with_freq): Remove.
21054 (profile_probability::combine_wiht_count): Declare.
21055 (profile_count::force_nonzero):: Set to adjusted.
21056 (profile_count::probability_in):: Set quality to adjusted.
21057 * tree-ssa-tail-merge.c (replace_block_by): Use
21058 combine_with_count.
21060 2018-01-23 Andrew Waterman <andrew@sifive.com>
21061 Jim Wilson <jimw@sifive.com>
21063 * config/riscv/riscv.c (riscv_stack_boundary): New.
21064 (riscv_option_override): Set riscv_stack_boundary. Handle
21065 riscv_preferred_stack_boundary_arg.
21066 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
21067 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
21068 (STACK_BOUNDARY): Set to riscv_stack_boundary.
21069 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
21070 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
21071 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
21073 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
21076 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
21077 of struct ix86_frame.
21078 (ix86_expand_epilogue): Likewise. Add a local variable for
21079 the reg_save_offset field in struct ix86_frame.
21081 2018-01-23 Bin Cheng <bin.cheng@arm.com>
21083 PR tree-optimization/82604
21084 * tree-loop-distribution.c (enum partition_kind): New enum item
21085 PKIND_PARTIAL_MEMSET.
21086 (partition_builtin_p): Support above new enum item.
21087 (generate_code_for_partition): Ditto.
21088 (compute_access_range): Differentiate cases that equality can be
21089 proven at all loops, the innermost loops or no loops.
21090 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
21091 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
21092 (finalize_partitions, distribute_loop): Don't fuse partition of
21093 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
21094 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
21095 parloop is enabled.
21097 2018-01-23 Martin Liska <mliska@suse.cz>
21099 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
21100 order to ignore the predictor.
21101 (PRED_POLYMORPHIC_CALL): Likewise.
21102 (PRED_RECURSIVE_CALL): Likewise.
21104 2018-01-23 Martin Liska <mliska@suse.cz>
21106 * tree-profile.c (tree_profiling): Print function header to
21107 aware reader which function we are working on.
21108 * value-prof.c (gimple_find_values_to_profile): Do not print
21109 not interesting value histograms.
21111 2018-01-23 Martin Liska <mliska@suse.cz>
21113 * profile-count.h (enum profile_quality): Add
21114 profile_uninitialized as the first value. Do not number values
21115 as they are zero based.
21116 (profile_count::verify): Update sanity check.
21117 (profile_probability::verify): Likewise.
21119 2018-01-23 Nathan Sidwell <nathan@acm.org>
21121 * doc/invoke.texi (ffor-scope): Deprecate.
21123 2018-01-23 David Malcolm <dmalcolm@redhat.com>
21125 PR tree-optimization/83510
21126 * domwalk.c (set_all_edges_as_executable): New function.
21127 (dom_walker::dom_walker): Convert bool param
21128 "skip_unreachable_blocks" to enum reachability. Move setup of
21129 edge flags to set_all_edges_as_executable and only do it when
21130 reachability is REACHABLE_BLOCKS.
21131 * domwalk.h (enum dom_walker::reachability): New enum.
21132 (dom_walker::dom_walker): Convert bool param
21133 "skip_unreachable_blocks" to enum reachability.
21134 (set_all_edges_as_executable): New decl.
21135 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
21136 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
21138 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
21139 but converting true to REACHABLE_BLOCKS.
21140 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
21142 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
21143 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
21144 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
21146 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
21147 if check_all_array_refs will be called.
21149 2018-01-23 David Malcolm <dmalcolm@redhat.com>
21151 * tree.c (selftest::test_location_wrappers): Add more test
21154 2018-01-23 David Malcolm <dmalcolm@redhat.com>
21156 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
21157 (selftest::test_bit_in_range): Likewise.
21159 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
21162 * doc/sourcebuild.texi (vect_float): Say that the selector
21163 only describes the situation when -funsafe-math-optimizations is on.
21164 (vect_float_strict): Document.
21166 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
21168 PR tree-optimization/83965
21169 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
21170 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
21171 instead of checking only for a reduction.
21172 (vect_recog_widen_sum_pattern): Likewise.
21174 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
21176 * predict.c (probably_never_executed): Only use precise profile info.
21177 (compute_function_frequency): Skip after inlining hack since we now
21178 have quality checking.
21180 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
21182 * profile-count.h (profile_probability::very_unlikely,
21183 profile_probability::unlikely, profile_probability::even): Set
21184 precision to guessed.
21186 2018-01-23 Richard Biener <rguenther@suse.de>
21188 PR tree-optimization/83963
21189 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
21190 Properly terminate dominator walk when crossing the exit edge not
21191 when visiting its source block.
21193 2018-01-23 Jakub Jelinek <jakub@redhat.com>
21196 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
21197 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
21199 2018-01-22 Jakub Jelinek <jakub@redhat.com>
21201 PR tree-optimization/83957
21202 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
21203 semicolon after for body surrounded by braces.
21205 PR tree-optimization/83081
21206 * profile-count.h (profile_probability::split): New method.
21207 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
21208 Use profile_probability::split.
21209 (do_compare_rtx_and_jump): Fix adjustment of probabilities
21210 when splitting a single conditional jump into 2.
21212 2018-01-22 David Malcolm <dmalcolm@redhat.com>
21214 PR tree-optimization/69452
21215 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
21218 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21220 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
21221 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
21222 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
21224 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21226 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
21228 * config/rl78/rl78.md (movdi): New define_expand.
21229 * config/rl78/rl78.c (rl78_split_movdi): New function.
21231 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
21234 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
21236 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
21237 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
21238 128-bit to produce an UNSPEC move to get the double word with the
21239 signbit and then a shift directly to do signbit.
21240 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
21241 implementation with a new version that just does either a direct
21242 move or a regular move. Move memory interface to separate insns.
21243 Move insns so they are next to the expander.
21244 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
21245 with signbit move. Split big and little endian case.
21246 (signbit<mode>2_dm_mem_le): Likewise.
21247 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
21248 (signbit<mode>2_dm2): Likewise.
21250 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21252 * config/rl78/rl78.md (anddi3): New define_expand.
21254 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21256 * config/rl78/rl78.md (umindi3): New define_expand.
21258 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21260 * config/rl78/rl78.md (smindi3): New define_expand.
21262 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21264 * config/rl78/rl78.md (smaxdi3): New define_expand.
21266 2018-01-22 Carl Love <cel@us.ibm.com>
21268 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
21269 LVX_V1TI): Add macro expansion.
21270 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
21271 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
21272 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
21273 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
21274 Change check to determine if the instruction is a byte reversing
21275 entry. Fix typo in comment.
21276 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
21277 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
21278 Add def_builtin calls for new builtins.
21279 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
21280 Add define_insn expansion.
21282 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21284 * config/rl78/rl78.md (umaxdi3): New define_expand.
21286 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21288 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
21289 for non-QImode registers.
21291 2018-01-22 Richard Biener <rguenther@suse.de>
21293 PR tree-optimization/83963
21294 * graphite-scop-detection.c (scop_detection::get_sese): Delay
21295 including the loop exit block.
21296 (scop_detection::merge_sese): Likewise.
21297 (scop_detection::add_scop): Do it here instead.
21299 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21301 * doc/sourcebuild.texi (arm_softfloat): Document.
21303 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
21306 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
21307 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
21308 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
21310 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21311 David Edelsohn <dje.gcc@gmail.com>
21314 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21315 Change "crset eq" to "crset 2".
21316 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21317 (*call_indirect_aix<mode>_nospec): Likewise.
21318 (*call_value_indirect_aix<mode>_nospec): Likewise.
21319 (*call_indirect_elfv2<mode>_nospec): Likewise.
21320 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
21321 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
21322 change assembly output from . to $.
21323 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21324 (indirect_jump<mode>_nospec): Change assembly output from . to $.
21325 (*tablejump<mode>_internal1_nospec): Likewise.
21327 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
21330 * config/sh/sh_optimize_sett_clrt.cc:
21331 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
21333 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
21335 PR tree-optimization/83940
21336 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
21337 offset_dt to vect_constant_def rather than vect_unknown_def_type.
21338 (vect_check_load_store_mask): Add a mask_dt_out parameter and
21339 use it to pass back the definition type.
21340 (vect_check_store_rhs): Likewise rhs_dt_out.
21341 (vect_build_gather_load_calls): Add a mask_dt argument and use
21342 it instead of a call to vect_is_simple_use.
21343 (vectorizable_store): Update calls to vect_check_load_store_mask
21344 and vect_check_store_rhs. Use the dt returned by the latter instead
21345 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
21346 instead of calls to vect_is_simple_use. Pass the scalar rather
21347 than the vector operand to vect_is_simple_use when handling
21348 second and subsequent copies of an rhs value.
21349 (vectorizable_load): Update calls to vect_check_load_store_mask
21350 and vect_build_gather_load_calls. Use the cached mask_dt and
21351 gs_info.offset_dt instead of calls to vect_is_simple_use.
21353 2018-01-20 Jakub Jelinek <jakub@redhat.com>
21355 PR middle-end/83945
21356 * tree-emutls.c: Include gimplify.h.
21357 (lower_emutls_2): New function.
21358 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
21359 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
21360 it before further processing.
21363 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
21364 UINTVAL (trueop1) instead of INTVAL (op1).
21366 2018-01-19 Jakub Jelinek <jakub@redhat.com>
21370 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
21371 INCOMING_FRAME_SP_OFFSET if not defined.
21372 (scan_trace): Add ENTRY argument. If true and
21373 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
21374 emit a note to adjust the CFA offset.
21375 (create_cfi_notes): Adjust scan_trace callers.
21376 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
21377 INCOMING_FRAME_SP_OFFSET in the CIE.
21378 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
21379 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
21381 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
21382 * doc/tm.texi: Regenerated.
21384 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21386 PR rtl-optimization/83147
21387 * lra-constraints.c (remove_inheritance_pseudos): Use
21388 lra_substitute_pseudo_within_insn.
21390 2018-01-19 Tom de Vries <tom@codesourcery.com>
21391 Cesar Philippidis <cesar@codesourcery.com>
21394 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
21396 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
21399 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
21400 spaces for function labels.
21402 2018-01-19 Martin Liska <mliska@suse.cz>
21404 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
21405 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
21406 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
21407 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
21408 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
21409 (PRED_CONST_RETURN): Change from 69 to 65.
21410 (PRED_NULL_RETURN): Change from 91 to 71.
21411 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
21412 (PRED_LOOP_GUARD): Change from 66 to 73.
21414 2018-01-19 Martin Liska <mliska@suse.cz>
21416 * predict.c (predict_insn_def): Add new assert.
21417 (struct branch_predictor): Change type to signed integer.
21418 (test_prediction_value_range): Amend test to cover
21419 PROB_UNINITIALIZED.
21420 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
21421 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
21422 (PRED_LOOP_ITERATIONS_MAX): Likewise.
21423 (PRED_LOOP_IV_COMPARE): Likewise.
21424 * predict.h (PROB_UNINITIALIZED): Define new constant.
21426 2018-01-19 Martin Liska <mliska@suse.cz>
21428 * predict.c (dump_prediction): Add new format for
21429 analyze_brprob.py script which is enabled with -details
21431 * profile-count.h (precise_p): New function.
21433 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
21435 PR tree-optimization/83922
21436 * tree-vect-loop.c (vect_verify_full_masking): Return false if
21437 there are no statements that need masking.
21438 (vect_active_double_reduction_p): New function.
21439 (vect_analyze_loop_operations): Use it when handling phis that
21440 are not in the loop header.
21442 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
21444 PR tree-optimization/83914
21445 * tree-vect-loop.c (vectorizable_induction): Don't convert
21446 init_expr or apply the peeling adjustment for inductions
21447 that are nested within the vectorized loop.
21449 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21451 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
21454 2018-01-18 Jakub Jelinek <jakub@redhat.com>
21458 * function.h (gimplify_parameters): Add gimple_seq * argument.
21459 * function.c: Include gimple.h and options.h.
21460 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
21461 for the added local temporaries if needed.
21462 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
21463 if there are any parameter cleanups, wrap whole body into a
21464 try/finally with the cleanups.
21466 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
21469 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
21470 Use GET_MODE_CLASS for scalar floating point.
21472 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
21476 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
21477 Fix call of call_cgraph_insertion_hooks.
21479 2018-01-18 Martin Sebor <msebor@redhat.com>
21481 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
21483 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
21486 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
21489 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
21492 * common.opt: (-ffile-prefix-map): New option.
21493 * opts.c (common_handle_option): Defer it.
21494 * opts-global.c (handle_common_deferred_options): Handle it.
21495 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
21496 * file-prefix-map.h: New file.
21497 (remap_debug_filename, add_debug_prefix_map): ...here.
21498 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
21499 * final.c (debug_prefix_map, add_debug_prefix_map
21500 remap_debug_filename): Move to...
21501 * file-prefix-map.c: New file.
21502 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
21503 generalize, get rid of alloca(), use strrchr() instead of strchr().
21504 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
21505 Implement in terms of add_prefix_map().
21506 (remap_macro_filename, remap_debug_filename): Implement in term of
21508 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
21509 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
21510 * dbxout.c: Include file-prefix-map.h.
21511 * varasm.c: Likewise.
21512 * vmsdbgout.c: Likewise.
21513 * xcoffout.c: Likewise.
21514 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
21515 * doc/cppopts.texi (-fmacro-prefix-map): Document.
21516 * doc/invoke.texi (-ffile-prefix-map): Document.
21517 (-fdebug-prefix-map): Update description.
21519 2018-01-18 Martin Liska <mliska@suse.cz>
21521 * config/i386/i386.c (indirect_thunk_name): Document that also
21523 (output_indirect_thunk): Document why both instructions
21524 (pause and lfence) are generated.
21526 2018-01-18 Richard Biener <rguenther@suse.de>
21528 PR tree-optimization/83887
21529 * graphite-scop-detection.c
21530 (scop_detection::get_nearest_dom_with_single_entry): Remove.
21531 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
21532 (scop_detection::merge_sese): Re-implement with a flood-fill
21533 algorithm that properly finds a SESE region if it exists.
21535 2018-01-18 Jakub Jelinek <jakub@redhat.com>
21538 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
21539 pointer_diff optimizations use view_convert instead of convert.
21541 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21543 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21544 Generate different code for -mno-speculate-indirect-jumps.
21545 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21546 (*call_indirect_aix<mode>): Disable for
21547 -mno-speculate-indirect-jumps.
21548 (*call_indirect_aix<mode>_nospec): New define_insn.
21549 (*call_value_indirect_aix<mode>): Disable for
21550 -mno-speculate-indirect-jumps.
21551 (*call_value_indirect_aix<mode>_nospec): New define_insn.
21552 (*sibcall_nonlocal_sysv<mode>): Generate different code for
21553 -mno-speculate-indirect-jumps.
21554 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21556 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
21558 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
21559 long double type, set the flags for noting the default long double
21560 type, even if we don't pass or return a long double type.
21562 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
21565 * ipa-inline.c (flatten_function): Do not overwrite final inlining
21568 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
21570 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
21571 support for merge[hl].
21572 (fold_mergehl_helper): New helper function.
21573 (tree-vector-builder.h): New #include for tree_vector_builder usage.
21574 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
21575 (altivec_vmrglw_direct): Add xxmrglw insn.
21577 2018-01-17 Andrew Waterman <andrew@sifive.com>
21579 * config/riscv/riscv.c (riscv_conditional_register_usage): If
21580 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
21582 2018-01-17 David Malcolm <dmalcolm@redhat.com>
21585 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
21586 call the lto_location_cache before reading the
21587 DECL_SOURCE_LOCATION of the types.
21589 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
21590 Richard Sandiford <richard.sandiford@linaro.org>
21592 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
21593 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
21594 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
21595 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
21596 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
21598 * config/aarch64/constraints.md (aarch64_movti_operand):
21600 * config/aarch64/predicates.md (Uti): Add new constraint.
21602 2018-01-17 Carl Love <cel@us.ibm.com>
21604 * config/rs6000/vsx.md (define_expand xl_len_r,
21605 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
21606 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
21608 (define_expand, define_insn): Move the shift left from the
21609 define_insn to the define_expand for lxvl and stxvl instructions.
21610 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
21611 and XL_LEN_R definitions to PURE.
21613 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
21615 * config/i386/i386.c (indirect_thunk_name): Declare regno
21616 as unsigned int. Compare regno with INVALID_REGNUM.
21617 (output_indirect_thunk): Ditto.
21618 (output_indirect_thunk_function): Ditto.
21619 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
21620 in the call to output_indirect_thunk_function.
21622 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
21624 PR middle-end/83884
21625 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
21626 rather than the size of inner_type to determine the stack slot size
21627 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
21629 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
21632 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
21635 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
21637 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
21638 endian Linux systems to optionally enable multilibs for selecting
21639 the long double type if the user configured an explicit type.
21640 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
21641 have no long double multilibs if not defined.
21642 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
21643 warn if the user used -mabi={ieee,ibm}longdouble and we built
21644 multilibs for long double.
21645 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
21646 appropriate multilib option.
21647 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
21649 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
21650 for building long double multilibs.
21651 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
21653 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
21655 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
21658 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
21660 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
21663 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
21666 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
21669 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21671 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
21672 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
21674 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
21676 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
21677 different rtl trees depending on TARGET_64BIT.
21678 (rs6000_gen_lvx): Likewise.
21680 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21682 * config/visium/visium.md (nop): Tweak comment.
21683 (hazard_nop): Likewise.
21685 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21687 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
21688 -mspeculate-indirect-jumps.
21689 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
21690 for -mno-speculate-indirect-jumps.
21691 (*call_indirect_elfv2<mode>_nospec): New define_insn.
21692 (*call_value_indirect_elfv2<mode>): Disable for
21693 -mno-speculate-indirect-jumps.
21694 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
21695 (indirect_jump): Emit different RTL for
21696 -mno-speculate-indirect-jumps.
21697 (*indirect_jump<mode>): Disable for
21698 -mno-speculate-indirect-jumps.
21699 (*indirect_jump<mode>_nospec): New define_insn.
21700 (tablejump): Emit different RTL for
21701 -mno-speculate-indirect-jumps.
21702 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
21703 (tablejumpsi_nospec): New define_expand.
21704 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
21705 (tablejumpdi_nospec): New define_expand.
21706 (*tablejump<mode>_internal1): Disable for
21707 -mno-speculate-indirect-jumps.
21708 (*tablejump<mode>_internal1_nospec): New define_insn.
21709 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
21712 2018-01-16 Artyom Skrobov tyomitch@gmail.com
21714 * caller-save.c (insert_save): Drop unnecessary parameter. All
21717 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21718 Richard Biener <rguenth@suse.de>
21721 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
21722 return early, inline manually is_gimple_sizepos. Make sure if we
21723 call gimplify_expr we don't end up with a gimple constant.
21724 * tree.c (variably_modified_type_p): Don't return true for
21725 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
21726 * gimplify.h (is_gimple_sizepos): Remove.
21728 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21730 PR tree-optimization/83857
21731 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
21732 vectorizable_live_operation for pure SLP statements.
21733 (vectorizable_live_operation): Handle PHIs.
21735 2018-01-16 Richard Biener <rguenther@suse.de>
21737 PR tree-optimization/83867
21738 * tree-vect-stmts.c (vect_transform_stmt): Precompute
21739 nested_in_vect_loop_p since the scalar stmt may get invalidated.
21741 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21744 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
21745 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
21746 If off is not INTEGER_CST, issue a may not be aligned warning
21747 rather than isn't aligned. Use isn%'t rather than isn't.
21748 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
21750 <case MULT_EXPR>: Improve the case when bottom and one of the
21751 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
21752 operand, in that case check if the other operand is multiple of
21753 bottom divided by the INTEGER_CST operand.
21755 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21758 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
21759 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
21760 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
21761 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
21762 * config/pa/pa.c (pa_function_arg_advance): Likewise.
21763 (pa_function_arg, pa_arg_partial_bytes): Likewise.
21764 (pa_function_arg_size): New function.
21766 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21768 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
21769 in a separate statement.
21771 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21773 PR tree-optimization/83847
21774 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
21775 group gathers and scatters.
21777 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21779 PR rtl-optimization/86620
21780 * params.def (max-sched-ready-insns): Bump minimum value to 1.
21782 PR rtl-optimization/83213
21783 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
21784 to last if both are JUMP_INSNs.
21786 PR tree-optimization/83843
21787 * gimple-ssa-store-merging.c
21788 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
21789 store_immediate_info for bswap/nop orig_stores.
21791 2018-01-15 Andrew Waterman <andrew@sifive.com>
21793 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
21795 <UDIV>: Increase cost if !TARGET_DIV.
21797 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
21799 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
21800 (define_attr "cr_logical_3op"): New.
21801 (cceq_ior_compare): Adjust.
21802 (cceq_ior_compare_complement): Adjust.
21803 (*cceq_rev_compare): Adjust.
21804 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
21805 (is_cracked_insn): Adjust.
21806 (insn_must_be_first_in_group): Adjust.
21807 * config/rs6000/40x.md: Adjust.
21808 * config/rs6000/440.md: Adjust.
21809 * config/rs6000/476.md: Adjust.
21810 * config/rs6000/601.md: Adjust.
21811 * config/rs6000/603.md: Adjust.
21812 * config/rs6000/6xx.md: Adjust.
21813 * config/rs6000/7450.md: Adjust.
21814 * config/rs6000/7xx.md: Adjust.
21815 * config/rs6000/8540.md: Adjust.
21816 * config/rs6000/cell.md: Adjust.
21817 * config/rs6000/e300c2c3.md: Adjust.
21818 * config/rs6000/e500mc.md: Adjust.
21819 * config/rs6000/e500mc64.md: Adjust.
21820 * config/rs6000/e5500.md: Adjust.
21821 * config/rs6000/e6500.md: Adjust.
21822 * config/rs6000/mpc.md: Adjust.
21823 * config/rs6000/power4.md: Adjust.
21824 * config/rs6000/power5.md: Adjust.
21825 * config/rs6000/power6.md: Adjust.
21826 * config/rs6000/power7.md: Adjust.
21827 * config/rs6000/power8.md: Adjust.
21828 * config/rs6000/power9.md: Adjust.
21829 * config/rs6000/rs64.md: Adjust.
21830 * config/rs6000/titan.md: Adjust.
21832 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21834 * config/i386/predicates.md (indirect_branch_operand): Rewrite
21835 ix86_indirect_branch_register logic.
21837 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21839 * config/i386/constraints.md (Bs): Update
21840 ix86_indirect_branch_register check. Don't check
21841 ix86_indirect_branch_register with GOT_memory_operand.
21843 * config/i386/predicates.md (GOT_memory_operand): Don't check
21844 ix86_indirect_branch_register here.
21845 (GOT32_symbol_operand): Likewise.
21847 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21849 * config/i386/predicates.md (constant_call_address_operand):
21850 Rewrite ix86_indirect_branch_register logic.
21851 (sibcall_insn_operand): Likewise.
21853 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21855 * config/i386/constraints.md (Bs): Replace
21856 ix86_indirect_branch_thunk_register with
21857 ix86_indirect_branch_register.
21859 * config/i386/i386.md (indirect_jump): Likewise.
21860 (tablejump): Likewise.
21861 (*sibcall_memory): Likewise.
21862 (*sibcall_value_memory): Likewise.
21863 Peepholes of indirect call and jump via memory: Likewise.
21864 * config/i386/i386.opt: Likewise.
21865 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21866 (GOT_memory_operand): Likewise.
21867 (call_insn_operand): Likewise.
21868 (sibcall_insn_operand): Likewise.
21869 (GOT32_symbol_operand): Likewise.
21871 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21873 PR middle-end/83837
21874 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21875 type rather than type addr's type points to.
21876 (expand_omp_atomic_mutex): Likewise.
21877 (expand_omp_atomic): Likewise.
21879 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21882 * config/i386/i386.c (output_indirect_thunk_function): Use
21883 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21884 for __x86_return_thunk.
21886 2018-01-15 Richard Biener <rguenther@suse.de>
21888 PR middle-end/83850
21889 * expmed.c (extract_bit_field_1): Fix typo.
21891 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21894 * config/arm/iterators.md (VF): New mode iterator.
21895 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21896 Remove integer-related logic from pattern.
21897 (neon_vabd<mode>_3): Likewise.
21899 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21901 PR middle-end/82694
21902 * common.opt (fstrict-overflow): No longer an alias.
21903 (fwrapv-pointer): New option.
21904 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21905 also for pointer types based on flag_wrapv_pointer.
21906 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21907 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21908 opts->x_flag_wrapv got set.
21909 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21910 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21911 POINTER_TYPE_OVERFLOW_UNDEFINED.
21912 * match.pd: Likewise in address comparison pattern.
21913 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21915 2018-01-15 Richard Biener <rguenther@suse.de>
21918 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21919 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
21920 Reset type names to their identifier if their TYPE_DECL doesn't
21921 have linkage (and thus is used for ODR and devirt).
21922 (save_debug_info_for_decl): Remove.
21923 (save_debug_info_for_type): Likewise.
21924 (add_tree_to_fld_list): Adjust.
21925 * tree-pretty-print.c (dump_generic_node): Make dumping of
21926 type names more robust.
21928 2018-01-15 Richard Biener <rguenther@suse.de>
21930 * BASE-VER: Bump to 8.0.1.
21932 2018-01-14 Martin Sebor <msebor@redhat.com>
21935 * builtins.c (check_access): Avoid warning when the no-warning bit
21938 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
21940 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21941 * ira-color (allocno_hard_regs_compare): Likewise.
21943 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
21946 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21947 Use .pushsection/.popsection.
21949 2018-01-14 Martin Sebor <msebor@redhat.com>
21952 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21954 2018-01-14 Jakub Jelinek <jakub@redhat.com>
21956 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21957 entry from extra_headers.
21958 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21959 extra_headers, make the list bitwise identical to the i?86-*-* one.
21961 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21963 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21964 -mcmodel=large with -mindirect-branch=thunk,
21965 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21966 -mfunction-return=thunk-extern.
21967 * doc/invoke.texi: Document -mcmodel=large is incompatible with
21968 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21969 -mfunction-return=thunk and -mfunction-return=thunk-extern.
21971 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21973 * config/i386/i386.c (print_reg): Print the name of the full
21974 integer register without '%'.
21975 (ix86_print_operand): Handle 'V'.
21976 * doc/extend.texi: Document 'V' modifier.
21978 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21980 * config/i386/constraints.md (Bs): Disallow memory operand for
21981 -mindirect-branch-register.
21983 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21984 (GOT_memory_operand): Likewise.
21985 (call_insn_operand): Likewise.
21986 (sibcall_insn_operand): Likewise.
21987 (GOT32_symbol_operand): Likewise.
21988 * config/i386/i386.md (indirect_jump): Call convert_memory_address
21989 for -mindirect-branch-register.
21990 (tablejump): Likewise.
21991 (*sibcall_memory): Likewise.
21992 (*sibcall_value_memory): Likewise.
21993 Disallow peepholes of indirect call and jump via memory for
21994 -mindirect-branch-register.
21995 (*call_pop): Replace m with Bw.
21996 (*call_value_pop): Likewise.
21997 (*sibcall_pop_memory): Replace m with Bs.
21998 * config/i386/i386.opt (mindirect-branch-register): New option.
21999 * doc/invoke.texi: Document -mindirect-branch-register option.
22001 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
22003 * config/i386/i386-protos.h (ix86_output_function_return): New.
22004 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
22005 set function_return_type.
22006 (indirect_thunk_name): Add ret_p to indicate thunk for function
22008 (output_indirect_thunk_function): Pass false to
22009 indirect_thunk_name.
22010 (ix86_output_indirect_branch_via_reg): Likewise.
22011 (ix86_output_indirect_branch_via_push): Likewise.
22012 (output_indirect_thunk_function): Create alias for function
22013 return thunk if regno < 0.
22014 (ix86_output_function_return): New function.
22015 (ix86_handle_fndecl_attribute): Handle function_return.
22016 (ix86_attribute_table): Add function_return.
22017 * config/i386/i386.h (machine_function): Add
22018 function_return_type.
22019 * config/i386/i386.md (simple_return_internal): Use
22020 ix86_output_function_return.
22021 (simple_return_internal_long): Likewise.
22022 * config/i386/i386.opt (mfunction-return=): New option.
22023 (indirect_branch): Mention -mfunction-return=.
22024 * doc/extend.texi: Document function_return function attribute.
22025 * doc/invoke.texi: Document -mfunction-return= option.
22027 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
22029 * config/i386/i386-opts.h (indirect_branch): New.
22030 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
22031 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
22032 with local indirect jump when converting indirect call and jump.
22033 (ix86_set_indirect_branch_type): New.
22034 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
22035 (indirectlabelno): New.
22036 (indirect_thunk_needed): Likewise.
22037 (indirect_thunk_bnd_needed): Likewise.
22038 (indirect_thunks_used): Likewise.
22039 (indirect_thunks_bnd_used): Likewise.
22040 (INDIRECT_LABEL): Likewise.
22041 (indirect_thunk_name): Likewise.
22042 (output_indirect_thunk): Likewise.
22043 (output_indirect_thunk_function): Likewise.
22044 (ix86_output_indirect_branch_via_reg): Likewise.
22045 (ix86_output_indirect_branch_via_push): Likewise.
22046 (ix86_output_indirect_branch): Likewise.
22047 (ix86_output_indirect_jmp): Likewise.
22048 (ix86_code_end): Call output_indirect_thunk_function if needed.
22049 (ix86_output_call_insn): Call ix86_output_indirect_branch if
22051 (ix86_handle_fndecl_attribute): Handle indirect_branch.
22052 (ix86_attribute_table): Add indirect_branch.
22053 * config/i386/i386.h (machine_function): Add indirect_branch_type
22054 and has_local_indirect_jump.
22055 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
22057 (tablejump): Likewise.
22058 (*indirect_jump): Use ix86_output_indirect_jmp.
22059 (*tablejump_1): Likewise.
22060 (simple_return_indirect_internal): Likewise.
22061 * config/i386/i386.opt (mindirect-branch=): New option.
22062 (indirect_branch): New.
22065 (thunk-inline): Likewise.
22066 (thunk-extern): Likewise.
22067 * doc/extend.texi: Document indirect_branch function attribute.
22068 * doc/invoke.texi: Document -mindirect-branch= option.
22070 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
22073 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
22075 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
22077 * ipa-inline.c (want_inline_small_function_p): Return false if
22078 inlining has already failed with CIF_FINAL_ERROR.
22079 (update_caller_keys): Call want_inline_small_function_p before
22081 (update_callee_keys): Likewise.
22083 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
22085 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
22087 (rs6000_quadword_masked_address_p): Likewise.
22088 (quad_aligned_load_p): Likewise.
22089 (quad_aligned_store_p): Likewise.
22090 (const_load_sequence_p): Add comment to describe the outer-most loop.
22091 (mimic_memory_attributes_and_flags): New function.
22092 (rs6000_gen_stvx): Likewise.
22093 (replace_swapped_aligned_store): Likewise.
22094 (rs6000_gen_lvx): Likewise.
22095 (replace_swapped_aligned_load): Likewise.
22096 (replace_swapped_load_constant): Capitalize argument name in
22097 comment describing this function.
22098 (rs6000_analyze_swaps): Add a third pass to search for vector loads
22099 and stores that access quad-word aligned addresses and replace
22100 with stvx or lvx instructions when appropriate.
22101 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
22102 New function prototype.
22103 (rs6000_quadword_masked_address_p): Likewise.
22104 (rs6000_gen_lvx): Likewise.
22105 (rs6000_gen_stvx): Likewise.
22106 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
22107 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
22108 when memory address is aligned.
22109 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
22110 this split to select lvx instruction when memory address is aligned.
22111 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
22112 instruction when memory address is aligned.
22113 (*vsx_le_perm_load_v16qi): Likewise.
22114 (four unnamed splitters): Modify to select the stvx instruction
22115 when memory is aligned.
22117 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
22119 * predict.c (determine_unlikely_bbs): Handle correctly BBs
22120 which appears in the queue multiple times.
22122 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22123 Alan Hayward <alan.hayward@arm.com>
22124 David Sherwood <david.sherwood@arm.com>
22126 * tree-vectorizer.h (vec_lower_bound): New structure.
22127 (_loop_vec_info): Add check_nonzero and lower_bounds.
22128 (LOOP_VINFO_CHECK_NONZERO): New macro.
22129 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
22130 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
22131 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
22132 fields. Make seg_len the distance travelled, not including the
22134 (dr_direction_indicator): Declare.
22135 (dr_zero_step_indicator): Likewise.
22136 (dr_known_forward_stride_p): Likewise.
22137 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
22139 (runtime_alias_check_p): Allow runtime alias checks with
22141 (operator ==): Compare access_size and align.
22142 (prune_runtime_alias_test_list): Rework for new distinction between
22143 the access_size and seg_len.
22144 (create_intersect_range_checks_index): Likewise. Cope with polynomial
22146 (get_segment_min_max): New function.
22147 (create_intersect_range_checks): Use it.
22148 (dr_step_indicator): New function.
22149 (dr_direction_indicator): Likewise.
22150 (dr_zero_step_indicator): Likewise.
22151 (dr_known_forward_stride_p): Likewise.
22152 * tree-loop-distribution.c (data_ref_segment_size): Return
22153 DR_STEP * (niters - 1).
22154 (compute_alias_check_pairs): Update call to the dr_with_seg_len
22156 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
22157 (vect_preserves_scalar_order_p): New function, split out from...
22158 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
22159 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
22160 (vect_vfa_access_size): New function.
22161 (vect_vfa_align): Likewise.
22162 (vect_compile_time_alias): Take access_size_a and access_b arguments.
22163 (dump_lower_bound): New function.
22164 (vect_check_lower_bound): Likewise.
22165 (vect_small_gap_p): Likewise.
22166 (vectorizable_with_step_bound_p): Likewise.
22167 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
22168 depencies if the vectorization factor is 1. Convert the checks
22169 for nonzero steps into checks on the bounds of DR_STEP. Try using
22170 a bunds check for variable steps if the minimum required step is
22171 relatively small. Update calls to the dr_with_seg_len
22172 constructor and to vect_compile_time_alias.
22173 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
22175 (vect_loop_versioning): Call it.
22176 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
22178 (vect_estimate_min_profitable_iters): Account for any bounds checks.
22180 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22181 Alan Hayward <alan.hayward@arm.com>
22182 David Sherwood <david.sherwood@arm.com>
22184 * doc/sourcebuild.texi (vect_scatter_store): Document.
22185 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
22187 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
22189 * genopinit.c (main): Add supports_vec_scatter_store and
22190 supports_vec_scatter_store_cached to target_optabs.
22191 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
22192 IFN_MASK_SCATTER_STORE.
22193 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
22195 * internal-fn.h (internal_store_fn_p): Declare.
22196 (internal_fn_stored_value_index): Likewise.
22197 * internal-fn.c (scatter_store_direct): New macro.
22198 (expand_scatter_store_optab_fn): New function.
22199 (direct_scatter_store_optab_supported_p): New macro.
22200 (internal_store_fn_p): New function.
22201 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
22202 IFN_MASK_SCATTER_STORE.
22203 (internal_fn_mask_index): Likewise.
22204 (internal_fn_stored_value_index): New function.
22205 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
22206 for scatter stores.
22207 * optabs-query.h (supports_vec_scatter_store_p): Declare.
22208 * optabs-query.c (supports_vec_scatter_store_p): New function.
22209 * tree-vectorizer.h (vect_get_store_rhs): Declare.
22210 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
22211 true for scatter stores.
22212 (vect_gather_scatter_fn_p): Handle scatter stores too.
22213 (vect_check_gather_scatter): Consider using scatter stores if
22214 supports_vec_scatter_store_p.
22215 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
22216 scatter stores too.
22217 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
22218 internal_fn_stored_value_index.
22219 (check_load_store_masking): Handle scatter stores too.
22220 (vect_get_store_rhs): Make public.
22221 (vectorizable_call): Use internal_store_fn_p.
22222 (vectorizable_store): Handle scatter store internal functions.
22223 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
22224 when deciding whether the end of the group has been reached.
22225 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
22226 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
22227 (mask_scatter_store<mode>): New insns.
22229 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22230 Alan Hayward <alan.hayward@arm.com>
22231 David Sherwood <david.sherwood@arm.com>
22233 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
22234 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
22235 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
22237 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
22238 Use vect_truncate_gather_scatter_offset if we can't treat the
22239 operation as a normal gather load or scatter store.
22240 (get_group_load_store_type): Take the gather_scatter_info
22241 as argument. Try using a gather load or scatter store for
22242 single-element groups.
22243 (get_load_store_type): Update calls to get_group_load_store_type
22244 and vect_use_strided_gather_scatters_p.
22246 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22247 Alan Hayward <alan.hayward@arm.com>
22248 David Sherwood <david.sherwood@arm.com>
22250 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
22251 optional tree argument.
22252 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
22254 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
22255 but continue to use the current value as a fallback.
22256 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
22257 to compare the updates.
22258 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
22259 (get_load_store_type): Use it when handling a strided access.
22260 (vect_get_strided_load_store_ops): New function.
22261 (vect_get_data_ptr_increment): Likewise.
22262 (vectorizable_load): Handle strided gather loads. Always pass
22263 a step to vect_create_data_ref_ptr and bump_vector_ptr.
22265 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22266 Alan Hayward <alan.hayward@arm.com>
22267 David Sherwood <david.sherwood@arm.com>
22269 * doc/md.texi (gather_load@var{m}): Document.
22270 (mask_gather_load@var{m}): Likewise.
22271 * genopinit.c (main): Add supports_vec_gather_load and
22272 supports_vec_gather_load_cached to target_optabs.
22273 * optabs-tree.c (init_tree_optimization_optabs): Use
22274 ggc_cleared_alloc to allocate target_optabs.
22275 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
22276 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
22278 * internal-fn.h (internal_load_fn_p): Declare.
22279 (internal_gather_scatter_fn_p): Likewise.
22280 (internal_fn_mask_index): Likewise.
22281 (internal_gather_scatter_fn_supported_p): Likewise.
22282 * internal-fn.c (gather_load_direct): New macro.
22283 (expand_gather_load_optab_fn): New function.
22284 (direct_gather_load_optab_supported_p): New macro.
22285 (direct_internal_fn_optab): New function.
22286 (internal_load_fn_p): Likewise.
22287 (internal_gather_scatter_fn_p): Likewise.
22288 (internal_fn_mask_index): Likewise.
22289 (internal_gather_scatter_fn_supported_p): Likewise.
22290 * optabs-query.c (supports_at_least_one_mode_p): New function.
22291 (supports_vec_gather_load_p): Likewise.
22292 * optabs-query.h (supports_vec_gather_load_p): Declare.
22293 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
22294 and memory_type field.
22295 (NUM_PATTERNS): Bump to 15.
22296 * tree-vect-data-refs.c: Include internal-fn.h.
22297 (vect_gather_scatter_fn_p): New function.
22298 (vect_describe_gather_scatter_call): Likewise.
22299 (vect_check_gather_scatter): Try using internal functions for
22300 gather loads. Recognize existing calls to a gather load function.
22301 (vect_analyze_data_refs): Consider using gather loads if
22302 supports_vec_gather_load_p.
22303 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
22304 (vect_get_gather_scatter_offset_type): Likewise.
22305 (vect_convert_mask_for_vectype): Likewise.
22306 (vect_add_conversion_to_patterm): Likewise.
22307 (vect_try_gather_scatter_pattern): Likewise.
22308 (vect_recog_gather_scatter_pattern): New pattern recognizer.
22309 (vect_vect_recog_func_ptrs): Add it.
22310 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
22311 internal_fn_mask_index and internal_gather_scatter_fn_p.
22312 (check_load_store_masking): Take the gather_scatter_info as an
22313 argument and handle gather loads.
22314 (vect_get_gather_scatter_ops): New function.
22315 (vectorizable_call): Check internal_load_fn_p.
22316 (vectorizable_load): Likewise. Handle gather load internal
22318 (vectorizable_store): Update call to check_load_store_masking.
22319 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
22320 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
22321 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
22322 (aarch64_gather_scale_operand_d): New predicates.
22323 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
22324 (mask_gather_load<mode>): New insns.
22326 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22327 Alan Hayward <alan.hayward@arm.com>
22328 David Sherwood <david.sherwood@arm.com>
22330 * optabs.def (fold_left_plus_optab): New optab.
22331 * doc/md.texi (fold_left_plus_@var{m}): Document.
22332 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
22333 * internal-fn.c (fold_left_direct): Define.
22334 (expand_fold_left_optab_fn): Likewise.
22335 (direct_fold_left_optab_supported_p): Likewise.
22336 * fold-const-call.c (fold_const_fold_left): New function.
22337 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
22338 * tree-parloops.c (valid_reduction_p): New function.
22339 (gather_scalar_reductions): Use it.
22340 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
22341 (vect_finish_replace_stmt): Declare.
22342 * tree-vect-loop.c (fold_left_reduction_fn): New function.
22343 (needs_fold_left_reduction_p): New function, split out from...
22344 (vect_is_simple_reduction): ...here. Accept reductions that
22345 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
22346 (vect_force_simple_reduction): Also store the reduction type in
22347 the assignment's STMT_VINFO_REDUC_TYPE.
22348 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
22349 (merge_with_identity): New function.
22350 (vect_expand_fold_left): Likewise.
22351 (vectorize_fold_left_reduction): Likewise.
22352 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
22353 scalar phi in place for it. Check for target support and reject
22354 cases that would reassociate the operation. Defer the transform
22355 phase to vectorize_fold_left_reduction.
22356 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
22357 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
22358 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
22360 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22362 * tree-if-conv.c (predicate_mem_writes): Remove redundant
22363 call to ifc_temp_var.
22365 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22366 Alan Hayward <alan.hayward@arm.com>
22367 David Sherwood <david.sherwood@arm.com>
22369 * target.def (legitimize_address_displacement): Take the original
22370 offset as a poly_int.
22371 * targhooks.h (default_legitimize_address_displacement): Update
22373 * targhooks.c (default_legitimize_address_displacement): Likewise.
22374 * doc/tm.texi: Regenerate.
22375 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
22376 as an argument, moving assert of ad->disp == ad->disp_term to...
22377 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
22378 Try calling targetm.legitimize_address_displacement before expanding
22379 the address rather than afterwards, and adjust for the new interface.
22380 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
22381 Match the new hook interface. Handle SVE addresses.
22382 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
22383 new hook interface.
22385 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22387 * Makefile.in (OBJS): Add early-remat.o.
22388 * target.def (select_early_remat_modes): New hook.
22389 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
22390 * doc/tm.texi: Regenerate.
22391 * targhooks.h (default_select_early_remat_modes): Declare.
22392 * targhooks.c (default_select_early_remat_modes): New function.
22393 * timevar.def (TV_EARLY_REMAT): New timevar.
22394 * passes.def (pass_early_remat): New pass.
22395 * tree-pass.h (make_pass_early_remat): Declare.
22396 * early-remat.c: New file.
22397 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
22399 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
22401 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22402 Alan Hayward <alan.hayward@arm.com>
22403 David Sherwood <david.sherwood@arm.com>
22405 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
22406 vfm1 with a bound_epilog parameter.
22407 (vect_do_peeling): Update calls accordingly, and move the prologue
22408 call earlier in the function. Treat the base bound_epilog as 0 for
22409 fully-masked loops and retain vf - 1 for other loops. Add 1 to
22410 this base when peeling for gaps.
22411 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
22412 with fully-masked loops.
22413 (vect_estimate_min_profitable_iters): Handle the single peeled
22414 iteration in that case.
22416 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22417 Alan Hayward <alan.hayward@arm.com>
22418 David Sherwood <david.sherwood@arm.com>
22420 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
22421 single-element interleaving even if the size is not a power of 2.
22422 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
22423 accesses for single-element interleaving if the group size is
22426 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22427 Alan Hayward <alan.hayward@arm.com>
22428 David Sherwood <david.sherwood@arm.com>
22430 * doc/md.texi (fold_extract_last_@var{m}): Document.
22431 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
22432 * optabs.def (fold_extract_last_optab): New optab.
22433 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
22434 * internal-fn.c (fold_extract_direct): New macro.
22435 (expand_fold_extract_optab_fn): Likewise.
22436 (direct_fold_extract_optab_supported_p): Likewise.
22437 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
22438 * tree-vect-loop.c (vect_model_reduction_cost): Handle
22439 EXTRACT_LAST_REDUCTION.
22440 (get_initial_def_for_reduction): Do not create an initial vector
22441 for EXTRACT_LAST_REDUCTION reductions.
22442 (vectorizable_reduction): Leave the scalar phi in place for
22443 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
22444 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
22445 epilogue code for EXTRACT_LAST_REDUCTION and defer the
22446 transform phase to vectorizable_condition.
22447 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
22449 (vect_finish_stmt_generation): ...here.
22450 (vect_finish_replace_stmt): New function.
22451 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
22452 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
22454 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
22456 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22457 Alan Hayward <alan.hayward@arm.com>
22458 David Sherwood <david.sherwood@arm.com>
22460 * doc/md.texi (extract_last_@var{m}): Document.
22461 * optabs.def (extract_last_optab): New optab.
22462 * internal-fn.def (EXTRACT_LAST): New internal function.
22463 * internal-fn.c (cond_unary_direct): New macro.
22464 (expand_cond_unary_optab_fn): Likewise.
22465 (direct_cond_unary_optab_supported_p): Likewise.
22466 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
22467 loops using EXTRACT_LAST.
22468 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
22469 (extract_last_<mode>): ...this optab.
22470 (vec_extract<mode><Vel>): Update accordingly.
22472 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22473 Alan Hayward <alan.hayward@arm.com>
22474 David Sherwood <david.sherwood@arm.com>
22476 * target.def (empty_mask_is_expensive): New hook.
22477 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
22478 * doc/tm.texi: Regenerate.
22479 * targhooks.h (default_empty_mask_is_expensive): Declare.
22480 * targhooks.c (default_empty_mask_is_expensive): New function.
22481 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
22482 if the target says that empty masks are expensive.
22483 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
22485 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
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 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
22492 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
22493 (vect_use_loop_mask_for_alignment_p): New function.
22494 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
22495 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
22496 niters_skip argument. Make sure that the first niters_skip elements
22497 of the first iteration are inactive.
22498 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
22499 Update call to vect_set_loop_masks_directly.
22500 (get_misalign_in_elems): New function, split out from...
22501 (vect_gen_prolog_loop_niters): ...here.
22502 (vect_update_init_of_dr): Take a code argument that specifies whether
22503 the adjustment should be added or subtracted.
22504 (vect_update_init_of_drs): Likewise.
22505 (vect_prepare_for_masked_peels): New function.
22506 (vect_do_peeling): Skip prologue peeling if we're using a mask
22507 instead. Update call to vect_update_inits_of_drs.
22508 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22510 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
22511 alignment. Do not include the number of peeled iterations in
22512 the minimum threshold in that case.
22513 (vectorizable_induction): Adjust the start value down by
22514 LOOP_VINFO_MASK_SKIP_NITERS iterations.
22515 (vect_transform_loop): Call vect_prepare_for_masked_peels.
22516 Take the number of skipped iterations into account when calculating
22518 * tree-vect-stmts.c (vect_gen_while_not): New function.
22520 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22521 Alan Hayward <alan.hayward@arm.com>
22522 David Sherwood <david.sherwood@arm.com>
22524 * doc/sourcebuild.texi (vect_fully_masked): Document.
22525 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
22526 default value to 0.
22527 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
22529 (vect_analyze_loop_2): ...here. Don't check the vectorization
22530 factor against the number of loop iterations if the loop is
22533 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22534 Alan Hayward <alan.hayward@arm.com>
22535 David Sherwood <david.sherwood@arm.com>
22537 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
22538 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
22539 (dump_groups): Update accordingly.
22540 (iv_use::mem_type): New member variable.
22541 (address_p): New function.
22542 (record_use): Add a mem_type argument and initialize the new
22544 (record_group_use): Add a mem_type argument. Use address_p.
22545 Remove obsolete null checks of base_object. Update call to record_use.
22546 (find_interesting_uses_op): Update call to record_group_use.
22547 (find_interesting_uses_cond): Likewise.
22548 (find_interesting_uses_address): Likewise.
22549 (get_mem_type_for_internal_fn): New function.
22550 (find_address_like_use): Likewise.
22551 (find_interesting_uses_stmt): Try find_address_like_use before
22552 calling find_interesting_uses_op.
22553 (addr_offset_valid_p): Use the iv mem_type field as the type
22554 of the addressed memory.
22555 (add_autoinc_candidates): Likewise.
22556 (get_address_cost): Likewise.
22557 (split_small_address_groups_p): Use address_p.
22558 (split_address_groups): Likewise.
22559 (add_iv_candidate_for_use): Likewise.
22560 (autoinc_possible_for_pair): Likewise.
22561 (rewrite_groups): Likewise.
22562 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
22563 (determine_group_iv_cost): Update after split of USE_ADDRESS.
22564 (get_alias_ptr_type_for_ptr_address): New function.
22565 (rewrite_use_address): Rewrite address uses in calls that were
22566 identified by find_address_like_use.
22568 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22569 Alan Hayward <alan.hayward@arm.com>
22570 David Sherwood <david.sherwood@arm.com>
22572 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
22574 * gimple-expr.h (is_gimple_addressable: Likewise.
22575 * gimple-expr.c (is_gimple_address): Likewise.
22576 * internal-fn.c (expand_call_mem_ref): New function.
22577 (expand_mask_load_optab_fn): Use it.
22578 (expand_mask_store_optab_fn): Likewise.
22580 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22581 Alan Hayward <alan.hayward@arm.com>
22582 David Sherwood <david.sherwood@arm.com>
22584 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
22585 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
22586 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
22587 (cond_umax@var{mode}): Document.
22588 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
22589 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
22590 (cond_umin_optab, cond_umax_optab): New optabs.
22591 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
22592 (COND_IOR, COND_XOR): New internal functions.
22593 * internal-fn.h (get_conditional_internal_fn): Declare.
22594 * internal-fn.c (cond_binary_direct): New macro.
22595 (expand_cond_binary_optab_fn): Likewise.
22596 (direct_cond_binary_optab_supported_p): Likewise.
22597 (get_conditional_internal_fn): New function.
22598 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
22599 Cope with reduction statements that are vectorized as calls rather
22601 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
22602 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
22603 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
22604 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
22605 (UNSPEC_COND_EOR): New unspecs.
22606 (optab): Add mappings for them.
22607 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
22608 (sve_int_op, sve_fp_op): New int attributes.
22610 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22611 Alan Hayward <alan.hayward@arm.com>
22612 David Sherwood <david.sherwood@arm.com>
22614 * optabs.def (while_ult_optab): New optab.
22615 * doc/md.texi (while_ult@var{m}@var{n}): Document.
22616 * internal-fn.def (WHILE_ULT): New internal function.
22617 * internal-fn.h (direct_internal_fn_supported_p): New override
22618 that takes two types as argument.
22619 * internal-fn.c (while_direct): New macro.
22620 (expand_while_optab_fn): New function.
22621 (convert_optab_supported_p): Likewise.
22622 (direct_while_optab_supported_p): New macro.
22623 * wide-int.h (wi::udiv_ceil): New function.
22624 * tree-vectorizer.h (rgroup_masks): New structure.
22625 (vec_loop_masks): New typedef.
22626 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
22627 and fully_masked_p.
22628 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
22629 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
22630 (vect_max_vf): New function.
22631 (slpeel_make_loop_iterate_ntimes): Delete.
22632 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
22633 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
22634 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
22635 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
22636 internal-fn.h, stor-layout.h and optabs-query.h.
22637 (vect_set_loop_mask): New function.
22638 (add_preheader_seq): Likewise.
22639 (add_header_seq): Likewise.
22640 (interleave_supported_p): Likewise.
22641 (vect_maybe_permute_loop_masks): Likewise.
22642 (vect_set_loop_masks_directly): Likewise.
22643 (vect_set_loop_condition_masked): Likewise.
22644 (vect_set_loop_condition_unmasked): New function, split out from
22645 slpeel_make_loop_iterate_ntimes.
22646 (slpeel_make_loop_iterate_ntimes): Rename to..
22647 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
22648 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
22649 (vect_do_peeling): Update call accordingly.
22650 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
22652 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22653 mask_compare_type, can_fully_mask_p and fully_masked_p.
22654 (release_vec_loop_masks): New function.
22655 (_loop_vec_info): Use it to free the loop masks.
22656 (can_produce_all_loop_masks_p): New function.
22657 (vect_get_max_nscalars_per_iter): Likewise.
22658 (vect_verify_full_masking): Likewise.
22659 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
22660 retries, and free the mask rgroups before retrying. Check loop-wide
22661 reasons for disallowing fully-masked loops. Make the final decision
22662 about whether use a fully-masked loop or not.
22663 (vect_estimate_min_profitable_iters): Do not assume that peeling
22664 for the number of iterations will be needed for fully-masked loops.
22665 (vectorizable_reduction): Disable fully-masked loops.
22666 (vectorizable_live_operation): Likewise.
22667 (vect_halve_mask_nunits): New function.
22668 (vect_double_mask_nunits): Likewise.
22669 (vect_record_loop_mask): Likewise.
22670 (vect_get_loop_mask): Likewise.
22671 (vect_transform_loop): Handle the case in which the final loop
22672 iteration might handle a partial vector. Call vect_set_loop_condition
22673 instead of slpeel_make_loop_iterate_ntimes.
22674 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
22675 (check_load_store_masking): New function.
22676 (prepare_load_store_mask): Likewise.
22677 (vectorizable_store): Handle fully-masked loops.
22678 (vectorizable_load): Likewise.
22679 (supportable_widening_operation): Use vect_halve_mask_nunits for
22681 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
22682 (vect_gen_while): New function.
22683 * config/aarch64/aarch64.md (umax<mode>3): New expander.
22684 (aarch64_uqdec<mode>): New insn.
22686 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22687 Alan Hayward <alan.hayward@arm.com>
22688 David Sherwood <david.sherwood@arm.com>
22690 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
22691 (reduc_xor_scal_optab): New optabs.
22692 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
22693 (reduc_xor_scal_@var{m}): Document.
22694 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
22695 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
22696 internal functions.
22697 * fold-const-call.c (fold_const_call): Handle them.
22698 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
22699 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
22700 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
22701 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
22702 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
22703 (UNSPEC_XORV): New unspecs.
22704 (optab): Add entries for them.
22705 (BITWISEV): New int iterator.
22706 (bit_reduc_op): New int attributes.
22708 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22709 Alan Hayward <alan.hayward@arm.com>
22710 David Sherwood <david.sherwood@arm.com>
22712 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
22713 * internal-fn.def (VEC_SHL_INSERT): New internal function.
22714 * optabs.def (vec_shl_insert_optab): New optab.
22715 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
22716 (duplicate_and_interleave): Likewise.
22717 * tree-vect-loop.c: Include internal-fn.h.
22718 (neutral_op_for_slp_reduction): New function, split out from
22719 get_initial_defs_for_reduction.
22720 (get_initial_def_for_reduction): Handle option 2 for variable-length
22721 vectors by loading the neutral value into a vector and then shifting
22722 the initial value into element 0.
22723 (get_initial_defs_for_reduction): Replace the code argument with
22724 the neutral value calculated by neutral_op_for_slp_reduction.
22725 Use gimple_build_vector for constant-length vectors.
22726 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
22727 but the first group_size elements have a neutral value.
22728 Use duplicate_and_interleave otherwise.
22729 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
22730 Update call to get_initial_defs_for_reduction. Handle SLP
22731 reductions for variable-length vectors by creating one vector
22732 result for each scalar result, with the elements associated
22733 with other scalar results stubbed out with the neutral value.
22734 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
22735 Require IFN_VEC_SHL_INSERT for double reductions on
22736 variable-length vectors, or SLP reductions that have
22737 a neutral value. Require can_duplicate_and_interleave_p
22738 support for variable-length unchained SLP reductions if there
22739 is no neutral value, such as for MIN/MAX reductions. Also require
22740 the number of vector elements to be a multiple of the number of
22741 SLP statements when doing variable-length unchained SLP reductions.
22742 Update call to vect_create_epilog_for_reduction.
22743 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
22744 and remove initial values.
22745 (duplicate_and_interleave): Make public.
22746 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
22747 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
22749 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22750 Alan Hayward <alan.hayward@arm.com>
22751 David Sherwood <david.sherwood@arm.com>
22753 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
22754 (can_duplicate_and_interleave_p): New function.
22755 (vect_get_and_check_slp_defs): Take the vector of statements
22756 rather than just the current one. Remove excess parentheses.
22757 Restriction rejectinon of vect_constant_def and vect_external_def
22758 for variable-length vectors to boolean types, or types for which
22759 can_duplicate_and_interleave_p is false.
22760 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
22761 (duplicate_and_interleave): New function.
22762 (vect_get_constant_vectors): Use gimple_build_vector for
22763 constant-length vectors and suitable variable-length constant
22764 vectors. Use duplicate_and_interleave for other variable-length
22765 vectors. Don't defer the update when inserting new statements.
22767 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22768 Alan Hayward <alan.hayward@arm.com>
22769 David Sherwood <david.sherwood@arm.com>
22771 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
22772 min_profitable_iters doesn't go negative.
22774 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22775 Alan Hayward <alan.hayward@arm.com>
22776 David Sherwood <david.sherwood@arm.com>
22778 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
22779 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
22780 * optabs.def (vec_mask_load_lanes_optab): New optab.
22781 (vec_mask_store_lanes_optab): Likewise.
22782 * internal-fn.def (MASK_LOAD_LANES): New internal function.
22783 (MASK_STORE_LANES): Likewise.
22784 * internal-fn.c (mask_load_lanes_direct): New macro.
22785 (mask_store_lanes_direct): Likewise.
22786 (expand_mask_load_optab_fn): Handle masked operations.
22787 (expand_mask_load_lanes_optab_fn): New macro.
22788 (expand_mask_store_optab_fn): Handle masked operations.
22789 (expand_mask_store_lanes_optab_fn): New macro.
22790 (direct_mask_load_lanes_optab_supported_p): Likewise.
22791 (direct_mask_store_lanes_optab_supported_p): Likewise.
22792 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
22794 (vect_load_lanes_supported): Likewise.
22795 * tree-vect-data-refs.c (strip_conversion): New function.
22796 (can_group_stmts_p): Likewise.
22797 (vect_analyze_data_ref_accesses): Use it instead of checking
22798 for a pair of assignments.
22799 (vect_store_lanes_supported): Take a masked_p parameter.
22800 (vect_load_lanes_supported): Likewise.
22801 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
22802 vect_store_lanes_supported and vect_load_lanes_supported.
22803 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
22804 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
22805 parameter. Don't allow gaps for masked accesses.
22806 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
22807 and vect_load_lanes_supported.
22808 (get_load_store_type): Take a masked_p parameter and update
22809 call to get_group_load_store_type.
22810 (vectorizable_store): Update call to get_load_store_type.
22811 Handle IFN_MASK_STORE_LANES.
22812 (vectorizable_load): Update call to get_load_store_type.
22813 Handle IFN_MASK_LOAD_LANES.
22815 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22816 Alan Hayward <alan.hayward@arm.com>
22817 David Sherwood <david.sherwood@arm.com>
22819 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
22821 * config/aarch64/aarch64-protos.h
22822 (aarch64_sve_struct_memory_operand_p): Declare.
22823 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
22824 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
22825 (VPRED, vpred): Handle SVE structure modes.
22826 * config/aarch64/constraints.md (Utx): New constraint.
22827 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
22828 (aarch64_sve_struct_nonimmediate_operand): New predicates.
22829 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
22830 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
22831 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
22832 structure modes. Split into pieces after RA.
22833 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
22834 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
22836 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
22837 SVE structure modes.
22838 (aarch64_classify_address): Likewise.
22839 (sizetochar): Move earlier in file.
22840 (aarch64_print_operand): Handle SVE register lists.
22841 (aarch64_array_mode): New function.
22842 (aarch64_sve_struct_memory_operand_p): Likewise.
22843 (TARGET_ARRAY_MODE): Redefine.
22845 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22846 Alan Hayward <alan.hayward@arm.com>
22847 David Sherwood <david.sherwood@arm.com>
22849 * target.def (array_mode): New target hook.
22850 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
22851 * doc/tm.texi: Regenerate.
22852 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
22853 * hooks.c (hook_optmode_mode_uhwi_none): New function.
22854 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
22855 targetm.array_mode.
22856 * stor-layout.c (mode_for_array): Likewise. Support polynomial
22859 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22860 Alan Hayward <alan.hayward@arm.com>
22861 David Sherwood <david.sherwood@arm.com>
22863 * fold-const.c (fold_binary_loc): Check the argument types
22864 rather than the result type when testing for a vector operation.
22866 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22868 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22869 * doc/tm.texi: Regenerate.
22871 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22872 Alan Hayward <alan.hayward@arm.com>
22873 David Sherwood <david.sherwood@arm.com>
22875 * doc/invoke.texi (-msve-vector-bits=): Document new option.
22876 (sve): Document new AArch64 extension.
22877 * doc/md.texi (w): Extend the description of the AArch64
22878 constraint to include SVE vectors.
22879 (Upl, Upa): Document new AArch64 predicate constraints.
22880 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22882 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22883 (msve-vector-bits=): New option.
22884 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22885 SVE when these are disabled.
22886 (sve): New extension.
22887 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22888 modes. Adjust their number of units based on aarch64_sve_vg.
22889 (MAX_BITSIZE_MODE_ANY_MODE): Define.
22890 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22891 aarch64_addr_query_type.
22892 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22893 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22894 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22895 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22896 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22897 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22898 (aarch64_simd_imm_zero_p): Delete.
22899 (aarch64_check_zero_based_sve_index_immediate): Declare.
22900 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22901 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22902 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22903 (aarch64_sve_float_mul_immediate_p): Likewise.
22904 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22905 rather than an rtx.
22906 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22907 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22908 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22909 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22910 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22911 (aarch64_regmode_natural_size): Likewise.
22912 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22913 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22915 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22916 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22917 for VG and the SVE predicate registers.
22918 (V_ALIASES): Add a "z"-prefixed alias.
22919 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22920 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22921 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22922 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22923 (REG_CLASS_NAMES): Add entries for them.
22924 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
22925 and the predicate registers.
22926 (aarch64_sve_vg): Declare.
22927 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22928 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22929 (REGMODE_NATURAL_SIZE): Define.
22930 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22932 * config/aarch64/aarch64.c: Include cfgrtl.h.
22933 (simd_immediate_info): Add a constructor for series vectors,
22934 and an associated step field.
22935 (aarch64_sve_vg): New variable.
22936 (aarch64_dbx_register_number): Handle VG and the predicate registers.
22937 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22938 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22939 (VEC_ANY_DATA, VEC_STRUCT): New constants.
22940 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22941 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22942 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22943 (aarch64_get_mask_mode): New functions.
22944 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22945 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22946 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
22947 predicate modes and predicate registers. Explicitly restrict
22948 GPRs to modes of 16 bytes or smaller. Only allow FP registers
22949 to store a vector mode if it is recognized by
22950 aarch64_classify_vector_mode.
22951 (aarch64_regmode_natural_size): New function.
22952 (aarch64_hard_regno_caller_save_mode): Return the original mode
22954 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22955 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22956 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22957 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22959 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
22960 does not overlap dest if the function is frame-related. Handle
22962 (aarch64_split_add_offset): New function.
22963 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22964 them aarch64_add_offset.
22965 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22966 and update call to aarch64_sub_sp.
22967 (aarch64_add_cfa_expression): New function.
22968 (aarch64_expand_prologue): Pass extra temporary registers to the
22969 functions above. Handle the case in which we need to emit new
22970 DW_CFA_expressions for registers that were originally saved
22971 relative to the stack pointer, but now have to be expressed
22972 relative to the frame pointer.
22973 (aarch64_output_mi_thunk): Pass extra temporary registers to the
22975 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
22976 IP0 and IP1 values for SVE frames.
22977 (aarch64_expand_vec_series): New function.
22978 (aarch64_expand_sve_widened_duplicate): Likewise.
22979 (aarch64_expand_sve_const_vector): Likewise.
22980 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22981 Handle SVE constants. Use emit_move_insn to move a force_const_mem
22982 into the register, rather than emitting a SET directly.
22983 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22984 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22985 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22986 (offset_9bit_signed_scaled_p): New functions.
22987 (aarch64_replicate_bitmask_imm): New function.
22988 (aarch64_bitmask_imm): Use it.
22989 (aarch64_cannot_force_const_mem): Reject expressions involving
22990 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
22991 (aarch64_classify_index): Handle SVE indices, by requiring
22992 a plain register index with a scale that matches the element size.
22993 (aarch64_classify_address): Handle SVE addresses. Assert that
22994 the mode of the address is VOIDmode or an integer mode.
22995 Update call to aarch64_classify_symbol.
22996 (aarch64_classify_symbolic_expression): Update call to
22997 aarch64_classify_symbol.
22998 (aarch64_const_vec_all_in_range_p): New function.
22999 (aarch64_print_vector_float_operand): Likewise.
23000 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
23001 "vN" for FP registers with SVE modes. Handle (const ...) vectors
23002 and the FP immediates 1.0 and 0.5.
23003 (aarch64_print_address_internal): Handle SVE addresses.
23004 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
23005 (aarch64_regno_regclass): Handle predicate registers.
23006 (aarch64_secondary_reload): Handle big-endian reloads of SVE
23008 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
23009 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
23010 (aarch64_convert_sve_vector_bits): New function.
23011 (aarch64_override_options): Use it to handle -msve-vector-bits=.
23012 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
23013 rather than an rtx.
23014 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
23015 Handle SVE vector and predicate modes. Accept VL-based constants
23016 that need only one temporary register, and VL offsets that require
23017 no temporary registers.
23018 (aarch64_conditional_register_usage): Mark the predicate registers
23019 as fixed if SVE isn't available.
23020 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
23021 Return true for SVE vector and predicate modes.
23022 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
23023 rather than an unsigned int. Handle SVE modes.
23024 (aarch64_preferred_simd_mode): Update call accordingly. Handle
23026 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
23028 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
23029 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
23030 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
23031 (aarch64_sve_float_mul_immediate_p): New functions.
23032 (aarch64_sve_valid_immediate): New function.
23033 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
23034 Explicitly reject structure modes. Check for INDEX constants.
23035 Handle PTRUE and PFALSE constants.
23036 (aarch64_check_zero_based_sve_index_immediate): New function.
23037 (aarch64_simd_imm_zero_p): Delete.
23038 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
23039 vector modes. Accept constants in the range of CNT[BHWD].
23040 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
23041 ask for an Advanced SIMD mode.
23042 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
23043 (aarch64_simd_vector_alignment): Handle SVE predicates.
23044 (aarch64_vectorize_preferred_vector_alignment): New function.
23045 (aarch64_simd_vector_alignment_reachable): Use it instead of
23047 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
23048 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
23050 (MAX_VECT_LEN): Delete.
23051 (expand_vec_perm_d): Add a vec_flags field.
23052 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
23053 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
23054 (aarch64_evpc_ext): Don't apply a big-endian lane correction
23056 (aarch64_evpc_rev): Rename to...
23057 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
23058 (aarch64_evpc_rev_global): New function.
23059 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
23060 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
23062 (aarch64_evpc_sve_tbl): New function.
23063 (aarch64_expand_vec_perm_const_1): Update after rename of
23064 aarch64_evpc_rev. Handle SVE permutes too, trying
23065 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
23066 than aarch64_evpc_tbl.
23067 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
23068 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
23069 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
23070 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
23071 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
23072 (aarch64_expand_sve_vcond): New functions.
23073 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
23074 of aarch64_vector_mode_p.
23075 (aarch64_dwarf_poly_indeterminate_value): New function.
23076 (aarch64_compute_pressure_classes): Likewise.
23077 (aarch64_can_change_mode_class): Likewise.
23078 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
23079 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
23080 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
23081 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
23082 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
23083 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
23084 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
23085 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
23087 (Dn, Dl, Dr): Accept const as well as const_vector.
23088 (Dz): Likewise. Compare against CONST0_RTX.
23089 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
23090 of "vector" where appropriate.
23091 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
23092 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
23093 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
23094 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
23095 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
23096 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
23097 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
23098 (v_int_equiv): Extend to SVE modes.
23099 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
23101 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
23102 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
23103 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
23104 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
23105 (SVE_COND_FP_CMP): New int iterators.
23106 (perm_hilo): Handle the new unpack unspecs.
23107 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
23109 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
23110 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
23111 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
23112 (aarch64_equality_operator, aarch64_constant_vector_operand)
23113 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
23114 (aarch64_sve_nonimmediate_operand): Likewise.
23115 (aarch64_sve_general_operand): Likewise.
23116 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
23117 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
23118 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
23119 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
23120 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
23121 (aarch64_sve_float_arith_immediate): Likewise.
23122 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
23123 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
23124 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
23125 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
23126 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
23127 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
23128 (aarch64_sve_float_arith_operand): Likewise.
23129 (aarch64_sve_float_arith_with_sub_operand): Likewise.
23130 (aarch64_sve_float_mul_operand): Likewise.
23131 (aarch64_sve_vec_perm_operand): Likewise.
23132 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
23133 (aarch64_mov_operand): Accept const_poly_int and const_vector.
23134 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
23135 as well as const_vector.
23136 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
23137 in file. Use CONST0_RTX and CONSTM1_RTX.
23138 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
23139 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
23140 Use aarch64_simd_imm_zero.
23141 * config/aarch64/aarch64-sve.md: New file.
23142 * config/aarch64/aarch64.md: Include it.
23143 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
23144 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
23145 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
23146 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
23147 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
23148 (sve): New attribute.
23149 (enabled): Disable instructions with the sve attribute unless
23151 (movqi, movhi): Pass CONST_POLY_INT operaneds through
23152 aarch64_expand_mov_immediate.
23153 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
23154 CNT[BHSD] immediates.
23155 (movti): Split CONST_POLY_INT moves into two halves.
23156 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
23157 Split additions that need a temporary here if the destination
23158 is the stack pointer.
23159 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
23160 (*add<mode>3_poly_1): New instruction.
23161 (set_clobber_cc): New expander.
23163 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23165 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
23166 parameter and use it instead of GET_MODE_SIZE (innermode). Use
23167 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
23168 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
23169 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
23170 Change innermode from fixed_mode_size to machine_mode.
23171 (simplify_subreg): Update call accordingly. Handle a constant-sized
23172 subreg of a variable-length CONST_VECTOR.
23174 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23175 Alan Hayward <alan.hayward@arm.com>
23176 David Sherwood <david.sherwood@arm.com>
23178 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
23179 (add_offset_to_base): New function, split out from...
23180 (create_mem_ref): ...here. When handling a scale other than 1,
23181 check first whether the address is valid without the offset.
23182 Add it into the base if so, leaving the index and scale as-is.
23184 2018-01-12 Jakub Jelinek <jakub@redhat.com>
23187 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
23188 fold_for_warn before checking if arg2 is INTEGER_CST.
23190 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
23192 * config/rs6000/predicates.md (load_multiple_operation): Delete.
23193 (store_multiple_operation): Delete.
23194 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
23195 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
23196 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
23197 guarded by TARGET_STRING.
23198 (rs6000_output_load_multiple): Delete.
23199 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
23200 OPTION_MASK_STRING / TARGET_STRING handling.
23201 (print_operand) <'N', 'O'>: Add comment that these are unused now.
23202 (const rs6000_opt_masks) <"string">: Change mask to 0.
23203 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
23204 (MASK_STRING): Delete.
23205 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
23207 (load_multiple): Delete.
23214 (store_multiple): Delete.
23221 (movmemsi_8reg): Delete.
23222 (corresponding unnamed define_insn): Delete.
23223 (movmemsi_6reg): Delete.
23224 (corresponding unnamed define_insn): Delete.
23225 (movmemsi_4reg): Delete.
23226 (corresponding unnamed define_insn): Delete.
23227 (movmemsi_2reg): Delete.
23228 (corresponding unnamed define_insn): Delete.
23229 (movmemsi_1reg): Delete.
23230 (corresponding unnamed define_insn): Delete.
23231 * config/rs6000/rs6000.opt (mno-string): New.
23232 (mstring): Replace by deprecation warning stub.
23233 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
23235 2018-01-12 Jakub Jelinek <jakub@redhat.com>
23237 * regrename.c (regrename_do_replace): If replacing the same
23238 reg multiple times, try to reuse last created gen_raw_REG.
23241 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
23242 main to workaround a bug in GDB.
23244 2018-01-12 Tom de Vries <tom@codesourcery.com>
23247 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
23249 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
23251 PR rtl-optimization/80481
23252 * ira-color.c (get_cap_member): New function.
23253 (allocnos_conflict_by_live_ranges_p): Use it.
23254 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
23255 (setup_slot_coalesced_allocno_live_ranges): Ditto.
23257 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
23260 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
23261 (*saddl_se_1): Ditto.
23262 (*ssubsi_1): Ditto.
23263 (*ssubl_se_1): Ditto.
23265 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23267 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
23268 rather than wi::to_widest for DR_INITs.
23269 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
23270 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
23271 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
23273 (vect_analyze_group_access_1): Note that here.
23275 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23277 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
23278 polynomial type sizes.
23280 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23282 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
23283 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
23284 (gimple_add_tmp_var): Likewise.
23286 2018-01-12 Martin Liska <mliska@suse.cz>
23288 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
23289 (gimple_alloc_sizes): Likewise.
23290 (dump_gimple_statistics): Use PRIu64 in printf format.
23291 * gimple.h: Change uint64_t to int.
23293 2018-01-12 Martin Liska <mliska@suse.cz>
23295 * tree-core.h: Use uint64_t instead of int.
23296 * tree.c (tree_node_counts): Likewise.
23297 (tree_node_sizes): Likewise.
23298 (dump_tree_statistics): Use PRIu64 in printf format.
23300 2018-01-12 Martin Liska <mliska@suse.cz>
23302 * Makefile.in: As qsort_chk is implemented in vec.c, add
23303 vec.o to linkage of gencfn-macros.
23304 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
23305 passing the info to record_node_allocation_statistics.
23306 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
23308 * ggc-common.c (struct ggc_usage): Add operator== and use
23309 it in operator< and compare function.
23310 * mem-stats.h (struct mem_usage): Likewise.
23311 * vec.c (struct vec_usage): Remove operator< and compare
23312 function. Can be simply inherited.
23314 2018-01-12 Martin Jambor <mjambor@suse.cz>
23317 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
23318 * tree-ssa-math-opts.c: Include domwalk.h.
23319 (convert_mult_to_fma_1): New function.
23320 (fma_transformation_info): New type.
23321 (fma_deferring_state): Likewise.
23322 (cancel_fma_deferring): New function.
23323 (result_of_phi): Likewise.
23324 (last_fma_candidate_feeds_initial_phi): Likewise.
23325 (convert_mult_to_fma): Added deferring logic, split actual
23326 transformation to convert_mult_to_fma_1.
23327 (math_opts_dom_walker): New type.
23328 (math_opts_dom_walker::after_dom_children): New method, body moved
23329 here from pass_optimize_widening_mul::execute, added deferring logic
23331 (pass_optimize_widening_mul::execute): Moved most of code to
23332 math_opts_dom_walker::after_dom_children.
23333 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
23334 * config/i386/i386.c (ix86_option_override_internal): Added
23335 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
23337 2018-01-12 Richard Biener <rguenther@suse.de>
23340 * dwarf2out.c (gen_variable_die): Do not reset old_die for
23341 inline instance vars.
23343 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
23346 * config/rx/rx.c (rx_is_restricted_memory_address):
23347 Handle SUBREG case.
23349 2018-01-12 Richard Biener <rguenther@suse.de>
23351 PR tree-optimization/80846
23352 * target.def (split_reduction): New target hook.
23353 * targhooks.c (default_split_reduction): New function.
23354 * targhooks.h (default_split_reduction): Declare.
23355 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
23356 target requests first reduce vectors by combining low and high
23358 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
23359 (get_vectype_for_scalar_type_and_size): Export.
23360 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
23361 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
23362 * doc/tm.texi: Regenerate.
23363 * config/i386/i386.c (ix86_split_reduction): Implement
23364 TARGET_VECTORIZE_SPLIT_REDUCTION.
23366 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
23369 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
23370 in PIC mode except for TARGET_VXWORKS_RTP.
23371 * config/sparc/sparc.c: Include cfgrtl.h.
23372 (TARGET_INIT_PIC_REG): Define.
23373 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
23374 (sparc_pic_register_p): New predicate.
23375 (sparc_legitimate_address_p): Use it.
23376 (sparc_legitimize_pic_address): Likewise.
23377 (sparc_delegitimize_address): Likewise.
23378 (sparc_mode_dependent_address_p): Likewise.
23379 (gen_load_pcrel_sym): Remove 4th parameter.
23380 (load_got_register): Adjust call to above. Remove obsolete stuff.
23381 (sparc_expand_prologue): Do not call load_got_register here.
23382 (sparc_flat_expand_prologue): Likewise.
23383 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
23384 (sparc_use_pseudo_pic_reg): New function.
23385 (sparc_init_pic_reg): Likewise.
23386 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23387 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
23389 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
23391 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
23392 Add item for branch_cost.
23394 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
23396 PR rtl-optimization/83565
23397 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
23398 not extend the result to a larger mode for rotate operations.
23399 (num_sign_bit_copies1): Likewise.
23401 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23404 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
23406 Use values-Xc.o for -pedantic.
23407 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
23409 2018-01-12 Martin Liska <mliska@suse.cz>
23412 * ipa-devirt.c (final_warning_record::grow_type_warnings):
23414 (possible_polymorphic_call_targets): Use it.
23415 (ipa_devirt): Likewise.
23417 2018-01-12 Martin Liska <mliska@suse.cz>
23419 * profile-count.h (enum profile_quality): Use 0 as invalid
23420 enum value of profile_quality.
23422 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
23424 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
23425 -mext-string options.
23427 2018-01-12 Richard Biener <rguenther@suse.de>
23429 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
23430 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
23431 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
23433 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
23435 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
23437 * configure.ac (--with-long-double-format): Add support for the
23438 configuration option to change the default long double format on
23440 * config.gcc (powerpc*-linux*-*): Likewise.
23441 * configure: Regenerate.
23442 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
23443 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
23444 used without modification.
23446 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23448 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
23449 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
23450 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
23451 MISC_BUILTIN_SPEC_BARRIER.
23452 (rs6000_init_builtins): Likewise.
23453 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
23455 (speculation_barrier): New define_insn.
23456 * doc/extend.texi: Document __builtin_speculation_barrier.
23458 2018-01-11 Jakub Jelinek <jakub@redhat.com>
23461 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
23462 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
23463 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
23465 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
23466 integral modes instead of "ss" and "sd".
23467 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
23468 vectors with 32-bit and 64-bit elements.
23469 (vecdupssescalarmodesuffix): New mode attribute.
23470 (vec_dup<mode>): Use it.
23472 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
23475 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
23476 frame if argument is passed on stack.
23478 2018-01-11 Jakub Jelinek <jakub@redhat.com>
23481 * ree.c (combine_reaching_defs): Optimize also
23482 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
23483 reg2=any_extend(exp); reg1=reg2;, formatting fix.
23485 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
23487 PR middle-end/83189
23488 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
23490 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
23492 PR middle-end/83718
23493 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
23494 after they are computed.
23496 2018-01-11 Bin Cheng <bin.cheng@arm.com>
23498 PR tree-optimization/83695
23499 * gimple-loop-linterchange.cc
23500 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
23501 reset cached scev information after interchange.
23502 (pass_linterchange::execute): Remove call to scev_reset_htab.
23504 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23506 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
23507 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
23508 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
23509 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
23510 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
23511 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
23512 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
23513 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
23514 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
23515 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
23516 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
23517 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
23518 (V_lane_reg): Likewise.
23519 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
23521 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
23522 (vfmal_lane_low<mode>_intrinsic,
23523 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
23524 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
23525 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
23526 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
23527 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
23528 vfmsl_lane_high<mode>_intrinsic): New define_insns.
23530 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23532 * config/arm/arm-cpus.in (fp16fml): New feature.
23533 (ALL_SIMD): Add fp16fml.
23534 (armv8.2-a): Add fp16fml as an option.
23535 (armv8.3-a): Likewise.
23536 (armv8.4-a): Add fp16fml as part of fp16.
23537 * config/arm/arm.h (TARGET_FP16FML): Define.
23538 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
23540 * config/arm/arm-modes.def (V2HF): Define.
23541 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
23542 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
23543 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
23544 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
23545 vfmsl_low, vfmsl_high): New set of builtins.
23546 * config/arm/iterators.md (PLUSMINUS): New code iterator.
23547 (vfml_op): New code attribute.
23548 (VFMLHALVES): New int iterator.
23549 (VFML, VFMLSEL): New mode attributes.
23550 (V_reg): Define mapping for V2HF.
23551 (V_hi, V_lo): New mode attributes.
23552 (VF_constraint): Likewise.
23553 (vfml_half, vfml_half_selector): New int attributes.
23554 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
23556 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
23557 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
23559 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
23560 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
23561 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
23562 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
23564 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
23565 Document new effective target and option set.
23567 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23569 * config/arm/arm-cpus.in (armv8_4): New feature.
23570 (ARMv8_4a): New fgroup.
23571 (armv8.4-a): New arch.
23572 * config/arm/arm-tables.opt: Regenerate.
23573 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
23574 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
23575 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
23576 Add matching rules for -march=armv8.4-a and extensions.
23577 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
23579 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
23582 * config/rx/rx.md (BW): New mode attribute.
23583 (sync_lock_test_and_setsi): Add mode suffix to insn output.
23585 2018-01-11 Richard Biener <rguenther@suse.de>
23587 PR tree-optimization/83435
23588 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
23589 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
23590 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
23592 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23593 Alan Hayward <alan.hayward@arm.com>
23594 David Sherwood <david.sherwood@arm.com>
23596 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
23598 (aarch64_classify_address): Initialize it. Track polynomial offsets.
23599 (aarch64_print_address_internal): Use it to check for a zero offset.
23601 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23602 Alan Hayward <alan.hayward@arm.com>
23603 David Sherwood <david.sherwood@arm.com>
23605 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
23606 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
23607 Return a poly_int64 rather than a HOST_WIDE_INT.
23608 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
23609 rather than a HOST_WIDE_INT.
23610 * config/aarch64/aarch64.h (aarch64_frame): Protect with
23611 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
23612 hard_fp_offset, frame_size, initial_adjust, callee_offset and
23613 final_offset from HOST_WIDE_INT to poly_int64.
23614 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
23615 to_constant when getting the number of units in an Advanced SIMD
23617 (aarch64_builtin_vectorized_function): Check for a constant number
23619 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
23621 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
23622 attribute instead of GET_MODE_NUNITS.
23623 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
23624 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
23625 GET_MODE_SIZE for fixed-size registers.
23626 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
23627 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
23628 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
23629 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
23630 (aarch64_print_operand, aarch64_print_address_internal)
23631 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
23632 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
23633 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
23634 Handle polynomial GET_MODE_SIZE.
23635 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
23636 wider than SImode without modification.
23637 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
23638 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
23639 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
23640 passing and returning SVE modes.
23641 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
23642 rather than GEN_INT.
23643 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
23644 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
23645 (aarch64_allocate_and_probe_stack_space): Likewise.
23646 (aarch64_layout_frame): Cope with polynomial offsets.
23647 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
23648 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
23649 polynomial offsets.
23650 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
23651 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
23652 poly_int64 rather than a HOST_WIDE_INT.
23653 (aarch64_get_separate_components, aarch64_process_components)
23654 (aarch64_expand_prologue, aarch64_expand_epilogue)
23655 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
23656 (aarch64_anchor_offset): New function, split out from...
23657 (aarch64_legitimize_address): ...here.
23658 (aarch64_builtin_vectorization_cost): Handle polynomial
23659 TYPE_VECTOR_SUBPARTS.
23660 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
23662 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
23663 number of elements from the PARALLEL rather than the mode.
23664 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
23665 rather than GET_MODE_BITSIZE.
23666 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
23667 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
23668 (aarch64_expand_vec_perm_const_1): Handle polynomial
23669 d->perm.length () and d->perm elements.
23670 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
23671 Apply to_constant to d->perm elements.
23672 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
23673 polynomial CONST_VECTOR_NUNITS.
23674 (aarch64_move_pointer): Take amount as a poly_int64 rather
23676 (aarch64_progress_pointer): Avoid temporary variable.
23677 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
23678 the mode attribute instead of GET_MODE.
23680 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23681 Alan Hayward <alan.hayward@arm.com>
23682 David Sherwood <david.sherwood@arm.com>
23684 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
23685 x exists before using it.
23686 (aarch64_add_constant_internal): Rename to...
23687 (aarch64_add_offset_1): ...this. Replace regnum with separate
23688 src and dest rtxes. Handle the case in which they're different,
23689 including when the offset is zero. Replace scratchreg with an rtx.
23690 Use 2 additions if there is no spare register into which we can
23691 move a 16-bit constant.
23692 (aarch64_add_constant): Delete.
23693 (aarch64_add_offset): Replace reg with separate src and dest
23694 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
23695 Use aarch64_add_offset_1.
23696 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
23697 an rtx rather than an int. Take the delta as a poly_int64
23698 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
23699 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
23700 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
23701 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
23702 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
23703 and aarch64_add_sp.
23704 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
23705 aarch64_add_constant.
23707 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23709 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
23710 Use scalar_float_mode.
23712 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23714 * config/aarch64/aarch64-simd.md
23715 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
23716 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
23717 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
23718 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
23719 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
23720 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
23721 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
23722 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
23723 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
23724 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
23726 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23729 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
23730 targ_options->x_arm_arch_string is non NULL.
23732 2018-01-11 Tamar Christina <tamar.christina@arm.com>
23734 * config/aarch64/aarch64.h
23735 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
23737 2018-01-11 Sudakshina Das <sudi.das@arm.com>
23740 * expmed.c (emit_store_flag_force): Swap if const op0
23741 and change VOIDmode to mode of op0.
23743 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23745 PR rtl-optimization/83761
23746 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
23747 than bytes to mode_for_size.
23749 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23751 PR middle-end/83189
23752 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
23753 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
23756 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23758 PR middle-end/83575
23759 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
23760 when in layout mode.
23761 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
23762 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
23765 2018-01-10 Michael Collison <michael.collison@arm.com>
23767 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
23768 * config/aarch64/aarch64-option-extension.def: Add
23769 AARCH64_OPT_EXTENSION of 'fp16fml'.
23770 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23771 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
23772 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
23773 * config/aarch64/constraints.md (Ui7): New constraint.
23774 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
23775 (VFMLA_SEL_W): Ditto.
23778 (VFMLA16_LOW): New int iterator.
23779 (VFMLA16_HIGH): Ditto.
23780 (UNSPEC_FMLAL): New unspec.
23781 (UNSPEC_FMLSL): Ditto.
23782 (UNSPEC_FMLAL2): Ditto.
23783 (UNSPEC_FMLSL2): Ditto.
23784 (f16mac): New code attribute.
23785 * config/aarch64/aarch64-simd-builtins.def
23786 (aarch64_fmlal_lowv2sf): Ditto.
23787 (aarch64_fmlsl_lowv2sf): Ditto.
23788 (aarch64_fmlalq_lowv4sf): Ditto.
23789 (aarch64_fmlslq_lowv4sf): Ditto.
23790 (aarch64_fmlal_highv2sf): Ditto.
23791 (aarch64_fmlsl_highv2sf): Ditto.
23792 (aarch64_fmlalq_highv4sf): Ditto.
23793 (aarch64_fmlslq_highv4sf): Ditto.
23794 (aarch64_fmlal_lane_lowv2sf): Ditto.
23795 (aarch64_fmlsl_lane_lowv2sf): Ditto.
23796 (aarch64_fmlal_laneq_lowv2sf): Ditto.
23797 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
23798 (aarch64_fmlalq_lane_lowv4sf): Ditto.
23799 (aarch64_fmlsl_lane_lowv4sf): Ditto.
23800 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
23801 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
23802 (aarch64_fmlal_lane_highv2sf): Ditto.
23803 (aarch64_fmlsl_lane_highv2sf): Ditto.
23804 (aarch64_fmlal_laneq_highv2sf): Ditto.
23805 (aarch64_fmlsl_laneq_highv2sf): Ditto.
23806 (aarch64_fmlalq_lane_highv4sf): Ditto.
23807 (aarch64_fmlsl_lane_highv4sf): Ditto.
23808 (aarch64_fmlalq_laneq_highv4sf): Ditto.
23809 (aarch64_fmlsl_laneq_highv4sf): Ditto.
23810 * config/aarch64/aarch64-simd.md:
23811 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
23812 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23813 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
23814 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23815 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
23816 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
23817 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
23818 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
23819 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
23820 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
23821 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
23822 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
23823 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
23824 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
23825 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
23826 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
23827 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
23828 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
23829 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
23830 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
23831 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
23832 (vfmlsl_low_u32): Ditto.
23833 (vfmlalq_low_u32): Ditto.
23834 (vfmlslq_low_u32): Ditto.
23835 (vfmlal_high_u32): Ditto.
23836 (vfmlsl_high_u32): Ditto.
23837 (vfmlalq_high_u32): Ditto.
23838 (vfmlslq_high_u32): Ditto.
23839 (vfmlal_lane_low_u32): Ditto.
23840 (vfmlsl_lane_low_u32): Ditto.
23841 (vfmlal_laneq_low_u32): Ditto.
23842 (vfmlsl_laneq_low_u32): Ditto.
23843 (vfmlalq_lane_low_u32): Ditto.
23844 (vfmlslq_lane_low_u32): Ditto.
23845 (vfmlalq_laneq_low_u32): Ditto.
23846 (vfmlslq_laneq_low_u32): Ditto.
23847 (vfmlal_lane_high_u32): Ditto.
23848 (vfmlsl_lane_high_u32): Ditto.
23849 (vfmlal_laneq_high_u32): Ditto.
23850 (vfmlsl_laneq_high_u32): Ditto.
23851 (vfmlalq_lane_high_u32): Ditto.
23852 (vfmlslq_lane_high_u32): Ditto.
23853 (vfmlalq_laneq_high_u32): Ditto.
23854 (vfmlslq_laneq_high_u32): Ditto.
23855 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
23856 (AARCH64_FL_FOR_ARCH8_4): New.
23857 (AARCH64_ISA_F16FML): New ISA flag.
23858 (TARGET_F16FML): New feature flag for fp16fml.
23859 (doc/invoke.texi): Document new fp16fml option.
23861 2018-01-10 Michael Collison <michael.collison@arm.com>
23863 * config/aarch64/aarch64-builtins.c:
23864 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23865 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23866 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23867 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23868 (AARCH64_ISA_SHA3): New ISA flag.
23869 (TARGET_SHA3): New feature flag for sha3.
23870 * config/aarch64/iterators.md (sha512_op): New int attribute.
23871 (CRYPTO_SHA512): New int iterator.
23872 (UNSPEC_SHA512H): New unspec.
23873 (UNSPEC_SHA512H2): Ditto.
23874 (UNSPEC_SHA512SU0): Ditto.
23875 (UNSPEC_SHA512SU1): Ditto.
23876 * config/aarch64/aarch64-simd-builtins.def
23877 (aarch64_crypto_sha512hqv2di): New builtin.
23878 (aarch64_crypto_sha512h2qv2di): Ditto.
23879 (aarch64_crypto_sha512su0qv2di): Ditto.
23880 (aarch64_crypto_sha512su1qv2di): Ditto.
23881 (aarch64_eor3qv8hi): Ditto.
23882 (aarch64_rax1qv2di): Ditto.
23883 (aarch64_xarqv2di): Ditto.
23884 (aarch64_bcaxqv8hi): Ditto.
23885 * config/aarch64/aarch64-simd.md:
23886 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23887 (aarch64_crypto_sha512su0qv2di): Ditto.
23888 (aarch64_crypto_sha512su1qv2di): Ditto.
23889 (aarch64_eor3qv8hi): Ditto.
23890 (aarch64_rax1qv2di): Ditto.
23891 (aarch64_xarqv2di): Ditto.
23892 (aarch64_bcaxqv8hi): Ditto.
23893 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23894 (vsha512h2q_u64): Ditto.
23895 (vsha512su0q_u64): Ditto.
23896 (vsha512su1q_u64): Ditto.
23897 (veor3q_u16): Ditto.
23898 (vrax1q_u64): Ditto.
23899 (vxarq_u64): Ditto.
23900 (vbcaxq_u16): Ditto.
23901 * config/arm/types.md (crypto_sha512): New type attribute.
23902 (crypto_sha3): Ditto.
23903 (doc/invoke.texi): Document new sha3 option.
23905 2018-01-10 Michael Collison <michael.collison@arm.com>
23907 * config/aarch64/aarch64-builtins.c:
23908 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23909 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23910 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23911 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23912 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23913 (AARCH64_ISA_SM4): New ISA flag.
23914 (TARGET_SM4): New feature flag for sm4.
23915 * config/aarch64/aarch64-simd-builtins.def
23916 (aarch64_sm3ss1qv4si): Ditto.
23917 (aarch64_sm3tt1aq4si): Ditto.
23918 (aarch64_sm3tt1bq4si): Ditto.
23919 (aarch64_sm3tt2aq4si): Ditto.
23920 (aarch64_sm3tt2bq4si): Ditto.
23921 (aarch64_sm3partw1qv4si): Ditto.
23922 (aarch64_sm3partw2qv4si): Ditto.
23923 (aarch64_sm4eqv4si): Ditto.
23924 (aarch64_sm4ekeyqv4si): Ditto.
23925 * config/aarch64/aarch64-simd.md:
23926 (aarch64_sm3ss1qv4si): Ditto.
23927 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23928 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23929 (aarch64_sm4eqv4si): Ditto.
23930 (aarch64_sm4ekeyqv4si): Ditto.
23931 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23932 (sm3part_op): Ditto.
23933 (CRYPTO_SM3TT): Ditto.
23934 (CRYPTO_SM3PART): Ditto.
23935 (UNSPEC_SM3SS1): New unspec.
23936 (UNSPEC_SM3TT1A): Ditto.
23937 (UNSPEC_SM3TT1B): Ditto.
23938 (UNSPEC_SM3TT2A): Ditto.
23939 (UNSPEC_SM3TT2B): Ditto.
23940 (UNSPEC_SM3PARTW1): Ditto.
23941 (UNSPEC_SM3PARTW2): Ditto.
23942 (UNSPEC_SM4E): Ditto.
23943 (UNSPEC_SM4EKEY): Ditto.
23944 * config/aarch64/constraints.md (Ui2): New constraint.
23945 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23946 * config/arm/types.md (crypto_sm3): New type attribute.
23947 (crypto_sm4): Ditto.
23948 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23949 (vsm3tt1aq_u32): Ditto.
23950 (vsm3tt1bq_u32): Ditto.
23951 (vsm3tt2aq_u32): Ditto.
23952 (vsm3tt2bq_u32): Ditto.
23953 (vsm3partw1q_u32): Ditto.
23954 (vsm3partw2q_u32): Ditto.
23955 (vsm4eq_u32): Ditto.
23956 (vsm4ekeyq_u32): Ditto.
23957 (doc/invoke.texi): Document new sm4 option.
23959 2018-01-10 Michael Collison <michael.collison@arm.com>
23961 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23962 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23963 (AARCH64_FL_FOR_ARCH8_4): New.
23964 (AARCH64_FL_V8_4): New flag.
23965 (doc/invoke.texi): Document new armv8.4-a option.
23967 2018-01-10 Michael Collison <michael.collison@arm.com>
23969 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23970 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23971 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23972 * config/aarch64/aarch64-option-extension.def: Add
23973 AARCH64_OPT_EXTENSION of 'sha2'.
23974 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23975 (crypto): Disable sha2 and aes if crypto disabled.
23976 (crypto): Enable aes and sha2 if enabled.
23977 (simd): Disable sha2 and aes if simd disabled.
23978 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23980 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23981 (TARGET_SHA2): New feature flag for sha2.
23982 (TARGET_AES): New feature flag for aes.
23983 * config/aarch64/aarch64-simd.md:
23984 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23985 conditional on TARGET_AES.
23986 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23987 (aarch64_crypto_sha1hsi): Make pattern conditional
23989 (aarch64_crypto_sha1hv4si): Ditto.
23990 (aarch64_be_crypto_sha1hv4si): Ditto.
23991 (aarch64_crypto_sha1su1v4si): Ditto.
23992 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23993 (aarch64_crypto_sha1su0v4si): Ditto.
23994 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23995 (aarch64_crypto_sha256su0v4si): Ditto.
23996 (aarch64_crypto_sha256su1v4si): Ditto.
23997 (doc/invoke.texi): Document new aes and sha2 options.
23999 2018-01-10 Martin Sebor <msebor@redhat.com>
24001 PR tree-optimization/83781
24002 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
24005 2018-01-11 Martin Sebor <msebor@gmail.com>
24006 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24008 PR tree-optimization/83501
24009 PR tree-optimization/81703
24011 * tree-ssa-strlen.c (get_string_cst): Rename...
24012 (get_string_len): ...to this. Handle global constants.
24013 (handle_char_store): Adjust.
24015 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
24016 Jim Wilson <jimw@sifive.com>
24018 * config/riscv/riscv-protos.h (riscv_output_return): New.
24019 * config/riscv/riscv.c (struct machine_function): New naked_p field.
24020 (riscv_attribute_table, riscv_output_return),
24021 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
24022 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
24023 (riscv_compute_frame_info): Only compute frame->mask if not a naked
24025 (riscv_expand_prologue): Add early return for naked function.
24026 (riscv_expand_epilogue): Likewise.
24027 (riscv_function_ok_for_sibcall): Return false for naked function.
24028 (riscv_set_current_function): New.
24029 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
24030 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
24031 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
24032 * doc/extend.texi (RISC-V Function Attributes): New.
24034 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
24036 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
24037 check for 128-bit long double before checking TCmode.
24038 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
24039 128-bit long doubles before checking TFmode or TCmode.
24040 (FLOAT128_IBM_P): Likewise.
24042 2018-01-10 Martin Sebor <msebor@redhat.com>
24044 PR tree-optimization/83671
24045 * builtins.c (c_strlen): Unconditionally return zero for the empty
24047 Use -Warray-bounds for warnings.
24048 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
24049 for non-constant array indices with COMPONENT_REF, arrays of
24050 arrays, and pointers to arrays.
24051 (gimple_fold_builtin_strlen): Determine and set length range for
24052 non-constant character arrays.
24054 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
24056 PR middle-end/81897
24057 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
24060 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
24062 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
24064 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
24067 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
24068 VECTOR_MEM_ALTIVEC_OR_VSX_P.
24069 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
24070 indexed_or_indirect_operand predicate.
24071 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
24072 (*vsx_le_perm_load_v8hi): Likewise.
24073 (*vsx_le_perm_load_v16qi): Likewise.
24074 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
24075 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
24076 (*vsx_le_perm_store_v8hi): Likewise.
24077 (*vsx_le_perm_store_v16qi): Likewise.
24078 (eight unnamed splitters): Likewise.
24080 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
24082 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
24083 * config/rs6000/emmintrin.h: Likewise.
24084 * config/rs6000/mmintrin.h: Likewise.
24085 * config/rs6000/xmmintrin.h: Likewise.
24087 2018-01-10 David Malcolm <dmalcolm@redhat.com>
24090 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
24092 * tree.c (tree_nop_conversion): Return true for location wrapper
24094 (maybe_wrap_with_location): New function.
24095 (selftest::check_strip_nops): New function.
24096 (selftest::test_location_wrappers): New function.
24097 (selftest::tree_c_tests): Call it.
24098 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
24099 (maybe_wrap_with_location): New decl.
24100 (EXPR_LOCATION_WRAPPER_P): New macro.
24101 (location_wrapper_p): New inline function.
24102 (tree_strip_any_location_wrapper): New inline function.
24104 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
24107 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
24108 stack_realign_offset for the largest alignment of stack slot
24110 (ix86_find_max_used_stack_alignment): New function.
24111 (ix86_finalize_stack_frame_flags): Use it. Set
24112 max_used_stack_alignment if we don't realign stack.
24113 * config/i386/i386.h (machine_function): Add
24114 max_used_stack_alignment.
24116 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
24118 * config/arm/arm.opt (-mbranch-cost): New option.
24119 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
24122 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
24125 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
24126 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
24128 2018-01-10 Richard Biener <rguenther@suse.de>
24131 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
24132 early out so it also covers the case where we have a non-NULL
24135 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
24137 PR tree-optimization/83753
24138 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
24139 for non-strided grouped accesses if the number of elements is 1.
24141 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
24144 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
24145 * i386.h (TARGET_USE_GATHER): Define.
24146 * x86-tune.def (X86_TUNE_USE_GATHER): New.
24148 2018-01-10 Martin Liska <mliska@suse.cz>
24151 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
24152 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
24154 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
24155 CLEANUP_NO_PARTITIONING is not set.
24157 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
24159 * doc/rtl.texi: Remove documentation of (const ...) wrappers
24160 for vectors, as a partial revert of r254296.
24161 * rtl.h (const_vec_p): Delete.
24162 (const_vec_duplicate_p): Don't test for vector CONSTs.
24163 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
24164 * expmed.c (make_tree): Likewise.
24167 * common.md (E, F): Use CONSTANT_P instead of checking for
24169 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
24170 checking for CONST_VECTOR.
24172 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
24174 PR middle-end/83575
24175 * predict.c (force_edge_cold): Handle in more sane way edges
24176 with no prediction.
24178 2018-01-09 Carl Love <cel@us.ibm.com>
24180 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
24182 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
24183 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
24184 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
24185 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
24186 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
24187 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
24188 * config/rs6000/rs6000-protos.h: Add extern defition for
24189 rs6000_generate_float2_double_code.
24190 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
24192 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
24193 (float2_v2df): Add define_expand.
24195 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
24198 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
24199 op_mode in the force_to_mode call.
24201 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
24203 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
24204 instead of checking each element individually.
24205 (aarch64_evpc_uzp): Likewise.
24206 (aarch64_evpc_zip): Likewise.
24207 (aarch64_evpc_ext): Likewise.
24208 (aarch64_evpc_rev): Likewise.
24209 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
24210 instead of checking each element individually. Return true without
24212 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
24213 whether all selected elements come from the same input, instead of
24214 checking each element individually. Remove calls to gen_rtx_REG,
24215 start_sequence and end_sequence and instead assert that no rtl is
24218 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
24220 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
24221 order of HIGH and CONST checks.
24223 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
24225 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
24226 if the destination isn't an SSA_NAME.
24228 2018-01-09 Richard Biener <rguenther@suse.de>
24230 PR tree-optimization/83668
24231 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
24233 (canonicalize_loop_form): ... here, renamed from ...
24234 (canonicalize_loop_closed_ssa_form): ... this and amended to
24235 swap successor edges for loop exit blocks to make us use
24236 the RPO order we need for initial schedule generation.
24238 2018-01-09 Joseph Myers <joseph@codesourcery.com>
24240 PR tree-optimization/64811
24241 * match.pd: When optimizing comparisons with Inf, avoid
24242 introducing or losing exceptions from comparisons with NaN.
24244 2018-01-09 Martin Liska <mliska@suse.cz>
24247 * asan.c (shadow_mem_size): Add gcc_assert.
24249 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
24251 Don't save registers in main().
24254 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
24255 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
24256 * config/avr/avr.c (avr_set_current_function): Don't error if
24257 naked, OS_task or OS_main are specified at the same time.
24258 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
24260 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
24262 * common/config/avr/avr-common.c (avr_option_optimization_table):
24263 Switch on -mmain-is-OS_task for optimizing compilations.
24265 2018-01-09 Richard Biener <rguenther@suse.de>
24267 PR tree-optimization/83572
24268 * graphite.c: Include cfganal.h.
24269 (graphite_transform_loops): Connect infinite loops to exit
24270 and remove fake edges at the end.
24272 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
24274 * ipa-inline.c (edge_badness): Revert accidental checkin.
24276 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
24279 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
24280 symbols; not inline clones.
24282 2018-01-09 Jakub Jelinek <jakub@redhat.com>
24285 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
24286 hard registers. Formatting fixes.
24288 PR preprocessor/83722
24289 * gcc.c (try_generate_repro): Pass
24290 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
24291 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
24294 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
24295 Kito Cheng <kito.cheng@gmail.com>
24297 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
24298 (riscv_leaf_function_p): Delete.
24299 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
24301 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24303 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
24305 (do_ifelse): New function.
24306 (do_isel): New function.
24307 (do_sub3): New function.
24308 (do_add3): New function.
24309 (do_load_mask_compare): New function.
24310 (do_overlap_load_compare): New function.
24311 (expand_compare_loop): New function.
24312 (expand_block_compare): Call expand_compare_loop() when appropriate.
24313 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
24314 option description.
24315 (-mblock-compare-inline-loop-limit): New option.
24317 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24320 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
24321 Reverse order of second and third operands in first alternative.
24322 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
24323 of first and second elements in UNSPEC_VPERMR vector.
24324 (altivec_expand_vec_perm_le): Likewise.
24326 2018-01-08 Jeff Law <law@redhat.com>
24328 PR rtl-optimizatin/81308
24329 * tree-switch-conversion.c (cfg_altered): New file scoped static.
24330 (process_switch): If group_case_labels makes a change, then set
24332 (pass_convert_switch::execute): If a switch is converted, then
24333 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
24335 PR rtl-optimization/81308
24336 * recog.c (split_all_insns): Conditionally cleanup the CFG after
24339 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
24341 PR target/83663 - Revert r255946
24342 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
24343 generation for cases where splatting a value is not useful.
24344 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
24345 across a vec_duplicate and a paradoxical subreg forming a vector
24346 mode to a vec_concat.
24348 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24350 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
24351 -march=armv8.3-a variants.
24352 * config/arm/t-multilib: Likewise.
24353 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
24355 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24357 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
24359 (cceq_ior_compare_complement): Give it a name so I can use it, and
24360 change boolean_or_operator predicate to boolean_operator so it can
24361 be used to generate a crand.
24362 (eqne): New code iterator.
24363 (bd/bd_neg): New code_attrs.
24364 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
24365 a single define_insn.
24366 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
24367 decrement (bdnzt/bdnzf/bdzt/bdzf).
24368 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
24369 with the new names of the branch decrement patterns, and added the
24370 names of the branch decrement conditional patterns.
24372 2018-01-08 Richard Biener <rguenther@suse.de>
24374 PR tree-optimization/83563
24375 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
24378 2018-01-08 Richard Biener <rguenther@suse.de>
24380 PR middle-end/83713
24381 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
24383 2018-01-08 Richard Biener <rguenther@suse.de>
24385 PR tree-optimization/83685
24386 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
24387 references to abnormals.
24389 2018-01-08 Richard Biener <rguenther@suse.de>
24392 * dwarf2out.c (output_indirect_strings): Handle empty
24393 skeleton_debug_str_hash.
24394 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
24396 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
24398 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
24399 (emit_store_direct): Likewise.
24400 (arc_trampoline_adjust_address): Likewise.
24401 (arc_asm_trampoline_template): New function.
24402 (arc_initialize_trampoline): Use asm_trampoline_template.
24403 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
24404 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
24405 * config/arc/arc.md (flush_icache): Delete pattern.
24407 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
24409 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
24410 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
24413 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
24416 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
24417 by not USED_FOR_TARGET.
24418 (make_pass_resolve_sw_modes): Likewise.
24420 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
24422 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
24425 2018-01-08 Richard Biener <rguenther@suse.de>
24427 PR middle-end/83580
24428 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
24430 2018-01-08 Richard Biener <rguenther@suse.de>
24432 PR middle-end/83517
24433 * match.pd ((t * 2) / 2) -> t): Add missing :c.
24435 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
24437 PR middle-end/81897
24438 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
24439 basic blocks with a small number of successors.
24440 (convert_control_dep_chain_into_preds): Improve handling of
24442 (dump_predicates): Split apart into...
24443 (dump_pred_chain): ...here...
24444 (dump_pred_info): ...and here.
24445 (can_one_predicate_be_invalidated_p): Add debugging printfs.
24446 (can_chain_union_be_invalidated_p): Improve check for invalidation
24448 (uninit_uses_cannot_happen): Avoid unnecessary if
24449 convert_control_dep_chain_into_preds yielded nothing.
24451 2018-01-06 Martin Sebor <msebor@redhat.com>
24453 PR tree-optimization/83640
24454 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
24455 subtracting negative offset from size.
24456 (builtin_access::overlap): Adjust offset bounds of the access to fall
24457 within the size of the object if possible.
24459 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
24461 PR rtl-optimization/83699
24462 * expmed.c (extract_bit_field_1): Restrict the vector usage of
24463 extract_bit_field_as_subreg to cases in which the extracted
24464 value is also a vector.
24466 * lra-constraints.c (process_alt_operands): Test for the equivalence
24467 substitutions when detecting a possible reload cycle.
24469 2018-01-06 Jakub Jelinek <jakub@redhat.com>
24472 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
24473 by default if flag_selective_schedling{,2}. Formatting fixes.
24475 PR rtl-optimization/83682
24476 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
24477 if it has non-VECTOR_MODE element mode.
24478 (vec_duplicate_p): Likewise.
24480 PR middle-end/83694
24481 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
24482 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
24484 2018-01-05 Jakub Jelinek <jakub@redhat.com>
24487 * config/i386/i386-builtin.def
24488 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
24489 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
24490 Require also OPTION_MASK_ISA_AVX512F in addition to
24491 OPTION_MASK_ISA_GFNI.
24492 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
24493 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
24494 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
24495 to OPTION_MASK_ISA_GFNI.
24496 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
24497 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
24498 OPTION_MASK_ISA_AVX512BW.
24499 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
24500 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
24501 addition to OPTION_MASK_ISA_GFNI.
24502 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
24503 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
24504 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
24505 to OPTION_MASK_ISA_GFNI.
24506 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
24507 a requirement for all ISAs rather than any of them with a few
24509 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
24511 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
24512 bitmasks to be enabled with 3 exceptions, instead of requiring any
24513 enabled ISA with lots of exceptions.
24514 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
24515 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
24516 Change avx512bw in isa attribute to avx512f.
24517 * config/i386/sgxintrin.h: Add license boilerplate.
24518 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
24519 to __AVX512F__ and __AVX512VL to __AVX512VL__.
24520 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
24521 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
24523 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
24524 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
24525 temporarily sse2 rather than sse if not enabled already.
24528 * config/i386/sse.md (VI248_VLBW): Rename to ...
24529 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
24530 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
24531 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
24532 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
24533 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
24534 mode iterator instead of VI248_VLBW.
24536 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
24538 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
24539 (record_modified): Skip clobbers; add debug output.
24540 (param_change_prob): Use sreal frequencies.
24542 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
24544 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
24545 punt for user-aligned variables.
24547 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
24549 * tree-chrec.c (chrec_contains_symbols): Return true for
24552 2018-01-05 Sudakshina Das <sudi.das@arm.com>
24555 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
24556 of (x|y) == x for BICS pattern.
24558 2018-01-05 Jakub Jelinek <jakub@redhat.com>
24560 PR tree-optimization/83605
24561 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
24562 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
24565 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
24567 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
24568 * config/epiphany/rtems.h: New file.
24570 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24571 Uros Bizjak <ubizjak@gmail.com>
24574 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
24575 QIreg_operand instead of register_operand predicate.
24576 * config/i386/i386.c (ix86_rop_should_change_byte_p,
24577 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
24578 comments instead of -fmitigate[-_]rop.
24580 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24583 * cgraphunit.c (symbol_table::compile): Switch to text_section
24584 before calling assembly_start debug hook.
24585 * run-rtl-passes.c (run_rtl_passes): Likewise.
24588 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24590 * tree-vrp.c (extract_range_from_binary_expr_1): Check
24591 range_int_cst_p rather than !symbolic_range_p before calling
24592 extract_range_from_multiplicative_op_1.
24594 2018-01-04 Jeff Law <law@redhat.com>
24596 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
24597 redundant test in assertion.
24599 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24601 * doc/rtl.texi: Document machine_mode wrapper classes.
24603 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24605 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
24606 using tree_to_uhwi.
24608 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24610 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
24611 the VEC_PERM_EXPR fold to fail.
24613 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24616 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
24617 to switched_sections.
24619 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24622 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
24623 test for d.testing.
24625 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
24628 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
24629 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
24631 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24634 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
24635 is BLKmode and bitpos not zero or mode change is needed.
24637 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24640 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
24643 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
24646 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
24647 instead of MULT rtx. Update all corresponding splitters.
24648 (*saddl_se): Ditto.
24649 (*ssub<modesuffix>): Ditto.
24650 (*ssubl_se): Ditto.
24651 (*cmp_sadd_di): Update split patterns.
24652 (*cmp_sadd_si): Ditto.
24653 (*cmp_sadd_sidi): Ditto.
24654 (*cmp_ssub_di): Ditto.
24655 (*cmp_ssub_si): Ditto.
24656 (*cmp_ssub_sidi): Ditto.
24657 * config/alpha/predicates.md (const23_operand): New predicate.
24658 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
24659 Look for ASHIFT, not MULT inner operand.
24660 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
24662 2018-01-04 Martin Liska <mliska@suse.cz>
24664 PR gcov-profile/83669
24665 * gcov.c (output_intermediate_file): Add version to intermediate
24667 * doc/gcov.texi: Document new field 'version' in intermediate
24668 file format. Fix location of '-k' option of gcov command.
24670 2018-01-04 Martin Liska <mliska@suse.cz>
24673 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
24675 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24677 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
24679 2018-01-03 Martin Sebor <msebor@redhat.com>
24681 PR tree-optimization/83655
24682 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
24683 checking calls with invalid arguments.
24685 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24687 * tree-vect-stmts.c (vect_get_store_rhs): New function.
24688 (vectorizable_mask_load_store): Delete.
24689 (vectorizable_call): Return false for masked loads and stores.
24690 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
24691 instead of gimple_assign_rhs1.
24692 (vectorizable_load): Handle IFN_MASK_LOAD.
24693 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
24695 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24697 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
24699 (vectorizable_mask_load_store): ...here.
24700 (vectorizable_load): ...and here.
24702 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24704 * tree-vect-stmts.c (vect_build_all_ones_mask)
24705 (vect_build_zero_merge_argument): New functions, split out from...
24706 (vectorizable_load): ...here.
24708 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24710 * tree-vect-stmts.c (vect_check_store_rhs): New function,
24712 (vectorizable_mask_load_store): ...here.
24713 (vectorizable_store): ...and here.
24715 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24717 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
24719 (vectorizable_mask_load_store): ...here.
24721 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24723 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
24724 (vect_model_store_cost): Take a vec_load_store_type instead of a
24726 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
24727 (vect_model_store_cost): Take a vec_load_store_type instead of a
24729 (vectorizable_mask_load_store): Update accordingly.
24730 (vectorizable_store): Likewise.
24731 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
24733 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24735 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
24736 IFN_MASK_LOAD calls here rather than...
24737 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
24739 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24740 Alan Hayward <alan.hayward@arm.com>
24741 David Sherwood <david.sherwood@arm.com>
24743 * expmed.c (extract_bit_field_1): For vector extracts,
24744 fall back to extract_bit_field_as_subreg if vec_extract
24747 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24748 Alan Hayward <alan.hayward@arm.com>
24749 David Sherwood <david.sherwood@arm.com>
24751 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
24752 they are variable or constant sized.
24753 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
24754 slots for constant-sized data.
24756 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24757 Alan Hayward <alan.hayward@arm.com>
24758 David Sherwood <david.sherwood@arm.com>
24760 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
24761 handling COND_EXPRs with boolean comparisons, try to find a better
24762 basis for the mask type than the boolean itself.
24764 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24766 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
24767 is calculated and how it can be overridden.
24768 * genmodes.c (max_bitsize_mode_any_mode): New variable.
24769 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
24771 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
24774 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24775 Alan Hayward <alan.hayward@arm.com>
24776 David Sherwood <david.sherwood@arm.com>
24778 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
24779 Remove the mode argument.
24780 (aarch64_simd_valid_immediate): Remove the mode and inverse
24782 * config/aarch64/iterators.md (bitsize): New iterator.
24783 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
24784 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
24785 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
24786 aarch64_simd_valid_immediate.
24787 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
24788 (aarch64_reg_or_bic_imm): Likewise.
24789 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
24790 with an insn_type enum and msl with a modifier_type enum.
24791 Replace element_width with a scalar_mode. Change the shift
24792 to unsigned int. Add constructors for scalar_float_mode and
24793 scalar_int_mode elements.
24794 (aarch64_vect_float_const_representable_p): Delete.
24795 (aarch64_can_const_movi_rtx_p)
24796 (aarch64_simd_scalar_immediate_valid_for_move)
24797 (aarch64_simd_make_constant): Update call to
24798 aarch64_simd_valid_immediate.
24799 (aarch64_advsimd_valid_immediate_hs): New function.
24800 (aarch64_advsimd_valid_immediate): Likewise.
24801 (aarch64_simd_valid_immediate): Remove mode and inverse
24802 arguments. Rewrite to use the above. Use const_vec_duplicate_p
24803 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
24804 and aarch64_float_const_representable_p on the result.
24805 (aarch64_output_simd_mov_immediate): Remove mode argument.
24806 Update call to aarch64_simd_valid_immediate and use of
24807 simd_immediate_info.
24808 (aarch64_output_scalar_simd_mov_immediate): Update call
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 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
24816 (mode_nunits): Likewise CONST_MODE_NUNITS.
24817 * machmode.def (ADJUST_NUNITS): Document.
24818 * genmodes.c (mode_data::need_nunits_adj): New field.
24819 (blank_mode): Update accordingly.
24820 (adj_nunits): New variable.
24821 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
24823 (emit_mode_size_inline): Set need_bytesize_adj for all modes
24824 listed in adj_nunits.
24825 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
24826 listed in adj_nunits. Don't emit case statements for such modes.
24827 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
24828 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
24829 nothing if adj_nunits is nonnull.
24830 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
24831 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
24832 (emit_mode_fbit): Update use of print_maybe_const_decl.
24833 (emit_move_size): Likewise. Treat the array as non-const
24835 (emit_mode_adjustments): Handle adj_nunits.
24837 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24839 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
24840 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
24841 (VECTOR_MODES): Use it.
24842 (make_vector_modes): Take the prefix as an argument.
24844 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24845 Alan Hayward <alan.hayward@arm.com>
24846 David Sherwood <david.sherwood@arm.com>
24848 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
24849 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
24850 for MODE_VECTOR_BOOL.
24851 * machmode.def (VECTOR_BOOL_MODE): Document.
24852 * genmodes.c (VECTOR_BOOL_MODE): New macro.
24853 (make_vector_bool_mode): New function.
24854 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
24856 * lto-streamer-in.c (lto_input_mode_table): Likewise.
24857 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
24859 * stor-layout.c (int_mode_for_mode): Likewise.
24860 * tree.c (build_vector_type_for_mode): Likewise.
24861 * varasm.c (output_constant_pool_2): Likewise.
24862 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
24863 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
24864 for MODE_VECTOR_BOOL.
24865 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24866 of mode class checks.
24867 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24868 instead of a list of mode class checks.
24869 (expand_vector_scalar_condition): Likewise.
24870 (type_for_widest_vector_mode): Handle BImode as an inner mode.
24872 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24873 Alan Hayward <alan.hayward@arm.com>
24874 David Sherwood <david.sherwood@arm.com>
24876 * machmode.h (mode_size): Change from unsigned short to
24878 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24879 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24880 or if measurement_type is not polynomial.
24881 (fixed_size_mode::includes_p): Check for constant-sized modes.
24882 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24883 return a poly_uint16 rather than an unsigned short.
24884 (emit_mode_size): Change the type of mode_size from unsigned short
24885 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
24886 (emit_mode_adjustments): Cope with polynomial vector sizes.
24887 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24889 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24891 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24892 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24893 * caller-save.c (setup_save_areas): Likewise.
24894 (replace_reg_with_saved_mem): Likewise.
24895 * calls.c (emit_library_call_value_1): Likewise.
24896 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24897 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24898 (gen_lowpart_for_combine): Likewise.
24899 * convert.c (convert_to_integer_1): Likewise.
24900 * cse.c (equiv_constant, cse_insn): Likewise.
24901 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24902 (cselib_subst_to_values): Likewise.
24903 * dce.c (word_dce_process_block): Likewise.
24904 * df-problems.c (df_word_lr_mark_ref): Likewise.
24905 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24906 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24907 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24908 (rtl_for_decl_location): Likewise.
24909 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24910 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24911 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24912 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24913 (expand_expr_real_1): Likewise.
24914 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24915 (pad_below): Likewise.
24916 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24917 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24918 * ira.c (get_subreg_tracking_sizes): Likewise.
24919 * ira-build.c (ira_create_allocno_objects): Likewise.
24920 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24921 (ira_sort_regnos_for_alter_reg): Likewise.
24922 * ira-costs.c (record_operand_costs): Likewise.
24923 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24924 (resolve_simple_move): Likewise.
24925 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24926 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24927 (lra_constraints): Likewise.
24928 (CONST_POOL_OK_P): Reject variable-sized modes.
24929 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24930 (add_pseudo_to_slot, lra_spill): Likewise.
24931 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24932 * optabs-query.c (get_best_extraction_insn): Likewise.
24933 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24934 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24935 (expand_mult_highpart, valid_multiword_target_p): Likewise.
24936 * recog.c (offsettable_address_addr_space_p): Likewise.
24937 * regcprop.c (maybe_mode_change): Likewise.
24938 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24939 * regrename.c (build_def_use): Likewise.
24940 * regstat.c (dump_reg_info): Likewise.
24941 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24942 (find_reloads, find_reloads_subreg_address): Likewise.
24943 * reload1.c (eliminate_regs_1): Likewise.
24944 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24945 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24946 (simplify_binary_operation_1, simplify_subreg): Likewise.
24947 * targhooks.c (default_function_arg_padding): Likewise.
24948 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24949 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24950 (verify_gimple_assign_ternary): Likewise.
24951 * tree-inline.c (estimate_move_cost): Likewise.
24952 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24953 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24954 (get_address_cost_ainc): Likewise.
24955 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24956 (vect_supportable_dr_alignment): Likewise.
24957 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24958 (vectorizable_reduction): Likewise.
24959 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24960 (vectorizable_operation, vectorizable_load): Likewise.
24961 * tree.c (build_same_sized_truth_vector_type): Likewise.
24962 * valtrack.c (cleanup_auto_inc_dec): Likewise.
24963 * var-tracking.c (emit_note_insn_var_location): Likewise.
24964 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24965 (ADDR_VEC_ALIGN): Likewise.
24967 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24968 Alan Hayward <alan.hayward@arm.com>
24969 David Sherwood <david.sherwood@arm.com>
24971 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24973 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24974 or if measurement_type is polynomial.
24975 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24976 * combine.c (make_extraction): Likewise.
24977 * dse.c (find_shift_sequence): Likewise.
24978 * dwarf2out.c (mem_loc_descriptor): Likewise.
24979 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24980 (extract_bit_field, extract_low_bits): Likewise.
24981 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24982 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24983 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24984 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24985 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24986 * reload.c (find_reloads): Likewise.
24987 * reload1.c (alter_reg): Likewise.
24988 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24989 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24990 * tree-if-conv.c (predicate_mem_writes): Likewise.
24991 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24992 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24993 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24994 * valtrack.c (dead_debug_insert_temp): Likewise.
24995 * varasm.c (mergeable_constant_section): Likewise.
24996 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24998 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24999 Alan Hayward <alan.hayward@arm.com>
25000 David Sherwood <david.sherwood@arm.com>
25002 * expr.c (expand_assignment): Cope with polynomial mode sizes
25003 when assigning to a CONCAT.
25005 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25006 Alan Hayward <alan.hayward@arm.com>
25007 David Sherwood <david.sherwood@arm.com>
25009 * machmode.h (mode_precision): Change from unsigned short to
25011 (mode_to_precision): Return a poly_uint16 rather than an unsigned
25013 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
25014 or if measurement_type is not polynomial.
25015 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
25016 in which the mode is already known to be a scalar_int_mode.
25017 * genmodes.c (emit_mode_precision): Change the type of mode_precision
25018 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
25020 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
25021 for GET_MODE_PRECISION.
25022 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
25023 for GET_MODE_PRECISION.
25024 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
25026 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
25027 (expand_field_assignment, make_extraction): Likewise.
25028 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
25029 (get_last_value): Likewise.
25030 * convert.c (convert_to_integer_1): Likewise.
25031 * cse.c (cse_insn): Likewise.
25032 * expr.c (expand_expr_real_1): Likewise.
25033 * lra-constraints.c (simplify_operand_subreg): Likewise.
25034 * optabs-query.c (can_atomic_load_p): Likewise.
25035 * optabs.c (expand_atomic_load): Likewise.
25036 (expand_atomic_store): Likewise.
25037 * ree.c (combine_reaching_defs): Likewise.
25038 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
25039 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
25040 * tree.h (type_has_mode_precision_p): Likewise.
25041 * ubsan.c (instrument_si_overflow): Likewise.
25043 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25044 Alan Hayward <alan.hayward@arm.com>
25045 David Sherwood <david.sherwood@arm.com>
25047 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
25048 polynomial numbers of units.
25049 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
25050 (valid_vector_subparts_p): New function.
25051 (build_vector_type): Remove temporary shim and take the number
25052 of units as a poly_uint64 rather than an int.
25053 (build_opaque_vector_type): Take the number of units as a
25054 poly_uint64 rather than an int.
25055 * tree.c (build_vector_from_ctor): Handle polynomial
25056 TYPE_VECTOR_SUBPARTS.
25057 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
25058 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
25059 (build_vector_from_val): If the number of units is variable,
25060 use build_vec_duplicate_cst for constant operands and
25061 VEC_DUPLICATE_EXPR otherwise.
25062 (make_vector_type): Remove temporary is_constant ().
25063 (build_vector_type, build_opaque_vector_type): Take the number of
25064 units as a poly_uint64 rather than an int.
25065 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
25067 * cfgexpand.c (expand_debug_expr): Likewise.
25068 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
25069 (store_constructor, expand_expr_real_1): Likewise.
25070 (const_scalar_mask_from_tree): Likewise.
25071 * fold-const-call.c (fold_const_reduction): Likewise.
25072 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
25073 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
25074 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
25075 (fold_relational_const): Likewise.
25076 (native_interpret_vector): Likewise. Change the size from an
25077 int to an unsigned int.
25078 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
25079 TYPE_VECTOR_SUBPARTS.
25080 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
25081 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
25082 duplicating a non-constant operand into a variable-length vector.
25083 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
25084 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
25085 * ipa-icf.c (sem_variable::equals): Likewise.
25086 * match.pd: Likewise.
25087 * omp-simd-clone.c (simd_clone_subparts): Likewise.
25088 * print-tree.c (print_node): Likewise.
25089 * stor-layout.c (layout_type): Likewise.
25090 * targhooks.c (default_builtin_vectorization_cost): Likewise.
25091 * tree-cfg.c (verify_gimple_comparison): Likewise.
25092 (verify_gimple_assign_binary): Likewise.
25093 (verify_gimple_assign_ternary): Likewise.
25094 (verify_gimple_assign_single): Likewise.
25095 * tree-pretty-print.c (dump_generic_node): Likewise.
25096 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25097 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
25098 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
25099 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
25100 (vect_shift_permute_load_chain): Likewise.
25101 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
25102 (expand_vector_condition, optimize_vector_constructor): Likewise.
25103 (lower_vec_perm, get_compute_type): Likewise.
25104 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
25105 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
25106 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
25107 (vect_recog_mask_conversion_pattern): Likewise.
25108 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
25109 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
25110 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25111 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
25112 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
25113 (vectorizable_shift, vectorizable_operation, vectorizable_store)
25114 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
25115 (supportable_widening_operation): Likewise.
25116 (supportable_narrowing_operation): Likewise.
25117 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
25119 * varasm.c (output_constant): Likewise.
25121 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25122 Alan Hayward <alan.hayward@arm.com>
25123 David Sherwood <david.sherwood@arm.com>
25125 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
25126 so that both the length == 3 and length != 3 cases set up their
25127 own permute vectors. Add comments explaining why we know the
25128 number of elements is constant.
25129 (vect_permute_load_chain): Likewise.
25131 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25132 Alan Hayward <alan.hayward@arm.com>
25133 David Sherwood <david.sherwood@arm.com>
25135 * machmode.h (mode_nunits): Change from unsigned char to
25137 (ONLY_FIXED_SIZE_MODES): New macro.
25138 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
25139 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
25140 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
25142 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
25143 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
25144 or if measurement_type is not polynomial.
25145 * genmodes.c (ZERO_COEFFS): New macro.
25146 (emit_mode_nunits_inline): Make mode_nunits_inline return a
25148 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
25149 Use ZERO_COEFFS when emitting initializers.
25150 * data-streamer.h (bp_pack_poly_value): New function.
25151 (bp_unpack_poly_value): Likewise.
25152 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
25153 for GET_MODE_NUNITS.
25154 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
25155 for GET_MODE_NUNITS.
25156 * tree.c (make_vector_type): Remove temporary shim and make
25157 the real function take the number of units as a poly_uint64
25158 rather than an int.
25159 (build_vector_type_for_mode): Handle polynomial nunits.
25160 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
25161 * emit-rtl.c (const_vec_series_p_1): Likewise.
25162 (gen_rtx_CONST_VECTOR): Likewise.
25163 * fold-const.c (test_vec_duplicate_folding): Likewise.
25164 * genrecog.c (validate_pattern): Likewise.
25165 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
25166 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
25167 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
25168 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
25169 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
25170 * rtlanal.c (subreg_get_info): Likewise.
25171 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25172 (vect_grouped_load_supported): Likewise.
25173 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
25174 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
25175 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
25176 (simplify_const_unary_operation, simplify_binary_operation_1)
25177 (simplify_const_binary_operation, simplify_ternary_operation)
25178 (test_vector_ops_duplicate, test_vector_ops): Likewise.
25179 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
25180 instead of CONST_VECTOR_NUNITS.
25181 * varasm.c (output_constant_pool_2): Likewise.
25182 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
25183 explicit-encoded elements in the XVEC for variable-length vectors.
25185 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25187 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
25189 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25190 Alan Hayward <alan.hayward@arm.com>
25191 David Sherwood <david.sherwood@arm.com>
25193 * coretypes.h (fixed_size_mode): Declare.
25194 (fixed_size_mode_pod): New typedef.
25195 * builtins.h (target_builtins::x_apply_args_mode)
25196 (target_builtins::x_apply_result_mode): Change type to
25197 fixed_size_mode_pod.
25198 * builtins.c (apply_args_size, apply_result_size, result_vector)
25199 (expand_builtin_apply_args_1, expand_builtin_apply)
25200 (expand_builtin_return): Update accordingly.
25202 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25204 * cse.c (hash_rtx_cb): Hash only the encoded elements.
25205 * cselib.c (cselib_hash_rtx): Likewise.
25206 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
25207 CONST_VECTOR encoding.
25209 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25210 Jeff Law <law@redhat.com>
25213 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
25214 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
25215 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
25216 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
25219 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
25220 explicitly probe *sp in a noreturn function if there were any callee
25221 register saves or frame pointer is needed.
25223 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25226 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
25227 BLKmode for ternary, binary or unary expressions.
25230 * var-tracking.c (delete_vta_debug_insn): New inline function.
25231 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
25232 insns from get_insns () to NULL instead of each bb separately.
25233 Use delete_vta_debug_insn. No longer static.
25234 (vt_debug_insns_local, variable_tracking_main_1): Adjust
25235 delete_vta_debug_insns callers.
25236 * rtl.h (delete_vta_debug_insns): Declare.
25237 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
25238 instead of variable_tracking_main.
25240 2018-01-03 Martin Sebor <msebor@redhat.com>
25242 PR tree-optimization/83603
25243 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
25244 arguments past the endof the argument list in functions declared
25245 without a prototype.
25246 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
25247 Avoid checking when arguments are null.
25249 2018-01-03 Martin Sebor <msebor@redhat.com>
25252 * doc/extend.texi (attribute const): Fix a typo.
25253 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
25254 issuing -Wsuggest-attribute for void functions.
25256 2018-01-03 Martin Sebor <msebor@redhat.com>
25258 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
25259 offset_int::from instead of wide_int::to_shwi.
25260 (maybe_diag_overlap): Remove assertion.
25261 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
25262 * gimple-ssa-sprintf.c (format_directive): Same.
25263 (parse_directive): Same.
25264 (sprintf_dom_walker::compute_format_length): Same.
25265 (try_substitute_return_value): Same.
25267 2018-01-03 Jeff Law <law@redhat.com>
25269 PR middle-end/83654
25270 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
25271 non-constant residual for zero at runtime and avoid probing in
25272 that case. Reorganize code for trailing problem to mirror handling
25275 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25277 PR tree-optimization/83501
25278 * tree-ssa-strlen.c (get_string_cst): New.
25279 (handle_char_store): Call get_string_cst.
25281 2018-01-03 Martin Liska <mliska@suse.cz>
25283 PR tree-optimization/83593
25284 * tree-ssa-strlen.c: Include tree-cfg.h.
25285 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
25286 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
25287 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
25289 (strlen_dom_walker::before_dom_children): Call
25290 gimple_purge_dead_eh_edges. Dump tranformation with details
25292 (strlen_dom_walker::before_dom_children): Update call by adding
25293 new argument cleanup_eh.
25294 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
25296 2018-01-03 Martin Liska <mliska@suse.cz>
25299 * cif-code.def (VARIADIC_THUNK): New enum value.
25300 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
25303 2018-01-03 Jan Beulich <jbeulich@suse.com>
25305 * sse.md (mov<mode>_internal): Tighten condition for when to use
25306 vmovdqu<ssescalarsize> for TI and OI modes.
25308 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25310 Update copyright years.
25312 2018-01-03 Martin Liska <mliska@suse.cz>
25315 * ipa-visibility.c (function_and_variable_visibility): Skip
25316 functions with noipa attribure.
25318 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25320 * gcc.c (process_command): Update copyright notice dates.
25321 * gcov-dump.c (print_version): Ditto.
25322 * gcov.c (print_version): Ditto.
25323 * gcov-tool.c (print_version): Ditto.
25324 * gengtype.c (create_file): Ditto.
25325 * doc/cpp.texi: Bump @copying's copyright year.
25326 * doc/cppinternals.texi: Ditto.
25327 * doc/gcc.texi: Ditto.
25328 * doc/gccint.texi: Ditto.
25329 * doc/gcov.texi: Ditto.
25330 * doc/install.texi: Ditto.
25331 * doc/invoke.texi: Ditto.
25333 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25335 * vector-builder.h (vector_builder::m_full_nelts): Change from
25336 unsigned int to poly_uint64.
25337 (vector_builder::full_nelts): Update prototype accordingly.
25338 (vector_builder::new_vector): Likewise.
25339 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
25340 (vector_builder::operator ==): Likewise.
25341 (vector_builder::finalize): Likewise.
25342 * int-vector-builder.h (int_vector_builder::int_vector_builder):
25343 Take the number of elements as a poly_uint64 rather than an
25345 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
25346 from unsigned int to poly_uint64.
25347 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
25348 (vec_perm_indices::new_vector): Likewise.
25349 (vec_perm_indices::length): Likewise.
25350 (vec_perm_indices::nelts_per_input): Likewise.
25351 (vec_perm_indices::input_nelts): Likewise.
25352 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
25353 number of elements per input as a poly_uint64 rather than an
25354 unsigned int. Use the original encoding for variable-length
25355 vectors, rather than clamping each individual element.
25356 For the second and subsequent elements in each pattern,
25357 clamp the step and base before clamping their sum.
25358 (vec_perm_indices::series_p): Handle polynomial element counts.
25359 (vec_perm_indices::all_in_range_p): Likewise.
25360 (vec_perm_indices_to_tree): Likewise.
25361 (vec_perm_indices_to_rtx): Likewise.
25362 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
25363 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
25364 (tree_vector_builder::new_binary_operation): Handle polynomial
25365 element counts. Return false if we need to know the number
25366 of elements at compile time.
25367 * fold-const.c (fold_vec_perm): Punt if the number of elements
25368 isn't known at compile time.
25370 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25372 * vec-perm-indices.h (vec_perm_builder): Change element type
25373 from HOST_WIDE_INT to poly_int64.
25374 (vec_perm_indices::element_type): Update accordingly.
25375 (vec_perm_indices::clamp): Handle polynomial element_types.
25376 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25377 (vec_perm_indices::all_in_range_p): Likewise.
25378 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
25380 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
25381 polynomial vec_perm_indices element types.
25382 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
25383 * fold-const.c (fold_vec_perm): Likewise.
25384 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
25385 * tree-vect-generic.c (lower_vec_perm): Likewise.
25386 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25387 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
25388 element type to HOST_WIDE_INT.
25390 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25391 Alan Hayward <alan.hayward@arm.com>
25392 David Sherwood <david.sherwood@arm.com>
25394 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
25395 rather than an int. Use plus_constant.
25396 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
25397 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
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 * calls.c (emit_call_1, expand_call): Change struct_value_size from
25404 a HOST_WIDE_INT to a poly_int64.
25406 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25407 Alan Hayward <alan.hayward@arm.com>
25408 David Sherwood <david.sherwood@arm.com>
25410 * calls.c (load_register_parameters): Cope with polynomial
25411 mode sizes. Require a constant size for BLKmode parameters
25412 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
25413 forces a parameter to be padded at the lsb end in order to
25414 fill a complete number of words, require the parameter size
25415 to be ordered wrt UNITS_PER_WORD.
25417 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25418 Alan Hayward <alan.hayward@arm.com>
25419 David Sherwood <david.sherwood@arm.com>
25421 * reload1.c (spill_stack_slot_width): Change element type
25422 from unsigned int to poly_uint64_pod.
25423 (alter_reg): Treat mode sizes as polynomial.
25425 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25426 Alan Hayward <alan.hayward@arm.com>
25427 David Sherwood <david.sherwood@arm.com>
25429 * reload.c (complex_word_subreg_p): New function.
25430 (reload_inner_reg_of_subreg, push_reload): Use it.
25432 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25433 Alan Hayward <alan.hayward@arm.com>
25434 David Sherwood <david.sherwood@arm.com>
25436 * lra-constraints.c (process_alt_operands): Reject matched
25437 operands whose sizes aren't ordered.
25438 (match_reload): Refer to this check here.
25440 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25441 Alan Hayward <alan.hayward@arm.com>
25442 David Sherwood <david.sherwood@arm.com>
25444 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
25445 that the mode size is in the set {1, 2, 4, 8, 16}.
25447 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25448 Alan Hayward <alan.hayward@arm.com>
25449 David Sherwood <david.sherwood@arm.com>
25451 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
25452 Use plus_constant instead of gen_rtx_PLUS.
25454 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25455 Alan Hayward <alan.hayward@arm.com>
25456 David Sherwood <david.sherwood@arm.com>
25458 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
25459 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
25460 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
25461 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
25462 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
25463 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
25464 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
25465 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
25466 * config/i386/i386.c (ix86_push_rounding): ...this new function.
25467 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
25469 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
25470 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
25471 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
25472 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
25473 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
25474 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
25475 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
25476 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
25477 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
25478 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
25480 * expr.c (emit_move_resolve_push): Treat the input and result
25481 of PUSH_ROUNDING as a poly_int64.
25482 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
25483 (emit_push_insn): Likewise.
25484 * lra-eliminations.c (mark_not_eliminable): Likewise.
25485 * recog.c (push_operand): Likewise.
25486 * reload1.c (elimination_effects): Likewise.
25487 * rtlanal.c (nonzero_bits1): Likewise.
25488 * calls.c (store_one_arg): Likewise. Require the padding to be
25489 known at compile time.
25491 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25492 Alan Hayward <alan.hayward@arm.com>
25493 David Sherwood <david.sherwood@arm.com>
25495 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
25496 Use plus_constant instead of gen_rtx_PLUS.
25498 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25499 Alan Hayward <alan.hayward@arm.com>
25500 David Sherwood <david.sherwood@arm.com>
25502 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
25503 rather than an int.
25505 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25506 Alan Hayward <alan.hayward@arm.com>
25507 David Sherwood <david.sherwood@arm.com>
25509 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
25510 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
25511 via stack temporaries. Treat the mode size as polynomial too.
25513 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25514 Alan Hayward <alan.hayward@arm.com>
25515 David Sherwood <david.sherwood@arm.com>
25517 * expr.c (expand_expr_real_2): When handling conversions involving
25518 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
25519 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
25520 as a poly_uint64 too.
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 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
25528 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25529 Alan Hayward <alan.hayward@arm.com>
25530 David Sherwood <david.sherwood@arm.com>
25532 * combine.c (can_change_dest_mode): Handle polynomial
25533 REGMODE_NATURAL_SIZE.
25534 * expmed.c (store_bit_field_1): Likewise.
25535 * expr.c (store_constructor): Likewise.
25536 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
25537 and polynomial REGMODE_NATURAL_SIZE.
25538 (gen_lowpart_common): Likewise.
25539 * reginfo.c (record_subregs_of_mode): Likewise.
25540 * rtlanal.c (read_modify_subreg_p): Likewise.
25542 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25543 Alan Hayward <alan.hayward@arm.com>
25544 David Sherwood <david.sherwood@arm.com>
25546 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
25547 numbers of elements.
25549 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25550 Alan Hayward <alan.hayward@arm.com>
25551 David Sherwood <david.sherwood@arm.com>
25553 * match.pd: Cope with polynomial numbers of vector elements.
25555 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25556 Alan Hayward <alan.hayward@arm.com>
25557 David Sherwood <david.sherwood@arm.com>
25559 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
25560 in a POINTER_PLUS_EXPR.
25562 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25563 Alan Hayward <alan.hayward@arm.com>
25564 David Sherwood <david.sherwood@arm.com>
25566 * omp-simd-clone.c (simd_clone_subparts): New function.
25567 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
25568 (ipa_simd_modify_function_body): Likewise.
25570 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25571 Alan Hayward <alan.hayward@arm.com>
25572 David Sherwood <david.sherwood@arm.com>
25574 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
25575 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
25576 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
25577 (expand_vector_condition, vector_element): Likewise.
25578 (subparts_gt): New function.
25579 (get_compute_type): Use subparts_gt.
25580 (count_type_subparts): Delete.
25581 (expand_vector_operations_1): Use subparts_gt instead of
25582 count_type_subparts.
25584 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25585 Alan Hayward <alan.hayward@arm.com>
25586 David Sherwood <david.sherwood@arm.com>
25588 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
25589 (vect_compile_time_alias): ...this new function. Do the calculation
25590 on poly_ints rather than trees.
25591 (vect_prune_runtime_alias_test_list): Update call accordingly.
25593 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25594 Alan Hayward <alan.hayward@arm.com>
25595 David Sherwood <david.sherwood@arm.com>
25597 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
25599 (vect_schedule_slp_instance): Likewise.
25601 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25602 Alan Hayward <alan.hayward@arm.com>
25603 David Sherwood <david.sherwood@arm.com>
25605 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
25606 constant and extern definitions for variable-length vectors.
25607 (vect_get_constant_vectors): Note that the number of units
25608 is known to be constant.
25610 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25611 Alan Hayward <alan.hayward@arm.com>
25612 David Sherwood <david.sherwood@arm.com>
25614 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
25615 of units as polynomial. Choose between WIDE and NARROW based
25618 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25619 Alan Hayward <alan.hayward@arm.com>
25620 David Sherwood <david.sherwood@arm.com>
25622 * tree-vect-stmts.c (simd_clone_subparts): New function.
25623 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
25625 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25626 Alan Hayward <alan.hayward@arm.com>
25627 David Sherwood <david.sherwood@arm.com>
25629 * tree-vect-stmts.c (vectorizable_call): Treat the number of
25630 vectors as polynomial. Use build_index_vector for
25631 IFN_GOMP_SIMD_LANE.
25633 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25634 Alan Hayward <alan.hayward@arm.com>
25635 David Sherwood <david.sherwood@arm.com>
25637 * tree-vect-stmts.c (get_load_store_type): Treat the number of
25638 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
25639 for variable-length vectors.
25640 (vectorizable_mask_load_store): Treat the number of units as
25641 polynomial, asserting that it is constant if the condition has
25642 already been enforced.
25643 (vectorizable_store, vectorizable_load): Likewise.
25645 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25646 Alan Hayward <alan.hayward@arm.com>
25647 David Sherwood <david.sherwood@arm.com>
25649 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
25650 of units as polynomial. Punt if we can't tell at compile time
25651 which vector contains the final result.
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 * tree-vect-loop.c (vectorizable_induction): Treat the number
25658 of units as polynomial. Punt on SLP inductions. Use an integer
25659 VEC_SERIES_EXPR for variable-length integer reductions. Use a
25660 cast of such a series for variable-length floating-point
25663 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25664 Alan Hayward <alan.hayward@arm.com>
25665 David Sherwood <david.sherwood@arm.com>
25667 * tree.h (build_index_vector): Declare.
25668 * tree.c (build_index_vector): New function.
25669 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
25670 of units as polynomial, forcibly converting it to a constant if
25671 vectorizable_reduction has already enforced the condition.
25672 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
25673 to create a {1,2,3,...} vector.
25674 (vectorizable_reduction): Treat the number of units as polynomial.
25675 Choose vectype_in based on the largest scalar element size rather
25676 than the smallest number of units. Enforce the restrictions
25679 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25680 Alan Hayward <alan.hayward@arm.com>
25681 David Sherwood <david.sherwood@arm.com>
25683 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
25684 number of units as polynomial.
25686 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25687 Alan Hayward <alan.hayward@arm.com>
25688 David Sherwood <david.sherwood@arm.com>
25690 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
25691 * target.def (autovectorize_vector_sizes): Return the vector sizes
25692 by pointer, using vector_sizes rather than a bitmask.
25693 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
25694 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
25695 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
25697 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
25698 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
25699 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
25700 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
25701 * omp-general.c (omp_max_vf): Likewise.
25702 * omp-low.c (omp_clause_aligned_alignment): Likewise.
25703 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
25704 * tree-vect-loop.c (vect_analyze_loop): Likewise.
25705 * tree-vect-slp.c (vect_slp_bb): Likewise.
25706 * doc/tm.texi: Regenerate.
25707 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
25709 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
25710 the vector size as a poly_uint64 rather than an unsigned int.
25711 (current_vector_size): Change from an unsigned int to a poly_uint64.
25712 (get_vectype_for_scalar_type): Update accordingly.
25713 * tree.h (build_truth_vector_type): Take the size and number of
25714 units as a poly_uint64 rather than an unsigned int.
25715 (build_vector_type): Add a temporary overload that takes
25716 the number of units as a poly_uint64 rather than an unsigned int.
25717 * tree.c (make_vector_type): Likewise.
25718 (build_truth_vector_type): Take the number of units as a poly_uint64
25719 rather than an unsigned int.
25721 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25722 Alan Hayward <alan.hayward@arm.com>
25723 David Sherwood <david.sherwood@arm.com>
25725 * target.def (get_mask_mode): Take the number of units and length
25726 as poly_uint64s rather than unsigned ints.
25727 * targhooks.h (default_get_mask_mode): Update accordingly.
25728 * targhooks.c (default_get_mask_mode): Likewise.
25729 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
25730 * doc/tm.texi: Regenerate.
25732 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25733 Alan Hayward <alan.hayward@arm.com>
25734 David Sherwood <david.sherwood@arm.com>
25736 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
25737 * omp-general.c (omp_max_vf): Likewise.
25738 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
25739 (expand_omp_simd): Handle polynomial safelen.
25740 * omp-low.c (omplow_simd_context): Add a default constructor.
25741 (omplow_simd_context::max_vf): Change from int to poly_uint64.
25742 (lower_rec_simd_input_clauses): Update accordingly.
25743 (lower_rec_input_clauses): Likewise.
25745 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25746 Alan Hayward <alan.hayward@arm.com>
25747 David Sherwood <david.sherwood@arm.com>
25749 * tree-vectorizer.h (vect_nunits_for_cost): New function.
25750 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
25751 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
25752 (vect_analyze_slp_cost): Likewise.
25753 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
25754 (vect_model_load_cost): Likewise.
25756 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25757 Alan Hayward <alan.hayward@arm.com>
25758 David Sherwood <david.sherwood@arm.com>
25760 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
25761 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
25762 from an unsigned int * to a poly_uint64_pod *.
25763 (calculate_unrolling_factor): New function.
25764 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
25766 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25767 Alan Hayward <alan.hayward@arm.com>
25768 David Sherwood <david.sherwood@arm.com>
25770 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
25771 from an unsigned int to a poly_uint64.
25772 (_loop_vec_info::slp_unrolling_factor): Likewise.
25773 (_loop_vec_info::vectorization_factor): Change from an int
25775 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
25776 (vect_get_num_vectors): New function.
25777 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
25778 (vect_get_num_copies): Use vect_get_num_vectors.
25779 (vect_analyze_data_ref_dependences): Change max_vf from an int *
25780 to an unsigned int *.
25781 (vect_analyze_data_refs): Change min_vf from an int * to a
25783 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25784 than an unsigned HOST_WIDE_INT.
25785 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
25786 (vect_analyze_data_ref_dependence): Change max_vf from an int *
25787 to an unsigned int *.
25788 (vect_analyze_data_ref_dependences): Likewise.
25789 (vect_compute_data_ref_alignment): Handle polynomial vf.
25790 (vect_enhance_data_refs_alignment): Likewise.
25791 (vect_prune_runtime_alias_test_list): Likewise.
25792 (vect_shift_permute_load_chain): Likewise.
25793 (vect_supportable_dr_alignment): Likewise.
25794 (dependence_distance_ge_vf): Take the vectorization factor as a
25795 poly_uint64 rather than an unsigned HOST_WIDE_INT.
25796 (vect_analyze_data_refs): Change min_vf from an int * to a
25798 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
25799 vfm1 as a poly_uint64 rather than an int. Make the same change
25800 for the returned bound_scalar.
25801 (vect_gen_vector_loop_niters): Handle polynomial vf.
25802 (vect_do_peeling): Likewise. Update call to
25803 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
25804 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
25806 * tree-vect-loop.c (vect_determine_vectorization_factor)
25807 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
25808 (vect_get_known_peeling_cost): Likewise.
25809 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
25810 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
25811 (vect_transform_loop): Likewise. Use the lowest possible VF when
25812 updating the upper bounds of the loop.
25813 (vect_min_worthwhile_factor): Make static. Return an unsigned int
25814 rather than an int.
25815 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
25816 polynomial unroll factors.
25817 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
25818 (vect_make_slp_decision): Likewise.
25819 (vect_supported_load_permutation_p): Likewise, and polynomial
25821 (vect_analyze_slp_cost): Handle polynomial vf.
25822 (vect_slp_analyze_node_operations): Likewise.
25823 (vect_slp_analyze_bb_1): Likewise.
25824 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25825 than an unsigned HOST_WIDE_INT.
25826 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
25827 (vectorizable_load): Handle polynomial vf.
25828 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
25830 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
25832 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25833 Alan Hayward <alan.hayward@arm.com>
25834 David Sherwood <david.sherwood@arm.com>
25836 * match.pd: Handle bit operations involving three constants
25837 and try to fold one pair.
25839 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25841 * tree-vect-loop-manip.c: Include gimple-fold.h.
25842 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
25843 niters_maybe_zero parameters. Handle other cases besides a step of 1.
25844 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
25845 Add a path that uses a step of VF instead of 1, but disable it
25847 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
25848 and niters_no_overflow parameters. Update calls to
25849 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
25850 Create a new SSA name if the latter choses to use a ste other
25851 than zero, and return it via niters_vector_mult_vf_var.
25852 * tree-vect-loop.c (vect_transform_loop): Update calls to
25853 vect_do_peeling, vect_gen_vector_loop_niters and
25854 slpeel_make_loop_iterate_ntimes.
25855 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
25856 (vect_gen_vector_loop_niters): Update declarations after above changes.
25858 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
25860 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
25861 128-bit round to integer instructions.
25862 (ceil<mode>2): Likewise.
25863 (btrunc<mode>2): Likewise.
25864 (round<mode>2): Likewise.
25866 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25868 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25869 unaligned VSX load/store on P8/P9.
25870 (expand_block_clear): Allow the use of unaligned VSX
25871 load/store on P8/P9.
25873 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25875 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25877 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25878 swap associated with both a load and a store.
25880 2018-01-02 Andrew Waterman <andrew@sifive.com>
25882 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25883 * config/riscv/riscv.md (clear_cache): Use it.
25885 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
25887 * web.c: Remove out-of-date comment.
25889 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25891 * expr.c (fixup_args_size_notes): Check that any existing
25892 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25893 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25894 (emit_single_push_insn): ...here.
25896 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25898 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25899 (const_vector_encoded_nelts): New function.
25900 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25901 (const_vector_int_elt, const_vector_elt): Declare.
25902 * emit-rtl.c (const_vector_int_elt_1): New function.
25903 (const_vector_elt): Likewise.
25904 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25905 of CONST_VECTOR_ELT.
25907 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25909 * expr.c: Include rtx-vector-builder.h.
25910 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25911 directly on the tree encoding.
25912 (const_vector_from_tree): Likewise.
25913 * optabs.c: Include rtx-vector-builder.h.
25914 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25915 sequence of "u" values.
25916 * vec-perm-indices.c: Include rtx-vector-builder.h.
25917 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25918 directly on the vec_perm_indices encoding.
25920 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25922 * doc/rtl.texi (const_vector): Describe new encoding scheme.
25923 * Makefile.in (OBJS): Add rtx-vector-builder.o.
25924 * rtx-vector-builder.h: New file.
25925 * rtx-vector-builder.c: Likewise.
25926 * rtl.h (rtx_def::u2): Add a const_vector field.
25927 (CONST_VECTOR_NPATTERNS): New macro.
25928 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25929 (CONST_VECTOR_DUPLICATE_P): Likewise.
25930 (CONST_VECTOR_STEPPED_P): Likewise.
25931 (CONST_VECTOR_ENCODED_ELT): Likewise.
25932 (const_vec_duplicate_p): Check for a duplicated vector encoding.
25933 (unwrap_const_vec_duplicate): Likewise.
25934 (const_vec_series_p): Check for a non-duplicated vector encoding.
25935 Say that the function only returns true for integer vectors.
25936 * emit-rtl.c: Include rtx-vector-builder.h.
25937 (gen_const_vec_duplicate_1): Delete.
25938 (gen_const_vector): Call gen_const_vec_duplicate instead of
25939 gen_const_vec_duplicate_1.
25940 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25941 (gen_const_vec_duplicate): Use rtx_vector_builder.
25942 (gen_const_vec_series): Likewise.
25943 (gen_rtx_CONST_VECTOR): Likewise.
25944 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25945 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25946 Build a new vector rather than modifying a CONST_VECTOR in-place.
25947 (handle_special_swappables): Update call accordingly.
25948 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25949 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25950 Build a new vector rather than modifying a CONST_VECTOR in-place.
25951 (handle_special_swappables): Update call accordingly.
25953 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25955 * simplify-rtx.c (simplify_const_binary_operation): Use
25956 CONST_VECTOR_ELT instead of XVECEXP.
25958 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25960 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25961 the selector elements to be different from the data elements
25962 if the selector is a VECTOR_CST.
25963 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25964 ssizetype for the selector.
25966 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25968 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25969 before testing each element individually.
25970 * tree-vect-generic.c (lower_vec_perm): Likewise.
25972 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25974 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25975 * selftest-run-tests.c (selftest::run_tests): Call it.
25976 * vector-builder.h (vector_builder::operator ==): New function.
25977 (vector_builder::operator !=): Likewise.
25978 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25979 (vec_perm_indices::all_from_input_p): New function.
25980 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25981 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25982 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25983 instead of reading the VECTOR_CST directly. Detect whether both
25984 vector inputs are the same before constructing the vec_perm_indices,
25985 and update the number of inputs argument accordingly. Use the
25986 utility functions added above. Only construct sel2 if we need to.
25988 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25990 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25991 the broadcast of the low byte.
25992 (expand_mult_highpart): Use an explicit encoding for the permutes.
25993 * optabs-query.c (can_mult_highpart_p): Likewise.
25994 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25995 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25996 (vectorizable_bswap): Likewise.
25997 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25998 explicit encoding for the power-of-2 permutes.
25999 (vect_permute_store_chain): Likewise.
26000 (vect_grouped_load_supported): Likewise.
26001 (vect_permute_load_chain): Likewise.
26003 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26005 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
26006 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
26007 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
26008 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
26009 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
26010 (vect_gen_perm_mask_any): Likewise.
26012 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26014 * int-vector-builder.h: New file.
26015 * vec-perm-indices.h: Include int-vector-builder.h.
26016 (vec_perm_indices): Redefine as an int_vector_builder.
26017 (auto_vec_perm_indices): Delete.
26018 (vec_perm_builder): Redefine as a stand-alone class.
26019 (vec_perm_indices::vec_perm_indices): New function.
26020 (vec_perm_indices::clamp): Likewise.
26021 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
26022 (vec_perm_indices::new_vector): New function.
26023 (vec_perm_indices::new_expanded_vector): Update for new
26024 vec_perm_indices class.
26025 (vec_perm_indices::rotate_inputs): New function.
26026 (vec_perm_indices::all_in_range_p): Operate directly on the
26027 encoded form, without computing elided elements.
26028 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
26029 encoding. Update for new vec_perm_indices class.
26030 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
26031 the given vec_perm_builder.
26032 (expand_vec_perm_var): Update vec_perm_builder constructor.
26033 (expand_mult_highpart): Use vec_perm_builder instead of
26034 auto_vec_perm_indices.
26035 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
26036 vec_perm_indices instead of auto_vec_perm_indices. Use a single
26037 or double series encoding as appropriate.
26038 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
26039 vec_perm_indices instead of auto_vec_perm_indices.
26040 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26041 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26042 (vect_permute_store_chain): Likewise.
26043 (vect_grouped_load_supported): Likewise.
26044 (vect_permute_load_chain): Likewise.
26045 (vect_shift_permute_load_chain): Likewise.
26046 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
26047 (vect_transform_slp_perm_load): Likewise.
26048 (vect_schedule_slp_instance): Likewise.
26049 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26050 (vectorizable_mask_load_store): Likewise.
26051 (vectorizable_bswap): Likewise.
26052 (vectorizable_store): Likewise.
26053 (vectorizable_load): Likewise.
26054 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
26055 vec_perm_indices instead of auto_vec_perm_indices. Use
26056 tree_to_vec_perm_builder to read the vector from a tree.
26057 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
26058 vec_perm_builder instead of a vec_perm_indices.
26059 (have_whole_vector_shift): Use vec_perm_builder and
26060 vec_perm_indices instead of auto_vec_perm_indices. Leave the
26061 truncation to calc_vec_perm_mask_for_shift.
26062 (vect_create_epilog_for_reduction): Likewise.
26063 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
26064 from auto_vec_perm_indices to vec_perm_indices.
26065 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
26066 instead of changing individual elements.
26067 (aarch64_vectorize_vec_perm_const): Use new_vector to install
26068 the vector in d.perm.
26069 * config/arm/arm.c (expand_vec_perm_d::perm): Change
26070 from auto_vec_perm_indices to vec_perm_indices.
26071 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
26072 instead of changing individual elements.
26073 (arm_vectorize_vec_perm_const): Use new_vector to install
26074 the vector in d.perm.
26075 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
26076 Update vec_perm_builder constructor.
26077 (rs6000_expand_interleave): Likewise.
26078 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
26079 (rs6000_expand_interleave): Likewise.
26081 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26083 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
26084 to qimode could truncate the indices.
26085 * optabs.c (expand_vec_perm_var): Likewise.
26087 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26089 * Makefile.in (OBJS): Add vec-perm-indices.o.
26090 * vec-perm-indices.h: New file.
26091 * vec-perm-indices.c: Likewise.
26092 * target.h (vec_perm_indices): Replace with a forward class
26094 (auto_vec_perm_indices): Move to vec-perm-indices.h.
26095 * optabs.h: Include vec-perm-indices.h.
26096 (expand_vec_perm): Delete.
26097 (selector_fits_mode_p, expand_vec_perm_var): Declare.
26098 (expand_vec_perm_const): Declare.
26099 * target.def (vec_perm_const_ok): Replace with...
26100 (vec_perm_const): ...this new hook.
26101 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
26102 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
26103 * doc/tm.texi: Regenerate.
26104 * optabs.def (vec_perm_const): Delete.
26105 * doc/md.texi (vec_perm_const): Likewise.
26106 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
26107 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
26108 expand_vec_perm for constant permutation vectors. Assert that
26109 the mode of variable permutation vectors is the integer equivalent
26110 of the mode that is being permuted.
26111 * optabs-query.h (selector_fits_mode_p): Declare.
26112 * optabs-query.c: Include vec-perm-indices.h.
26113 (selector_fits_mode_p): New function.
26114 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
26115 is defined, instead of checking whether the vec_perm_const_optab
26116 exists. Use targetm.vectorize.vec_perm_const instead of
26117 targetm.vectorize.vec_perm_const_ok. Check whether the indices
26118 fit in the vector mode before using a variable permute.
26119 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
26120 vec_perm_indices instead of an rtx.
26121 (expand_vec_perm): Replace with...
26122 (expand_vec_perm_const): ...this new function. Take the selector
26123 as a vec_perm_indices rather than an rtx. Also take the mode of
26124 the selector. Update call to shift_amt_for_vec_perm_mask.
26125 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
26126 Use vec_perm_indices::new_expanded_vector to expand the original
26127 selector into bytes. Check whether the indices fit in the vector
26128 mode before using a variable permute.
26129 (expand_vec_perm_var): Make global.
26130 (expand_mult_highpart): Use expand_vec_perm_const.
26131 * fold-const.c: Includes vec-perm-indices.h.
26132 * tree-ssa-forwprop.c: Likewise.
26133 * tree-vect-data-refs.c: Likewise.
26134 * tree-vect-generic.c: Likewise.
26135 * tree-vect-loop.c: Likewise.
26136 * tree-vect-slp.c: Likewise.
26137 * tree-vect-stmts.c: Likewise.
26138 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
26140 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
26141 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
26142 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
26143 (aarch64_vectorize_vec_perm_const): ...this new function.
26144 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
26145 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26146 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
26147 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
26148 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
26149 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26150 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
26152 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
26153 check for NEON modes.
26154 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
26155 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
26156 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
26157 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
26159 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
26160 the old VEC_PERM_CONST conditions.
26161 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
26162 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
26163 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
26164 (ia64_vectorize_vec_perm_const_ok): Merge into...
26165 (ia64_vectorize_vec_perm_const): ...this new function.
26166 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
26167 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
26168 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
26169 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
26170 * config/mips/mips.c (mips_expand_vec_perm_const)
26171 (mips_vectorize_vec_perm_const_ok): Merge into...
26172 (mips_vectorize_vec_perm_const): ...this new function.
26173 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
26174 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
26175 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
26176 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
26177 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
26178 (rs6000_expand_vec_perm_const): Delete.
26179 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
26181 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26182 (altivec_expand_vec_perm_const_le): Take each operand individually.
26183 Operate on constant selectors rather than rtxes.
26184 (altivec_expand_vec_perm_const): Likewise. Update call to
26185 altivec_expand_vec_perm_const_le.
26186 (rs6000_expand_vec_perm_const): Delete.
26187 (rs6000_vectorize_vec_perm_const_ok): Delete.
26188 (rs6000_vectorize_vec_perm_const): New function.
26189 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
26190 an element count and rtx array.
26191 (rs6000_expand_extract_even): Update call accordingly.
26192 (rs6000_expand_interleave): Likewise.
26193 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
26194 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
26195 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
26196 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
26197 (rs6000_expand_vec_perm_const): Delete.
26198 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
26199 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26200 (altivec_expand_vec_perm_const_le): Take each operand individually.
26201 Operate on constant selectors rather than rtxes.
26202 (altivec_expand_vec_perm_const): Likewise. Update call to
26203 altivec_expand_vec_perm_const_le.
26204 (rs6000_expand_vec_perm_const): Delete.
26205 (rs6000_vectorize_vec_perm_const_ok): Delete.
26206 (rs6000_vectorize_vec_perm_const): New function. Remove stray
26207 reference to the SPE evmerge intructions.
26208 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
26209 an element count and rtx array.
26210 (rs6000_expand_extract_even): Update call accordingly.
26211 (rs6000_expand_interleave): Likewise.
26212 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
26213 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
26215 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26217 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26219 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
26220 vector mode and that that mode matches the mode of the data
26222 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
26223 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
26224 directly using expand_vec_perm_1 when forcing selectors into
26226 (expand_vec_perm_var): New function, split out from expand_vec_perm.
26228 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26230 * optabs-query.h (can_vec_perm_p): Delete.
26231 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
26232 * optabs-query.c (can_vec_perm_p): Split into...
26233 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
26234 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
26235 particular selector is valid.
26236 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26237 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26238 (vect_grouped_load_supported): Likewise.
26239 (vect_shift_permute_load_chain): Likewise.
26240 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
26241 (vect_transform_slp_perm_load): Likewise.
26242 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26243 (vectorizable_bswap): Likewise.
26244 (vect_gen_perm_mask_checked): Likewise.
26245 * fold-const.c (fold_ternary_loc): Likewise. Don't take
26246 implementations of variable permutation vectors into account
26247 when deciding which selector to use.
26248 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
26249 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
26250 with a false third argument.
26251 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
26252 to test whether the constant selector is valid and can_vec_perm_var_p
26253 to test whether a variable selector is valid.
26255 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26257 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
26258 * optabs-query.c (can_vec_perm_p): Likewise.
26259 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
26260 instead of vec_perm_indices.
26261 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
26262 (vect_gen_perm_mask_checked): Likewise,
26263 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
26264 (vect_gen_perm_mask_checked): Likewise,
26266 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26268 * optabs-query.h (qimode_for_vec_perm): Declare.
26269 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
26270 (qimode_for_vec_perm): ...this new function.
26271 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
26273 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26275 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
26276 does not have a conditional at the top.
26278 2018-01-02 Richard Biener <rguenther@suse.de>
26280 * ipa-inline.c (big_speedup_p): Fix expression.
26282 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
26285 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
26288 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
26292 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
26293 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
26294 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
26295 cond_taken_branch_cost 3->4.
26297 2018-01-01 Jakub Jelinek <jakub@redhat.com>
26299 PR tree-optimization/83581
26300 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
26301 TODO_cleanup_cfg if any changes have been made.
26303 PR middle-end/83608
26304 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
26305 convert_modes if target mode has the right side, but different mode
26308 PR middle-end/83609
26309 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
26310 last argument when extracting from CONCAT. If either from_real or
26311 from_imag is NULL, use expansion through memory. If result is not
26312 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
26313 the parts directly to inner mode, if even that fails, use expansion
26316 PR middle-end/83623
26317 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
26318 check for bswap in mode rather than HImode and use that in expand_unop
26321 Copyright (C) 2018 Free Software Foundation, Inc.
26323 Copying and distribution of this file, with or without modification,
26324 are permitted in any medium without royalty provided the copyright
26325 notice and this notice are preserved.