1 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3 * genattrtab.c (mk_attr_alt): Use alternative_mask.
4 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
6 (check_attr_test): Use alternative_mask.
7 (get_attr_value): Likewise.
8 (compute_alternative_mask): Use alternative_mask and XWINT.
9 (make_alternative_compare): Use alternative_mask.
10 (attr_alt_subset_p): Use XWINT.
11 (attr_alt_subset_of_compl_p): Likewise.
12 (attr_alt_intersection): Use alternative_mask and XWINT.
13 (attr_alt_union): Likewise.
14 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
15 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
16 (simplify_test_exp): Use alternative_mask and XWINT.
17 (write_test_expr): Use alternative_mask and XWINT, adjust bit
18 number calculation to support 64 bits. Generate code that
20 (main): Use alternative_mask.
21 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
23 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
26 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
27 RETURN+USE when returning via %r14.
29 2018-09-24 Martin Liska <mliska@suse.cz>
31 * gcov.c (output_lines): Print colorization legend
32 for both flag_use_colors and flag_use_hotness_colors.
35 2018-09-24 Martin Liska <mliska@suse.cz>
37 * coverage.c (get_coverage_counts): Use warning_at
38 with current_function_decl location. Use %qD in warning
41 2018-09-24 Martin Liska <mliska@suse.cz>
43 * memory-block.h (memory_block_pool::release): Annotate with
44 valgrind that the memory is not accessible.
46 2018-09-24 Martin Liska <mliska@suse.cz>
49 * asan.c: Make asan_handled_variables extern.
51 * cfgexpand.c (expand_stack_vars): Make sure
52 a representative is unpoison if another
53 variable in the partition is handled by
54 use-after-scope sanitization.
56 2018-09-24 Richard Biener <rguenther@suse.de>
58 PR tree-optimization/63155
59 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
60 the worklist when the edge of the respective argument isn't
63 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
65 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
66 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
67 (MASK_CLASS_P): Update for rename.
68 (MAYBE_MASK_CLASS_P): Ditto.
69 (REG_CLASS_NAMES): Update.
70 (REG_CLASS_CONTENT): Update.
71 * config/i386/i386.c (regclass_map): Update for MASK_REG
72 and ALL_MASK_REGS rename.
73 * config/i386/constraints.md (Yk): Update for rename.
76 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
78 * config/i386/i386.h (enum reg_class): Remove
79 EVEX_SSE_REGS and MOD4_SSE_REGS.
80 (REG_CLASS_NAMES): Update.
81 (REG_CLASS_CONTENT): Update.
82 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
83 registers as ALL_SSE_REGS.
84 (ix86_additional_allocno_class_p): Remove.
85 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
86 (ix86_register_priority): Lower priority of EVEX SSE registers.
87 Use IN_RANGE macro where appropriate.
88 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
90 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
91 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
92 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
93 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
94 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
95 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
96 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
97 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
98 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
99 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
100 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
101 * config/i386/constraints.md (Yh): Remove.
103 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
105 * config/i386/i386.c (regclass_map): Declare integer REX registers
108 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
110 * doc/service.texi (Service): Switch the fsf.org link to https.
112 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
115 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
116 Define to speculation_safe_value_not_needed.
118 2018-09-21 Florian Weimer <fweimer@redhat.com>
121 * doc/extend.texi (Common Function Attributes): Mention that
122 noreturn suppresses tail call optimization.
124 2018-09-21 Jeff Law <law@redhat.com>
126 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
127 vr_values::cleanup_edges_and_switches.
128 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
130 (identify_jump_threads): Remove EDGE_IGNORE handling.
131 (execute_vrp): Move handling of to_remove_edges and
132 to_update_switch_stmts into vr_values class member functions.
133 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
134 (to_update_switch_stmts): Likewise.
135 * vr-values.c: Include cfghooks.h.
136 (vr_values::vr_values): Initialize to_remove_edges and
137 to_update_switch_stmts.
138 (vr_values::~vr_values): Verify to_remove_edges and
139 to_update_switch_stmts are empty.
140 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
141 (vr_values::cleanup_edges_and_switches): New member function.
142 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
143 function. Add new data members.
145 2018-09-21 David Malcolm <dmalcolm@redhat.com>
147 PR tree-optimization/87309
148 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
149 calls with pflags and alt_flags.
150 (selftest::test_capture_of_dump_calls): Add test of interaction of
151 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
153 2018-09-21 Olivier Hainque <hainque@adacore.com>
155 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
157 2018-09-21 Olivier Hainque <hainque@adacore.com>
159 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
161 2018-09-21 Olivier Hainque <hainque@adacore.com>
163 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
164 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
165 (VXWORKS_LIBS_RTP): Minor reordering.
167 2018-09-21 Olivier Hainque <hainque@adacore.com>
169 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
170 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
172 2018-09-21 Olivier Hainque <hainque@adacore.com>
174 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
175 (PTRDIFF_TYPE): Likewise.
177 2018-09-21 Olivier Hainque <hainque@adacore.com>
179 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
180 triplet, similar to support for VxWorks7.
181 * config/vxworks-dummy.h: Provide a default definition
182 of TARGET_VXWORKS64 to 0.
184 2018-09-21 Olivier Hainque <hainque@adacore.com>
186 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
187 * config/vxworks-dummy.h: here.
189 2018-09-21 Olivier Hainque <hainque@adacore.com>
191 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
193 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
194 Bo Zhou <zbo.zhou@hisilicon.com>
196 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
197 * config/aarch64/aarch64-tune.md: Regenerated.
198 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
199 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
200 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
202 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
203 Julian Brown <julian@codesourcery.com>
205 * builtins.c (get_builtin_sync_mem): Handle address spaces.
207 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
209 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
210 if the call takes a static chain.
212 2018-09-21 Martin Liska <mliska@suse.cz>
214 * auto-profile.c (autofdo_source_profile::read): Do not
216 (read_profile): Do not add working sets.
217 (read_autofdo_file): Remove sum_all.
218 (afdo_callsite_hot_enough_for_early_inline): Remove const
220 * coverage.c (struct counts_entry): Remove gcov_summary.
221 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
222 do not support GCOV_TAG_PROGRAM_SUMMARY.
223 (get_coverage_counts): Remove summary and expected
225 * coverage.h (get_coverage_counts): Likewise.
226 * doc/gcov-dump.texi: Remove -w option.
227 * gcov-dump.c (dump_working_sets): Remove.
228 (main): Do not support '-w' option.
229 (print_usage): Likewise.
230 (tag_summary): Likewise.
231 * gcov-io.c (gcov_write_summary): Do not dump
233 (gcov_read_summary): Likewise.
234 (gcov_histo_index): Remove.
235 (gcov_histogram_merge): Likewise.
236 (compute_working_sets): Likewise.
237 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
239 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
240 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
241 (GCOV_HISTOGRAM_SIZE): Remove.
242 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
243 (struct gcov_summary): Simplify rapidly just
244 to runs and sum_max fields.
245 (gcov_histo_index): Remove.
246 (NUM_GCOV_WORKING_SETS): Likewise.
247 (compute_working_sets): Likewise.
248 * gcov-tool.c (print_overlap_usage_message): Remove
250 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
251 (output_lines): Remove program related line.
252 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
253 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
255 (input_profile_summary): Do not read it.
256 (merge_profile_summaries): And do not merge it.
257 (input_symtab): Do not call removed function.
258 * modulo-sched.c (sms_schedule): Do not print sum_max.
259 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
260 removed when histogram method was invented.
261 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
263 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
265 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
266 and dump selected value.
267 * profile.c (add_working_set): Remove.
268 (get_working_sets): Likewise.
269 (find_working_set): Likewise.
270 (get_exec_counts): Do not work with working sets.
271 (read_profile_edge_counts): Do not inform as sum_max is removed.
272 (compute_branch_probabilities): Likewise.
273 (compute_value_histograms): Remove argument for call of
275 * profile.h: Do not make gcov_summary const.
277 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
279 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
281 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
283 PR tree-optimization/86990
284 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
285 Check that the entire merged store group is made of constants only for
288 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
290 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
291 (VTABLE_VERIFICATION_SPEC): Likewise.
292 (SANITIZER_EARLY_SPEC): Likewise.
293 (SANITIZER_SPEC): Likewise.
294 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
295 * doc/invoke.texi (Link Options): Document -r.
297 2018-09-20 Richard Biener <rguenther@suse.de>
300 * gimplify.c (gimplify_expr): Retain alignment of
301 addressable lvalue in dereference.
303 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
306 * configure.ac: Check for .loc is_stmt support.
307 * configure, config.in: Rebuilt.
308 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
311 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
313 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
314 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
317 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
319 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
321 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
324 2018-09-20 Marek Polacek <polacek@redhat.com>
326 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
328 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
330 PR tree-optimization/87288
331 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
332 into account when determining PEELING_FOR_NITERS.
334 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
336 PR tree-optimization/86877
337 * tree-vect-loop.c (vect_analyze_loop_2): Call
338 vect_verify_datarefs_alignment.
340 2018-09-19 Marek Polacek <polacek@redhat.com>
342 * doc/invoke.texi: Document -Wclass-conversion.
344 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
346 * config/pa/pa.c (pa_adjust_priority): Delete.
347 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
349 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
350 (atomic_storehi): Likewise.
351 (atomic_storesi): Likewise.
352 (atomic_loaddi): Restore compare and swap exchange loop code.
354 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
356 PR rtl-optimization/86902
357 * combine.c (try_combine): When changing the CC mode used, don't change
358 an unrelated mode in other_insn to that new CC mode.
360 2018-09-19 David Malcolm <dmalcolm@redhat.com>
362 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
363 with %T in place of calls to dump_generic_expr.
364 (prune_runtime_alias_test_list): Likewise.
365 (create_runtime_alias_checks): Likewise.
366 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
367 (vect_analyze_data_ref_dependence): Likewise.
368 (vect_slp_analyze_data_ref_dependence): Likewise.
369 (vect_record_base_alignment): Likewise. Use %G in place of call
371 (vect_compute_data_ref_alignment): Likewise.
372 (verify_data_ref_alignment): Likewise.
373 (vect_find_same_alignment_drs): Likewise.
374 (vect_analyze_group_access_1): Likewise.
375 (vect_analyze_data_ref_accesses): Likewise.
376 (dependence_distance_ge_vf): Likewise.
377 (dump_lower_bound): Likewise.
378 (vect_prune_runtime_alias_test_list): Likewise.
379 (vect_find_stmt_data_reference): Likewise.
380 (vect_analyze_data_refs): Likewise.
381 (vect_create_addr_base_for_vector_ref): Likewise.
382 (vect_create_data_ref_ptr): Likewise.
383 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
384 (vect_can_advance_ivs_p): Likewise.
385 (vect_update_ivs_after_vectorizer): Likewise.
386 (vect_gen_prolog_loop_niters): Likewise.
387 (vect_prepare_for_masked_peels): Likewise.
388 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
389 (vect_determine_vectorization_factor): Likewise.
390 (vect_is_simple_iv_evolution): Likewise.
391 (vect_analyze_scalar_cycles_1): Likewise.
392 (vect_analyze_loop_operations): Likewise.
393 (report_vect_op): Likewise.
394 (vect_is_slp_reduction): Likewise.
395 (check_reduction_path): Likewise.
396 (vect_is_simple_reduction): Likewise.
397 (vect_create_epilog_for_reduction): Likewise.
398 (vect_finalize_reduction:): Likewise.
399 (vectorizable_induction): Likewise.
400 (vect_transform_loop_stmt): Likewise.
401 (vect_transform_loop): Likewise.
402 (optimize_mask_stores): Likewise.
403 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
404 (vect_split_statement): Likewise.
405 (vect_recog_over_widening_pattern): Likewise.
406 (vect_recog_average_pattern): Likewise.
407 (vect_determine_min_output_precision_1): Likewise.
408 (vect_determine_precisions_from_range): Likewise.
409 (vect_determine_precisions_from_users): Likewise.
410 (vect_mark_pattern_stmts): Likewise.
411 (vect_pattern_recog_1): Likewise.
412 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
413 (vect_record_max_nunits): Likewise.
414 (vect_build_slp_tree_1): Likewise.
415 (vect_build_slp_tree_2): Likewise.
416 (vect_print_slp_tree): Likewise.
417 (vect_analyze_slp_instance): Likewise.
418 (vect_detect_hybrid_slp_stmts): Likewise.
419 (vect_detect_hybrid_slp_1): Likewise.
420 (vect_slp_analyze_operations): Likewise.
421 (vect_slp_analyze_bb_1): Likewise.
422 (vect_transform_slp_perm_load): Likewise.
423 (vect_schedule_slp_instance): Likewise.
424 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
425 (vect_mark_stmts_to_be_vectorized): Likewise.
426 (vect_init_vector_1): Likewise.
427 (vect_get_vec_def_for_operand): Likewise.
428 (vect_finish_stmt_generation_1): Likewise.
429 (vect_check_load_store_mask): Likewise.
430 (vectorizable_call): Likewise.
431 (vectorizable_conversion): Likewise.
432 (vectorizable_operation): Likewise.
433 (vectorizable_load): Likewise.
434 (vect_analyze_stmt): Likewise.
435 (vect_is_simple_use): Likewise.
436 (vect_get_vector_types_for_stmt): Likewise.
437 (vect_get_mask_type_for_stmt): Likewise.
438 * tree-vectorizer.c (increase_alignment): Likewise.
440 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
442 * doc/rtl.texi: Adjust vec_select description.
443 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
444 non-constant selectors.
446 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
448 * config/aarch64/aarch64-protos.h
449 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
450 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
451 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
452 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
453 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
454 (AARCH64_FL_PROFILE): Move index so flags are ordered.
455 (AARCH64_ISA_RCPC8_4): New flag.
456 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
457 to aarch64_offset_9bit_signed_unscaled_p.
458 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
460 * config/aarch64/constraints.md (Ust): New constraint.
461 * config/aarch64/predicates.md.
462 (aarch64_9bit_offset_memory_operand): New predicate.
463 (aarch64_rcpc_memory_operand): New predicate.
465 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
467 PR rtl-optimization/87361
468 * rtlanal.c (nonzero_bits1): Revert accidental change.
470 2018-09-19 Richard Biener <rguenther@suse.de>
472 PR tree-optimization/87349
473 PR tree-optimization/87342
474 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
476 2018-09-18 Marek Polacek <polacek@redhat.com>
478 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
479 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
481 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
483 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
485 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
487 PR rtl-optimization/86882
488 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
490 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
492 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
493 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
495 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
498 * doc/invoke.texi (Link Options): Fix formatting and grammar.
500 2018-09-18 Richard Biener <rguenther@suse.de>
503 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
504 (compute_samebase_partition_bases): Likewise.
505 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
506 (gimple_can_coalesce_p): Simplify.
508 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
510 Handle a library implementation of ffs calling __builtin_ffs.
511 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
512 (mmix_init_libfuncs): New function: make __builtin_ffs expand
515 2018-09-17 David Malcolm <dmalcolm@redhat.com>
517 * diagnostic-show-locus.c (class layout_range): Add field
519 (layout_range::layout_range): Add "original_idx" param and use it
520 to initialize new field.
521 (make_range): Use 0 for original_idx.
522 (layout::layout): Pass in index to calls to
523 maybe_add_location_range.
524 (layout::maybe_add_location_range): Add param "original_idx" and
525 pass it on to layout_range.
526 (layout::print_any_labels): Pass on range->m_original_idx to
528 (gcc_rich_location::add_location_if_nearby): Use 0 for
530 * gcc-rich-location.h (text_range_label::get_text): Update for new
532 (range_label_for_type_mismatch::get_text): Likewise.
534 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
536 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
538 2018-09-17 David Malcolm <dmalcolm@redhat.com>
540 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
541 format_string_diagnostic_t.
542 (fmtwarn_n): Likewise.
543 * substring-locations.c
544 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
545 (format_warning_n_va): Convert to...
546 (format_string_diagnostic_t::emit_warning_n_va): ...this.
547 (format_warning_va): Convert to...
548 (format_string_diagnostic_t::emit_warning_va): ...this.
549 (format_warning_at_substring): Convert to...
550 (format_string_diagnostic_t::emit_warning): ...this.
551 (format_warning_at_substring_n): Convert to...
552 (format_string_diagnostic_t::emit_warning_n): ...this.
553 * substring-locations.h (class format_string_diagnostic_t): New
555 (format_warning_va): Convert to
556 format_string_diagnostic_t::emit_warning_va.
557 (format_warning_n_va): Convert to
558 format_string_diagnostic_t::emit_warning_n_va.
559 (format_warning_at_substring): Convert to
560 format_string_diagnostic_t::emit_warning.
561 (format_warning_at_substring_n): Convert to
562 format_string_diagnostic_t::emit_warning_n.
564 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
565 Bernd Schmidt <bernds_cb1@t-online.de>
567 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
570 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
572 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
573 operand 0 predicate to nonimmediate operand.
574 (rint<mode>2_frndint): Remove insn pattern.
575 (rint<mode>2): Change operand 1 predicate to general_operand.
576 Extend operand 1 to XFmode and generate rintxf2 insn.
577 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
578 Do not use X87MODEF mode macro.
579 (frndintxf2_<rounding>_i387): Rename from
580 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
581 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
582 to XFmode and generate significandxf3 insn.
584 2018-09-17 Richard Biener <rguenther@suse.de>
586 PR tree-optimization/87328
587 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
588 visiting unexecutable backedges when not iterating.
589 (do_rpo_vn): Mark all edges not executable even when not
592 2018-09-17 Martin Jambor <mjambor@suse.cz>
595 * doc/invoke.texi (Warning Options): Likewise.
597 2018-09-17 Richard Biener <rguenther@suse.de>
599 PR tree-optimization/87301
600 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
601 clean EH info from leftover copy assignments.
603 2018-09-17 Martin Liska <mliska@suse.cz>
605 PR gcov-profile/85871
606 * gcov.c (output_intermediate_file): Fix out of bounds
609 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
611 * config/arc/arc.c: Object attributes for core4 not reflected
613 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
616 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
618 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
620 2018-09-17 Martin Liska <mliska@suse.cz>
622 * doc/gcov.texi: Document new option --use-hotness-colors.
623 * gcov.c (struct source_info): Declare new field.
624 (source_info::source_info): Set default for maximum_count.
625 (print_usage): Add new -q option.
626 (process_args): Process it.
627 (accumulate_line_info): Save src->maximum_count.
628 (output_line_beginning): Make color line number if
629 flag_use_hotness_colors is set.
630 (output_line_details): Pass default argument value.
631 (output_lines): Pass src->maximum_count.
633 2018-09-17 Martin Liska <mliska@suse.cz>
635 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
636 Use processor_names table.
637 * config/i386/i386.c (ix86_default_align): Use
638 processor_cost_table for alignment values.
639 (ix86_option_override_internal): Use processor_names.
640 (ix86_function_specific_print): Likewise.
641 * config/i386/i386.h (struct processor_costs):
642 Add alignment values.
643 (struct ptt): Remove and replace with const char *.
644 * config/i386/x86-tune-costs.h (struct processor_costs):
645 Declare default alignments for all costs.
647 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
649 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
650 symbolics or VR_VARYING ranges for ABS_EXPR.
651 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
652 when range will wrap.
654 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
657 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
658 before and after a JUMP_TABLE_DATA.
660 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
663 * dojump.c (do_compare_and_jump): Canonicalize function pointers
664 when one operand is a function pointer. Use POINTER_TYPE_P and
665 FUNC_OR_METHOD_TYPE_P.
666 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
667 * fold-const.c (build_range_check): Likewise.
668 * match.pd (simple_comparison): Likewise.
670 2018-09-14 David Malcolm <dmalcolm@redhat.com>
673 * spellcheck.c (get_edit_distance_cutoff): New function.
674 (selftest::test_edit_distance_unit_test_oneway): Rename to...
675 (selftest::test_get_edit_distance_one_way): ...this.
676 (selftest::test_get_edit_distance_unit): Rename to...
677 (selftest::test_get_edit_distance_both_ways): ...this.
678 (selftest::test_edit_distances): Move tests to this new function,
679 and test some more pairs of strings. Update for above renaming.
680 (selftest::get_old_cutoff): New function.
681 (selftest::test_get_edit_distance_cutoff): New function.
682 (selftest::assert_suggested_for): New function.
683 (ASSERT_SUGGESTED_FOR): New macro.
684 (selftest::assert_not_suggested_for): New function.
685 (ASSERT_NOT_SUGGESTED_FOR): New macro.
686 (selftest::test_suggestions): New function.
687 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
688 tests to selftest::test_edit_distances and call it. Add calls to
689 selftest::test_get_edit_distance_cutoff and
690 selftest::test_suggestions.
691 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
692 (best_match::consider): Replace hard-coded cutoff calculation with
694 (best_match::get_cutoff): New declaration.
695 (best_match::get_best_meaningful_candidate): Likewise.
697 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
699 * builtins.c (fold_builtin_strlen): Remove TODO comment.
701 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
704 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
706 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
707 terminated string literal.
709 2018-09-14 Martin Sebor <msebor@redhat.com>
711 * builtins.c (unterminated_array): Handle ARRAY_REF.
712 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
713 * builtins.h (unterminated_array): Declare extern.
714 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
716 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
719 2018-09-14 Martin Sebor <msebor@redhat.com>
720 Jeff Law <law@redhat.com>
722 * builtins.c (unterminated_array): New.
723 (expand_builtin_strcpy): Adjust.
724 (expand_builtin_strcpy_args): Detect unterminated arrays.
725 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
727 * gimple-fold.h (get_maxval_strlen): Add argument.
728 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
730 * gimple-fold.c (get_range_strlen): Add argument.
731 (get_maxval_strlen): Adjust.
732 * gimple-fold.h (get_range_strlen): Add argument.
734 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
736 * config/i386/movdirintrin.h: Fix copyright year.
738 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
740 * reg-stack.c: Include regs.h.
741 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
742 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
743 FIRST_STACK_REG, not DFmode.
744 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
745 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
746 (change stack): Default register mode to the reg_raw_mode of
747 FIRST_STACK_REG, not DFmode.
748 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
749 (*swapxf): Rename from swapxf.
751 2018-09-14 Carl Love <cel@us.ibm.com>
753 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
754 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
756 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
759 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
762 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
765 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
767 2018-09-14 Jason Merrill <jason@redhat.com>
769 Fix --enable-gather-detailed-mem-stats.
770 * hash-table.c (hash_table_usage): Change from variable to function.
771 * hash-table.h: Adjust.
772 * Makefile.in: Add missing dependencies on hash-table.h.
774 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
776 PR tree-optimization/87259
778 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
779 execute_cse_reciprocals_1 has tried transforming.
781 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
783 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
784 VR_VARYING for PLUS/MINUS_EXPR.
786 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
788 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
791 2018-09-14 Richard Biener <rguenther@suse.de>
794 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
795 bits for the merged partition.
797 2018-09-13 Martin Sebor <msebor@redhat.com>
798 Bernd Edlinger <bernd.edlinger@hotmail.de>
800 * builtins.h (c_srlen): Add argument.
801 * builtins.c (warn_string_no_nul): New function.
802 (c_strlen): Add argument and use it. Update recursive calls.
803 Pass DECL argument to string_constant to get info on non
804 terminated strings. Update *NONSTR as needed.
805 (fold_builtin_strlen): Add argument to calls to c_strlen.
806 Warn for unterminated arrays.
807 (warn_string_no_null): Add prototype.
808 * expr.c (string_constant): Update arguments. Update recursive
809 calls appropriately. Detect missing NUL terminator and outermost
810 declaration its missing in.
811 Improve checks for arrays with nonzero lower bound or elements
812 that are not a single byte. Simplify offset computation.
813 Simplify checks for non-NUL terminated strings.
814 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
815 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
817 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
819 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
821 * fold-const.c (c_getstr): Fix function comment. Remove unused third
822 argument. Fix range checks.
823 * fold-const.h (c_getstr): Adjust protoype.
824 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
825 string is constant but contains no NUL byte.
827 * expr.c (string_constant): Adjust function comment.
828 Remove bogus check for zero termination.
830 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
832 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
833 (get_constant_size): Don't make STRING_CSTs larger than they are.
834 (check_string_literal): New check function for STRING_CSTs.
835 (output_constant): Use it.
837 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
840 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
842 2018-09-13 Richard Biener <rguenther@suse.de>
844 PR tree-optimization/87263
845 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
846 (struct unwind_state): Add max_rpo field.
847 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
848 Compute max_rpo, the max RPO number a block can be backwards reached
849 from. Re-write non-iterating mode to a RPO ordered worklist approach,
850 separating it from the iterating mode.
852 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
854 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
855 (rfs_decision): New scheduling decision.
857 2018-09-13 Richard Biener <rguenther@suse.de>
860 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
861 (vn_nary_op_insert_pieces_predicated): Do not write useless
862 valid_dominated_by_p entry outside of the allocated storage.
864 2018-09-13 Omar Sandoval <osandov@osandov.com>
865 Tom de Vries <tdevries@suse.de>
868 * dwarf2out.c (is_c): New function.
869 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
871 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
874 * config/aarch64/aarch64.md (*aarch64_bfxil):
876 * config/aarch64/constraints.md (Ulc): Define.
877 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
879 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
882 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
884 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
885 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
886 aarch64_layout_frame call.
887 (aarch64_expand_epilogue): Likewise.
888 (aarch64_initial_elimination_offset): Likewise.
889 (aarch64_get_separate_components): Likewise.
890 (aarch64_use_return_insn_p): Likewise.
891 (aarch64_layout_frame): Remove unneeded check.
893 2018-09-13 Jakub Jelinek <jakub@redhat.com>
895 * configure.ac: Only append
896 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
897 gcc_config_arguments if it was never reconfigured or last reconfigure
898 was with different arguments.
899 * configure: Regenerated.
901 2018-09-13 Jakub Jelinek <jakub@redhat.com>
902 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
905 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
906 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
908 2018-09-13 Jakub Jelinek <jakub@redhat.com>
910 PR tree-optimization/87287
911 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
912 X % C == 0 to X % (unsigned) C == 0 optimization to ...
913 * match.pd (X % C == 0): ... here. New optimization.
915 2018-09-12 Jakub Jelinek <jakub@redhat.com>
918 * expr.h (maybe_optimize_mod_cmp): Declare.
919 * expr.c (mod_inv): New function.
920 (maybe_optimize_mod_cmp): New function.
921 (do_store_flag): Use it.
922 * cfgexpand.c (expand_gimple_cond): Likewise.
924 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
925 Julian Brown <julian@codesourcery.com>
928 * gimplify.c (gimplify_scan_omp_clauses): Set
929 target_firstprivatize_array_bases in OpenACC parallel and kernels
930 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
931 OpenACC data regions.
933 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
935 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
936 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
938 2018-09-12 Richard Biener <rguenther@suse.de>
940 PR tree-optimization/87280
941 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
942 edge but unreachable target.
943 (do_rpo_vn): For conservatively handling a PHI only mark
944 the backedge executable but not the block reachable.
946 2018-09-12 Richard Biener <rguenther@suse.de>
948 PR tree-optimization/87266
949 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
952 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
954 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
956 ("trunc<BFP:mode><DFP_ALL:mode>2")
957 ("trunc<DFP_ALL:mode><BFP:mode>2")
958 ("extend<BFP:mode><DFP_ALL:mode>2")
959 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
960 according to the target operand type.
962 2018-09-12 Jakub Jelinek <jakub@redhat.com>
963 Andreas Krebbel <krebbel@linux.ibm.com>
965 PR tree-optimization/86844
966 * gimple-ssa-store-merging.c
967 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
968 there are any overlapping stores in between them, make sure they are
969 also coalesced or we give up completely.
971 2018-09-12 Jakub Jelinek <jakub@redhat.com>
974 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
975 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
977 2018-09-12 Tom de Vries <tdevries@suse.de>
979 * common.opt (gdescribe-dies): Add option.
980 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
981 attribute for artifical and nameless decls.
982 (dwarf2out_register_external_die): Add description attribute to
983 external reference die.
984 (add_desc_attribute): New functions.
985 (gen_subprogram_die): Add description attribute to
986 DW_TAG_call_site_parameter.
987 * tree-pretty-print.c (print_generic_expr_to_str): New function.
988 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
989 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
991 (@item -gdescribe-dies): Add.
993 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
995 * tree-vrp.c (vrp_shift_undefined_p): Remove.
996 (extract_range_from_binary_expr_1: Call
997 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
998 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
1001 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
1003 * gimple-ssa-warn-alloca.c
1004 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
1005 field for ALLOCA_BOUND_*_LARGE.
1007 2018-09-11 Nathan Sidwell <nathan@acm.org>
1009 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
1011 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
1013 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
1014 for clobbers. Remove obsolete comment.
1016 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
1018 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
1019 mpxchk, mpxld and mpxst types.
1020 (define_attr length_immediate): Remove all processing of mpx types.
1021 (define_attr prefix_0f): Ditto.
1022 (define_attr memory): Ditto.
1024 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
1026 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
1027 (log<mode>2): Change operand 1 predicate to general_operand.
1028 Extend operand 1 to XFmode and generate logxf3 insn.
1029 (log10<mode>2): Change operand 1 predicate to general_operand.
1030 Extend operand 1 to XFmode and generate log10xf3 insn.
1031 (log2<mode>2): Change operand 1 predicate to general_operand.
1032 Extend operand 1 to XFmode and generate log2xf3 insn.
1033 (fyl2xp1_extend<mode>xf3_i387): Remove.
1034 (log1p<mode>2): Change operand 1 predicate to general_operand.
1035 Extend operand 1 to XFmode and generate log1pxf3 insn.
1036 (fxtract_extend<mode>xf3_i387): Remove.
1037 (logb<mode>2): Change operand 1 predicate to general_operand.
1038 Extend operand 1 to XFmode and generate logbxf3 insn.
1039 (ilogb<mode>2): Change operand 1 predicate to general_operand.
1040 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
1041 (significand<mode>2): Change operand 1 predicate to general_operand.
1042 Extend operand 1 to XFmode and generate significandxf3 insn.
1044 2018-09-11 Nathan Sidwell <nathan@acm.org>
1046 * gcc.c (perror_with_name, pfatal_with_name): Delete.
1047 (load_specs): Use fatal_error.
1048 (DELETE_IF_ORDINARY, process_command): Use error.
1049 (execute, run_attempt): Use fatal_error.
1051 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
1053 * diagnostic-core.h (sorry_at): New prototype.
1054 * diagnostic.c (sorry_at): New function.
1056 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
1058 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
1059 by zero as VR_UNDEFINED.
1061 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
1063 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
1064 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
1065 (<sincos>mode2): New expander.
1066 (sincos_extend<mode>xf3_i387): Remove insn pattern.
1067 (sincos -> sin, cos splitters): Remove splitter patterns.
1068 (sincos<mode>3): Change operand 2 predicate to general_operand.
1069 Extend operand 2 to XFmode and generate sincosxf3 insn.
1070 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
1071 Change operand 3 predicate to const1_operand.
1072 (fptan_extend<mode>xf4_i387): Remove insn pattern.
1073 (tanxf2): Update operands in the call to fptanxf4_i387.
1074 (tan<mode>2): Change operand 1 predicate to general_operand.
1075 Extend operand 1 to XFmode and generate tanxf3 insn.
1076 (atan2xf3): Rename from *fpatanxf3_i387.
1077 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
1078 (atan2xf3): Remove expander.
1079 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
1080 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
1081 (atan<mode>2): Change operand 1 predicate to general_operand.
1082 Extend operand 1 to XFmode and generate atanxf3 insn.
1084 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
1086 * config/i386/i386.md (x87/SSE constant load splitter): Use
1087 memory_operand instead of nonimmediate_operand for input operand
1090 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
1092 * config/i386/i386.md (float partial SSE register stall splitter): Move
1093 splitter near its instruction pattern.
1094 (float_extend partial SSE register stall splitter): Ditto.
1095 (float_truncate partial SSE register stall splitter): Ditto.
1097 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
1100 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1101 to speculation_safe_value_not_needed.
1104 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
1105 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
1106 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
1107 leaf_function_p, instead use has_hard_reg_initial_val.
1109 2018-09-09 Nathan Sidwell <nathan@acm.org>
1111 * gcc.h (pfatal_with_name): Don't declare here.
1112 * gcc.c (pfatal_with_name): Make static.
1114 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
1116 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
1119 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
1121 PR rtl-optimization/85458
1122 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
1123 priority hook to reduce the priority of EXPR.
1125 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
1127 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
1128 DImode for x87 on 32bit targets. Conditionally disable x87 modes
1129 with X87_ENABLE_FLOAT. Remove preparation code.
1130 (*float<SWI48:mode><MODEF:mode>2): Rename from
1131 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
1132 math using "enabled" attribute.
1133 (*floatdi<MODEF:mode>2_i387): Rename from
1134 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
1135 enable for 32bit targets only.
1136 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
1138 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
1139 as operand 1 predicate. Rewrite as define_insn_and_split.
1140 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
1142 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
1144 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
1145 to fallthru to FLOAT case.
1147 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
1150 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
1151 around folding of vec_sl to handle out of range shift values.
1153 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
1155 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
1156 Update callers to gen_fix_trunc<mode>_i387_fisttp
1157 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
1158 nonimmediate_operand.
1159 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
1160 and corresponding splitters.
1161 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
1162 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
1163 (fix_truncdi_i387_with_temp): Remove insn pattern
1164 and corresponding splitters.
1165 (fix_trunc<mode>_i387): Change operand 0 predicate to
1166 nonimmediate_operand.
1167 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
1168 and corresponding splitters.
1169 (*fistdi2_1): Remove.
1171 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
1172 (lrintxfdi2): Remove expander. Reimplement as define_insn.
1173 (*fist<mode>2_1): Remove.
1174 (fist<mode>2): Ditto.
1175 (fist<mode>2_with_temp): Remove insn pattern and corresponding
1177 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
1178 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
1179 (fistdi2_<rounding>): Change operand 0 predicate to
1180 nonimmediate_operand.
1181 (fistdi2_<rounding>_with_temp): Remove insn pattern
1182 and corresponding splitters.
1183 (fist<mode>2_<rounding>): Change operand 0 predicate to
1184 nonimmediate_operand.
1185 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
1186 and corresponding splitters.
1188 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
1190 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1192 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
1195 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
1197 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
1198 early gimple folding of vec_splat().
1199 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
1200 * gimple-fold.h: Add an extern define for tree_vec_extract().
1202 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
1204 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
1205 wrappers around TREE_TYPE comparisons.
1207 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1210 * config/s390/predicates.md: Add nonsym_memory_operand.
1211 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
1212 contains a SYMBOL_REF, load it into an intermediate pseudo.
1213 (s390_emit_compare_and_swap): Legitimize operand.
1214 * config/s390/s390.md: Use the new nonsym_memory_operand
1215 with UNSPECV_CAS patterns.
1217 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1220 * config/s390/s390-passes.def: New file.
1221 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
1223 (make_pass_s390_early_mach): Add declaration.
1224 * config/s390/s390.c (make_pass_s390_early_mach):
1225 (s390_option_override): Remove dynamic registration.
1226 * config/s390/t-s390: Add s390-passes.def.
1228 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1230 * config/s390/s390.c (s390_decompose_constant_pool_ref):
1231 Remove UNSPEC_LTREL_BASE check.
1232 (annotate_constant_pool_refs): Likewise.
1233 (find_constant_pool_ref): Likewise.
1234 (find_ltrel_base): Removed.
1235 (replace_ltrel_base): Removed.
1236 (s390_mainpool_finish): Remove replace_ltrel_base call.
1237 (s390_chunkify_start): Remove pending LTREL_BASE logic.
1238 (s390_chunkify_finish): Remove replace_ltrel_base call.
1239 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
1241 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
1244 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1245 to speculation_safe_value_not_needed.
1247 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
1248 Bernd Schmidt <bernds_cb1@t-online.de>
1250 * config/nvptx/nvptx-opts.h: New file.
1251 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
1252 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
1254 (TARGET_SM35): New macro.
1255 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
1257 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
1259 (misa=): New option.
1260 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
1262 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
1264 * config/i386/i386.md (truncdfsf2): Remove expander.
1265 (truncdfsf2_with_temp): Ditto.
1266 (truncxf<mode>2): Ditto.
1267 (*truncdfsf_fast_mixed): Remove insn pattern.
1268 (*truncdfsf_fast_i387): Ditto.
1269 (*truncdfsf_mixed): Ditto.
1270 (*truncdfsf_i387): Ditto.
1271 (*truncdfsf2_i387_1): Ditto.
1272 (*truncxfsf2_mixed): Ditto.
1273 (*truncxfdf2_mixed): Ditto.
1274 (*truncxf<mode>2_i387_noop): Ditto. Update callers
1275 to call gen_truncxf<mode>2 instead.
1276 (*truncxf<mode>2_i387): Remove.
1277 (reg->reg splitters): Remove splitter pattern.
1278 (reg->mem splitters): Ditto.
1280 (truncdfsf2): New insn pattern.
1281 (truncxf<mode>2): Ditto.
1283 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1285 * tree-ssa-math-opts.c (is_mult_by): New function.
1286 (is_square_of): Use the above.
1287 (optimize_recip_sqrt): New function.
1288 (pass_cse_reciprocals::execute): Use the above.
1290 2018-09-05 Richard Biener <rguenther@suse.de>
1293 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
1294 to zero-init the emplaced vec.
1296 2018-09-05 Martin Liska <mliska@suse.cz>
1298 PR tree-optimization/87205
1299 * tree-switch-conversion.c (pass_lower_switch::execute):
1300 Group cases for switch statements.
1302 2018-09-05 Richard Biener <rguenther@suse.de>
1304 PR tree-optimization/87217
1305 * tree-ssa-sccvn.c (vuse_valueize): New.
1306 (vn_reference_lookup_pieces): Use it.
1307 (vn_reference_lookup): Likewise.
1309 2018-09-05 Nathan Sidwell <nathan@acm.org>
1312 * stor-layout.c (place_field): Scan forwards to check last
1313 bitfield when ms_bitfield_placement is in effect.
1315 2018-09-05 Richard Biener <rguenther@suse.de>
1318 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
1321 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
1322 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
1324 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
1325 * config.gcc (extra_objs): Build it.
1326 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
1328 * config/aarch64/aarch64-passes.def
1329 (pass_tag_collision_avoidance): New pass.
1330 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
1331 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
1332 (aarch64_classify_address): Remove static qualifier.
1333 (aarch64_address_info, aarch64_address_type): Move to...
1334 * config/aarch64/aarch64-protos.h: ... here.
1335 (make_pass_tag_collision_avoidance): New function.
1336 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
1339 2018-09-05 Martin Liska <mliska@suse.cz>
1341 * doc/gcov.texi: Update documentation of humar
1343 * gcov.c (format_count): Print one decimal place, it provides
1344 more fine number of situations like '1G' vs. '1.4G'.
1346 2018-09-05 Martin Liska <mliska@suse.cz>
1349 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
1350 * optc-gen.awk: Allow 'Var' for Deprecated options in order
1351 to generate a MASK value.
1353 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
1356 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
1357 if frame pointer isn't used.
1358 (compute_frame_pointer_to_fb_displacement): Likewise.
1360 2018-09-04 Jakub Jelinek <jakub@redhat.com>
1363 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
1364 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
1365 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
1366 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
1367 and OPTION_MASK_ISA_XSAVEC_UNSET.
1369 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
1371 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
1372 XOR operations in NAND case.
1374 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
1376 * wide-int-range.cc (wide_int_range_convert): New.
1377 * wide-int-range.h (wide_int_range_convert): New.
1378 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
1379 code into wide_int_range_convert.
1380 (extract_range_into_wide_ints): Do not munge anti range constants
1381 into the entire domain. Just return the range back.
1383 2018-09-04 Martin Liska <mliska@suse.cz>
1385 * genmatch.c (output_line_directive): Add new argument
1387 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
1389 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
1391 * doc/invoke.texi (Option Summary): Add whitespace.
1393 * doc/invoke.texi (Option Summary): Add -Waligned-new.
1395 2018-09-04 Richard Biener <rguenther@suse.de>
1397 PR tree-optimization/87211
1398 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
1399 backedge value we're supposed to treat as VARYING also number
1400 the PHI to VARYING in case it got a different value-number already.
1402 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
1404 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
1405 (extract_range_from_binary_expr_1): Do not call
1406 vrp_can_optimize_bit_op.
1407 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
1409 (wide_int_range_get_mask_and_bounds): New.
1410 (wide_int_range_optimize_bit_op): New.
1411 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
1412 (wide_int_range_bit_and): Same.
1413 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
1414 (wide_int_range_optimize_bit_op): New.
1415 (wide_int_range_get_mask_and_bounds): New.
1417 2018-09-04 Richard Biener <rguenther@suse.de>
1419 PR tree-optimization/87176
1420 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
1421 variable. When value-numbering a virtual PHI node make sure
1422 to not value-number to the backedge value.
1424 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
1426 * doc/extend.texi (Long Long, Hex Floats): Document support for
1427 long long and hex floats in more recent versions of ISO C++.
1429 2018-09-03 Richard Biener <rguenther@suse.de>
1431 PR tree-optimization/87177
1432 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
1435 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1437 * bb-reorder.c (edge_order): Convert to C-qsort-style
1438 tri-state comparator.
1439 (reorder_basic_blocks_simple): Change std::stable_sort to
1442 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1444 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
1445 tri-state comparator.
1446 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
1448 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1450 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
1451 (mergesort): ... here as maximum count for using netsort.
1452 (gcc_qsort): Set nlim to 3 if stable sort is requested.
1453 (gcc_stablesort): New.
1454 * system.h (gcc_stablesort): Declare.
1456 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1458 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
1459 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
1460 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
1462 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
1464 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
1465 lxsdx and stxsdx alternatives.
1466 (*mov<mode>_hardfloat64): Ditto.
1467 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
1469 2018-09-03 Richard Biener <rguenther@suse.de>
1471 PR tree-optimization/87200
1472 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
1475 2018-09-03 Martin Liska <mliska@suse.cz>
1477 PR tree-optimization/87201
1478 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
1479 Fix parenthesis in an expression.
1481 2018-09-03 Richard Biener <rguenther@suse.de>
1483 PR tree-optimization/87197
1484 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
1485 visited. CSE the VN_INFO hashtable lookup.
1487 PR tree-optimization/87169
1488 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
1489 iterating make sure there's no extra backedges from irreducible
1490 regions feeding the header. Mark the destination block
1493 2018-09-03 Martin Liska <mliska@suse.cz>
1496 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
1497 * common/common-targhooks.c (default_get_valid_option_values):
1499 * common/common-targhooks.h (default_get_valid_option_values):
1501 * common/config/i386/i386-common.c: Move processor_target_table
1503 (ix86_get_valid_option_values): New function.
1504 (TARGET_GET_VALID_OPTION_VALUES): New macro.
1505 * config/i386/i386.c (struct ptt): Move to i386-common.c.
1506 (PTA_*): Move all defined masks into i386-common.c.
1507 (ix86_function_specific_restore): Use new processor_cost_table.
1508 * config/i386/i386.h (struct ptt): Moved from i386.c.
1509 (struct pta): Likewise.
1510 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
1511 * doc/tm.texi.in: Likewise.
1512 * opt-suggestions.c (option_proposer::suggest_option):
1513 Pass prefix to build_option_suggestions.
1514 (option_proposer::get_completions): Likewise.
1515 (option_proposer::build_option_suggestions): Use the new target
1517 * opts.c (struct option_help_tuple): New struct.
1518 (print_filtered_help): Use the new target hook.
1520 2018-09-03 Martin Liska <mliska@suse.cz>
1523 * predict.c (set_even_probabilities): Add likely_edges
1524 argument and handle cases where we have precisely one
1526 (combine_predictions_for_bb): Catch also likely_edges.
1527 (tree_predict_by_opcode): Handle gswitch statements.
1528 * tree-cfg.h (find_case_label_for_value): New declaration.
1529 (find_taken_edge_switch_expr): Likewise.
1530 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
1531 Find pivot in decision tree based on probabily, not by number of
1534 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
1536 * doc/standards.texi (Standards): Update Objective-C reference.
1538 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1540 * doc/install.texi (Prerequisites): Update link for MPC.
1542 2018-09-01 Michael Matz <matz@suse.de>
1544 PR tree-optimization/87074
1545 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
1546 PHIs for outer-loop uses.
1548 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1550 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
1551 * doc/invoke.texi (C Dialect Options): Ditto.
1553 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1555 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
1557 2018-08-31 Richard Biener <rguenther@suse.de>
1559 PR tree-optimization/87168
1560 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
1561 (rpo_elim::eliminate_avail): When OP was not visited it must
1564 2018-08-31 David Malcolm <dmalcolm@redhat.com>
1566 * tree-vrp.c (copy_value_range): Convert param "from" from
1567 "value_range *" to "const value_range *".
1568 (range_is_null): Likewise for param "vr".
1569 (range_int_cst_p): Likewise.
1570 (range_int_cst_singleton_p): Likewise.
1571 (symbolic_range_p): Likewise.
1572 (value_ranges_intersect_p): Likewise for both params.
1573 (value_range_nonnegative_p): Likewise for param "vr".
1574 (value_range_constant_singleton): Likewise.
1575 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
1576 (extract_range_into_wide_ints): Likewise for param "vr".
1577 (extract_range_from_multiplicative_op): Likewise for params "vr0"
1579 (vrp_can_optimize_bit_op): Likewise.
1580 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
1582 (extract_range_from_unary_expr): Likewise.
1583 (debug_value_range): Likewise for param "vr".
1584 (value_range::dump): Add "const" qualifier.
1585 (vrp_prop::check_array_ref): Convert local "vr" from
1586 "value_range *" to "const value_range *".
1587 (vrp_prop::check_mem_ref): Likewise.
1588 (vrp_prop::visit_stmt): Likewise for local "old_vr".
1589 (vrp_intersect_ranges_1): Likewise for param "vr_1".
1590 (vrp_intersect_ranges): Likewise.
1591 (simplify_stmt_for_jump_threading): Likewise for local "vr".
1592 (vrp_prop::vrp_finalize): Likewise.
1593 * tree-vrp.h (value_range::dump): Add "const" qualifier.
1594 (vrp_intersect_ranges): Add "const" qualifier to params as above.
1595 (extract_range_from_unary_expr): Likewise.
1596 (value_range_constant_singleton): Likewise.
1597 (symbolic_range_p): Likewise.
1598 (copy_value_range): Likewise.
1599 (extract_range_from_binary_expr_1): Likewise.
1600 (range_int_cst_p): Likewise.
1601 (vrp_set_zero_nonzero_bits): Likewise.
1602 (range_int_cst_singleton_p): Likewise.
1604 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
1606 * config/aarch64/arm_neon.h (vabsd_s64): New.
1607 (vnegd_s64): Likewise.
1609 2018-08-31 Martin Jambor <mjambor@suse.cz>
1611 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
1613 2018-08-31 Martin Liska <mliska@suse.cz>
1615 * ipa-icf.c (sem_item::add_type): Use
1616 sem_item::m_type_hash_cache.
1617 * ipa-icf.h: Move the cache from sem_item_optimizer
1620 2018-08-31 Nathan Sidwell <nathan@acm.org>
1622 * doc/extend.texi (Backwards Compatibility): Remove implicit
1623 extern C leeway of () being (...).
1625 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1627 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
1629 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
1633 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
1635 2018-08-31 Jakub Jelinek <jakub@redhat.com>
1638 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
1639 gen_int_mode. Formatting fixes.
1641 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
1643 * target.def (custom_function_descriptors): Improve documentation.
1644 * doc/tm.texi.in (Trampolines): Expand discussion of function
1645 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
1646 beginning of the section.
1647 * doc/tm.texi: Regenerated.
1649 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
1651 * cfg.h (class auto_edge_flag): Spell out the template-id of the
1652 base class in the initializer list. This is a workaround for
1653 building with older GCC.
1654 (class auto_bb_flag): Likewise.
1656 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
1658 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
1659 (altivec_vcmpequ<VI_char>_p): Remove star.
1660 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
1662 (expand_strncmp_vec_sequence): New function.
1663 (emit_final_str_compare_vec): New function.
1664 (expand_strn_compare): Add support for vector strncmp.
1665 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
1666 length specification to bytes.
1667 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
1668 (vcmpnezb_p): New pattern.
1669 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
1670 for option -mstring-compare-inline-limit.
1672 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
1674 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
1675 (PTA_SKYLAKE): Add PTA_AES.
1676 (PTA_GOLDMONT): Likewise.
1678 2018-08-29 Jan Hubicka <jh@suse.cz>
1681 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
1682 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
1684 2018-08-29 Jan Hubicka <jh@suse.cz>
1686 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
1688 (hash_tree): Do not visit TYPE_STUB_DECL.
1689 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
1690 stream TYPE_STUB_DECL.
1691 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
1692 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
1693 after free_lang_data.
1694 (type_in_anonymous_namespace_p): Likewise.
1696 2018-08-29 Jan Hubicka <jh@suse.cz>
1698 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1699 comment that it has to be even number.
1700 (class sreal): Change m_sig type to int32_t.
1701 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1702 int64_t for temporary calculations.
1703 (sreal_verify_basics): Drop one bit from minimum and maximum.
1705 2018-08-30 Richard Biener <rguenther@suse.de>
1707 PR tree-optimization/87147
1708 * tree-ssa-sccvn.c (SSA_VISITED): New function.
1709 (visit_phi): When the degenerate result is from the backedge and
1710 we didn't visit its definition yet drop to VARYING.
1711 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
1713 2018-08-29 Jan Hubicka <jh@suse.cz>
1715 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
1717 (hash_tree): Likewise.
1719 2018-08-29 Jan Hubicka <jh@suse.cz>
1721 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
1722 and TYPE_NEXT_REF_TO.
1724 2018-08-29 Jan Hubicka <jh@suse.cz>
1726 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1727 comment that it has to be even number.
1728 (class sreal): Change m_sig type to int32_t.
1729 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1730 int64_t for temporary calculations.
1731 (sreal_verify_basics): Drop one bit from minimum and maximum.
1733 2018-08-30 Tamar Christina <tamar.christina@arm.com>
1735 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
1737 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
1740 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
1741 if to_add is negative.
1743 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
1746 * builtins.c (c_strlen): Improve range checks.
1748 2018-08-29 Martin Sebor <msebor@redhat.com>
1749 Jeff Law <law@redhat.com>
1751 PR tree-optimization/86714
1752 PR tree-optimization/86711
1753 * builtins.c (c_strlen): Add arguments to call to string_constant.
1754 * expr.c (string_constant): Add argument. Detect missing nul
1755 terminator and outermost declaration it's missing in.
1756 * expr.h (string_constant): Add argument.
1757 * fold-const.c (read_from_constant_string): Add arguments to call to
1759 (c_getstr): Likewise.
1760 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1762 * tree-ssa-strlen.c (get_stridx): Likewise.
1764 2018-08-29 Jan Hubicka <jh@suse.cz>
1766 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
1767 Do not stream DECL_VINDEX.
1768 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
1769 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
1770 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
1772 2018-08-29 Richard Biener <rguenther@suse.de>
1774 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
1775 virtual operands that are not default defs to honor region
1777 (rpo_vn_valueize): Remove ineffective code here.
1779 2018-08-29 Richard Biener <rguenther@suse.de>
1781 PR tree-optimization/87132
1782 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
1783 when skipping defs reachable over backedges.
1785 2018-08-29 Richard Biener <rguenther@suse.de>
1787 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
1788 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
1789 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
1790 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
1791 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
1792 (vn_reference_lookup_3): Remove use of const_parms.
1793 (free_rpo_vn): Do not free const_parms.
1794 (do_rpo_vn): Do not call init_const_parms.
1795 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
1796 SSA_NAME_POINTS_TO_READONLY_MEMORY.
1797 (call_may_clobber_ref_p_1): Likewise.
1799 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
1802 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
1804 (-ftree-scev-cprop): Document.
1806 2018-08-29 Jan Hubicka <jh@suse.cz>
1808 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
1810 (sreal constructor): Update.
1811 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
1812 sreal:operator/): Update.
1814 2018-08-29 Martin Liska <mliska@suse.cz>
1816 * tree-switch-conversion.c (switch_conversion::expand):
1817 Strenghten assumption about gswitch statements.
1819 2018-08-29 Richard Biener <rguenther@suse.de>
1821 PR tree-optimization/87117
1822 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1823 re-value-number released SSA VDEFs.
1825 2018-08-29 Richard Biener <rguenther@suse.de>
1827 PR tree-optimization/87126
1828 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
1830 2018-08-28 Jim Wilson <jimw@sifive.com>
1832 * config/riscv/pic.md: Rewrite.
1833 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
1835 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
1836 (SOFTF, default_load, softload, softstore): New.
1838 2018-08-28 Jeff Law <law@redhat.com>
1840 * fold-const.c (fold_binary_loc): Remove recently added assert.
1842 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
1844 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
1845 to OP parmeter of generated function.
1847 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
1849 PR tree-optimization/87009
1850 * match.pd: Add boolean optimizations.
1852 2018-08-28 Martin Sebor <msebor@redhat.com>
1855 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1856 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1857 (pass_walloca::gate): Use it.
1858 (alloca_call_type): Same.
1859 (pass_walloca::execute): Same.
1860 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1862 2018-08-28 David Malcolm <dmalcolm@redhat.com>
1864 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1865 GCC_VERSION for usage of "__gcc_dump_printf__" format from
1868 2018-08-28 Richard Biener <rguenther@suse.de>
1870 PR tree-optimization/87124
1871 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1872 constants before looking up avail.
1874 2018-08-28 Jakub Jelinek <jakub@redhat.com>
1877 * calls.c (maybe_warn_nonstring_arg): Punt early if
1878 warn_stringop_overflow is zero. Don't call get_range_strlen
1879 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1880 Swap comparison operands to have constants on rhs. Only use
1881 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
1882 increment lenrng[0].
1884 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
1886 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1887 use of tree_to_shwi. Remove duplicated test for the size being
1888 a whole number of bytes.
1890 2018-08-28 Richard Biener <rguenther@suse.de>
1892 PR tree-optimization/87117
1893 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1894 Handle removed stmt without LHS (GIMPLE_NOP).
1896 2018-08-28 Richard Biener <rguenther@suse.de>
1898 PR tree-optimization/87117
1899 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1900 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1902 2018-08-28 Richard Biener <rguenther@suse.de>
1904 PR tree-optimization/87117
1905 * tree-ssa-pre.c (compute_avail): Do not make expressions
1906 with predicated values available.
1907 (get_expr_value_id): Assert we do not run into predicated value
1910 2018-08-28 Richard Biener <rguenther@suse.de>
1912 PR tree-optimization/87117
1913 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1914 get virtual operands.
1915 (get_expr_operands): Handle STRING_CST like other decls.
1917 2018-08-28 Martin Liska <mliska@suse.cz>
1919 * tree.h: Update documentation of fndecl_built_in_p
1923 2018-08-27 Jeff Law <law@redhat.com>
1924 PR tree-optimization/87110
1925 * tree-ssa-dse.c (compute_trims): Handle non-constant
1928 2018-08-27 Martin Sebor <msebor@redhat.com>
1930 PR tree-optimization/86914
1931 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1933 2018-08-27 Martin Sebor <msebor@redhat.com>
1935 PR tree-optimization/87112
1936 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1937 the type of the bound argument.
1939 2018-08-27 Jeff Law <law@redhat.com>
1941 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1942 type does not have a TYPE_SIZE_UNIT.
1944 2018-08-27 Steve Ellcey <sellcey@cavium.com>
1946 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1947 with include of backend.h.
1949 2018-08-27 Richard Biener <rguenther@suse.de>
1951 PR tree-optimization/86927
1952 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1953 use const cond reduction code.
1955 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
1957 PR tree-optimization/85758
1958 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1960 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1963 * diagnostic-show-locus.c (class layout_range): Update for
1964 conversion of show_caret_p to a tri-state.
1965 (layout_range::layout_range): Likewise.
1966 (make_range): Likewise.
1967 (layout::maybe_add_location_range): Likewise.
1968 (layout::should_print_annotation_line_p): Don't show annotation
1969 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1970 (layout::get_state_at_point): Update for conversion of
1971 show_caret_p to a tri-state. Bail out early for
1972 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1973 underlining or source colorization.
1974 (gcc_rich_location::add_location_if_nearby): Update for conversion
1975 of show_caret_p to a tri-state.
1976 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1977 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1979 (selftest::test_one_liner_labels): Likewise.
1980 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1981 conversion of show_caret_p to a tri-state.
1982 * pretty-print.c (text_info::set_location): Likewise.
1983 * pretty-print.h (text_info::set_location): Likewise.
1984 * substring-locations.c (format_warning_n_va): Likewise.
1985 * tree-diagnostic.c (default_tree_printer): Likewise.
1986 * tree-pretty-print.c (newline_and_indent): Likewise.
1988 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1991 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1992 line above for line-insertion fix-it hints.
1993 (selftest::test_fixit_insert_containing_newline): Update the
1994 expected results, and add a test with line-numbering enabled.
1996 2018-08-27 Martin Liska <mliska@suse.cz>
1999 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
2000 params with DECL_HAS_VALUE_EXPR_P.
2002 2018-08-27 Martin Liska <mliska@suse.cz>
2004 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
2005 selected expansion strategy.
2007 2018-08-27 Martin Liska <mliska@suse.cz>
2009 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
2010 * builtins.c (is_builtin_fn): Likewise.
2011 * attribs.c (diag_attr_exclusions): Use new function
2012 fndecl_built_in_p and remove check for FUNCTION_DECL if
2014 (builtin_mathfn_code): Likewise.
2015 (fold_builtin_expect): Likewise.
2016 (fold_call_expr): Likewise.
2017 (fold_builtin_call_array): Likewise.
2018 (fold_call_stmt): Likewise.
2019 (set_builtin_user_assembler_name): Likewise.
2020 (is_simple_builtin): Likewise.
2021 * calls.c (gimple_alloca_call_p): Likewise.
2022 (maybe_warn_nonstring_arg): Likewise.
2023 * cfgexpand.c (expand_call_stmt): Likewise.
2024 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
2025 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
2026 (cgraph_node::verify_node): Likewise.
2027 * cgraphclones.c (build_function_decl_skip_args): Likewise.
2028 (cgraph_node::create_clone): Likewise.
2029 * config/arm/arm.c (arm_insert_attributes): Likewise.
2030 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
2031 * dse.c (scan_insn): Likewise.
2032 * expr.c (expand_expr_real_1): Likewise.
2033 * fold-const.c (operand_equal_p): Likewise.
2034 (fold_binary_loc): Likewise.
2035 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
2036 * gimple-low.c (lower_stmt): Likewise.
2037 * gimple-pretty-print.c (dump_gimple_call): Likewise.
2038 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
2040 * gimple.c (gimple_build_call_from_tree): Likewise.
2041 (gimple_call_builtin_p): Likewise.
2042 (gimple_call_combined_fn): Likewise.
2043 * gimplify.c (gimplify_call_expr): Likewise.
2044 (gimple_boolify): Likewise.
2045 (gimplify_modify_expr): Likewise.
2046 (gimplify_addr_expr): Likewise.
2047 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
2048 * ipa-cp.c (determine_versionability): Likewise.
2049 * ipa-fnsummary.c (compute_fn_summary): Likewise.
2050 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
2051 * ipa-split.c (visit_bb): Likewise.
2052 (split_function): Likewise.
2053 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
2054 * lto-cgraph.c (input_node): Likewise.
2055 * lto-streamer-out.c (write_symbol): Likewise.
2056 * omp-low.c (setjmp_or_longjmp_p): Likewise.
2057 (lower_omp_1): Likewise.
2058 * predict.c (strip_predict_hints): Likewise.
2059 * print-tree.c (print_node): Likewise.
2060 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
2061 * trans-mem.c (is_tm_irrevocable): Likewise.
2062 (is_tm_load): Likewise.
2063 (is_tm_simple_load): Likewise.
2064 (is_tm_store): Likewise.
2065 (is_tm_simple_store): Likewise.
2066 (is_tm_abort): Likewise.
2067 (tm_region_init_1): Likewise.
2068 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
2069 * tree-cfg.c (verify_gimple_call): Likewise.
2070 (move_stmt_r): Likewise.
2071 (stmt_can_terminate_bb_p): Likewise.
2072 * tree-eh.c (lower_eh_constructs_2): Likewise.
2073 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
2074 * tree-inline.c (remap_gimple_stmt): Likewise.
2075 (copy_bb): Likewise.
2076 (estimate_num_insns): Likewise.
2077 (fold_marked_statements): Likewise.
2078 * tree-sra.c (scan_function): Likewise.
2079 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
2080 (optimize_stack_restore): Likewise.
2081 (pass_fold_builtins::execute): Likewise.
2082 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
2083 (mark_all_reaching_defs_necessary_1): Likewise.
2084 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
2085 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
2086 (pass_forwprop::execute): Likewise.
2087 * tree-ssa-loop-im.c (stmt_cost): Likewise.
2088 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
2089 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
2090 * tree-ssa-strlen.c (get_string_length): Likewise.
2091 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
2092 (find_func_aliases_for_call): Likewise.
2093 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
2094 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
2095 * tree-tailcall.c (find_tail_calls): Likewise.
2096 * tree.c (need_assembler_name_p): Likewise.
2097 (free_lang_data_in_decl): Likewise.
2098 (get_call_combined_fn): Likewise.
2099 * ubsan.c (is_ubsan_builtin_p): Likewise.
2100 * varasm.c (incorporeal_function_p): Likewise.
2101 * tree.h (DECL_BUILT_IN): Remove and replace with
2103 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
2104 (fndecl_built_in_p): New.
2106 2018-08-27 Martin Liska <mliska@suse.cz>
2108 PR tree-optimization/86847
2109 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
2110 Dump also subtree probability.
2111 (switch_decision_tree::do_jump_if_equal): New function.
2112 (switch_decision_tree::emit_case_nodes): Handle special
2113 situations in balanced tree that can be emitted much simpler.
2114 Fix calculation of probabilities that happen in tree expansion.
2115 * tree-switch-conversion.h (struct cluster): Add
2117 (struct simple_cluster): Likewise.
2118 (struct case_tree_node): Add new function has_child.
2119 (do_jump_if_equal): New.
2121 2018-08-27 Martin Liska <mliska@suse.cz>
2123 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
2124 Add new argument to bit_test_cluster constructor.
2125 (bit_test_cluster::emit): Set bits really number of values
2127 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
2128 probability argument.
2129 * tree-switch-conversion.h (struct bit_test_cluster):
2130 Add m_handles_entire_switch.
2132 2018-08-27 Martin Liska <mliska@suse.cz>
2134 PR tree-optimization/86702
2135 * tree-switch-conversion.c (jump_table_cluster::emit):
2136 Make probabilities even for values in jump table
2137 according to number of cases handled.
2138 (switch_decision_tree::compute_cases_per_edge): Pass
2139 argument to reset_out_edges_aux function.
2140 (switch_decision_tree::analyze_switch_statement): Likewise.
2141 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
2144 2018-08-27 Martin Liska <mliska@suse.cz>
2146 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
2147 cfun argument explicitly.
2148 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
2149 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
2150 function gimple_switch_default_bb.
2151 (convert_switch_statements):
2153 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
2154 * stmt.c (label_to_block_fn): Use label_to_block and pass
2155 cfun argument explicitly and use gimple_switch_label_bb.
2156 (expand_case): Likewise.
2157 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
2158 cfun argument explicitly. Likewise.
2159 (make_edges_bb): Likewise.
2160 (make_cond_expr_edges): Likewise.
2161 (get_cases_for_edge): Likewise.
2162 (make_gimple_switch_edges): Likewise.
2163 (label_to_block_fn): Likewise.
2164 (label_to_block): Likewise.
2165 (make_goto_expr_edges): Likewise.
2166 (make_gimple_asm_edges): Likewise.
2167 (main_block_label): Likewise.
2168 (group_case_labels_stmt): Likewise.
2169 (find_taken_edge_computed_goto): Likewise.
2170 (find_taken_edge_switch_expr): Likewise.
2171 (gimple_verify_flow_info): Likewise.
2172 (gimple_redirect_edge_and_branch): Likewise.
2173 (gimple_switch_label_bb): New function.
2174 (gimple_switch_default_bb): Likewise.
2175 (gimple_switch_edge): Likewise.
2176 (gimple_switch_default_edge): Likewise.
2177 * tree-cfg.h (label_to_block_fn): Remove and replace ...
2178 (label_to_block): ... with this.
2179 (gimple_switch_label_bb): New.
2180 (gimple_switch_default_bb): Likewise.
2181 (gimple_switch_edge): Likewise.
2182 (gimple_switch_default_edge): Likewise.
2183 * tree-cfgcleanup.c (convert_single_case_switch): Use
2184 new gimple functions and pass new argument to label_to_block.
2185 (cleanup_control_flow_bb):
2186 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
2187 cfun argument explicitly.
2188 (make_eh_edges): Likewise.
2189 (redirect_eh_dispatch_edge): Likewise.
2190 (lower_resx): Likewise.
2191 (lower_eh_dispatch): Likewise.
2192 (maybe_remove_unreachable_handlers): Likewise.
2193 (unsplit_eh): Likewise.
2194 (cleanup_empty_eh): Likewise.
2195 (verify_eh_edges): Likewise.
2196 (verify_eh_dispatch_edge): Likewise.
2197 * tree-ssa-dom.c (record_edge_info): Likewise.
2198 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
2199 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
2200 (thread_through_normal_block): Likewise.
2201 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
2202 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
2203 * tree-switch-conversion.c (switch_conversion::collect): Use new
2205 (switch_conversion::check_final_bb): Likewise.
2206 (switch_conversion::gather_default_values): Pass new argument
2208 (switch_conversion::build_constructors): Likewise.
2209 (switch_decision_tree::compute_cases_per_edge): Use new
2210 gimple_switch_edge function.
2211 (switch_decision_tree::analyze_switch_statement): Pass new argument
2213 (switch_decision_tree::try_switch_expansion): Use
2214 gimple_switch_default_edge.
2215 * tree-vrp.c (find_switch_asserts): Pass new argument
2217 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
2218 (vr_values::simplify_switch_using_ranges): Likewise.
2220 2018-08-27 Richard Biener <rguenther@suse.de>
2222 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
2223 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
2225 * tree-ssa-sccvn.h (struct vn_pval): New structure.
2226 (struct vn_nary_op_s): Add unwind_to member. Add
2227 predicated_values flag and put result into a union together
2228 with a linked list of vn_pval.
2229 (struct vn_ssa_aux): Add name member to make maintaining
2230 a map of SSA name to vn_ssa_aux possible. Remove no longer
2231 needed info, dfsnum, low, visited, on_sccstack, use_processed
2232 and range_info_anti_range_p members.
2233 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
2234 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
2236 (vn_valueize): New global.
2237 (vn_context_bb): Likewise.
2238 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
2239 VN_INFO_PTR_INFO): Remove.
2240 * tree-ssa-sccvn.c: ... (rewrite)
2241 (pass_fre::execute): For -O2+ initialize loops and run
2242 RPO VN in optimistic mode (iterating). For -O1 and -Og
2243 run RPO VN in non-optimistic mode.
2244 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
2245 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
2246 * doc/invoke.texi (sccvn-max-scc-size): Remove.
2247 (rpo-vn-max-loop-depth): Document.
2248 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
2249 when valuezing the VUSE signals we walked out of the region.
2250 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
2251 (phi_translate): Set VN context block to use for availability
2253 (compute_avail): Likewise.
2254 (pre_valueize): New function.
2255 (pass_pre::execute): Adjust to the RPO VN API.
2257 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
2258 (propagate_constants_for_unrolling): Remove.
2259 (tree_unroll_loops_completely): Perform value-numbering
2260 on the unrolled bodies loop parent.
2262 2018-08-27 Richard Biener <rguenther@suse.de>
2264 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
2265 for partial antic compute.
2267 2018-08-27 Jakub Jelinek <jakub@redhat.com>
2269 PR rtl-optimization/87065
2270 * combine.c (simplify_if_then_else): Formatting fix.
2271 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
2273 (known_cond): Don't return const_true_rtx for vector modes. Use
2274 CONST0_RTX instead of const0_rtx. Formatting fixes.
2276 2018-08-27 Martin Liska <mliska@suse.cz>
2278 PR gcov-profile/87069
2279 * gcov.c (process_file): Record files already processed
2280 and warn about a file being processed multiple times.
2282 2018-08-27 Martin Liska <mliska@suse.cz>
2285 * config/aarch64/aarch64.c (aarch64_override_options_internal):
2286 Set default values for x_aarch64_*_string strings.
2287 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
2288 prefix. For -mabi do not print '=ABI' in help and use
2289 <option_value> format for -msve-vector-bits and -moverride
2292 2018-08-26 Jeff Law <law@redhat.com>
2294 * config/mips/frame-header-opt.c: Include "backend.h" rather than
2297 2018-08-26 Marek Polacek <polacek@redhat.com>
2299 PR c++/87029, Implement -Wredundant-move.
2300 * doc/invoke.texi: Document -Wredundant-move.
2302 2018-08-25 Martin Sebor <msebor@redhat.com>
2304 PR tree-optimization/87059
2305 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
2306 to the same type as the other.
2307 * fold-const.c (fold_binary_loc): Assert expectation.
2309 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
2311 * config/darwin.c (machopic_legitimize_pic_address): Clean up
2312 extraneous parentheses, dead code section and formatting.
2314 2018-08-24 David Malcolm <dmalcolm@redhat.com>
2317 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
2318 wide enough for jumps in the line-numbering to be visible.
2319 (layout::print_gap_in_line_numbering): New member function.
2320 (layout::calculate_line_spans): When using line numbering, merge
2321 line spans that are only 1 line apart.
2322 (diagnostic_show_locus): When printing line numbers, show gaps in
2323 line numbering directly, rather than printing headers.
2324 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
2325 line-numbering with multiple line spans.
2326 (selftest::test_fixit_insert_containing_newline_2): Add test of
2327 line-numbering, in which the spans are close enough to be merged.
2329 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
2331 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
2332 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
2333 * tree-vrp.c (range_is_nonnull): Remove.
2334 (range_includes_zero_p): Accept value_range instead of min/max.
2335 (extract_range_from_binary_expr_1): Do not early bail on
2337 Use range_includes_zero_p instead of range_is_nonnull.
2338 (extract_range_from_unary_expr): Use range_includes_zero_p instead
2339 of range_is_nonnull.
2340 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
2341 special case VR_ANTI_RANGE.
2342 (vrp_finalize): Same.
2343 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
2345 (range_is_nonnull): Remove.
2346 * vr-values.c (vrp_stmt_computes_nonzero): Use
2347 range_includes_zero_p instead of range_is_nonnull.
2348 (extract_range_basic): Pass value_range to range_includes_zero_p
2349 instead of range_is_nonnull.
2351 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
2353 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
2354 * emit-rtl.h (rtl_data): Remove return_bnd.
2355 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
2356 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
2357 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
2358 (POINTER_BOUNDS_MODE): Remove definition.
2359 (make_pointer_bounds_mode): Remove.
2360 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
2361 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
2362 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
2363 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
2364 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
2365 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
2366 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
2368 * config/i386/i386-modes.def (BND32, BND64): Remove.
2369 * config/i386/i386.c (dbx_register_map): Remove bound registers.
2370 (dbx64_register_map): Ditto.
2371 (svr4_dbx_register_map): Ditto.
2372 (indirect_thunk_bnd_needed): Remove.
2373 (indirect_thunks_bnd_used): Ditto.
2374 (indirect_return_bnd_needed): Ditto.
2375 (indirect_return_via_cx_bnd): Ditto.
2376 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
2377 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
2378 (output_indirect_thunk): Ditto. Remove need_prefix argument.
2379 (output_indirect_thunk_function): Remove handling of
2380 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
2381 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
2382 (ix86_save_reg): Remove handling of crtl->return_bnd.
2383 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
2384 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
2385 and UNSPEC_BNDLX_ADDR.
2386 (ix86_output_indirect_branch_via_reg): Remove handling of
2387 indirect_thunk_prefix_bnd.
2388 (ix86_output_indirect_branch_via_push): Ditto.
2389 (ix86_output_function_return): Ditto.
2390 (ix86_output_indirect_function_return): Ditto.
2391 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
2392 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
2393 (CALL_USED_REGISTERS): Ditto.
2394 (REG_ALLOC_ORDER): Update for removal of bound registers.
2395 (HI_REGISTER_NAMES): Ditto.
2396 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
2397 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
2398 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
2399 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
2400 (FIRST_PSEUDO_REG): Update.
2401 (BND): Remove mode iterator.
2402 * config/i386/predicates.md (bnd_mem_operator): Remove.
2404 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
2406 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
2409 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
2411 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
2412 the case in which the permute needs only a single element and
2413 repeats for every vector of the result. Extend that case to
2414 handle variable-length vectors.
2415 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2417 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
2420 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
2421 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
2423 2018-08-24 Richard Biener <rguenther@suse.de>
2425 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
2426 bb_flags_allocated members.
2427 (auto_flag): New RAII class for allocating flags.
2428 (auto_edge_flag): New RAII class for allocating edge flags.
2429 (auto_bb_flag): New RAII class for allocating bb flags.
2430 * cfgloop.c (verify_loop_structure): Allocate temporary edge
2432 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
2433 in favor of temporarily allocated BB flag.
2434 * hsa-brig.c: Re-order includes.
2435 * hsa-dump.c: Likewise.
2436 * hsa-regalloc.c: Likewise.
2437 * print-rtl.c: Likewise.
2438 * profile-count.c: Likewise.
2440 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
2443 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
2446 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
2449 * wide-int-range.cc (wide_int_range_div): Do not ignore result
2450 from wide_int_range_multiplicative_op.
2452 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2454 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
2457 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
2459 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
2462 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
2464 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
2465 full GENERIC expression used for replacement.
2467 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
2469 * tree-vrp.c (abs_extent_range): Remove.
2470 (extract_range_into_wide_ints): Pass wide ints by reference.
2471 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
2472 Pass wide ints by reference in all calls to
2473 extract_range_into_wide_ints.
2474 * wide-int-range.cc (wide_int_range_div): New.
2475 * wide-int-range.h (wide_int_range_div): New.
2476 (wide_int_range_includes_zero_p): New.
2477 (wide_int_range_zero_p): New.
2479 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
2481 * config/aarch64/aarch64.md (arches): New enum.
2482 (arch): New enum attr.
2483 (arch_enabled): New attr.
2484 (enabled): Now uses arch_enabled only.
2485 (simd, sve, fp16): Removed attribute.
2486 (fp): Attr now defined in terms of 'arch'.
2487 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
2488 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
2489 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
2490 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
2491 attributes into 'arch'.
2492 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
2493 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
2494 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
2495 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
2496 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
2497 'simd' attribute into 'arch'.
2498 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
2499 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
2500 Convert use of 'fp' attribute to 'arch'.
2501 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
2502 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
2504 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
2505 (different modes) Merge 'fp' and 'simd' into 'arch'.
2506 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
2509 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
2511 PR rtl-optimization/87026
2512 * expmed.c (canonicalize_comparison): If we can no longer create
2513 pseudoregisters, don't.
2515 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
2518 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
2520 * config/arm/arm.c (speculation_barrier_libfunc): New static
2522 (arm_init_libfuncs): Initialize it.
2523 (arm_emit_speculation_barrier): New function.
2524 * config/arm/arm.md (speculation_barrier): Call
2525 arm_emit_speculation_barrier for architectures that do not have
2527 (speculation_barrier_insn): Only match on Armv7 or later.
2529 2018-08-23 Richard Biener <rguenther@suse.de>
2532 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
2535 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
2537 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
2538 of single-vector TBLs.
2539 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
2542 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
2545 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
2546 aarch64_evpc_tbl guard.
2548 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
2550 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
2553 2018-08-22 Martin Sebor <msebor@redhat.com>
2556 * tree-pretty-print.c (pretty_print_string): Add argument.
2557 (dump_generic_node): Call to pretty_print_string with string size.
2559 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
2561 PR rtl-optimization/86771
2562 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
2563 of two SETs into those two SETs, one to be placed at i2, if that SETs
2564 destination is modified between i2 and i3.
2566 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2568 PR tree-optimization/86725
2569 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
2571 (vect_analyze_scalar_cycles_1): Check it.
2573 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2575 PR tree-optimization/86725
2576 * tree-vect-loop.c (vect_is_simple_reduction): When treating
2577 an outer loop phi as a double reduction, make sure that the
2578 single user of the phi result is an inner loop phi.
2580 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2582 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
2583 grouped stores with gaps to a strided group.
2585 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2587 * tree-vect-stmts.c (get_group_load_store_type)
2588 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
2589 first statement in a group.
2591 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2593 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
2594 the sequence used in gcc/gcc.c.
2596 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2599 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
2602 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2604 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
2605 Darwin10-specific unwinder-shim.
2606 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
2607 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
2608 New to cater for Darwin10 Rosetta.
2610 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2612 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
2613 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
2615 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2620 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
2621 (dwarf2out_switch_text_section): Generate a local label for the
2622 second function sub-section and apply it as the second FDE start
2624 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
2625 second sub-section start.
2627 2018-08-22 Richard Biener <rguenther@suse.de>
2629 PR tree-optimization/86988
2630 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
2632 2018-08-22 Richard Biener <rguenther@suse.de>
2634 PR tree-optimization/86945
2635 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
2637 2018-08-22 Alexandre Oliva <oliva@adacore.com>
2639 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
2640 a comment about how uses of r2 for .sdata2 come about.
2642 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
2644 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
2646 2018-08-21 Marek Polacek <polacek@redhat.com>
2648 PR c++/86981, Implement -Wpessimizing-move.
2649 * doc/invoke.texi: Document -Wpessimizing-move.
2651 2018-08-21 Jan Hubicka <jh@suse.cz>
2653 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
2654 * tree.h (is_redundant_typedef): Remove.
2655 * dwarf2out.c (is_redundant_typedef): Turn into static function.
2657 2018-08-21 Jan Hubicka <jh@suse.cz>
2659 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
2662 2018-08-21 Tamar Christina <tamar.christina@arm.com>
2664 * expmed.c (extract_low_bits): Reject invalid subregs early.
2666 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2669 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
2672 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2674 * config/vxworks.h: Guard vxworks_asm_out_constructor and
2675 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
2676 * config/vxworks.c: Likewise.
2678 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2680 * config/vxworks.c: Set targetm.have_ctors_dtors
2681 if HAVE_INITFINI_ARRAY_SUPPORT.
2682 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
2683 if HAVE_INITFINI_ARRAY_SUPPORT.
2685 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2687 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
2688 default search path for VxWorks < 7.
2690 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2692 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
2693 (get_format_string): Refer to c_getstr.
2695 2018-08-21 Tom de Vries <tdevries@suse.de>
2697 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2698 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2699 (debuginfo_early_stop): Declare.
2700 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2701 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2702 (debuginfo_early_stop): New function.
2703 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
2704 and debuginfo_early_stop.
2705 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
2706 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
2707 (general_init): Call debuginfo_early_init.
2708 (finalize): Call debuginfo_fini.
2709 (do_compile): Call debuginfo_init.
2710 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
2712 (@item -fdump-debug, @item -fdump-earlydebug): Add.
2714 2018-08-21 Tom de Vries <tdevries@suse.de>
2716 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
2717 flag_dump_noaddr and flag_dump_unnumbered.
2719 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
2721 * wide-int-range.cc (wide_int_range_abs): New.
2722 (wide_int_range_order_set): Rename from wide_int_range_min_max.
2723 * wide-int-range.h (wide_int_range_abs): New.
2724 (wide_int_range_min_max): New.
2725 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
2726 case to call wide_int_range_abs.
2727 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
2728 (extract_range_from_abs_expr): Delete.
2730 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
2733 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
2734 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
2737 2018-08-20 Nathan Sidwell <nathan@acm.org>
2738 Jeff Law <law@redhat.com>
2740 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
2741 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
2743 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2746 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
2747 (decl_attributes): Likewise.
2748 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
2750 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
2751 * diagnostic-core.h (class auto_diagnostic_group): New class.
2752 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
2753 (diagnostic_report_diagnostic): Handle the first diagnostics within
2755 (emit_diagnostic): Add auto_diagnostic_group instance.
2757 (inform_n): Likewise.
2758 (warning): Likewise.
2759 (warning_at): Likewise.
2760 (warning_n): Likewise.
2761 (pedwarn): Likewise.
2762 (permerror): Likewise.
2764 (error_n): Likewise.
2765 (error_at): Likewise.
2767 (fatal_error): Likewise.
2768 (internal_error): Likewise.
2769 (internal_error_no_backtrace): Likewise.
2770 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
2771 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
2772 * diagnostic.h (struct diagnostic_context): Add fields
2773 "diagnostic_group_nesting_depth",
2774 "diagnostic_group_emission_count", "begin_group_cb",
2776 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
2777 Add auto_diagnostic_group instance(s).
2778 (find_explicit_erroneous_behavior): Likewise.
2779 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
2780 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
2781 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
2782 (gimplify_va_arg_expr): Likewise.
2783 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
2784 (HSA_SORRY_AT): Likewise.
2785 * ipa-devirt.c (compare_virtual_tables): Likewise.
2786 (warn_odr): Likewise.
2787 * multiple_target.c (expand_target_clones): Likewise.
2788 * opts-common.c (cmdline_handle_error): Likewise.
2789 * reginfo.c (globalize_reg): Likewise.
2790 * substring-locations.c (format_warning_n_va): Likewise.
2791 * tree-inline.c (expand_call_inline): Likewise.
2792 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
2793 * tree-ssa-loop-niter.c
2794 (do_warn_aggressive_loop_optimizations): Likewise.
2795 * tree-ssa-uninit.c (warn_uninit): Likewise.
2796 * tree.c (warn_deprecated_use): Likewise.
2798 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
2801 * config/i386/i386.md (eh_return): Always update EH return
2802 address in word_mode.
2804 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
2806 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
2807 TARGET_SPLIT_COMPLEX_ARG is defined.
2809 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2811 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
2813 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2816 * expr.c (expand_assignment): Assert that bitpos is positive.
2817 (store_field): Likewise
2818 (expand_expr_real_1): Make sure that bitpos is positive.
2819 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
2822 2018-08-20 Nathan Sidwell <nathan@acm.org>
2824 * Makefile.in (CPP_ID_DATA_H): Delete.
2825 (CPP_INTERNAL_H): Don't add it.
2826 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
2827 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
2829 2018-08-20 Richard Biener <rguenther@suse.de>
2831 PR tree-optimization/78655
2832 * tree-vrp.c (extract_range_from_binary_expr_1): Make
2833 pointer + offset nonnull if either operand is nonnull work.
2835 2018-08-20 Tom de Vries <tdevries@suse.de>
2837 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
2838 unless the referenced die describes the added property using
2839 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
2840 Otherwise, add a DW_AT_location to the referenced die.
2842 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
2845 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
2846 register_operand when calling ix86_set_reg_reg_cost.
2847 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
2848 Set *total to 0 for operands that satisfy x86_64_immediate_operand
2849 predicate and to 1 otherwise.
2851 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
2853 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2854 emit a diagnostic that it is not supported and reset the option.
2855 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2856 supported and consume the option. (ASM_FINAL_SPEC): New.
2858 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2860 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2863 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
2865 C-SKY port: Documentation
2867 * doc/extend.texi (C-SKY Function Attributes): New section.
2868 * doc/invoke.texi (Option Summary): Add C-SKY options.
2869 (C-SKY Options): New section.
2870 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2872 2018-08-17 Jojo <jijie_rong@c-sky.com>
2873 Huibin Wang <huibin_wang@c-sky.com>
2874 Sandra Loosemore <sandra@codesourcery.com>
2875 Chung-Lin Tang <cltang@codesourcery.com>
2877 C-SKY port: Backend implementation
2879 * config/csky/*: New.
2880 * common/config/csky/*: New.
2882 2018-08-17 Jojo <jijie_rong@c-sky.com>
2883 Huibin Wang <huibin_wang@c-sky.com>
2884 Sandra Loosemore <sandra@codesourcery.com>
2885 Chung-Lin Tang <cltang@codesourcery.com>
2886 Andrew Jenner <andrew@codesourcery.com>
2888 C-SKY port: Configury
2890 * config.gcc (csky-*-*): New.
2891 * configure.ac: Add csky to targets for dwarf2 debug_line support.
2892 * configure: Regenerated.
2894 2018-08-17 David Malcolm <dmalcolm@redhat.com>
2896 * dump-context.h: Include "dumpfile.h".
2897 (dump_context::dump_printf_va): Convert final param from va_list
2898 to va_list *. Convert from ATTRIBUTE_PRINTF to
2899 ATTRIBUTE_GCC_DUMP_PRINTF.
2900 (dump_context::dump_printf_loc_va): Likewise.
2901 * dumpfile.c: Include "stringpool.h".
2902 (make_item_for_dump_printf_va): Delete.
2903 (make_item_for_dump_printf): Delete.
2904 (class dump_pretty_printer): New class.
2905 (dump_pretty_printer::dump_pretty_printer): New ctor.
2906 (dump_pretty_printer::emit_items): New member function.
2907 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2909 (dump_pretty_printer::emit_item): New member function.
2910 (dump_pretty_printer::stash_item): New member function.
2911 (dump_pretty_printer::format_decoder_cb): New member function.
2912 (dump_pretty_printer::decode_format): New member function.
2913 (dump_context::dump_printf_va): Reimplement in terms of
2914 dump_pretty_printer.
2915 (dump_context::dump_printf_loc_va): Convert final param from va_list
2917 (dump_context::begin_scope): Reimplement call to
2918 make_item_for_dump_printf.
2919 (dump_printf): Update for change to dump_printf_va.
2920 (dump_printf_loc): Likewise.
2921 (selftest::test_capture_of_dump_calls): Convert "stmt" from
2922 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
2923 with %T, %E, and %G.
2924 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2925 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2926 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2927 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2928 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2929 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2930 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2931 within a dump_printf_loc call to "%wu".
2932 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2933 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
2934 missing space after "=".
2935 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2936 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2937 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2938 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2939 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
2940 duplicate "vectorized" from message.
2942 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2944 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2945 polyNxK_t element's TYPE_STRING_FLAG.
2947 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2949 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2950 (they were unnamed before). Fix comments.
2952 2018-08-17 Nathan Sidwell <nathan@acm.org>
2954 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2956 2018-08-17 Richard Biener <rguenther@suse.de>
2958 PR tree-optimization/86841
2959 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2961 2018-08-17 Martin Liska <mliska@suse.cz>
2963 * common.opt: Remove Warn, Init and Report for options with
2964 Ignore/Deprecated flag. Warning is done automatically for
2966 * config/i386/i386.opt: Likewise.
2967 * config/ia64/ia64.opt: Likewise.
2968 * config/rs6000/rs6000.opt: Likewise.
2969 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2970 Remove usage of flag_check_pointer_bounds.
2971 * lto-wrapper.c (merge_and_complain): Do not handle
2972 OPT_fcheck_pointer_bounds.
2973 (append_compiler_options): Likewise.
2974 * opt-functions.awk: Do not handle Deprecated.
2975 * optc-gen.awk: Check that Var, Report and Init are not
2976 used for an option with Ignore/Deprecated flag.
2977 * opts-common.c (decode_cmdline_option): Do not report
2979 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2981 * opts.h (struct cl_option): Remove cl_deprecated flag.
2982 (CL_ERR_DEPRECATED): Remove error enum value.
2984 2018-08-17 Richard Biener <rguenther@suse.de>
2987 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2988 across a va-arg-pack using call adjust its return value accordingly.
2990 2018-08-16 Martin Sebor <msebor@redhat.com>
2992 PR tree-optimization/86853
2993 * gimple-ssa-sprintf.c (struct format_result): Rename member.
2994 (struct fmtresult): Add member and initialize it in ctors.
2995 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
2996 (format_string): Handle %S the same as %ls. Set MAYFAIL.
2997 (format_directive): Set POSUNDER4K when MAYFAIL is set.
2998 (parse_directive): Handle %C same as %c.
2999 (sprintf_dom_walker::compute_format_length): Adjust.
3000 (is_call_safe): Adjust.
3002 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
3004 * builtins.c (c_strlen): Add new parameter eltsize. Use it
3005 for determining how to count the elements.
3006 * builtins.h (c_strlen): Adjust prototype.
3007 * expr.c (string_constant): Add new parameter mem_size.
3008 Set *mem_size appropriately.
3009 * expr.h (string_constant): Adjust protoype.
3010 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
3011 * gimple-fold.h (get_range_strlen): Adjust prototype.
3012 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
3013 (format_string): Call get_string_length with eltsize.
3015 2018-08-16 David Malcolm <dmalcolm@redhat.com>
3017 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
3018 to emit the span, rather than setting it as the prefix.
3020 2018-08-16 David Malcolm <dmalcolm@redhat.com>
3022 * diagnostic-show-locus.c (layout::start_annotation_line): Add
3023 "margin_char" parameter, defaulting to space. Use it in place
3024 of pp_space for the initial part of the margin.
3025 (layout::print_leading_fixits): Use '+' when filling the margin
3026 of line-insertion fix-it hints.
3028 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
3030 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
3033 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
3035 * config/rs6000/altivec.md: Don't set length attribute to the default
3037 * config/rs6000/darwin.md: Ditto.
3038 * config/rs6000/dfp.md: Ditto.
3039 * config/rs6000/htm.md: Ditto.
3040 * config/rs6000/rs6000.md: Ditto.
3041 * config/rs6000/sync.md: Ditto.
3042 * config/rs6000/vsx.md: Ditto.
3044 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
3046 * config/rs6000/altivec.md: Don't set length attribute to the default
3047 value, for branch instructions.
3048 * config/rs6000/darwin.md: Ditto.
3049 * config/rs6000/rs6000.md: Ditto.
3051 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
3053 * config/rs6000/rs6000.md (length): Always define as const_int 4.
3054 (unnamed conditional branch define_insn): Set length to 4 or 8
3055 depending on offset.
3056 (<bd>_<mode>): Similar, for alternative 0.
3057 (<bd>tf_<mode>): Ditto.
3059 2018-08-16 Tamar Christina <tamar.christina@arm.com>
3061 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
3063 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
3065 * doc/rtl.texi: Replace old RTX class names with new names.
3068 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
3070 * expmed.h (canonicalize_comparison): New declaration.
3071 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
3072 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
3073 * optabs.c (prepare_cmp_insn): Likewise.
3074 * rtl.h (unsigned_condition_p): New function which checks if a
3075 comparison operator is unsigned.
3077 2018-08-16 Nathan Sidwell <nathan@acm.org>
3079 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
3080 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
3082 2018-08-16 Tamar Christina <tamar.christina@arm.com>
3085 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
3086 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
3087 (mov<mov>): ..this and enable unconditionally.
3089 2018-08-16 Tamar Christina <tamar.christina@arm.com>
3091 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
3093 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
3095 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
3096 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
3097 "Common" with "Target".
3099 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
3101 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
3102 * doc/invoke.texi (mmitigate-rop): Remove.
3103 * config/i386/i386.c: Do not include "regrename.h".
3104 (ix86_rop_should_change_byte_p, reg_encoded_number)
3105 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
3107 (ix86_reorg): Remove call to ix86_mitigate_rop.
3108 * config/i386/i386.md (attr "modrm_class"): Remove.
3109 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
3110 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
3111 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
3113 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
3115 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
3116 allow folding of mergeh() and mergel() for the float and double types.
3117 (fold_mergehl_helper): Rework to handle building a permute tree
3120 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
3122 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
3125 2018-08-15 David Malcolm <dmalcolm@redhat.com>
3127 * common.opt (fdiagnostics-show-labels): New option.
3128 * diagnostic-show-locus.c (class layout_range): Add field
3130 (class layout): Add field "m_show_labels_p".
3131 (layout_range::layout_range): Add param "label" and use it to
3133 (make_range): Pass in NULL for new "label" param of layout_range's
3135 (layout::layout): Initialize m_show_labels_p.
3136 (layout::maybe_add_location_range): Pass in loc_range->m_label
3137 when constructing layout_range instances.
3138 (struct line_label): New struct.
3139 (layout::print_any_labels): New member function.
3140 (layout::print_line): Call it if label-printing is enabled.
3141 (selftest::test_one_liner_labels): New test.
3142 (selftest::test_diagnostic_show_locus_one_liner): Call it.
3143 * diagnostic.c (diagnostic_initialize): Initialize
3144 context->show_labels_p.
3145 * diagnostic.h (struct diagnostic_context): Add field
3147 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
3148 -fno-diagnostics-show-labels.
3149 * dwarf2out.c (gen_producer_string): Add
3150 OPT_fdiagnostics_show_labels to the ignored options.
3151 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
3153 (gcc_rich_location::maybe_add_expr): Likewise.
3154 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
3155 label" param, defaulting to NULL.
3156 (gcc_rich_location::add_expr): Add "label" param.
3157 (gcc_rich_location::maybe_add_expr): Likewise.
3158 (class text_range_label): New class.
3159 (class range_label_for_type_mismatch): New class.
3160 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
3161 of format_warning_va.
3162 (fmtwarn_n): Likewise for new params of format_warning_n_va.
3163 * lto-wrapper.c (merge_and_complain): Add
3164 OPT_fdiagnostics_show_labels to the "pick one setting" options.
3165 (append_compiler_options): Likewise to the dropped options.
3166 (append_diag_options): Likewise to the passed-on options.
3167 * opts.c (common_handle_option): Handle the new option.
3168 * selftest-diagnostic.c
3169 (test_diagnostic_context::test_diagnostic_context): Enable
3171 * substring-locations.c: Include "gcc-rich-location.h".
3172 (format_warning_n_va): Add "fmt_label" and "param_label" params
3173 and use them as appropriate.
3174 (format_warning_va): Add "fmt_label" and "param_label" params,
3175 passing them on to format_warning_n_va.
3176 (format_warning_at_substring): Likewise.
3177 (format_warning_at_substring_n): Likewise.
3178 * substring-locations.h (format_warning_va): Add "fmt_label" and
3179 "param_label" params.
3180 (format_warning_n_va): Likewise.
3181 (format_warning_at_substring): Likewise.
3182 (format_warning_at_substring_n): Likewise.
3183 * toplev.c (general_init): Initialize global_dc->show_labels_p.
3185 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
3188 * builtins.c (expand_builtin_memcmp): Do not expand the call
3189 when overflow is detected.
3191 2018-08-15 Martin Sebor <msebor@redhat.com>
3193 PR tree-optimization/71625
3194 * config/aarch64/aarch64-builtins.c
3195 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
3197 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
3199 * config/s390/s390.c (s390_reorg): Remove loop.
3201 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3204 (darwin_function_switched_text_sections): Delete.
3205 * gcc/config/darwin.h
3206 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
3208 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3211 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
3212 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
3213 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
3215 2018-08-15 Martin Liska <mliska@suse.cz>
3217 PR tree-optimization/86925
3218 * predict.c (expr_expected_value_1): When taking
3219 later predictor, assign also probability.
3220 Use fold_build2_initializer_loc in order to fold
3221 the expression in -frounding-math.
3223 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
3225 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
3227 (expand_vec_perm_1): Try the new method.
3229 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
3232 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
3233 Check whether lra_live_max_point is 0 before dividing.
3235 2018-08-14 Martin Sebor <msebor@redhat.com>
3237 PR tree-optimization/86650
3238 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
3239 (vrp_prop::check_mem_ref): Same.
3241 2018-08-13 Liu Hao <lh_mouse@126.com>
3243 * pretty-print.c (eat_esc_sequence): Swap the foreground and
3244 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
3245 and clear it thereafter, as it only works for DBCS.
3247 2018-08-13 Liu Hao <lh_mouse@126.com>
3249 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
3250 handle returned by _get_osf_handle().
3252 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3254 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
3255 for folding vec_perm.
3257 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3259 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
3260 Add support for gimple-folding of vec_pack() and vec_unpack()
3263 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3265 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
3266 vec_xst variants to the list.
3267 (rs6000_gimple_fold_builtin): Add support for folding unaligned
3268 vector loads and stores.
3270 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
3272 * config.gcc (rs6000-ibm-aix4.x): Delete.
3273 (rs6000-ibm-aix5.1): Delete.
3274 (rs6000-ibm-aix5.2): Delete.
3275 (rs6000-ibm-aix5.3): Delete.
3276 * config/rs6000/aix43.h: Delete.
3277 * config/rs6000/aix51.h: Delete.
3278 * config/rs6000/aix52.h: Delete.
3279 * config/rs6000/t-aix43: Delete.
3281 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
3283 * config/s390/s390.c (s390_decompose_constant_pool_ref):
3285 (s390_decompose_address): Factor out constant pool ref
3288 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3290 * config/nds32/nds32-predicates.c
3291 (nds32_can_use_bclr_p): Change return type as bool.
3292 (nds32_can_use_bset_p): Ditto.
3293 (nds32_can_use_btgl_p): Ditto.
3294 (nds32_can_use_bitci_p): Ditto.
3295 * config/nds32/nds32-protos.h
3296 (nds32_can_use_bclr_p): Change declaration.
3297 (nds32_can_use_bset_p): Ditto.
3298 (nds32_can_use_btgl_p): Ditto.
3299 (nds32_can_use_bitci_p): Ditto.
3301 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3303 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
3304 Support -msched-prolog-epilog option.
3305 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
3307 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3309 * common/config/nds32/nds32-common.c
3310 (nds32_option_optimization_table): Enalbe -malways-align.
3312 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3314 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
3316 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
3317 OPT_misr_secure_ case.
3318 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
3319 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
3320 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
3322 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
3323 (nds32_isr_info): New field security_level.
3324 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
3325 * config/nds32/nds32.md (return_internal): Consider critical attribute.
3326 * config/nds32/nds32.opt (misr-secure): New option.
3327 * config/nds32/nds32_init.inc: New file.
3328 * config/nds32/nds32_isr.h: New file.
3330 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
3332 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
3333 Update comment for atomic instructions.
3334 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
3335 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
3337 (atomic_loaddi): Revise fence expansion to only emit fence prior to
3338 load for __ATOMIC_SEQ_CST model.
3339 (atomic_loaddi_1): Remove float register target.
3340 (atomic_storedi): Handle CONST_INT values.
3341 (atomic_storedi_1): Remove float register source. Add special case
3343 (memory_barrier): New expander and insn.
3345 2018-08-11 Jakub Jelinek <jakub@redhat.com>
3347 PR tree-optimization/86835
3348 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
3349 new_stmt after def_gsi, make sure to insert new_square_stmt after
3350 that stmt, not 2 stmts before it.
3352 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
3355 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
3358 2018-08-10 Martin Liska <mliska@suse.cz>
3361 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
3363 * builtins.c (expand_builtin_expect_with_probability):
3365 (expand_builtin_expect_with_probability): New function.
3366 (build_builtin_expect_predicate): Add new argumnet probability
3367 for BUILT_IN_EXPECT_WITH_PROBABILITY.
3368 (fold_builtin_expect):
3371 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
3372 * builtins.h (fold_builtin_expect): Set new argument.
3373 * doc/extend.texi: Document __builtin_expect_with_probability.
3374 * doc/invoke.texi: Likewise.
3375 * gimple-fold.c (gimple_fold_call): Pass new argument.
3376 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
3377 also BUILT_IN_EXPECT_WITH_PROBABILITY.
3378 * predict.c (get_predictor_value): New function.
3379 (expr_expected_value): Add new argument probability. Assume
3380 that predictor and probability are always non-null.
3381 (expr_expected_value_1): Likewise. For __builtin_expect and
3382 __builtin_expect_with_probability set probability. Handle
3383 combination in binary expressions.
3384 (tree_predict_by_opcode): Simplify code by simply calling
3385 get_predictor_value.
3386 (pass_strip_predict_hints::execute): Add handling of
3387 BUILT_IN_EXPECT_WITH_PROBABILITY.
3388 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
3390 * tree.h (DECL_BUILT_IN_P): New function.
3392 2018-08-10 Martin Liska <mliska@suse.cz>
3394 PR tree-optimization/85799
3395 * passes.def: Add argument for pass_strip_predict_hints.
3396 * predict.c (class pass_strip_predict_hints): Add new argument
3398 (strip_predictor_early): New function.
3399 (pass_strip_predict_hints::execute): Call the function to
3401 (strip_predict_hints): New function.
3402 * predict.def: Fix comment.
3404 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
3406 * Makefile.in: Clarify which tm.texi to copy over to assert the
3407 right to grant a GFDL license for all.
3409 2018-08-09 Jeff Law <law@redhat.com>
3411 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
3414 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
3416 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
3419 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3421 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
3422 reductions for variable-length vectors.
3424 2018-08-09 David Malcolm <dmalcolm@redhat.com>
3427 * common.opt (fdiagnostics-show-line-numbers): New option.
3428 * diagnostic-show-locus.c (class layout): Add fields
3429 "m_show_line_numbers_p" and "m_linenum_width";
3430 (num_digits): New function.
3431 (test_num_digits): New function.
3432 (layout::layout): Initialize new fields. Update m_x_offset
3433 logic to handle any left margin.
3434 (layout::print_source_line): Print line number when requested.
3435 (layout::start_annotation_line): New member function.
3436 (layout::print_annotation_line): Call it.
3437 (layout::print_leading_fixits): Likewise.
3438 (layout::print_trailing_fixits): Likewise. Update calls to
3439 move_to_column for new parameter.
3440 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
3441 it to potentially call start_annotation_line.
3442 (layout::show_ruler): Call start_annotation_line.
3443 (selftest::test_line_numbers_multiline_range): New selftest.
3444 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
3445 and selftest::test_line_numbers_multiline_range.
3446 * diagnostic.c (diagnostic_initialize): Initialize
3447 show_line_numbers_p.
3448 * diagnostic.h (struct diagnostic_context): Add field
3449 "show_line_numbers_p".
3450 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
3451 -fno-diagnostics-show-line-numbers.
3452 * dwarf2out.c (gen_producer_string): Add
3453 OPT_fdiagnostics_show_line_numbers to the ignored options.
3454 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
3455 one setting" options.
3456 (append_compiler_options): Likewise to the dropped options.
3457 (append_diag_options): Likewise to the passed-on options.
3458 * opts.c (common_handle_option): Handle the new option.
3459 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
3461 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
3463 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
3464 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
3465 third argument of type "const signed char" to descriptions of
3466 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
3467 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
3468 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
3469 __builtin_bcdsub_ov functions.
3471 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3473 PR tree-optimization/86858
3474 * tree-vect-loop.c (vect_is_simple_reduction): Restore
3475 flow_bb_inside_loop_p calls.
3477 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3479 PR tree-optimization/86871
3480 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
3481 instead of gimple_assign_lhs.
3483 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
3486 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
3487 register constraint to operand 0.
3488 (add<mode>3_carryinC): Likewise.
3489 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
3491 2018-08-09 Martin Liska <mliska@suse.cz>
3494 * common.opt: Remove extra line.
3496 2018-08-09 Martin Liska <mliska@suse.cz>
3498 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
3499 at the end of a line, make first letter capital and end up
3500 a sentence with a dot.
3501 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
3502 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
3503 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
3504 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
3505 (PARAM_MAX_ISL_OPERATIONS): Likewise.
3506 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
3507 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
3508 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
3509 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
3510 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
3511 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
3512 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
3513 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
3514 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
3515 (PARAM_TREE_REASSOC_WIDTH): Likewise.
3516 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
3517 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
3518 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
3520 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
3523 * config/s390/s390.c (s390_option_override_internal): Reduce the
3524 stack-clash-protection-probe-interval param if it would be too big
3527 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
3530 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
3531 * config/m68k/m68k.c (handle_move_double): Don't call
3532 m68k_final_prescan_insn.
3533 (m68k_adjust_decorated_operand): Renamed from
3534 m68k_final_prescan_insn, remove first and third operand and
3536 (print_operand): Call it.
3537 (print_operand_address): Call it.
3539 2018-08-08 Nathan Sidwell <nathan@acm.org>
3541 * diagnostic.c (diagnostic_report_current_module): Use
3542 linemap_included_from & linemap_included_from_linemap.
3544 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
3546 * config/aarch64/aarch64-cores.def: Add phecda core.
3547 * config/aarch64/aarch64-tune.md: Regenerate.
3548 * doc/invoke.texi: Add phecda core.
3550 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
3553 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
3555 * config/s390/s390.md ("movti"): Add more alternatives for
3556 constant to GPR copies.
3558 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
3560 * config/s390/s390.c: Fix whitespace damage throughout the file.
3561 * config/s390/s390.h: Likewise.
3562 * config/s390/tpf.h: Likewise.
3564 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
3566 * config/s390/s390.c (s390_loadrelative_operand_p):
3567 Remove TARGET_CPU_ZARCH usages.
3568 (s390_rtx_costs): Likewise.
3569 (s390_legitimate_constant_p): Likewise.
3570 (s390_cannot_force_const_mem): Likewise.
3571 (legitimate_reload_constant_p): Likewise.
3572 (s390_preferred_reload_class): Likewise.
3573 (legitimize_pic_address): Likewise.
3574 (legitimize_tls_address): Likewise.
3575 (s390_split_branches): Removed.
3576 (s390_add_execute): Removed.
3577 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
3578 (s390_mainpool_start): Likewise.
3579 (s390_mainpool_finish): Likewise.
3580 (s390_mainpool_cancel): Removed.
3581 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
3582 (s390_chunkify_cancel): Likewise.
3583 (s390_return_addr_rtx): Likewise.
3584 (s390_register_info): Remove split_branches_pending_p uages.
3585 (s390_optimize_register_info): Likewise.
3586 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
3587 split_branches_pending_p usages.
3588 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
3589 (s390_load_got): Likewise.
3590 (s390_expand_split_stack_prologue): Likewise.
3591 (output_asm_nops): Likewise.
3592 (s390_function_profiler): Likewise.
3593 (s390_emit_call): Likewise.
3594 (s390_conditional_register_usage): Likewise.
3595 (s390_optimize_prologue): Likewise.
3596 (s390_reorg): Remove TARGET_CPU_ZARCH and
3597 split_branches_pending_p usages.
3598 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
3600 (s390_output_indirect_thunk_function): Likewise.
3601 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
3602 (TARGET_CPU_ZARCH_P): Removed.
3603 (struct machine_function): Remove split_branches_pending_p.
3604 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
3606 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
3608 * common/config/s390/s390-common.c (processor_flags_table):
3610 * config.gcc: Remove with_arch/with_tune support.
3611 * config/s390/2064.md: Remove cpu attribute comparisons.
3612 * config/s390/driver-native.c (s390_host_detect_local_cpu):
3614 * config/s390/linux.h (ASM_SPEC):
3615 Remove -march support.
3616 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
3617 Use a table to get an arch level.
3618 * config/s390/s390-opts.h (enum processor_type):
3620 * config/s390/s390.c
3621 (processor_table): Remove entries, add arch_level values.
3622 (s390_issue_rate): Remove cases.
3623 (s390_option_override): Adjust
3624 s390_option_override_internal() call.
3625 (s390_option_override_internal): Remove deprecation warning.
3626 (s390_valid_target_attribute_tree): Adjust
3627 s390_option_override_internal() call.
3628 * config/s390/s390.h (struct s390_processor):
3629 Share with s390-c.c, add arch_level field.
3630 * config/s390/s390.md:
3631 Remove occurrences in cpu attribute.
3632 * config/s390/s390.opt: Remove -march/-mtune support.
3633 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
3634 * doc/invoke.texi: Remove deprecation warning.
3636 2018-08-08 Luis Machado <luis.machado@linaro.org>
3638 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
3640 (qdf24xx_tunings): Set vector cost structure to
3641 qdf24xx_vector_cost.
3643 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
3644 <register_sextend>: Set to 3.
3646 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
3649 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
3650 * config/aarch64/aarch64-simd.md
3651 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
3652 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
3653 (aarch64_frecpx<mode>): ...this new pattern.
3654 * config/aarch64/aarch64-simd-builtins.def: Remove comment
3655 about aarch64_frecp<FRECP:frecp_suffix><mode>.
3657 2018-08-07 Martin Liska <mliska@suse.cz>
3660 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
3661 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
3662 * predict.def (PRED_MALLOC_NONNULL): New predictor.
3663 * doc/extend.texi: Document that malloc attribute adds
3666 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
3669 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3670 Define to speculation_safe_value_not_needed.
3672 2018-08-06 Jeff Law <law@redhat.com>
3674 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
3675 the vr_values instance to cprop_into_stmt.
3676 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
3677 (cprop_operand): Also query EVRP to determine if OP is a constant.
3679 2018-08-06 Nathan Sidwell <nathan@acm.org>
3681 * diagnostic.c (diagnostic_report_current_module): Reroll
3682 included-at loop. Translate text.
3684 2018-08-06 David Malcolm <dmalcolm@redhat.com>
3686 * function-tests.c (selftest::test_expansion_to_rtl): Call
3687 free_after_compilation.
3689 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3691 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
3693 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
3695 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
3696 loops with memory block operations from getting unrolled.
3698 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
3701 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3702 Define to speculation_safe_value_not_needed.
3704 2018-08-06 Jeff Law <law@redhat.com>
3706 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
3709 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3712 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
3713 with all enabled __intN types.
3715 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
3717 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3719 * alias.c (record_set): Check for clobber high.
3720 * cfgexpand.c (expand_gimple_stmt): Likewise.
3721 * combine-stack-adj.c (single_set_for_csa): Likewise.
3722 * combine.c (find_single_use_1): Likewise.
3723 (set_nonzero_bits_and_sign_copies): Likewise.
3724 (get_combine_src_dest): Likewise.
3725 (is_parallel_of_n_reg_sets): Likewise.
3726 (try_combine): Likewise.
3727 (record_dead_and_set_regs_1): Likewise.
3728 (reg_dead_at_p_1): Likewise.
3729 (reg_dead_at_p): Likewise.
3730 * dce.c (deletable_insn_p): Likewise.
3731 (mark_nonreg_stores_1): Likewise.
3732 (mark_nonreg_stores_2): Likewise.
3733 * df-scan.c (df_find_hard_reg_defs): Likewise.
3734 (df_uses_record): Likewise.
3735 (df_get_call_refs): Likewise.
3736 * dwarf2out.c (mem_loc_descriptor): Likewise.
3737 * haifa-sched.c (haifa_classify_rtx): Likewise.
3738 * ira-build.c (create_insn_allocnos): Likewise.
3739 * ira-costs.c (scan_one_insn): Likewise.
3740 * ira.c (equiv_init_movable_p): Likewise.
3741 (rtx_moveable_p): Likewise.
3742 (interesting_dest_for_shprep): Likewise.
3743 * jump.c (mark_jump_label_1): Likewise.
3744 * postreload-gcse.c (record_opr_changes): Likewise.
3745 * postreload.c (reload_cse_simplify): Likewise.
3746 (struct reg_use): Add source expr.
3747 (reload_combine): Check for clobber high.
3748 (reload_combine_note_use): Likewise.
3749 (reload_cse_move2add): Likewise.
3750 (move2add_note_store): Likewise.
3751 * print-rtl.c (print_pattern): Likewise.
3752 * recog.c (decode_asm_operands): Likewise.
3753 (store_data_bypass_p): Likewise.
3754 (if_test_bypass_p): Likewise.
3755 * regcprop.c (kill_clobbered_value): Likewise.
3756 (kill_set_value): Likewise.
3757 * reginfo.c (reg_scan_mark_refs): Likewise.
3758 * reload1.c (maybe_fix_stack_asms): Likewise.
3759 (eliminate_regs_1): Likewise.
3760 (elimination_effects): Likewise.
3761 (mark_not_eliminable): Likewise.
3762 (scan_paradoxical_subregs): Likewise.
3763 (forget_old_reloads_1): Likewise.
3764 * reorg.c (find_end_label): Likewise.
3765 (try_merge_delay_insns): Likewise.
3766 (redundant_insn): Likewise.
3767 (own_thread_p): Likewise.
3768 (fill_simple_delay_slots): Likewise.
3769 (fill_slots_from_thread): Likewise.
3770 (dbr_schedule): Likewise.
3771 * resource.c (update_live_status): Likewise.
3772 (mark_referenced_resources): Likewise.
3773 (mark_set_resources): Likewise.
3774 * rtl.c (copy_rtx): Likewise.
3775 * rtlanal.c (reg_referenced_p): Likewise.
3776 (single_set_2): Likewise.
3777 (noop_move_p): Likewise.
3778 (note_stores): Likewise.
3779 * sched-deps.c (sched_analyze_reg): Likewise.
3780 (sched_analyze_insn): Likewise.
3782 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3784 * cse.c (invalidate_reg): New function extracted from...
3785 (invalidate): ...here.
3786 (canonicalize_insn): Check for clobber high.
3787 (invalidate_from_clobbers): invalidate clobber highs.
3788 (invalidate_from_sets_and_clobbers): Likewise.
3789 (count_reg_usage): Check for clobber high.
3790 (insn_live_p): Likewise.
3791 * cselib.c (cselib_expand_value_rtx_1):Likewise.
3792 (cselib_invalidate_regno): Check for clobber in setter.
3793 (cselib_invalidate_rtx): Pass through setter.
3794 (cselib_invalidate_rtx_note_stores):
3795 (cselib_process_insn): Check for clobber high.
3796 * cselib.h (cselib_invalidate_rtx): Add operand.
3798 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3800 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
3801 (mark_not_eliminable): Likewise.
3802 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
3803 * lra-lives.c (process_bb_lives): Check for clobber high.
3804 * lra.c (new_insn_reg): Remember clobber highs.
3805 (collect_non_operand_hard_regs): Check for clobber high.
3806 (lra_set_insn_recog_data): Likewise.
3807 (add_regs_to_insn_regno_info): Likewise.
3808 (lra_update_insn_regno_info): Likewise.
3810 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3812 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
3813 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
3815 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3817 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
3818 (copy_insn_1): Likewise.
3819 (gen_hard_reg_clobber_high): New gen function.
3820 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
3821 * genemit.c (gen_exp): Likewise.
3822 (gen_emit_seq): Pass through info.
3823 (gen_insn): Check for CLOBBER_HIGH.
3824 (gen_expand): Pass through info.
3825 (gen_split): Likewise.
3826 (output_add_clobbers): Likewise.
3827 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
3828 (remove_clobbers): Likewise.
3829 * rtl.h (gen_hard_reg_clobber_high): New declaration.
3831 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3833 * doc/rtl.texi (clobber_high): Add.
3834 (parallel): Add in clobber high
3835 * rtl.c (rtl_check_failed_code3): Add function.
3836 * rtl.def (CLOBBER_HIGH): Add expression.
3837 * rtl.h (RTL_CHECKC3): Add macro.
3838 (rtl_check_failed_code3): Add declaration.
3839 (XC3EXP): Add macro.
3841 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
3844 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3845 cfun->machine->max_used_stack_alignment if needed.
3847 2018-08-04 Martin Sebor <msebor@redhat.com>
3849 PR tree-optimization/86571
3850 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
3853 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
3856 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3859 2018-08-03 Jeff Law <law@redhat.com>
3862 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3863 Define to speculation_safe_value_not_needed.
3865 2018-08-03 David Malcolm <dmalcolm@redhat.com>
3867 * doc/gcov.texi (-x): Remove duplicate "to".
3868 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3869 (-Wif-not-aligned): Remove duplicate "is".
3870 (-flto): Remove duplicate "the".
3871 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3872 duplicate "v5.00.b".
3873 (MSP430 Options): Remove duplicate "and" from the description
3874 of "-mgprel-sec=regexp".
3875 (x86 Options): Remove duplicate copies of "vmldLog102" and
3876 vmlsLog104 from description of "-mveclibabi=type".
3878 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
3880 * internal-fn.h (first_commutative_argument): Declare.
3881 * internal-fn.c (first_commutative_argument): New function.
3882 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3883 restrictions for pattern statements. Use first_commutative_argument
3884 to look for commutative operands in calls to internal functions.
3886 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
3888 * Makefile.in (wide-int-range.o): New.
3889 * tree-vrp.c: Move all the wide_int_* functions to...
3890 * wide-int-range.cc: ...here.
3891 * tree-vrp.h: Move all the wide_int_* prototypes to...
3892 * wide-int-range.h: ...here.
3894 2018-08-03 Tom de Vries <tdevries@suse.de>
3896 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3898 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3899 * except.c (output_function_exception_table): Do early exit if
3900 targetm_common.except_unwind_info (&global_options) == UI_NONE.
3902 2018-08-03 Martin Liska <mliska@suse.cz>
3904 * predict.c (dump_prediction): Change to 2 digits
3907 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
3909 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3911 (falkor_am_1_gtov_gtov): ... a new insn reservation.
3913 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
3915 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3916 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3917 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3918 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3919 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3921 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3923 * diagnostic-show-locus.c (diagnostic_show_locus): Use
3924 pp_take_prefix when saving the existing prefix.
3925 * diagnostic.c (diagnostic_append_note): Likewise.
3926 * langhooks.c (lhd_print_error_function): Likewise.
3927 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3928 param's type. Free the existing prefix.
3929 (pp_take_prefix): New function.
3930 (pretty_printer::pretty_printer): Drop the prefix parameter.
3931 Rename the length parameter to match the comment.
3932 (pretty_printer::~pretty_printer): Free the prefix.
3933 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3935 (struct pretty_printer): Drop the "const" from "prefix" field's
3936 type and clarify memory management.
3937 (pp_set_prefix): Drop the "const" from the 2nd param.
3938 (pp_take_prefix): New decl.
3940 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3942 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3943 for word_mode_ok here instead of passing as argument.
3944 (expand_block_compare): Change select_block_compare_mode() call.
3945 (expand_strncmp_gpr_sequence): New function.
3946 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3948 2018-08-02 Jeff Law <law@redhat.com>
3951 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3952 Define to speculation_safe_value_not_needed.
3955 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3956 Define to speculation_safe_value_not_needed.
3958 2018-08-02 Tom de Vries <tdevries@suse.de>
3961 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3962 function. Return UI_TARGET unconditionally.
3963 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3964 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3966 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3968 * genemit.c (print_overload_test): Fix typo.
3970 2018-08-02 Richard Biener <rguenther@suse.de>
3972 PR tree-optimization/86816
3973 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3974 which checks for value availability before querying it.
3975 (gvn_uses_equal): Use it.
3976 (same_succ_hash): Likewise.
3977 (gimple_equal_p): Likewise.
3979 2018-08-02 Nick Clifton <nickc@redhat.com>
3982 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3983 Define to speculation_safe_value_not_needed.
3986 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3987 Define to speculation_safe_value_not_needed.
3990 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3991 Define to speculation_safe_value_not_needed.
3994 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3995 Define to speculation_safe_value_not_needed.
3998 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3999 Define to speculation_safe_value_not_needed.
4002 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4003 Define to speculation_safe_value_not_needed.
4006 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4007 Define to speculation_safe_value_not_needed.
4010 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4011 Define to speculation_safe_value_not_needed.
4014 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
4015 speculation_safe_value_not_needed.
4018 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
4019 to speculation_safe_value_not_needed.
4021 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
4023 * doc/md.texi: Expand the documentation of instruction names
4024 to mention port-local uses. Document '@' in pattern names.
4025 * read-md.h (overloaded_instance, overloaded_name): New structs.
4027 (md_reader::handle_overloaded_name): New member function.
4028 (md_reader::get_overloads): Likewise.
4029 (md_reader::m_first_overload): New member variable.
4030 (md_reader::m_next_overload_ptr): Likewise.
4031 (md_reader::m_overloads_htab): Likewise.
4032 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
4033 m_next_overload_ptr and m_overloads_htab.
4034 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
4035 (get_mode_token, get_code_token, get_int_token): New functions.
4036 (map_attr_string): Add an optional argument that passes back
4037 the associated iterator.
4038 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
4039 (md_reader::handle_overloaded_name, add_overload_instance): New
4041 (apply_iterators): Handle '@' names. Report an error if '@'
4042 is used without iterators.
4043 (initialize_iterators): Initialize the new iterator_group fields.
4044 * genopinit.c (handle_overloaded_code_for)
4045 (handle_overloaded_gen): New functions.
4046 (main): Use them to print declarations of maybe_code_for_* and
4047 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
4048 * genemit.c (print_overload_arguments, print_overload_test)
4049 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
4050 (main): Use it to print definitions of maybe_code_for_* and
4051 maybe_gen_* functions.
4052 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
4053 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
4054 instead of explicit mode checks.
4055 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
4056 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
4057 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
4058 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
4059 (aarch64_expand_compare_and_swap): Likewise
4060 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
4061 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
4062 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
4063 (aarch64_constant_pool_reload_icode): Delete.
4064 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
4065 instead of aarch64_constant_pool_reload_icode. Use
4066 code_for_aarch64_reload_mov instead of explicit mode checks.
4067 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
4068 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
4069 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
4070 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
4071 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
4072 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
4073 (aarch64_atomic_load_op_code): Delete.
4074 (aarch64_emit_atomic_load_op): Likewise.
4075 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
4076 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
4077 instead of aarch64_emit_atomic_load_op.
4078 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
4079 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
4080 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
4081 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
4082 character before the pattern name.
4083 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
4084 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
4085 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
4086 (aarch64_frecps<mode>): Likewise.
4087 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
4088 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
4089 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
4090 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
4091 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
4093 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
4095 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
4096 Allow HFmode constants if TARGET_FP_F16INST.
4098 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
4101 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
4102 No longer check last store for clobber of address register.
4104 2018-08-02 Martin Liska <mliska@suse.cz>
4106 PR gcov-profile/86817
4107 * gcov.c (process_all_functions): New function.
4109 (process_file): Move functions processing to
4110 process_all_functions.
4112 2018-08-02 David Malcolm <dmalcolm@redhat.com>
4114 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
4115 "const" to the "gimple *" and "rtx_insn *" parameters.
4116 * dumpfile.h (dump_user_location_t::dump_user_location_t):
4118 (dump_location_t::dump_location_t): Likewise.
4120 2018-08-01 Martin Sebor <msebor@redhat.com>
4122 PR tree-optimization/86650
4123 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
4124 rather than a "gcall *". Directly pass the data of interest
4125 to percent_K_format, rather than building a temporary CALL_EXPR
4127 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
4128 (gimple_fold_builtin_strncat): Adjust.
4129 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
4130 gcall* argument with gimple*.
4131 * gimple-ssa-warn-restrict.c (check_call): Same.
4132 (wrestrict_dom_walker::before_dom_children): Same.
4133 (builtin_access::builtin_access): Same.
4134 (check_bounds_or_overlap): Same
4135 (maybe_diag_overlap): Same.
4136 (maybe_diag_offset_bounds): Same.
4137 * tree-diagnostic.c (default_tree_printer): Move usage of
4138 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
4140 * tree-pretty-print.c (percent_K_format): Add argument.
4141 * tree-pretty-print.h: Add argument.
4142 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
4143 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
4144 (maybe_diag_stxncpy_trunc): Same.
4145 (handle_builtin_stxncpy): Same.
4146 (handle_builtin_strcat): Same.
4148 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4150 * match.pd: Optimise pointer range checks.
4152 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4154 PR tree-optimization/86758
4155 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
4156 to remove pattern statements.
4158 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4160 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
4161 result of dfs_enumerate_from when constructing stmt_vec_infos,
4162 instead of additionally calling get_loop_body.
4164 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4166 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
4168 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
4169 When creating an iv, assert that the step is not known to be zero.
4170 (vect_setup_realignment): Update call accordingly.
4171 * tree-vect-stmts.c (vectorizable_store): Likewise.
4172 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
4174 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4176 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
4177 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
4178 (vectorizable_reduction): Likewise.
4179 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4180 (vect_detect_hybrid_slp_stmts): Likewise.
4181 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4183 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
4185 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
4186 (wide_int_set_zero_nonzero_bits): ...this.
4187 (zero_nonzero_bits_from_vr): Rename to...
4188 (vrp_set_zero_nonzero_bits): ...this.
4189 (extract_range_from_multiplicative_op_1): Abstract wide int
4191 (wide_int_range_multiplicative_op): ...here.
4192 (extract_range_from_binary_expr_1): Extract wide int binary
4193 operations into their own functions.
4194 (wide_int_range_lshift): New.
4195 (wide_int_range_can_optimize_bit_op): New.
4196 (wide_int_range_shift_undefined_p): New.
4197 (wide_int_range_bit_xor): New.
4198 (wide_int_range_bit_ior): New.
4199 (wide_int_range_bit_and): New.
4200 (wide_int_range_trunc_mod): New.
4201 (extract_range_into_wide_ints): New.
4202 (vrp_shift_undefined_p): New.
4203 (extract_range_from_multiplicative_op): New.
4204 (vrp_can_optimize_bit_op): New.
4205 * tree-vrp.h (value_range::dump): New.
4206 (wide_int_range_multiplicative_op): New.
4207 (wide_int_range_lshift):New.
4208 (wide_int_range_shift_undefined_p): New.
4209 (wide_int_range_bit_xor): New.
4210 (wide_int_range_bit_ior): New.
4211 (wide_int_range_bit_and): New.
4212 (wide_int_range_trunc_mod): New.
4213 (zero_nonzero_bits_from_bounds): Rename to...
4214 (wide_int_set_zero_nonzero_bits): ...this.
4215 (zero_nonzero_bits_from_vr): Rename to...
4216 (vrp_set_zero_nonzero_bits): ...this.
4217 (range_easy_mask_min_max): Rename to...
4218 (wide_int_range_can_optimize_bit_op): this.
4219 * vr-values.c (simplify_bit_ops_using_ranges): Rename
4220 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
4222 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4224 * tree-vectorizer.h (vect_orig_stmt): New function.
4225 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
4226 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
4227 (vect_create_epilog_for_reduction): Likewise.
4228 (vectorizable_live_operation): Likewise.
4229 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4230 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
4231 * tree-vect-stmts.c (vectorizable_call): Likewise.
4232 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
4234 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4236 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
4238 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
4239 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
4240 (vect_transform_loop): Likewise.
4241 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
4243 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4245 * tree-vectorizer.h (vect_schedule_slp): Return void.
4246 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
4247 (vect_schedule_slp): Likewise.
4249 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4251 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
4253 (vect_transform_loop): Update calls accordingly. Schedule SLP
4254 instances before the main loop, if any exist.
4256 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4258 PR tree-optimization/86749
4259 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
4260 If the lhs is used in a COND_EXPR, check that it is being used
4261 as the "then" or "else" value.
4263 2018-08-01 Tom de Vries <tdevries@suse.de>
4266 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
4267 speculation_safe_value_not_needed.
4269 2018-08-01 Richard Biener <rguenther@suse.de>
4271 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
4274 2018-08-01 Martin Liska <mliska@suse.cz>
4276 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
4277 format how successful transformation is dumped.
4278 (gimple_mod_pow2_value_transform): Likewise.
4279 (gimple_mod_subtract_transform): Likewise.
4280 (gimple_stringops_transform): Likewise.
4282 2018-08-01 Martin Liska <mliska@suse.cz>
4285 * value-prof.c (interesting_stringop_to_profile_p):
4286 Simplify the code and add BUILT_IN_MEMMOVE.
4287 (gimple_stringops_transform): Likewise.
4289 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
4291 * config/aarch64/aarch64-simd.md
4292 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
4293 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
4294 use GPI iterator instead of SI mode.
4296 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
4298 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
4299 rs6000_speculation_barrier.
4300 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
4301 new barrier pattern name.
4303 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
4305 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
4306 (speculation_barrier): New insn.
4308 2018-08-01 Richard Biener <rguenther@suse.de>
4311 * graphite.h: Include isl/id.h and isl/space.h to allow build
4314 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
4317 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
4318 mode for COFF targets.
4319 * defaults.h (TARGET_COFF): Define.
4320 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
4321 TARGET_COFF): Define.
4322 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
4323 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
4324 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
4326 2018-07-31 Alexandre Oliva <oliva@adacore.com>
4328 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
4329 * gimple-streamer-out.c (output_bb): Save it.
4330 * lto-streamer-in.c (input_struct_function_base): Restore
4331 instance discriminator if available. Create map on demand.
4332 * lto-streamer-out.c (output_struct_function_base): Save it if
4334 * final.c (decl_to_instance_map): Document LTO strategy.
4336 2018-07-31 Alexandre Oliva <oliva@adacore.com>
4337 Olivier Hainque <hainque@adacore.com>
4339 * debug.h (decl_to_instance_map_t): New type.
4340 (decl_to_instance_map): Declare.
4341 (maybe_create_decl_to_instance_map): New inline function.
4342 * final.c (bb_discriminator, last_bb_discriminator): New statics,
4343 to track basic block discriminators.
4344 (final_start_function_1): Initialize them.
4345 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
4347 (decl_to_instance_map): New variable.
4348 (map_decl_to_instance, maybe_set_discriminator): New functions.
4349 (notice_source_line): Set discriminator.
4351 2018-07-31 Ian Lance Taylor <iant@golang.org>
4353 * targhooks.c (default_have_speculation_safe_value): Add
4356 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4358 * dump-context.h: Include "pretty-print.h".
4359 (dump_context::refresh_dumps_are_enabled): New decl.
4360 (dump_context::emit_item): New decl.
4361 (class dump_context): Add fields "m_test_pp" and
4363 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
4364 (temp_dump_context::get_dumped_text): New decl.
4365 (class temp_dump_context): Add field "m_pp".
4366 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
4367 (dump_context::refresh_dumps_are_enabled): ...and add a test for
4369 (set_dump_file): Update for above change.
4370 (set_alt_dump_file): Likewise.
4371 (dump_loc): New overload, taking a pretty_printer *.
4372 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
4373 to any test pretty-printer.
4374 (make_item_for_dump_gimple_stmt): New function, adapted from
4375 optinfo::add_gimple_stmt.
4376 (dump_context::dump_gimple_stmt): Call it, and use the result,
4377 eliminating the direct usage of dump_file and alt_dump_file in
4378 favor of indirectly using them via emit_item.
4379 (make_item_for_dump_gimple_expr): New function, adapted from
4380 optinfo::add_gimple_expr.
4381 (dump_context::dump_gimple_expr): Call it, and use the result,
4382 eliminating the direct usage of dump_file and alt_dump_file in
4383 favor of indirectly using them via emit_item.
4384 (make_item_for_dump_generic_expr): New function, adapted from
4386 (dump_context::dump_generic_expr): Call it, and use the result,
4387 eliminating the direct usage of dump_file and alt_dump_file in
4388 favor of indirectly using them via emit_item.
4389 (make_item_for_dump_printf_va): New function, adapted from
4390 optinfo::add_printf_va.
4391 (make_item_for_dump_printf): New function.
4392 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
4393 and use the result, eliminating the direct usage of dump_file and
4394 alt_dump_file in favor of indirectly using them via emit_item.
4395 (make_item_for_dump_dec): New function.
4396 (dump_context::dump_dec): Call it, and use the result,
4397 eliminating the direct usage of dump_file and alt_dump_file in
4398 favor of indirectly using them via emit_item.
4399 (make_item_for_dump_symtab_node): New function, adapted from
4400 optinfo::add_symtab_node.
4401 (dump_context::dump_symtab_node): Call it, and use the result,
4402 eliminating the direct usage of dump_file and alt_dump_file in
4403 favor of indirectly using them via emit_item.
4404 (dump_context::begin_scope): Reimplement, avoiding direct usage
4405 of dump_file and alt_dump_file in favor of indirectly using them
4407 (dump_context::emit_item): New member function.
4408 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
4409 Set up test pretty-printer on the underlying context. Call
4410 refresh_dumps_are_enabled.
4411 (temp_dump_context::~temp_dump_context): Call
4412 refresh_dumps_are_enabled.
4413 (temp_dump_context::get_dumped_text): New member function.
4414 (selftest::verify_dumped_text): New function.
4415 (ASSERT_DUMPED_TEXT_EQ): New macro.
4416 (selftest::test_capture_of_dump_calls): Run all tests twice, with
4417 and then without optinfo enabled. Add uses of
4418 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
4419 * dumpfile.h: Update comment for the dump_* API.
4420 * optinfo-emit-json.cc
4421 (selftest::test_building_json_from_dump_calls): Update for new
4422 param for temp_dump_context ctor.
4423 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
4424 and "m_owned" field.
4425 (optinfo_item::~optinfo_item): Likewise.
4426 (optinfo::add_item): New member function.
4427 (optinfo::emit): Update comment.
4428 (optinfo::add_string): Delete.
4429 (optinfo::add_printf): Delete.
4430 (optinfo::add_printf_va): Delete.
4431 (optinfo::add_gimple_stmt): Delete.
4432 (optinfo::add_gimple_expr): Delete.
4433 (optinfo::add_tree): Delete.
4434 (optinfo::add_symtab_node): Delete.
4435 (optinfo::add_dec): Delete.
4436 * optinfo.h (class dump_context): New forward decl.
4437 (optinfo::add_item): New decl.
4438 (optinfo::add_string): Delete.
4439 (optinfo::add_printf): Delete.
4440 (optinfo::add_printf_va): Delete.
4441 (optinfo::add_gimple_stmt): Delete.
4442 (optinfo::add_gimple_expr): Delete.
4443 (optinfo::add_tree): Delete.
4444 (optinfo::add_symtab_node): Delete.
4445 (optinfo::add_dec): Delete.
4446 (optinfo::add_poly_int): Delete.
4447 (optinfo_item::optinfo_item): Remove "owned" param.
4448 (class optinfo_item): Remove field "m_owned".
4450 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4453 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
4454 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
4455 requested variable alignment.
4456 (expand_one_ssa_partition): Likewise.
4457 (expand_one_var): Likewise.
4459 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4461 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4462 to speculation_safe_value_not_needed.
4464 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4466 * targhooks.h (speculation_safe_value_not_needed): New prototype.
4467 * targhooks.c (speculation_safe_value_not_needed): New function.
4468 * target.def (have_speculation_safe_value): Update documentation.
4469 * doc/tm.texi: Regenerated.
4471 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4473 * config/aarch64/iterators.md (ALLI_TI): New iterator.
4474 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
4476 (despeculate_copy<ALLI:mode>_insn): New insn.
4477 (despeculate_copyti_insn): New insn.
4478 (despeculate_simple<ALLI:mode>): New insn
4479 (despeculate_simpleti): New insn.
4480 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
4482 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
4483 aarch64_speculation_safe_value.
4484 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
4486 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4488 * config/aarch64/aarch64-speculation.cc: New file.
4489 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
4490 before pass_reorder_blocks.
4491 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
4493 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
4494 X14 and X15 when tracking speculation.
4495 * config/aarch64/aarch64.md (register name constants): Add
4496 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
4497 (unspec): Add UNSPEC_SPECULATION_TRACKER.
4498 (speculation_barrier): New insn attribute.
4499 (cmp<mode>): Allow SP in comparisons.
4500 (speculation_tracker): New insn.
4501 (speculation_barrier): Add speculation_barrier attribute.
4502 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
4503 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
4504 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
4506 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4508 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
4509 aarch64_track_speculation is true.
4510 (tb<optab><mode>1): Likewise.
4511 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
4512 generate CB[N]Z when tracking speculation.
4513 (aarch64_split_compare_and_swap): Likewise.
4514 (aarch64_split_atomic_op): Likewise.
4516 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4518 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
4520 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4522 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
4523 (speculation_barrier): New insn.
4525 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4527 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
4528 * config/arm/arm.md (speculation_barrier): New expand.
4529 (speculation_barrier_insn): New pattern.
4531 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4533 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
4534 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
4535 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
4536 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
4538 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
4539 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
4540 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
4541 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
4542 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
4543 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
4544 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
4545 * builtins.c (expand_speculation_safe_value): New function.
4546 (expand_builtin): Call it.
4547 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
4548 * doc/extend.texi: Document __builtin_speculation_safe_value.
4549 * doc/md.texi: Document "speculation_barrier" pattern.
4550 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
4551 TARGET_HAVE_SPECULATION_SAFE_VALUE.
4552 * doc/tm.texi: Regenerated.
4553 * target.def (have_speculation_safe_value, speculation_safe_value): New
4555 * targhooks.c (default_have_speculation_safe_value): New function.
4556 (default_speculation_safe_value): New function.
4557 * targhooks.h (default_have_speculation_safe_value): Add prototype.
4558 (default_speculation_safe_value): Add prototype.
4560 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4562 * dump-context.h (dump_context::dump_loc): New decl.
4563 * dumpfile.c (dump_context::dump_loc): New member function.
4564 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
4565 and dump_gimple_stmt.
4566 (dump_context::dump_gimple_expr_loc): Likewise, using
4568 (dump_context::dump_generic_expr_loc): Likewise, using
4570 (dump_context::dump_printf_loc_va): Likewise, using
4572 (dump_context::begin_scope): Explicitly using the global function
4573 "dump_loc", rather than the member function.
4575 2018-07-31 Martin Sebor <msebor@redhat.com>
4577 PR tree-optimization/86741
4578 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
4580 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
4582 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
4583 depend on whether prefetch instructions will be emitted or not.
4584 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
4585 will be emitted or not.
4586 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
4587 (TARGET_SETMEM_PFD): New macros.
4589 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4591 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
4592 (NULL_STMT_VEC_INFO): Delete.
4593 (stmt_vec_info::operator*): Likewise.
4594 (stmt_vec_info::operator gimple *): Likewise.
4595 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
4596 of NULL_STMT_VEC_INFO.
4597 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4598 (vect_reassociating_reduction_p): Likewise.
4599 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4600 (vectorizable_store): Likewise.
4601 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
4602 (vec_info::free_stmt_vec_infos): Likewise.
4604 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4606 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
4607 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
4609 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4611 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
4612 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4613 (vec_info::free_stmt_vec_info): New private member functions.
4614 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
4615 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
4616 * tree-parloops.c (gather_scalar_reductions): Remove calls to
4617 set_stmt_vec_info_vec and free_stmt_vec_infos.
4618 * tree-vect-loop.c (_loop_vec_info): Remove call to
4619 set_stmt_vec_info_vec.
4620 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
4621 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
4622 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
4623 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4624 (vec_info::free_stmt_vec_info): ...these new functions. Remove
4625 assignments in {vec_info::,}new_stmt_vec_info that are redundant
4626 with the clearing in the xcalloc.
4627 (stmt_vec_info_vec): Delete.
4628 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
4629 (vectorize_loops): Likewise.
4630 (vec_info::~vec_info): Remove argument from call to
4631 free_stmt_vec_infos.
4632 (vec_info::add_stmt): Remove vinfo argument from call to
4635 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4637 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
4638 rather than a gimple stmt.
4639 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
4640 information for pattern statements when passed the original
4641 statement; instead wait to be passed the pattern statement itself.
4642 Don't call set_vinfo_for_stmt here.
4643 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
4644 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
4645 stmt_vec_infos here.
4646 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
4647 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
4648 stmt_vec_infos entry.
4650 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4652 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
4653 * tree-vectorizer.c (vec_info::replace_stmt): New function.
4654 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
4655 * tree-vect-stmts.c (vectorizable_call): Likewise.
4656 (vectorizable_simd_clone_call): Likewise.
4658 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4660 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
4661 * tree-vectorizer.c (vec_info::remove_stmt): New function.
4662 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
4663 * tree-vect-loop.c (vect_transform_loop): Likewise.
4664 * tree-vect-slp.c (vect_schedule_slp): Likewise.
4665 * tree-vect-stmts.c (vect_remove_stores): Likewise.
4667 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4669 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
4670 (vect_dr_stmt): Delete.
4671 * tree-vectorizer.c (vec_info::lookup_dr): New function.
4672 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
4674 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
4675 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
4676 (vect_verify_datarefs_alignment, vect_peeling_supportable)
4677 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4678 (vect_analyze_data_refs): Likewise.
4679 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
4681 (vect_find_same_alignment_drs): Likewise.
4682 (vect_slp_analyze_node_dependences): Update calls accordingly.
4683 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4684 instead of DR_VECT_AUX.
4685 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
4686 of a vector data references. Use vec_info::lookup_dr instead of
4688 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
4689 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4690 instead of DR_VECT_AUX.
4692 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4694 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
4696 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4698 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4699 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4700 (vect_gen_prolog_loop_niters): Likewise.
4702 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4704 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
4705 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
4706 (vect_known_alignment_in_bytes, vect_dr_behavior)
4707 (vect_get_scalar_dr_size): Take references as dr_vec_infos
4708 instead of data_references. Update calls to other routines for
4709 which the same change has been made.
4710 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
4711 dr_vec_infos instead of stmt_vec_infos.
4712 (vect_analyze_data_ref_dependence): Update call accordingly.
4713 (vect_slp_analyze_data_ref_dependence)
4714 (vect_record_base_alignments): Use DR_VECT_AUX.
4715 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
4716 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
4717 (vector_alignment_reachable_p, vect_get_data_access_cost)
4718 (vect_peeling_supportable, vect_analyze_group_access_1)
4719 (vect_analyze_group_access, vect_analyze_data_ref_access)
4720 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
4721 (vect_compile_time_alias, vect_small_gap_p)
4722 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
4723 (vect_supportable_dr_alignment): Take references as dr_vec_infos
4724 instead of data_references. Update calls to other routines for
4725 which the same change has been made.
4726 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
4727 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4728 (vect_slp_analyze_and_verify_node_alignment)
4729 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4730 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4731 (vect_setup_realignment): Use dr_vec_infos. Update calls after
4733 (_vect_peel_info::dr): Replace with...
4734 (_vect_peel_info::dr_info): ...this new field.
4735 (vect_peeling_hash_get_most_frequent)
4736 (vect_peeling_hash_choose_best_peeling): Update accordingly.
4737 (vect_peeling_hash_get_lowest_cost):
4738 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
4739 routines for which the same change has been made.
4740 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
4742 * tree-vect-loop-manip.c (get_misalign_in_elems)
4743 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
4745 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4746 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
4747 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
4748 (get_group_load_store_type, get_negative_load_store_type)
4749 (vect_get_data_ptr_increment, vectorizable_store)
4750 (vectorizable_load): Likewise.
4751 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
4752 Update calls to other routines for which the same change has been made.
4754 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4756 * tree-vectorizer.h (vec_info::move_dr): New member function.
4757 (dataref_aux): Rename to...
4758 (dr_vec_info): ...this and add "dr" and "stmt" fields.
4759 (_stmt_vec_info::dr_aux): Update accordingly.
4760 (_stmt_vec_info::data_ref_info): Delete.
4761 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
4762 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
4763 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
4764 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
4766 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
4767 (STMT_VINFO_DR_INFO): New macro.
4768 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
4769 (set_dr_misalignment): Update after rename of dataref_aux.
4770 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
4771 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
4772 initialization of STMT_VINFO_DATA_REF.
4773 * tree-vectorizer.c (vec_info::move_dr): New function.
4774 * tree-vect-patterns.c (vect_recog_bool_pattern)
4775 (vect_recog_mask_conversion_pattern)
4776 (vect_recog_gather_scatter_pattern): Use it.
4777 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
4778 the "dr" and "stmt" fields of dr_vec_info instead of
4779 STMT_VINFO_DATA_REF.
4781 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4783 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
4784 (is_pattern_stmt_p): Use it.
4785 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
4786 on pattern statements.
4788 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4790 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
4791 original stmt as a stmt_vec_info rather than a gimple stmt.
4792 (vect_pattern_recog_1): Take the statement directly as a
4793 stmt_vec_info, rather than via a gimple_stmt_iterator.
4794 Update call to vect_mark_pattern_stmts.
4795 (vect_pattern_recog): Update calls accordingly.
4797 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4799 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
4800 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
4801 a vect_def_type for the first argument.
4802 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
4803 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
4804 operand if it isn't defined by a vectorized statement.
4805 (vect_build_gather_load_calls): Remove the mask_dt argument and
4806 update calls to vect_get_vec_def_for_stmt_copy.
4807 (vectorizable_bswap): Likewise the dt argument.
4808 (vectorizable_call): Update calls to vectorizable_bswap and
4809 vect_get_vec_def_for_stmt_copy.
4810 (vectorizable_simd_clone_call, vectorizable_assignment)
4811 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
4812 (vectorizable_comparison): Update calls to
4813 vect_get_vec_def_for_stmt_copy.
4814 (vectorizable_store): Likewise. Remove now-unnecessary calls to
4816 (vect_get_loop_based_defs): Remove dt argument and update call
4817 to vect_get_vec_def_for_stmt_copy.
4818 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
4819 and vect_get_vec_def_for_stmt_copy.
4820 (vectorizable_load): Update calls to vect_build_gather_load_calls
4821 and vect_get_vec_def_for_stmt_copy.
4822 * tree-vect-loop.c (vect_create_epilog_for_reduction)
4823 (vectorizable_reduction, vectorizable_live_operation): Update calls
4824 to vect_get_vec_def_for_stmt_copy.
4826 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4828 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
4829 and gimple stmt arguments with a stmt_vec_info.
4830 (vect_record_base_alignments): Update calls accordingly.
4831 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
4832 and gimple stmt arguments with a stmt_vec_info.
4833 (vect_build_slp_tree_1): Remove vinfo argument and update call
4834 to vect_record_max_nunits.
4835 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
4836 and vect_record_max_nunits.
4838 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4840 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
4841 file and take a stmt_vec_info instead of a gimple stmt.
4842 (supportable_widening_operation, vect_finish_replace_stmt)
4843 (vect_finish_stmt_generation, vect_get_store_rhs)
4844 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
4845 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
4846 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
4847 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
4848 (vect_create_data_ref_ptr, bump_vector_ptr)
4849 (vect_permute_store_chain, vect_setup_realignment)
4850 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
4851 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
4852 (vectorizable_reduction, vectorizable_induction)
4853 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4854 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4855 than gimple stmts as arguments.
4856 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4857 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4858 (can_group_stmts_p, vect_check_gather_scatter)
4859 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4860 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4861 (vect_permute_load_chain, vect_shift_permute_load_chain)
4862 (vect_transform_grouped_load)
4863 (vect_record_grouped_load_vectors): Likewise.
4864 * tree-vect-loop.c (vect_fixup_reduc_chain)
4865 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4866 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4867 (vectorizable_reduction, vectorizable_induction)
4868 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4869 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4870 (vect_get_load_store_mask): Likewise.
4871 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4872 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4873 * tree-vect-stmts.c (vect_mark_relevant)
4874 (is_simple_and_all_uses_invariant)
4875 (exist_non_indexing_operands_for_use_p, process_use)
4876 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4877 (vect_get_vec_def_for_operand, vect_get_vec_defs)
4878 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4879 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4880 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4881 (get_negative_load_store_type, get_load_store_type)
4882 (vect_check_load_store_mask, vect_check_store_rhs)
4883 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4884 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4885 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4886 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4887 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4888 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4889 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4890 (supportable_widening_operation): Likewise.
4892 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4894 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4895 a stmt_vec_info instead of a gcall.
4896 (vect_check_gather_scatter): Update call accordingly.
4897 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4899 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4900 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4901 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4902 instead of a gimple stmt.
4903 (vect_transform_loop): Update calls accordingly.
4904 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4905 stmt_vec_infos instead of gimple stmts.
4906 (vect_analyze_slp_instance): Update use accordingly.
4907 * tree-vect-stmts.c (read_vector_array, write_vector_array)
4908 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4909 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4910 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4911 (vect_gen_widened_results_half, vect_get_loop_based_defs)
4912 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4913 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4914 down to subroutines.
4916 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4918 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4919 of the worklist from a vector of gimple stmts to a vector of
4921 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4922 (vect_mark_stmts_to_be_vectorized): Likewise
4924 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4926 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4927 statement before passing it to vect_analyze_stmt.
4928 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4929 the chain of phi vector definitions. Track the exit phi via its
4931 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4932 STMT_VINFO_REDUC_DEF.
4933 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4934 stmt_vec_infos to handle the statement chains.
4935 (vect_get_slp_defs): Record the first statement in the node
4936 using a stmt_vec_info.
4937 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4938 statements here and pass their stmt_vec_info down to subroutines.
4939 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4940 down to vect_finish_stmt_generation.
4941 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4942 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4943 stmt_vec_infos to subroutines.
4944 (vect_remove_stores): Use stmt_vec_infos to handle the statement
4947 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4949 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4950 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4951 (vect_permute_store_chain, vect_setup_realignment)
4952 (vect_permute_load_chain, vect_shift_permute_load_chain)
4953 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4954 stmts internally, and when passing values to other vectorizer routines.
4955 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4956 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4957 (vect_analyze_loop_operations, get_initial_def_for_reduction)
4958 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4959 (vectorizable_reduction, vectorizable_induction)
4960 (vectorizable_live_operation, vect_transform_loop_stmt)
4961 (vect_transform_loop): Likewise.
4962 * tree-vect-patterns.c (vect_reassociating_reduction_p)
4963 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4964 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4965 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4966 (vect_slp_analyze_node_operations_1): Likewise.
4967 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4968 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4969 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4970 (vect_finish_stmt_generation_1, get_group_load_store_type)
4971 (get_load_store_type, vect_build_gather_load_calls)
4972 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4973 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4974 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4975 (vectorizable_store, vectorizable_load, vectorizable_condition)
4976 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4977 (supportable_widening_operation): Likewise.
4978 (vect_get_vector_types_for_stmt): Likewise.
4979 * tree-vectorizer.h (vect_dr_behavior): Likewise.
4981 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4983 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4984 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4985 (vect_permute_store_chain, vect_permute_load_chain)
4986 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4987 repeated stmt_vec_info lookups.
4988 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4989 (vect_update_ivs_after_vectorizer): Likewise.
4990 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4991 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4992 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4993 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4994 (vect_bb_slp_scalar_cost): Likewise.
4995 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4997 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4999 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
5000 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
5001 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
5002 to get gassigns and gcalls, rather than operating on generc gimple
5004 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
5005 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
5006 (vectorizable_load, vect_analyze_stmt): Likewise.
5007 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
5009 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5011 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
5012 return stmt_vec_infos rather than gimple stmts. Do not accept
5014 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
5016 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
5017 Update use of get_later_stmt.
5018 (vect_get_constant_vectors): Update call accordingly.
5019 (vect_schedule_slp_instance): Likewise
5020 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
5021 (vect_slp_analyze_instance_dependence): Likewise.
5022 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
5024 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5026 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
5027 (stmt_info_for_cost::stmt_info): ...this new field.
5028 (add_stmt_costs): Update accordingly.
5029 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
5030 (vect_get_known_peeling_cost): Likewise.
5031 (vect_estimate_min_profitable_iters): Likewise.
5032 * tree-vect-stmts.c (record_stmt_cost): Likewise.
5034 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5036 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
5037 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5038 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
5040 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
5042 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5044 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
5045 a gimple stmt to a stmt_vec_info.
5046 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
5048 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5050 * tree-vectorizer.h (vec_info::grouped_stores): Change from
5051 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5052 (_loop_vec_info::reduction_chains): Likewise.
5053 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
5055 * tree-vect-slp.c (vect_analyze_slp): Likewise.
5057 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5059 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
5060 a gimple stmt to a stmt_vec_info.
5061 (_stmt_vec_info::next_element): Likewise.
5062 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
5063 (vect_slp_analyze_and_verify_node_alignment)
5064 (vect_analyze_group_access_1, vect_analyze_group_access)
5065 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
5066 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
5067 (vect_supportable_dr_alignment): Update accordingly.
5068 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
5069 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
5070 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
5071 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
5072 * tree-vect-slp.c (vect_build_slp_tree_1)
5073 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
5074 (vect_split_slp_store_group, vect_analyze_slp_instance)
5075 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
5076 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
5077 (get_group_load_store_type, get_load_store_type)
5078 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
5079 (vect_transform_stmt, vect_remove_stores): Likewise.
5081 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5083 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
5085 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
5086 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
5087 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
5088 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
5089 (vector_alignment_reachable_p, vect_get_data_access_cost)
5090 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
5091 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
5092 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
5093 (vect_analyze_group_access_1, vect_analyze_group_access)
5094 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
5095 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
5096 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
5097 result of vect_dr_stmt and use the stmt_vec_info instead of
5098 the associated gimple stmt.
5099 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5100 (vect_gen_prolog_loop_niters): Likewise.
5101 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5103 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5105 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
5106 to a vec<stmt_vec_info>.
5107 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
5108 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
5110 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
5111 to a vec<stmt_vec_info>.
5112 (bst_traits::value_type, bst_traits::value_type): Likewise.
5113 (bst_traits::hash): Update accordingly.
5114 (vect_get_and_check_slp_defs): Change the stmts parameter from
5115 a vec<gimple *> to a vec<stmt_vec_info>.
5116 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
5117 (vect_build_slp_tree): Likewise.
5118 (vect_build_slp_tree_2): Likewise. Update uses of
5119 SLP_TREE_SCALAR_STMTS.
5120 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
5121 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
5122 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
5123 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
5124 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
5125 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
5126 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
5127 (vect_get_constant_vectors, vect_get_slp_defs)
5128 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
5129 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
5130 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
5131 instead of gimple stmts.
5132 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
5133 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
5134 (vect_slp_analyze_instance_dependence): Update uses of
5135 SLP_TREE_SCALAR_STMTS.
5136 (vect_slp_analyze_and_verify_node_alignment): Likewise.
5137 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
5138 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
5139 (get_initial_defs_for_reduction): Likewise.
5140 (vect_create_epilog_for_reduction): Likewise.
5141 (vectorize_fold_left_reduction): Likewise.
5142 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
5143 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
5144 (can_vectorize_live_stmts): Likewise.
5146 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5148 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
5149 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5150 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
5152 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
5154 (gather_scalar_reductions): Update after above interface changes.
5155 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
5156 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
5158 (vect_force_simple_reduction): Likewise.
5159 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
5160 LOOP_VINFO_REDUCTIONS.
5161 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5163 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5165 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
5166 a gimple stmt to a stmt_vec_info.
5167 * tree-vect-loop.c (vect_active_double_reduction_p)
5168 (vect_force_simple_reduction, vectorizable_reduction): Update
5171 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5173 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
5174 vec<gimple *> to a vec<stmt_vec_info>.
5175 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
5176 the reduction_phis argument from a vec<gimple *> to a
5178 (vectorizable_reduction): Likewise the phis local variable that
5179 is passed to vect_create_epilog_for_reduction. Update for new type
5180 of SLP_TREE_VEC_STMTS.
5181 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
5182 (vectorizable_live_operation): Likewise.
5183 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
5184 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
5186 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5188 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
5189 a gimple stmt to a stmt_vec_info.
5190 (vectorizable_condition, vectorizable_live_operation)
5191 (vectorizable_reduction, vectorizable_induction): Pass back the
5192 vectorized statement as a stmt_vec_info.
5193 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
5194 use of STMT_VINFO_VEC_STMT.
5195 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
5196 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
5197 as stmt_vec_infos rather than gimple stmts.
5198 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
5200 (vectorizable_live_operation): Likewise.
5201 (vectorizable_reduction, vectorizable_induction): Likewise,
5202 updating use of STMT_VINFO_VEC_STMT.
5203 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
5204 of STMT_VINFO_VEC_STMT.
5205 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
5206 (vectorizable_simd_clone_call, vectorizable_conversion)
5207 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5208 (vectorizable_store, vectorizable_load, vectorizable_condition)
5209 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
5210 from a gimple stmt to a stmt_vec_info.
5211 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
5212 pointer to a stmt_vec_info to the vectorizable_* routines.
5214 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5216 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
5217 a gimple stmt to a stmt_vec_info.
5218 (is_pattern_stmt_p): Update accordingly.
5219 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
5220 (vect_record_grouped_load_vectors): Likewise.
5221 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
5222 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
5223 (vect_model_reduction_cost): Likewise.
5224 (vect_create_epilog_for_reduction): Likewise.
5225 (vectorizable_reduction, vectorizable_induction): Likewise.
5226 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5227 Return the stmt_vec_info for the pattern statement.
5228 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
5229 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
5230 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
5231 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
5232 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
5233 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
5234 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
5235 (free_stmt_vec_info, vect_is_simple_use): Likewise.
5237 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5239 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
5240 (vect_finish_stmt_generation): Likewise.
5241 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5242 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
5243 (vect_build_gather_load_calls): Use the return value of the above
5244 functions instead of a separate call to vinfo_for_stmt. Use narrow
5245 scopes for the input gimple stmt and wider scopes for the associated
5246 stmt_vec_info. Use vec_info::lookup_def when setting these
5247 stmt_vec_infos from an SSA_NAME definition.
5248 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
5249 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
5250 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5251 (vectorizable_store, vectorizable_load, vectorizable_condition)
5252 (vectorizable_comparison): Likewise.
5253 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
5254 (vectorizable_reduction): Likewise.
5256 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5258 * tree-vectorizer.h (vect_is_simple_use): Add an optional
5259 stmt_vec_info * parameter before the optional gimple **.
5260 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5261 (process_use, vect_get_vec_def_for_operand_1): Update callers.
5262 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
5263 * tree-vect-loop.c (vectorizable_reduction): Likewise.
5264 (vectorizable_live_operation): Likewise.
5265 * tree-vect-patterns.c (type_conversion_p): Likewise.
5266 (vect_look_through_possible_promotion): Likewise.
5267 (vect_recog_rotate_pattern): Likewise.
5268 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5270 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5272 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
5273 a typedef to a wrapper class.
5274 (NULL_STMT_VEC_INFO): New macro.
5275 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
5276 (stmt_vec_info::operator*): New function.
5277 (stmt_vec_info::operator gimple *): Likewise.
5278 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
5279 (add_stmt_costs): Likewise.
5280 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
5281 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
5282 (vect_get_known_peeling_cost): Likewise.
5283 (vect_estimate_min_profitable_iters): Likewise.
5284 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5285 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
5286 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
5287 (vectorizable_store, free_stmt_vec_infos): Likewise.
5288 (new_stmt_vec_info): Change return type of xcalloc to
5291 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5293 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
5294 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
5295 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
5296 a single_imm_use-based sequence.
5297 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
5299 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5301 * tree-vectorizer.h (vec_info::lookup_def): Declare.
5302 * tree-vectorizer.c (vec_info::lookup_def): New function.
5303 * tree-vect-patterns.c (vect_get_internal_def): Use it.
5304 (vect_widened_op_tree): Likewise.
5305 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5306 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
5307 (vectorizable_reduction): Likewise.
5308 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
5310 (vect_is_slp_reduction): Update calls accordingly. Use
5311 vec_info::lookup_def.
5312 (vect_is_simple_reduction): Likewise
5313 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
5315 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5317 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
5318 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
5319 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
5321 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
5322 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
5323 (vect_update_vf_for_slp, vect_analyze_loop_operations)
5324 (vect_is_slp_reduction, vectorizable_induction)
5325 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
5326 * tree-vect-patterns.c (vect_init_pattern_stmt):
5327 (vect_determine_min_output_precision_1, vect_determine_precisions)
5328 (vect_pattern_recog): Likewise.
5329 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
5330 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
5331 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
5332 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
5333 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
5334 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
5335 info field from a loop to a loop_vec_info.
5337 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5339 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
5340 (vec_info::add_stmt): Declare.
5341 * tree-vectorizer.c (vec_info::add_stmt): New function.
5342 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
5343 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
5344 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
5345 (vectorizable_induction): Likewise.
5346 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
5347 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5348 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
5349 (vectorizable_load): Likewise.
5350 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5351 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
5352 (vect_recog_gather_scatter_pattern): Likewise.
5353 (append_pattern_def_seq): Likewise. Remove a check that is
5354 performed by add_stmt itself.
5356 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5358 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
5359 which make_ssa_name was called with new_stmt before new_stmt
5362 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5364 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
5366 (vect_is_slp_reduction): ...here...
5367 (vect_is_simple_reduction): ...and here. Remove repetition of tests
5368 that are already known to be false.
5370 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5372 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
5373 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
5374 STMT_VINFO_NUM_SLP_USES when it's true.
5375 (vect_free_slp_instance): Add a final_p parameter and pass it to
5377 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
5378 (vect_analyze_slp_instance): Likewise.
5379 (vect_slp_analyze_operations): Likewise.
5380 (vect_slp_analyze_bb_1): Likewise.
5381 * tree-vectorizer.c (vec_info): Likewise.
5382 * tree-vect-loop.c (vect_transform_loop): Likewise.
5384 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5386 * tree-vect-loop.c (vectorizable_reduction): Assert that the
5387 function is not called for second and subsequent members of
5390 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5392 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
5393 cases for nested loops from here to ...
5394 (vect_create_epilog_for_reduction): ...here. Only call
5395 vect_is_simple_use for inner-loop reductions.
5397 2018-07-31 Martin Liska <mliska@suse.cz>
5399 PR gcov-profile/85338
5400 PR gcov-profile/85350
5401 PR gcov-profile/85372
5402 * profile.c (struct location_triplet): New.
5403 (struct location_triplet_hash): Likewise.
5404 (output_location): Do not output a BB that
5405 is already recorded for a line.
5406 (branch_prob): Use streamed_locations.
5408 2018-07-31 Martin Liska <mliska@suse.cz>
5410 PR gcov-profile/85370
5411 * coverage.c (coverage_begin_function): Do not mark target
5412 clones as artificial functions.
5414 2018-07-31 Martin Liska <mliska@suse.cz>
5416 PR gcov-profile/83813
5417 PR gcov-profile/84758
5418 PR gcov-profile/85217
5419 PR gcov-profile/85332
5420 * profile.c (branch_prob): Do not record GOTO expressions
5421 for GIMPLE statements which locations are already streamed.
5423 2018-07-31 Olivier Hainque <hainque@adacore.com>
5425 * gcc.c (handle_spec_function): Accept a soft_matched_part
5426 argument, as do_spec_1. Pass it down to ...
5427 (eval_spec_function): Accept a soft_matched_part argument,
5428 and pass it down to ...
5429 (do_spec_2): Accept a soft_matched_part argument, and pass
5430 it down to do_spec_1.
5431 (do_spec_1): Pass soft_matched_part to handle_spec_function.
5432 (handle_braces): Update call to handle_spec_function.
5433 (driver::set_up_specs): Update calls to do_spec_2.
5434 (compare_debug_dump_opt_spec_function): Likewise.
5435 (compare_debug_self_opt_spec_function): Likewise.
5437 2018-07-31 Olivier Hainque <hainque@adacore.com>
5439 * common.opt (nolibc): New option.
5440 * doc/invoke.texi (Link Options): Document it.
5441 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
5442 * config/alpha/linux.h: Likewise.
5443 * config/arc/elf.h: Likewise.
5444 * config/arm/uclinux-elf.h: Likewise.
5445 * config/arm/unknown-elf.h: Likewise.
5446 * config/avr/avrlibc.h: Likewise.
5447 * config/bfin/bfin.h: Likewise.
5448 * config/bfin/linux.h: Likewise.
5449 * config/bfin/uclinux.h: Likewise.
5450 * config/darwin.h: Likewise.
5451 * config/darwin10.h: Likewise.
5452 * config/darwin12.h: Likewise.
5453 * config/gnu-user.h: Likewise.
5454 * config/lm32/uclinux-elf.h: Likewise.
5455 * config/pa/pa-hpux11.h: Likewise.
5456 * config/pa/pa64-hpux.h: Likewise.
5457 * config/sparc/sparc.h: Likewise.
5459 2018-07-31 Olivier Hainque <hainque@adacore.com>
5461 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
5462 undefined variables.
5464 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
5467 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
5470 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
5472 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
5473 terminated string literal.
5475 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
5477 PR rtl-optimization/85160
5478 * combine.c (is_just_move): New function.
5479 (try_combine): Allow combining two instructions into two if neither of
5480 the original instructions was a move.
5482 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
5485 * doc/extend.texi (Global Register Variables): Discourage use of type
5487 (Local Register Variables): Likewise.
5489 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
5491 PR tree-optimization/86506
5492 * hwint.h (ceil_log2): Resync with hwint.c implementation.
5494 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
5497 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
5498 hard_regno, make sure no insn between `from` and `to` clobbers it.
5500 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
5501 Tom de Vries <tdevries@suse.de>
5503 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
5504 (PTX_DEFAULT_RUNTIME_DIM): ... this.
5505 (nvptx_goacc_validate_dims): Set default worker and gang dims to
5506 PTX_DEFAULT_RUNTIME_DIM.
5507 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
5509 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
5511 * config/pa/pa.c (pa_output_addr_vec): Align address table.
5512 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
5513 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
5515 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
5517 * config/rs6000/constraints.md (wG constraint): Delete, no longer
5519 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
5520 predicate to reflect toc fusion has been deleted.
5521 (toc_fusion_mem_raw): Delete, no longer used.
5522 (toc_fusion_mem_wrapped): Likewise.
5523 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
5525 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
5526 Delete, no longer used.
5527 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
5528 meant to be used for toc fusion.
5529 (rs6000_debug_print_mode): Delete toc fusion debugging.
5530 (rs6000_debug_reg_global): Likewise.
5531 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
5532 fusion and secondary reload support that were never used.
5533 (rs6000_option_override_internal): Delete TOC fusion, that was only
5534 partially defined, and it did not work unless you also used the
5536 (rs6000_legitimate_address_p): Delete TOC fusion support.
5537 (rs6000_opt_masks): Likewise.
5538 (fusion_wrap_memory_address): Delete function, no longer used.
5539 (fusion_split_address); Delete TOC fusion support.
5540 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
5541 longer used with toc fusion being deleted.
5542 (TARGET_TOC_FUSION_FP): Likewise.
5543 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
5545 (toc fusion spliter): Delete TOC fusion support.
5546 (toc_fusionload_<mode>): Likewise.
5547 (toc_fusionload_di): Likewise.
5548 (fusion_gpr_load_<mode>): Delete generator function, this insn no
5549 longer needs to be named. Rename predicate to delete TOC fusion.
5550 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5551 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5552 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5553 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5554 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
5556 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
5558 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
5559 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
5560 __int128 in built-in function prototypes.
5561 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
5562 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
5564 2018-07-27 Martin Sebor <msebor@redhat.com>
5566 PR tree-optimization/86696
5567 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
5568 types, including enums.
5569 (handle_char_store): Be prepared for the above function to fail.
5571 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
5573 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
5574 when optimization level is lower than 2 or optimize for size.
5576 2018-07-26 Martin Sebor <msebor@redhat.com>
5578 PR tree-optimization/86043
5579 PR tree-optimization/86042
5580 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
5581 (get_string_cst_length): Rename...
5582 (get_min_string_length): ...to this. Add argument.
5583 (handle_char_store): Extend to handle multi-character stores by
5585 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
5586 * tree.h (initializer_zerop): Add argument.
5588 2018-07-26 Jakub Jelinek <jakub@redhat.com>
5591 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
5592 declare target to variables if they have always,{to,from,tofrom} map
5595 2018-07-26 Martin Liska <mliska@suse.cz>
5598 * lto-wrapper.c: Add linker_output as prefix
5599 for ltrans_output_file.
5601 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
5603 PR rtl-optimization/85805
5604 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
5605 value for hard registers if that was written in the same mode.
5607 2018-07-26 Martin Liska <mliska@suse.cz>
5609 PR gcov-profile/86536
5610 * gcov.c (format_gcov): Use printf format %.*f directly
5611 and do not handle special values.
5613 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5615 * common/config/arc/arc-common.c (arc_option_optimization_table):
5616 Update default optimizations for size.
5618 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5620 * config/arc/arc.md (movsf_insn): Add short instruction selection.
5621 * config/arc/constraints.md (CfZ): New constraint.
5622 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
5623 (subsf3_fpu): Likewise.
5624 (cmpsf_fpu): Likewise.
5625 (cmpsf_fpu_uneq): Likewise.
5627 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5629 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
5631 (arc_is_uncached_mem_p): uncached applies to both the variable and
5634 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5636 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
5639 2018-07-25 David Malcolm <dmalcolm@redhat.com>
5641 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
5642 field "m_scopes" from vec to auto_vec.
5644 2018-07-25 Martin Liska <mliska@suse.cz>
5646 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
5649 2018-07-25 Richard Biener <rguenther@suse.de>
5652 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
5653 special wrt context_die late.
5654 (gen_subprogram_die): Re-use DIEs in local scope.
5656 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
5658 PR tree-optimization/86644
5659 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
5661 2018-07-25 Martin Liska <mliska@suse.cz>
5664 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
5665 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
5667 2018-07-25 Martin Liska <mliska@suse.cz>
5670 * params.def: Explain ASan abbreviation and provide
5671 a documentation link.
5673 2018-07-24 Martin Sebor <msebor@redhat.com>
5675 PR tree-optimization/86622
5676 PR tree-optimization/86532
5677 * builtins.h (string_length): Declare.
5678 * builtins.c (c_strlen): Correct handling of non-constant offsets.
5679 (check_access): Be prepared for non-constant length ranges.
5680 (string_length): Make extern.
5681 * expr.c (string_constant): Only handle the minor non-constant
5682 array index. Use string_constant to compute the length of
5683 a generic string constant.
5685 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
5687 PR tree-optimization/86618
5688 * tree-vect-stmts.c (vectorizable_call): Don't take the address
5689 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
5691 2018-07-24 David Malcolm <dmalcolm@redhat.com>
5693 PR tree-optimization/86636
5694 * json.cc (json::object::set): Fix comment. Add assertions.
5695 (json::array::append): Move here from json.h. Add comment and an
5697 (json::string::string): Likewise.
5698 * json.h (json::array::append): Move to json.cc.
5699 (json::string::string): Likewise.
5700 * optinfo-emit-json.cc
5701 (optrecord_json_writer::impl_location_to_json): Assert that we
5702 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
5703 wrapper around it. Expand the location once, rather than three
5705 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
5706 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
5708 (optrecord_json_writer::optinfo_to_json): Likewise, in four
5709 places. Fix some overlong lines.
5711 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
5713 * config/aarch64/aarch64-simd.md
5714 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
5715 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
5716 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
5717 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
5718 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
5719 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
5720 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
5721 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
5722 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
5724 2018-07-24 Jakub Jelinek <jakub@redhat.com>
5727 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
5728 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
5729 and abs_d == d, do the power of two handling if profitable.
5731 2018-07-24 Richard Biener <rguenther@suse.de>
5733 * match.pd: Add BIT_FIELD_REF canonicalizations.
5735 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5738 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
5740 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5742 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
5743 terminated STRING_CST object.
5745 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5747 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
5749 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5751 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
5752 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
5753 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
5754 the elements into a register.
5755 (rs6000_split_v4si_init_di_reg): Delete.
5756 (rs6000_split_v4si_init): Delete.
5757 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
5758 (vsx_init_v4si): Rewrite as a define_expand.
5760 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5762 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
5763 zero_extend argument from memory): New.
5765 2018-07-22 Martin Sebor <msebor@redhat.com>
5768 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
5769 diagnosing calls with unknown arguments unless -Walloca-larger-than
5770 is restricted to less than PTRDIFF_MAX bytes.
5772 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
5774 * doc/gcov.texi (Invoking Gcov): Editorial changes.
5776 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5778 * pretty-print.c (text_info::set_location): Remove redundant
5779 "line_table" parameter from call to rich_location::set_range.
5781 2018-07-20 Martin Sebor <msebor@redhat.com>
5784 * builtins.c (expand_builtin_alloca): Adjust.
5785 * calls.c (alloc_max_size): Simplify.
5786 * cgraphunit.c (cgraph_node::expand): Adjust.
5787 * common.opt (larger_than_size, warn_frame_larger_than): Remove
5789 (frame_larger_than_size): Same.
5790 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
5791 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
5793 * doc/invoke.texi (GCC Command Options): Document option arguments.
5794 Explain byte-size arguments and suffixes.
5795 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
5796 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
5797 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
5798 * doc/options.texi (UInteger): Expand.
5799 (Host_Wide_Int, ByteSize): Document new properties.
5800 * final.c (final_start_function_1): Include sizes in an error message.
5801 * function.c (frame_offset_overflow): Same.
5802 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
5803 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
5804 Diagnose unbounded alloca calls only for limits of less than
5806 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
5807 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
5809 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
5810 only for limits of less than PTRDIFF_MAX.
5811 * langhooks-def.h (lhd_handle_option): Change function argument
5813 * langhooks.c (lhd_handle_option): Same.
5814 * langhooks.h (handle_option): Same.
5815 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
5817 (var_type, var_type_struct): Same.
5818 (var_set): Handle ByteSize flag.
5819 * optc-gen.awk: Add comments to output to ease debugging. Make
5820 use of HOST_WIDE_INT where appropriate.
5821 * opts-gen-save.awk: Use %lx to format unsigned long.
5822 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
5823 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
5824 arguments. Parse bytes-size suffixes.
5825 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
5826 (enum_value_to_arg): Same.
5827 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
5828 (handle_option): Adjust.
5829 (generate_option): Change function argument to HOST_WIDE_INT.
5830 (cmdline_handle_error): Adjust.
5831 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
5832 (set_option): Change function argument to HOST_WIDE_INT.
5833 (option_enabled): Handle cl_host_wide_int.
5834 (get_option_state): Handle CLVC_SIZE.
5835 (control_warning_option): Same.
5836 * opts.c (common_handle_option): Change function argument to
5837 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
5838 OPT_Wvla_larger_than_.
5839 * opts.h (enum cl_var_type): Add an enumerator.
5840 * stor-layout.c (layout_decl): Print a more meaningful warning.
5841 * toplev.c (output_stack_usage): Adjust.
5843 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
5845 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
5846 call to inline_expand_builtin_string_cmp.
5847 (expand_builtin_strcmp): Likewise.
5848 (expand_builtin_strncmp): Likewise.
5849 (inline_string_cmp): Delete the last parameter, change char_type_node
5850 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
5852 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5853 the inlining expansion on target where the type of the call has same or
5854 narrower precision than unsigned char.
5856 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5858 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5859 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5860 * common.opt (fsave-optimization-record): New option.
5861 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5862 * doc/invoke.texi (-fsave-optimization-record): New option.
5863 * dumpfile.c: Include "optinfo-emit-json.h".
5864 (struct kv_pair): Move to coretypes.h.
5865 (optgroup_options): Make non-static.
5866 (dump_context::end_scope): Call
5867 optimization_records_maybe_pop_dump_scope.
5868 * dumpfile.h (optgroup_options): New decl.
5869 * json.cc: New file.
5871 * optinfo-emit-json.cc: New file.
5872 * optinfo-emit-json.h: New file.
5873 * optinfo.cc: Include "optinfo-emit-json.h".
5874 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5875 (optinfo_enabled_p): Check optimization_records_enabled_p.
5876 (optinfo_wants_inlining_info_p): Likewise.
5877 * optinfo.h: Update comment.
5878 * profile-count.c (profile_quality_as_string): New function.
5879 * profile-count.h (profile_quality_as_string): New decl.
5880 (profile_count::quality): New accessor.
5881 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5882 and optinfo_emit_json_cc_tests.
5883 * selftest.h (selftest::json_cc_tests): New decl.
5884 (selftest::optinfo_emit_json_cc_tests): New decl.
5885 * toplev.c: Include "optinfo-emit-json.h".
5886 (compile_file): Call optimization_records_finish.
5887 (do_compile): Call optimization_records_start.
5888 * tree-ssa-live.c: Include optinfo.h.
5889 (remove_unused_scope_block_p): Retain inlining information if
5890 optinfo_wants_inlining_info_p returns true.
5892 2018-07-20 Richard Biener <rguenther@suse.de>
5895 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5896 to cover -flto-partition=none.
5898 2018-07-20 Martin Liska <mliska@suse.cz>
5900 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5901 (get_decl_source_range): Remove unused function.
5903 2018-07-20 Richard Biener <rguenther@suse.de>
5905 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5906 (struct vn_phi_s): Likewise.
5907 (struct vn_reference_s): Likewise.
5908 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5909 for searching the slot of an entry known to be in the hash itself.
5910 (vn_phi_hasher::equal): Likewise.
5911 (vn_reference_hasher::equal): Likewise.
5912 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5914 (optimistic_info, current_info): Remove, keeping only valid_info.
5915 (vn_reference_lookup_1): Remove fallback lookup.
5916 (vn_reference_lookup_2): Likewise.
5917 (vn_nary_op_lookup_1): Likewise.
5918 (vn_phi_lookup): Likewise.
5919 (vn_nary_build_or_lookup_1): Make sure to not chain the built
5921 (vn_reference_insert): Adjust, chain the inserted hash element
5922 at last_inserted_ref.
5923 (vn_reference_insert_pieces): Likewise.
5924 (visit_reference_op_call): Likewise.
5925 (vn_nary_op_insert_into): Chain the inserted hash element at
5927 (vn_nary_op_insert_pieces): Adjust.
5928 (vn_nary_op_insert): Likewise.
5929 (vn_nary_op_insert_stmt): Likewise.
5930 (vn_phi_insert): Adjust, chain the inserted hash element at
5932 (process_scc): Remove clearing and copying the optimistic
5933 table. Instead remove elements inserted during an optimistic
5934 iteration from the single table we maintain.
5935 (init_scc_vn): Adjust.
5936 (free_scc_vn): Likewise.
5937 (sccvn_dom_walker::record_cond): Likewise.
5938 (sccvn_dom_walker::after_dom_children): Likewise.
5940 2018-07-19 Martin Sebor <msebor@redhat.com>
5942 PR tree-optimization/84047
5943 PR tree-optimization/83776
5944 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5945 (check_array_bounds): Call it.
5947 2018-07-19 Martin Sebor <msebor@redhat.com>
5949 * align.h (align_flags): Use member initialization.
5951 2018-07-19 David Malcolm <dmalcolm@redhat.com>
5953 * Makefile.in (OBJS): Add optinfo.o.
5954 * coretypes.h (class symtab_node): New forward decl.
5955 (struct cgraph_node): New forward decl.
5956 (class varpool_node): New forward decl.
5957 * dump-context.h: New file.
5958 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5960 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5961 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5962 (set_alt_dump_file): Likewise.
5963 (dump_context::~dump_context): New dtor.
5964 (dump_gimple_stmt): Move implementation to...
5965 (dump_context::dump_gimple_stmt): ...this new member function.
5966 Add the stmt to any pending optinfo, creating one if need be.
5967 (dump_gimple_stmt_loc): Move implementation to...
5968 (dump_context::dump_gimple_stmt_loc): ...this new member function.
5969 Start a new optinfo and add the stmt to it.
5970 (dump_gimple_expr): Move implementation to...
5971 (dump_context::dump_gimple_expr): ...this new member function.
5972 Add the stmt to any pending optinfo, creating one if need be.
5973 (dump_gimple_expr_loc): Move implementation to...
5974 (dump_context::dump_gimple_expr_loc): ...this new member function.
5975 Start a new optinfo and add the stmt to it.
5976 (dump_generic_expr): Move implementation to...
5977 (dump_context::dump_generic_expr): ...this new member function.
5978 Add the tree to any pending optinfo, creating one if need be.
5979 (dump_generic_expr_loc): Move implementation to...
5980 (dump_context::dump_generic_expr_loc): ...this new member
5981 function. Add the tree to any pending optinfo, creating one if
5983 (dump_printf): Move implementation to...
5984 (dump_context::dump_printf_va): ...this new member function. Add
5985 the text to any pending optinfo, creating one if need be.
5986 (dump_printf_loc): Move implementation to...
5987 (dump_context::dump_printf_loc_va): ...this new member function.
5988 Start a new optinfo and add the stmt to it.
5989 (dump_dec): Move implementation to...
5990 (dump_context::dump_dec): ...this new member function. Add the
5991 value to any pending optinfo, creating one if need be.
5992 (dump_context::dump_symtab_node): New member function.
5993 (dump_context::get_scope_depth): New member function.
5994 (dump_context::begin_scope): New member function.
5995 (dump_context::end_scope): New member function.
5996 (dump_context::ensure_pending_optinfo): New member function.
5997 (dump_context::begin_next_optinfo): New member function.
5998 (dump_context::end_any_optinfo): New member function.
5999 (dump_context::s_current): New global.
6000 (dump_context::s_default): New global.
6001 (dump_scope_depth): Delete global.
6002 (dumpfile_ensure_any_optinfo_are_flushed): New function.
6003 (dump_symtab_node): New function.
6004 (get_dump_scope_depth): Reimplement in terms of dump_context.
6005 (dump_begin_scope): Likewise.
6006 (dump_end_scope): Likewise.
6007 (selftest::temp_dump_context::temp_dump_context): New ctor.
6008 (selftest::temp_dump_context::~temp_dump_context): New dtor.
6009 (selftest::verify_item): New function.
6010 (ASSERT_IS_TEXT): New macro.
6011 (ASSERT_IS_TREE): New macro.
6012 (ASSERT_IS_GIMPLE): New macro.
6013 (selftest::test_capture_of_dump_calls): New test.
6014 (selftest::dumpfile_c_tests): Call it.
6015 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
6016 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
6017 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
6018 descriptive comment.
6019 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
6020 (dump_node, dump_bb): Move these unrelated decls.
6021 (class dump_manager): Add leading comment.
6022 * optinfo.cc: New file.
6023 * optinfo.h: New file.
6025 2018-07-19 Michael Collison <michael.collison@arm.com>
6026 Richard Henderson <rth@redhat.com>
6028 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
6029 (subti): Handle op1 zero.
6030 (subvti4, usub4ti4): New.
6031 (*sub<GPI>3_compare1_imm): New.
6032 (sub<GPI>3_carryinCV): New.
6033 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
6034 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
6036 2018-07-19 Michael Collison <michael.collison@arm.com>
6037 Richard Henderson <rth@redhat.com>
6039 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
6040 (addti3): Create simpler code if low part is already known to be 0.
6041 (addvti4, uaddvti4): New.
6042 (*add<GPI>3_compareC_cconly_imm): New.
6043 (*add<GPI>3_compareC_cconly): New.
6044 (*add<GPI>3_compareC_imm): New.
6045 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
6046 handle constants within this pattern..
6047 (*add<GPI>3_compareV_cconly_imm): New.
6048 (*add<GPI>3_compareV_cconly): New.
6049 (*add<GPI>3_compareV_imm): New.
6050 (add<GPI>3_compareV): New.
6051 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
6052 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
6053 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
6054 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
6055 with 'comparison' operator.
6056 (*add<GPI>3_compareV_cconly_imm): Ditto.
6057 (*add<GPI>3_compareV_cconly): Ditto.
6058 (*add<GPI>3_compareV_imm): Ditto.
6059 (add<GPI>3_compareV): Ditto.
6060 (add<mode>3_carryinC): Ditto.
6061 (*add<mode>3_carryinC_zero): Ditto.
6062 (*add<mode>3_carryinC): Ditto.
6063 (add<mode>3_carryinV): Ditto.
6064 (*add<mode>3_carryinV_zero): Ditto.
6065 (*add<mode>3_carryinV): Ditto.
6067 2018-07-19 Michael Collison <michael.collison@arm.com>
6068 Richard Henderson <rth@redhat.com>
6070 * config/aarch64/aarch64-modes.def (CC_V): New.
6071 * config/aarch64/aarch64-protos.h
6072 (aarch64_addti_scratch_regs): Declare
6073 (aarch64_subvti_scratch_regs): Declare.
6074 (aarch64_expand_subvti): Declare.
6075 (aarch64_gen_unlikely_cbranch): Declare
6076 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
6077 for signed overflow using CC_Vmode.
6078 (aarch64_get_condition_code_1): Handle CC_Vmode.
6079 (aarch64_gen_unlikely_cbranch): New function.
6080 (aarch64_addti_scratch_regs): New function.
6081 (aarch64_subvti_scratch_regs): New function.
6082 (aarch64_expand_subvti): New function.
6084 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
6086 * config/aarch64/aarch64-option-extensions.def: New entry for profile
6088 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
6089 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
6092 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
6095 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6096 address check not strict.
6098 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
6100 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
6102 (store_pair_lanes<mode>): Likewise.
6103 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
6104 enum value 'ADDR_QUERY_LDP_STP_N'.
6105 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
6106 (aarch64_print_address_internal): Add declaration.
6107 (aarch64_print_ldpstp_address): Remove.
6108 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
6109 (aarch64_print_operand): Change printing of 'y'.
6110 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
6111 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
6112 'true' rather than '1'.
6113 * config/aarch64/constraints.md (Uml): Likewise.
6114 (Uml): Rename to Umn.
6117 2018-07-19 Richard Biener <rguenther@suse.de>
6119 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
6121 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
6122 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
6123 (vn_reference_hasher): Likewise.
6124 (struct vn_tables_s): Remove obstack and alloc-pool members.
6125 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
6126 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
6127 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
6128 (vn_reference_insert_pieces): Likewise.
6129 (alloc_vn_nary_op_noinit): Adjust.
6130 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
6131 (vn_phi_eq): Adjust.
6132 (shared_lookup_phiargs): Remove.
6133 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
6134 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
6135 (visit_reference_op_call): Likewise.
6136 (copy_nary, copy_phi, copy_reference): Remove.
6137 (process_scc): Rewind the obstack when iterating. Do not
6138 copy the elements to valid_info but just move them from one
6139 hashtable to the other.
6140 (allocate_vn_table): Adjust.
6141 (free_vn_table): Likewise.
6142 (init_scc_vn): Likewise.
6143 (free_scc_vn): Likewise.
6145 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
6148 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
6149 indirect_return as function type attribute.
6150 (ix86_attribute_table): Change indirect_return to function
6152 * doc/extend.texi: Update indirect_return attribute.
6154 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
6156 * wide-int.h (widest2_int): New.
6157 * gimple-fold.c (arith_overflowed_p): Use it.
6158 * tree.h (widest2_int_cst): New.
6159 * tree-vrp.c (wide_int_binop_overflow): Rename from
6160 vrp_int_const_binop.
6161 Rewrite to work on trees.
6162 (extract_range_from_multiplicative_op_1): Abstract code to...
6163 (wide_int_range_min_max): ...here.
6164 (wide_int_range_cross_product): ...and here.
6165 (extract_range_from_binary_expr_1): Abstract overflow code to...
6166 (wide_int_range_mult_wrapping): ...here.
6167 * tree-vrp.h (wide_int_range_cross_product): New.
6168 (wide_int_range_mult_wrapping): New.
6170 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
6171 Julia Koval <julia.koval@intel.com>
6173 * config/i386/x86-tune-costs.h (skylake_memcpy,
6174 skylake_memset): Replace rep_prefix with unrolling for size 512.
6176 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
6179 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
6180 comparision with EQ_EXPR in last stmt.
6182 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
6184 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
6185 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
6186 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
6187 previously known as "PowerPC AltiVec Built-in Functions". Move
6188 some material to new subsubsections "PowerPC AltiVec Built-in
6189 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
6191 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
6192 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
6193 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
6194 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
6196 2018-07-18 Richard Biener <rguenther@suse.de>
6198 PR tree-optimization/86557
6199 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
6202 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
6204 * config/s390/s390.c (s390_function_profiler): Generate CFI.
6206 2018-07-17 Jeff Law <law@redhat.com>
6208 * config/arm/arm.c (get_label_padding): Update for recent
6209 changes to label_to_alignment.
6211 PR tree-optimization/86010
6212 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
6214 * config/mips/mips.c (vr4130_align_insns): Update for recent
6215 changes to label_to_alignment.
6217 * config/frv/frv.c (frv_label_align): Update for recent changes
6218 to label_to_alignment.
6220 * config/nios2/nios2.c (nios2_label_align): Update for recent
6221 changes which dropped ALIGN_LABELS_LOG.
6223 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
6225 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
6226 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
6228 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
6230 * config/arc/arc.c (arc_label_align): Use align_labels instead of
6231 deprecated align_labels_log.
6233 2018-07-17 Richard Biener <rguenther@suse.de>
6236 * dwarf2out.c (init_sections_and_labels): Always generate
6237 a debug_line_str_section for early LTO debug.
6238 (dwarf2out_finish): Reset debug_line_str_hash output early.
6239 Bump counter for extra dwarf5 .debug_loc labels to not conflict
6241 (dwarf2out_early_finish): Output debug_line_str.
6243 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
6245 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
6246 index register on z196 or later.
6248 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
6250 * config/s390/s390.c (s390_default_align): Set default function
6252 (s390_override_options_after_change): Call s390_default align.
6253 (s390_option_override_internal): Call s390_default_align.
6254 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
6256 2018-07-17 Jakub Jelinek <jakub@redhat.com>
6259 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
6260 to _looptemp_ clauses, other than the first two.
6262 2018-07-17 Martin Liska <mliska@suse.cz>
6264 * opts.c: Do not enable OPT_falign_* for -Os.
6266 2018-07-17 Martin Liska <mliska@suse.cz>
6268 * align.h (MAX_CODE_ALIGN): New.
6269 (MAX_CODE_ALIGN_VALUE): New.
6270 * common/config/i386/i386-common.c (ix86_handle_option):
6271 (MAX_CODE_ALIGN): Moved to align.h.
6272 * final.c (MAX_CODE_ALIGN): Likewise.
6273 * opts.c (parse_and_check_align_values):
6274 (MAX_CODE_ALIGN): Likewise.
6275 (MAX_CODE_ALIGN_VALUE): Likewise.
6277 2018-07-17 Martin Liska <mliska@suse.cz>
6279 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
6280 in order to fulfil coding style.
6281 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
6282 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6283 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6284 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
6285 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
6286 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
6287 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
6288 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
6289 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6291 2018-07-17 Martin Liska <mliska@suse.cz>
6293 * align.h: New file.
6294 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
6296 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
6297 align_flags of label_to_alignment.
6298 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
6300 * config/m68k/m68k.c: Do not use removed align_labels_value and
6302 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
6303 (LOOP_ALIGN): Likewise.
6304 (LABEL_ALIGN): Likewise.
6305 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
6306 Remove not used macro.
6307 (rs6000_loop_align): Change return type to align_flags.
6308 (rs6000_loop_align_max_skip): Remove.
6309 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
6310 Change return type to align_flags.
6311 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
6312 Remove not used macro.
6313 (rs6000_loop_align): Change return type to align_flags.
6314 (rs6000_loop_align_max_skip): Remove.
6315 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
6316 * config/rx/rx-protos.h (rx_align_for_label): Make it
6318 * config/rx/rx.c (rx_align_for_label): Change return type
6320 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
6322 into align_flags class.
6323 (LABEL_ALIGN): Likewise.
6324 (LOOP_ALIGN): Likewise.
6325 * config/s390/s390.c (s390_label_align): Use align_flags
6327 (s390_asm_output_function_label): Likewise.
6328 * config/sh/sh.c (sh_override_options_after_change):
6329 Use align_flags class directly without macros.
6330 (find_barrier): Likewise.
6331 (barrier_align): Likewise.
6332 (sh_loop_align): Likewise.
6333 * config/spu/spu.c (spu_option_override):
6334 Use align_flags_tuple::get_value instead of removed macros.
6335 (spu_sched_init): Likewise.
6336 * config/spu/spu.h (GTY): Likewise.
6337 * config/visium/visium.c (visium_option_override):
6338 Set "8" as default secondary alignment.
6339 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
6340 in order to guarantee secondary alignment of 8.
6341 * coretypes.h: Include align.h header file.
6342 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
6343 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
6344 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
6345 * doc/tm.texi.in: Likewise.
6346 * final.c (struct label_alignment): Remove not used structure.
6347 (LABEL_ALIGN): Change type to align_flags.
6348 (LOOP_ALIGN): Likewise.
6349 (JUMP_ALIGN): Likewise.
6350 (default_loop_align_max_skip): Remove.
6351 (default_label_align_max_skip): Likewise.
6352 (default_jump_align_max_skip): Likewise.
6353 (default_label_align_after_barrier_max_skip):
6354 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
6355 (LABEL_TO_MAX_SKIP): Remove.
6356 (label_to_alignment): Return align_flags type instead of integer.
6357 (label_to_max_skip): Remove.
6358 (align_fuzz): Use align_flags type.
6359 (compute_alignments): Use align_flags type and use align_flags::max
6360 to combine multiple alignments.
6361 (grow_label_align): Grow vec instead of C array.
6362 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
6363 (shorten_branches): Use align_flags type and use align_flags::max
6364 to combine multiple alignments.
6365 (final_scan_insn_1): Remove usage of secondary alignment that comes
6366 from label alignment, but instead use proper secondary alignment
6367 which is computed in grow_label_align.
6368 * flags.h (struct align_flags_tuple): Move to align.h.
6369 (struct align_flags): Likewise.
6370 (state_align_loops): Rename to align_loops.
6371 (state_align_jumps): Rename to align_jumps.
6372 (state_align_labels): Rename to align_labels.
6373 (state_align_functions): Rename to align_functions.
6374 (align_loops_log): Remove.
6375 (align_jumps_log): Remove.
6376 (align_labels_log): Remove.
6377 (align_functions_log): Remove.
6378 (align_loops_max_skip): Remove.
6379 (align_jumps_max_skip): Remove.
6380 (align_labels_max_skip): Remove.
6381 (align_functions_max_skip): Remove.
6382 (align_loops_value): Remove.
6383 (align_jumps_value): Remove.
6384 (align_labels_value): Remove.
6385 (align_functions_value): Remove.
6386 * output.h (label_to_alignment): Change return type to align_flags.
6387 (label_to_max_skip): Remove.
6388 * target.def: Remove loop_align_max_skip, label_align_max_skip,
6389 jump_align_max_skip macros.
6390 * targhooks.h (default_loop_align_max_skip): Remove.
6391 (default_label_align_max_skip): Likewise.
6392 (default_jump_align_max_skip): Likewise.
6393 (default_label_align_after_barrier_max_skip): Remove.
6394 * toplev.c (read_log_maxskip): Use ::normalize function.
6395 (parse_N_M): Remove not used argument and also call ::normalize.
6396 (parse_alignment_opts): Do not pass unused arguments.
6397 * varasm.c (assemble_start_function): Use directly align_functions
6398 instead of removed macros.
6399 * system.h: Do not poison removed macros.
6401 2018-07-17 Jakub Jelinek <jakub@redhat.com>
6404 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
6405 and cond temporaries don't have reference type if iterator has
6406 pointer type. For init use &for_pre_body instead of pre_p if
6407 for_pre_body is non-empty.
6409 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6411 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
6412 double-double modes to SFmode directly directly.
6413 (trunc<mode>sf2_fprs): Delete.
6415 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6417 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
6418 for conversions between IFmode and the decimal floating point modes.
6419 (init_float128_ieee): Use the correct names for conversions between
6420 KFmode and the decimal floating point modes.
6422 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6424 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
6425 for the conversions between TDmode and IFmode.
6426 (init_float128_ieee): Use more correct names for the conversions
6427 between TDmode and KFmode.
6429 2018-07-16 Jakub Jelinek <jakub@redhat.com>
6431 PR tree-optimization/86526
6432 * builtins.c (expand_builtin_memcmp): Formatting fixes.
6433 (inline_expand_builtin_string_cmp): Likewise.
6434 (inline_string_cmp): Likewise. Use c_readstr instead of
6435 builtin_memcpy_read_str. Add unit_mode temporary.
6437 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
6440 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
6441 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
6443 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
6445 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
6446 Alphabetize prototypes of built-in functions, separating out
6447 built-in functions that are listed in this section but should be
6448 described elsewhere.
6450 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
6453 * expmed.c (emit_store_flag): Do not emit setcc followed by a
6454 conditional move when trapping comparison was split to a
6455 non-trapping one (and vice versa).
6457 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6459 * config/s390/s390.c (s390_function_profiler): Generate nops
6460 instead of profiler call sequences.
6461 * config/s390/s390.opt: Add the new option.
6463 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6465 * config/s390/s390.c (s390_function_profiler): Generate
6466 __mcount_loc section.
6467 * config/s390/s390.opt: Add the new option.
6469 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6471 * common.opt: Add the new warning.
6472 * config/s390/s390.c (s390_function_profiler): Emit "brasl
6473 %r0,__fentry__" when -mfentry is specified.
6474 (s390_option_override_internal): Disallow -mfentry for 31-bit
6476 * config/s390/s390.opt: Add the new option.
6478 2018-07-16 Richard Biener <rguenther@suse.de>
6481 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
6482 for function-local FUNCTION_DECL and RESULT_DECL immediately.
6484 2018-07-16 Martin Liska <mliska@suse.cz>
6487 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
6490 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
6492 * config/arc/arcHS.md: Update ARCHS scheduling rules.
6494 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
6496 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
6498 * config/arc/arc-cpus.def (hs4x): New cpu.
6500 * config/arc/arc-tables.opt: Regenerate.
6501 * config/arc/arc.c (arc_sched_issue_rate): New function.
6502 (TARGET_SCHED_ISSUE_RATE): Define.
6503 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
6504 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
6506 (attr tune): Add ARCHS4x tune values.
6507 (attr tune_dspmpy): Define.
6508 (*tst): Correct instruction type.
6509 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
6510 * config/arc/arcHS4x.md: New file.
6511 * config/arc/fpu.md: Update instruction type attributes.
6512 * config/arc/t-multilib: Regenerate.
6514 2018-07-16 Tom de Vries <tdevries@suse.de>
6517 * var-tracking.c (vt_initialize): Fix pre_dec handling.
6519 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6521 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
6524 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
6526 PR tree-optimization/86514
6527 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
6528 conversion to a boolean type from a type with greater precision.
6530 2018-07-16 Tom de Vries <tdevries@suse.de>
6532 * var-tracking.c (vt_initialize): Print adjusted insn slim if
6533 dump_flags request TDF_SLIM.
6535 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
6537 * fold-const.c (int_const_binop_1): Abstract...
6538 (wide_int_binop): ...wide int code here.
6539 (poly_int_binop): ...poly int code here.
6540 Abstract the rest of int_const_binop_1 into int_const_binop.
6541 * fold-const.h (wide_int_binop): New.
6542 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
6543 Remove useless PLUS/MINUS_EXPR case.
6544 (zero_nonzero_bits_from_vr): Move wide int code...
6545 (zero_nonzero_bits_from_bounds): ...here.
6546 (extract_range_from_binary_expr_1): Move mask optimization code...
6547 (range_easy_mask_min_max): ...here.
6548 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
6549 (range_easy_mask_min_max): New.
6551 2018-07-15 Jeff Law <law@redhat.com>
6554 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
6557 2018-07-14 Jim Wilson <jimw@sifive.com>
6559 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
6561 2018-07-14 Paul Koning <ni1d@arrl.net>
6563 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
6565 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
6567 * lto-streamer-out.c (copy_function_or_variable): Dump info about
6570 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
6571 Steve Munroe <munroesj52@gmail.com>
6573 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
6574 (_mm_andnot_si128): Likewise.
6575 (_mm_or_si128): Likewise.
6576 (_mm_xor_si128): Likewise.
6578 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
6581 * builtins.c (expand_builtin_memcmp): Inline the calls first
6582 when result_eq is false.
6583 (expand_builtin_strcmp): Inline the calls first.
6584 (expand_builtin_strncmp): Likewise.
6585 (inline_string_cmp): New routine. Expand a string compare
6586 call by using a sequence of char comparison.
6587 (inline_expand_builtin_string_cmp): New routine. Inline expansion
6588 a call to str(n)cmp/memcmp.
6589 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
6591 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
6593 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
6595 * config/arm/driver-arm.c: Include arm-native.h.
6596 (host_detect_local_cpu): Use auto-generated data tables.
6597 (vendors, arm_cpu_table): Delete. Move part information to ...
6598 * config/arm/arm-cpus.in: ... here.
6599 * config/arm/parsecpu.awk (gen_native): New function.
6600 (vendor, part): New CPU fields.
6601 (END): Add support for building the native CPU detection tables.
6602 * config/arm/t-arm (arm-native.h): Add build rule.
6603 (driver-arm.o): Add dependency on arm-native.h.
6605 2018-07-13 Richard Biener <rguenther@suse.de>
6608 * match.pd (addr1 - addr2): Allow either of the operand to
6611 2018-07-13 Tom de Vries <tdevries@suse.de>
6613 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
6616 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
6618 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
6619 arrays instead of numbered variables.
6621 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
6623 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
6624 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
6626 2018-07-13 Richard Biener <rguenther@suse.de>
6629 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
6630 instead of get_context_die.
6632 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
6633 Richard Biener <rguenther@suse.de>
6636 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
6637 that the loop latch destination where phi is defined.
6639 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
6641 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
6642 (riscv_expand_epilogue): Add assertion to check interrupt mode.
6643 (riscv_set_current_function): Extract getting interrupt type to new
6645 (riscv_get_interrupt_type): New function.
6646 (riscv_merge_decl_attributes): New function, checking interrupt type is
6648 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
6650 2018-07-12 Paul Koning <ni1d@arrl.net>
6652 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
6655 2018-07-12 Paul Koning <ni1d@arrl.net>
6657 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
6658 zero reference, add doloop_end instead.
6659 * doc/md.texi (decrement_and_branch_until_zero): Remove.
6660 (Looping patterns): Remove decrement_and_branch_until_zero. Add
6661 detail for doloop_end.
6663 2018-07-12 Martin Sebor <msebor@redhat.com>
6666 * attribs.c (decl_attributes): Reject conflicting attributes before
6667 calling attribute handlers.
6669 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6671 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
6673 (gcc::dump_manager::get_dump_file_name): likewise.
6674 (dump_begin): Likewise.
6675 * dumpfile.h (dump_begin): Update prototype.
6676 (gcc::dump_manager::get_dump_file_name,
6677 gcc::dump_manager::get_dump_file_name): Update prototype.
6679 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6681 * internal-fn.h (vectorizable_internal_fn_p): New function.
6682 * tree-vect-slp.c (compatible_calls_p): Likewise.
6683 (vect_build_slp_tree_1): Remove nops argument. Handle calls
6684 to internal functions.
6685 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
6687 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6689 * fold-const.h (inverse_conditions_p): Declare.
6690 * fold-const.c (inverse_conditions_p): New function.
6691 * match.pd: Use inverse_conditions_p. Add folds of view_converts
6692 that test the inverse condition of a conditional internal function.
6693 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
6694 * internal-fn.c (internal_fn_mask_index): Handle conditional
6696 (vectorized_internal_fn_supported_p): New function.
6697 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
6698 (any_pred_load_store): Replace with...
6699 (need_to_predicate): ...this new variable.
6700 (redundant_ssa_names): New variable.
6701 (ifcvt_can_use_mask_load_store): Move initial checks to...
6702 (ifcvt_can_predicate): ...this new function. Handle tree codes
6703 for which a conditional internal function exists.
6704 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
6705 instead of ifcvt_can_use_mask_load_store. Update after variable
6707 (predicate_load_or_store): New function, split out from
6708 predicate_mem_writes.
6709 (check_redundant_cond_expr): New function.
6710 (value_available_p): Likewise.
6711 (predicate_rhs_code): Likewise.
6712 (predicate_mem_writes): Rename to...
6713 (predicate_statements): ...this. Use predicate_load_or_store
6714 and predicate_rhs_code.
6715 (combine_blocks, tree_if_conversion): Update after above name changes.
6716 (ifcvt_local_dce): Handle redundant_ssa_names.
6717 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
6718 general conditional functions.
6719 * tree-vect-stmts.c (vectorizable_call): Likewise.
6721 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6722 Alan Hayward <alan.hayward@arm.com>
6723 David Sherwood <david.sherwood@arm.com>
6725 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
6726 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
6727 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
6728 plus and minus and convert them into IFN_COND_FMA-based sequences.
6729 (convert_mult_to_fma): Handle conditional plus and minus.
6731 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6733 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
6734 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
6735 (cond_fnms_optab): New optabs.
6736 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
6738 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
6739 * internal-fn.h (get_conditional_internal_fn): Declare.
6740 (get_unconditional_internal_fn): Likewise.
6741 * internal-fn.c (cond_ternary_direct): New macro.
6742 (expand_cond_ternary_optab_fn): Likewise.
6743 (direct_cond_ternary_optab_supported_p): Likewise.
6744 (FOR_EACH_COND_FN_PAIR): Likewise.
6745 (get_conditional_internal_fn): New function.
6746 (get_unconditional_internal_fn): Likewise.
6747 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
6748 (gimple_match_op::gimple_match_op): Add a new overload for 5
6750 (gimple_match_op::set_op): Likewise.
6751 (gimple_resimplify5): Declare.
6752 * genmatch.c (decision_tree::gen): Generate simplifications for
6754 * gimple-match-head.c (gimple_simplify): Define an overload for
6755 5 operands. Handle calls with 5 arguments in the top-level overload.
6756 (convert_conditional_op): Handle conversions from unconditional
6757 internal functions to conditional ones.
6758 (gimple_resimplify5): New function.
6759 (build_call_internal): Pass a fifth operand.
6760 (maybe_push_res_to_seq): Likewise.
6761 (try_conditional_simplification): Try converting conditional
6762 internal functions to unconditional internal functions.
6763 Handle 3-operand unconditional forms.
6764 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
6765 Define ternary equivalents of the current rules for binary conditional
6767 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
6769 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
6770 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
6771 (optab): Handle them.
6772 (SVE_COND_FP_TERNARY): New int iterator.
6773 (sve_fmla_op, sve_fmad_op): New int attributes.
6774 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
6775 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
6776 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
6778 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6780 * target.def (preferred_else_value): New target hook.
6781 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
6782 * doc/tm.texi: Regenerate.
6783 * targhooks.h (default_preferred_else_value): Declare.
6784 * targhooks.c (default_preferred_else_value): New function.
6785 * internal-fn.h (conditional_internal_fn_code): Declare.
6786 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
6787 (get_conditional_internal_fn): Use it.
6788 (conditional_internal_fn_code): New function.
6789 * gimple-match.h (gimple_match_cond): New struct.
6790 (gimple_match_op): Add a cond member function.
6791 (gimple_match_op::gimple_match_op): Update all forms to take a
6793 * genmatch.c (expr::gen_transform): Use the same condition as res_op
6794 for the suboperation, but don't specify a particular else_value.
6795 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
6796 (visit_nary_op, visit_reference_op_load): Pass
6797 gimple_match_cond::UNCOND to the gimple_match_op constructor.
6798 * gimple-match-head.c: Include tree-eh.h
6799 (convert_conditional_op): New function.
6800 (maybe_resimplify_conditional_op): Likewise.
6801 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
6802 (gimple_resimplify2): Likewise.
6803 (gimple_resimplify3): Likewise.
6804 (gimple_resimplify4): Likewise.
6805 (maybe_push_res_to_seq): Return null for conditional operations.
6806 (try_conditional_simplification): New function.
6807 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
6809 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
6811 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
6813 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
6815 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6817 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6819 (hash_tree): Do not hash DECL_FCONTEXT
6820 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
6821 Do not stream DECL_FCONTEXT.
6822 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
6823 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
6825 2018-07-12 Richard Biener <rguenther@suse.de>
6828 * dwarf2out.c (gen_block_die): Only output blocks when they have
6829 at least one !DECL_IGNORED_P variable.
6831 2018-07-12 Richard Biener <rguenther@suse.de>
6834 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
6835 Remove -mieee-fp handling.
6837 2018-07-12 Richard Biener <rguenther@suse.de>
6839 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
6840 left-over from last patch.
6842 2018-07-12 Jakub Jelinek <jakub@redhat.com>
6844 PR tree-optimization/86492
6845 * gimple-ssa-store-merging.c
6846 (imm_store_chain_info::coalesce_immediate_stores): Call
6847 check_no_overlap even for the merge_overlapping case. Formatting fix.
6849 2018-07-12 Richard Biener <rguenther@suse.de>
6852 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6853 move possibly trapping operations into the conditional.
6855 2018-07-12 Richard Biener <rguenther@suse.de>
6857 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6858 (vn_lookup_simplify_result): Remove recursion limit applied
6860 (vn_nary_build_or_lookup_1): Adjust.
6861 (try_to_simplify): Likewise.
6862 * gimple-match-head.c (gimple_resimplify1): Instead apply one
6864 (gimple_resimplify2): Likewise.
6865 (gimple_resimplify3): Likewise.
6866 (gimple_resimplify4): Likewise.
6868 2018-07-11 Jakub Jelinek <jakub@redhat.com>
6870 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6871 Use __mmask64 type instead of __mmask8 for __M argument.
6872 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6873 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6875 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6876 __mmask16 for __M argument.
6877 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6878 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6879 to __mmask16 instead of __mmask8.
6880 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6881 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6882 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6883 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6884 instead of __mmask16 for __U argument.
6885 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6886 __mmask16 instead of __mmask8 for __U argument.
6887 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6889 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6891 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6893 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6895 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6897 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6899 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6901 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6903 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6905 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6907 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6908 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6909 return type as well as __M argument type and all casts from __mmask8
6911 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6912 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6913 return type as well as __M argument type and all casts from __mmask8
6915 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6916 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6917 return type as well as __M argument type and all casts from __mmask8
6919 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6920 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6921 return type as well as __M argument type and all casts from __mmask8
6923 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6924 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6927 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
6929 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6930 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6933 2018-07-11 Paul Koning <ni1d@arrl.net>
6935 * doc/md.texi (define_subst): Document how multiple occurrences of
6936 the same argument in the replacement pattern are handled.
6938 2018-07-11 Paul Koning <ni1d@arrl.net>
6940 * doc/extend.texi (Common Variable Attributes): Move "mode" into
6942 (Common Type Attributes): Add "mode" attribute.
6944 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
6946 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6947 stream DECL_ORIGINAL_TYPE.
6948 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6949 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6950 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6951 Do not walk original type.
6952 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6954 (write_ts_decl_non_common_tree_pointers): Do not stream
6956 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6957 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6959 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6961 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6962 thread twice from the same starting edge.
6964 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6966 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6967 * gimple.c (gimple_call_nonnull_result_p): ...here...
6968 (gimple_call_nonnull_arg): ...and here.
6969 * gimple.h (gimple_call_nonnull_result_p): New.
6970 (gimple_call_nonnull_arg): New.
6972 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
6974 * config/arm/arm-cpus.in: Move information from fpu field of each
6975 cpu definition to the isa field.
6976 * config/arm/parsecpu.awk (fpu): Delete match rule.
6977 (gen_comm_data): Don't add bits from the CPU's FPU entry.
6979 2018-07-11 Richard Biener <rguenther@suse.de>
6982 * dwarf2out.c (init_sections_and_labels): Use
6983 output_asm_line_debug_info consistently.
6984 (dwarf2out_early_finish): Likewise.
6985 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6988 2018-07-11 Richard Biener <rguenther@suse.de>
6990 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6991 Rework father_bb setting in a way to avoid propagating constants
6992 multiple times on a loop body.
6994 2018-07-10 Mark Wielaard <mark@klomp.org>
6997 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6999 2018-07-10 Richard Biener <rguenther@suse.de>
7001 * hash-map.h (hash_map::iterator::operator*): Return
7002 references to key and value.
7004 2018-07-10 Jakub Jelinek <jakub@redhat.com>
7007 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
7008 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
7009 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
7010 (gimplify_omp_for): For composite loops, move outer
7011 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
7012 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
7013 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
7014 TREE_LIST for both the original class iterator and the "last" helper
7015 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
7016 loop, remember has_decl_expr from outer composite loops for the
7017 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
7019 2018-07-09 Martin Sebor <msebor@redhat.com>
7023 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
7024 accessing implicitly initialized array elements.
7025 * expr.c (string_constant): Handle string initializers of
7026 character arrays within aggregates.
7027 * gimple-fold.c (fold_array_ctor_reference): Add argument.
7028 Store element offset. As a special case, handle zero size.
7029 (fold_nonarray_ctor_reference): Same.
7030 (fold_ctor_reference): Add argument. Store subobject offset.
7031 * gimple-fold.h (fold_ctor_reference): Add argument.
7033 2018-07-09 Paul Koning <ni1d@arrl.net>
7035 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
7036 (pdp11_insn_cost): New function.
7037 (pdp11_md_asm_adjust): New function.
7038 (TARGET_INVALID_WITHIN_DOLOOP): Define.
7039 (pdp11_rtx_costs): Update to match machine better.
7040 (output_addr_const_pdp11): Correct format mismatch warnings.
7041 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
7042 * config/pdp11/pdp11.md: General change to add base_cost and/or
7043 length attributes for use by new pdp11_insn_cost function.
7044 (MIN_BRANCH): Correct definition.
7046 (doloop_end): Use standard pattern name for looping pattern.
7047 (doloop_end_nocc): New.
7048 (movsf): Add another constraint alternative.
7049 (zero_extendqihi2): Add constraint alternatives for not in place
7051 (zero_extendhisi2): Remove.
7052 (shift patterns): Add CC handling variants.
7056 (define_peephole2): New peephole to recognize mov that sets CC for
7059 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7061 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
7062 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
7065 2018-07-09 Jakub Jelinek <jakub@redhat.com>
7068 * real.c (real_nextafter): Return true if result is denormal.
7070 2018-07-09 Martin Liska <mliska@suse.cz>
7072 * common.opt: Add back wrongly removed attribute.
7074 2018-07-09 Richard Biener <rguenther@suse.de>
7077 * dwarf2out.c (gen_block_die): For an early generated DIE
7078 always output high/low PC attributes.
7080 2018-07-09 Tom de Vries <tdevries@suse.de>
7082 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
7083 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
7084 onto VAR_DECL with abstract origin.
7086 2018-07-07 Jim Wilson <jimw@sifive.com>
7088 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
7090 2018-07-07 Tom de Vries <tdevries@suse.de>
7092 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
7094 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
7096 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
7098 (combine_bound): Use wide-int overflow calculation instead of
7100 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
7102 * fold-const.c (int_const_binop_2): Same.
7103 (extract_muldiv_1): Same.
7104 (fold_div_compare): Same.
7105 (fold_abs_const): Same.
7107 * poly-int.h (add): Same.
7111 * predict.c (predict_iv_comparison): Same.
7112 * profile-count.c (slow_safe_scale_64bit): Same.
7113 * simplify-rtx.c (simplify_const_binary_operation): Same.
7114 * tree-chrec.c (tree_fold_binomial): Same.
7115 * tree-data-ref.c (split_constant_offset_1): Same.
7116 * tree-if-conv.c (idx_within_array_bound): Same.
7117 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
7118 * tree-ssa-phiopt.c (minmax_replacement): Same.
7119 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
7120 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
7121 * vr-values.c (vr_values::adjust_range_with_scev): Same.
7122 * wide-int.cc (wi::add_large): Same.
7123 (wi::mul_internal): Same.
7124 (wi::sub_large): Same.
7125 (wi::divmod_internal): Same.
7126 * wide-int.h: Change overflow type to overflow_type for neg, add,
7127 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
7128 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
7129 mul_internal, divmod_internal.
7130 (overflow_type): New enum.
7131 (accumulate_overflow): New.
7133 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
7135 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
7136 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
7138 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
7140 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
7141 argument is checked for zero before entering loop, avoid checking again.
7143 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
7145 * gimplify.h (generic_expr_could_trap_p): Set as global function.
7146 * gimplify.h (generic_expr_could_trap_p): Likwise.
7147 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
7149 2018-07-06 Jakub Jelinek <jakub@redhat.com>
7151 PR tree-optimization/86401
7152 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
7153 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
7154 (fold_bit_and_mask): ... here. New helper function for match.pd.
7155 * fold-const.h (fold_bit_and_mask): Declare.
7156 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
7158 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
7161 * target.def (translate_mode_attribute): New hook.
7162 * targhooks.h (default_translate_mode_attribute): Declare.
7163 * targhooks.c (default_translate_mode_attribute): New function.
7164 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
7165 * doc/tm.texi: Regenerate.
7166 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
7167 (rs6000_translate_mode_attribute): New function.
7169 2018-07-06 Paul Koning <ni1d@arrl.net>
7171 * doc/md.texi (define_split): Document DONE and FAIL.
7172 (define_peephole2): Ditto.
7174 2018-07-05 Jeff Law <law@redhat.com>
7176 PR tree-optimization/86010
7177 * tree-ssa-dse.c (compute_trims): More aggressively trim at
7178 both the head and tail of mem* and str* calls.
7180 2018-07-05 Jim Wilson <jimw@sifive.com>
7182 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
7184 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
7186 * config/aarch64/aarch64-simd.md: correct flags text for
7187 MIN_EXPR replacement.
7189 2018-07-05 James Clarke <jrtc27@jrtc27.com>
7191 * configure: Regenerated.
7193 2018-07-05 Carl Love <cel@us.ibm.com>
7195 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
7196 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
7197 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
7198 VSX_BUILTIN_DOUBLEL_V4SF.
7200 2018-07-05 Martin Sebor <msebor@redhat.com>
7203 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
7204 than its domain to compute its the upper bound of a char array.
7206 2018-07-05 Nathan Sidwell <nathan@acm.org>
7208 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
7209 * doc/cpp.texi: Update comment.
7210 * doc/tm.texi: Rebuilt.
7211 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
7212 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
7213 * doc/extend.texi (Backwards Compatibility): Clarify it is system
7214 headers affected by extern "C".
7215 * system.h: Poison NO_IMPLICIT_EXTERN_C.
7216 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
7217 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
7218 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
7219 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
7220 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
7221 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
7222 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
7223 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
7224 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
7225 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
7226 config/sparc/sp64-elf.h, config/spu/spu.h,
7227 config/stormy16/stormy16.h, config/v850/v850.h,
7228 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
7229 define NO_IMPLICIT_EXTERN_C.
7230 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
7232 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7235 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
7236 instead of GET_MODE_SIZE when comparing Units.
7238 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7241 * rtlanal.c (set_noop_p): Constrain on mode change,
7242 include hard-reg-set.h
7244 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7246 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
7248 2018-07-05 Jakub Jelinek <jakub@redhat.com>
7251 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
7254 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
7256 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
7258 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
7261 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
7263 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
7265 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
7268 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
7270 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
7272 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
7273 neg_*_op* variables.
7275 2018-07-04 Martin Liska <mliska@suse.cz>
7277 * tree-switch-conversion.c: Define
7278 max_ratio_for_speed and max_ratio_for_size constants.
7280 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
7281 Martin Liska <mliska@suse.cz>
7286 * common.opt: Rename align options with 'str_' prefix.
7287 * common/config/i386/i386-common.c (set_malign_value): New
7289 (ix86_handle_option): Use it to set -falign-* options/
7290 * config/aarch64/aarch64-protos.h (struct tune_params): Change
7291 type from int to string.
7292 * config/aarch64/aarch64.c: Update default values from int
7294 * config/alpha/alpha.c (alpha_override_options_after_change):
7296 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
7297 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7298 max skip conditionally.
7299 * config/i386/freebsd.h (SUBALIGN_LOG): New.
7300 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7301 max skip conditionally.
7302 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7303 max skip conditionally.
7304 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
7305 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7306 max skip conditionally.
7307 * config/i386/i386.c (struct ptt): Change type from int to
7309 (ix86_default_align): Set default values.
7310 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
7311 max skip conditionally.
7312 * config/i386/iamcu.h (SUBALIGN_LOG): New.
7313 (ASM_OUTPUT_MAX_SKIP_ALIGN):
7314 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
7315 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7316 max skip conditionally.
7317 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
7318 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
7319 * config/i386/x86-64.h (SUBALIGN_LOG): New.
7320 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7321 max skip conditionally.
7322 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7323 * config/ia64/ia64.c (ia64_option_override): Set default values
7324 for alignment options.
7325 * config/m68k/m68k.c: Handle new str_align_* options.
7326 * config/mips/mips.c (mips_set_compression_mode): Change
7328 (mips_option_override): Set default values for options.
7329 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
7331 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7333 * config/rx/rx.c (rx_option_override): Likewise.
7334 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
7335 (LABEL_ALIGN): Use align_labels_log.
7336 (LOOP_ALIGN): Use align_loops_align.
7337 * config/s390/s390.c (s390_asm_output_function_label): Use new
7339 * config/sh/sh.c (sh_override_options_after_change):
7340 Change type of constants.
7341 * config/spu/spu.c (spu_sched_init): Likewise.
7342 * config/sparc/sparc.c (sparc_option_override): Set default
7344 * config/visium/visium.c (visium_option_override): Likewise.
7345 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
7346 emit p2align format with last argument if it's not needed.
7347 * doc/invoke.texi: Document extended format of -falign-*.
7348 * final.c: Use align_labels alignment.
7349 * flags.h (struct target_flag_state): Change type to use
7351 (struct align_flags_tuple): New.
7352 (struct align_flags): Likewise.
7353 (align_loops_log): Redefine macro to use new types.
7354 (align_loops_max_skip): Redefine macro to use new types.
7355 (align_jumps_log): Redefine macro to use new types.
7356 (align_jumps_max_skip): Redefine macro to use new types.
7357 (align_labels_log): Redefine macro to use new types.
7358 (align_labels_max_skip): Redefine macro to use new types.
7359 (align_functions_log): Redefine macro to use new types.
7360 (align_loops): Redefine macro to use new types.
7361 (align_jumps): Redefine macro to use new types.
7362 (align_labels): Redefine macro to use new types.
7363 (align_functions): Redefine macro to use new types.
7364 (align_functions_max_skip): Redefine macro to use new types.
7365 (align_loops_value): New macro.
7366 (align_jumps_value): New macro.
7367 (align_labels_value): New macro.
7368 (align_functions_value): New macro.
7369 * function.c (invoke_set_current_function_hook): Propagate
7370 alignment values from flags to global variables default in
7372 * ipa-icf.c (sem_function::equals_wpa): Use
7373 cl_optimization_option_eq instead of memcmp.
7374 * lto-streamer.h (cl_optimization_stream_out): Support streaming
7376 (cl_optimization_stream_in): Likewise.
7377 * optc-save-gen.awk: Support strings in cl_optimization.
7378 * opth-gen.awk: Likewise.
7379 * opts.c (finish_options): Remove error checking of invalid
7381 (MAX_CODE_ALIGN): Remove.
7382 (MAX_CODE_ALIGN_VALUE): Likewise.
7383 (parse_and_check_align_values): New function.
7384 (check_alignment_argument): Likewise.
7385 (common_handle_option): Use check_alignment_argument.
7386 * opts.h (parse_and_check_align_values): Declare.
7387 * toplev.c (init_alignments): Remove.
7388 (read_log_maxskip): New.
7389 (parse_N_M): Likewise.
7390 (parse_alignment_opts): Likewise.
7391 (backend_init_target): Remove usage of init_alignments.
7392 * toplev.h (parse_alignment_opts): Declare.
7393 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
7395 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
7396 * tree.c (cl_option_hasher::equal): New.
7397 * varasm.c: Use new global macros.
7399 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
7401 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
7402 Use a simpler align directive also if MAXSKIP = ALIGN-1.
7403 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7404 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7405 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7406 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7407 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
7408 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
7409 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
7410 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7411 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7412 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7413 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7415 2018-07-04 Martin Liska <mliska@suse.cz>
7416 Jonathan Wakely <jwakely@redhat.com>
7418 * coverage.c: Use correct type.
7419 * doc/invoke.texi: Language correction.
7421 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
7424 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
7425 ENDBRANCH for non-tail call which may return via indirect branch.
7426 * doc/extend.texi: Document indirect_return attribute.
7428 2018-07-03 Martin Sebor <msebor@redhat.com>
7430 PR tree-optimization/86274
7431 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
7433 (format_floating): Correct handling of infinities and NaNs.
7435 2018-07-03 Martin Sebor <msebor@redhat.com>
7437 * print-tree.c (print_real_cst): New function.
7438 (print_node_brief): Call it.
7439 (print_node): Ditto.
7441 2018-07-03 Jeff Law <law@redhat.com>
7443 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
7444 into a single pattern.
7446 * config/h8300/h8300.md (ors code_iterator): New.
7447 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
7448 a single pattern and single splitter.
7449 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
7450 (iorqi3_1, xorqi3_1): Likewise.
7451 (iorqi3, xorqi3 expanders): Similarly.
7453 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
7454 (movmd_internal) into a single pattern using the P mode iterator.
7455 (movmd splitters): Similarly.
7456 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
7457 (movsd splitters): Similarly.
7459 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
7460 ADDB, ADDW and ADDL into a single ADD attribute which selects the
7461 right table based on the size of the operand.
7462 * config/h8300/h8300.md (length_table): Corresponding changes. All
7463 references to "addb", "addw" and "addl" changed to "add".
7464 (btst patterns): Merge two variants into a single pattern.
7465 (tstqi, tsthi): Likewise.
7466 (addhi3_incdec, addsi3_incdec): Likewise.
7467 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
7468 (mulhi3, mulsi3): Likewise.
7469 (udivhi3, udivsi3): Likewise.
7470 (divhi3, divsi3): Likewise.
7471 (andorqi3, andorhi3, andorsi3): Likewise.
7473 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
7476 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
7477 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
7479 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7481 PR tree-optimization/85694
7482 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
7483 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
7485 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
7486 (<u>avg<mode>3_ceil): New patterns.
7488 2018-07-03 David Malcolm <dmalcolm@redhat.com>
7490 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
7491 scan-tree-dump directive.
7492 * gcc.dg/vect/slp-perm-2.c: Likewise.
7493 * gcc.dg/vect/slp-perm-3.c: Likewise.
7494 * gcc.dg/vect/slp-perm-5.c: Likewise.
7495 * gcc.dg/vect/slp-perm-6.c: Likewise.
7496 * gcc.dg/vect/slp-perm-7.c: Likewise.
7497 * gcc.dg/vect/slp-perm-8.c: Likewise.
7499 2018-07-03 Marek Polacek <polacek@redhat.com>
7502 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
7504 2018-07-03 Richard Biener <rguenther@suse.de>
7507 * tree-ssa-structalias.c (find_func_clobbers): Properly
7508 handle indirect calls.
7510 2018-07-03 Jeff Law <law@redhat.com>
7512 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
7513 (shifts): New code iterator.
7514 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
7515 expander. Fix HImode handling on H8/SX.
7516 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
7517 (subqi3, subhi3, subsi3 expanders): Likewise.
7518 (andqi3, andhi3, andsi3 expanders): Likewise.
7519 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
7520 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
7521 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
7522 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
7523 (zero_extendqihi2, zero_extendqisi2): Likewise.
7524 (extendqihi2, extendqisi2): Likewise.
7525 (rotlqi3, rotlhi3, rotlsi3): Likewise.
7526 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
7527 (rotlqi3_1, rotlhi3_1): Likewise.
7528 (logicalhi3_sn, logicalsi3_sn): Likewise.
7529 (logicalhi3, logicalsi3): Likewise.
7531 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7533 * tree-vect-patterns.c (vect_recog_rotate_pattern)
7534 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7535 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
7536 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
7537 type to append_pattern_def_seq instead of creating a stmt_vec_info
7539 (build_mask_conversion): Likewise. Remove vinfo argument.
7540 (vect_add_conversion_to_patterm): Likewise, renaming to...
7541 (vect_add_conversion_to_pattern): ...this.
7542 (vect_recog_mask_conversion_pattern): Update call to
7543 build_mask_conversion. Pass the vector type to
7544 append_pattern_def_seq here too.
7545 (vect_recog_gather_scatter_pattern): Update call to
7546 vect_add_conversion_to_pattern.
7548 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7550 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
7551 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7552 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
7553 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
7554 STMT_VINFO_PATTERN_DEF_SEQ to null here.
7555 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
7556 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
7557 append_pattern_def_seq instead of new_pattern_def_seq.
7558 (vect_recog_divmod_pattern): Do both of the above.
7559 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
7562 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7564 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
7565 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
7566 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
7567 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
7568 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
7569 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7570 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
7571 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7572 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7573 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
7574 parameter with a single stmt_vec_info.
7575 (vect_recog_func_ptr): Likewise.
7576 (vect_recog_gather_scatter_pattern): Likewise, folding in...
7577 (vect_try_gather_scatter_pattern): ...this.
7578 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
7579 the stmt_vec_info of the statement to be matched. Don't clear
7580 STMT_VINFO_RELATED_STMT.
7581 (vect_pattern_recog): Update call accordingly.
7583 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7585 PR tree-optimization/85694
7586 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
7587 (uavgM3_ceil): Document new optabs.
7588 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
7589 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
7591 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
7592 (savg_ceil_optab): New optabs.
7593 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
7594 (vect_vect_recog_func_ptrs): Add it.
7595 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
7596 constant directly from the associated lhs.
7598 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7600 * tree-vect-patterns.c (vect_split_statement): New function.
7601 (vect_convert_input): Use it to try to split an existing cast.
7603 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7605 * poly-int.h (print_hex): New function.
7606 * dumpfile.h (dump_dec, dump_hex): Declare.
7607 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
7608 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
7609 min_input_precision, operation_precision and operation_sign.
7610 * tree-vect-patterns.c (vect_get_range_info): New function.
7611 (vect_same_loop_or_bb_p, vect_single_imm_use)
7612 (vect_operation_fits_smaller_type): Delete.
7613 (vect_look_through_possible_promotion): Add an optional
7614 single_use_p parameter.
7615 (vect_recog_over_widening_pattern): Rewrite to use new
7616 stmt_vec_info infomration. Handle one operation at a time.
7617 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
7618 (vect_truncatable_operation_p, vect_set_operation_type)
7619 (vect_set_min_input_precision): New functions.
7620 (vect_determine_min_output_precision_1): Likewise.
7621 (vect_determine_min_output_precision): Likewise.
7622 (vect_determine_precisions_from_range): Likewise.
7623 (vect_determine_precisions_from_users): Likewise.
7624 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
7625 (vect_vect_recog_func_ptrs): Put over_widening first.
7627 (vect_pattern_recog): Call vect_determine_precisions.
7629 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7631 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
7632 statements that have been replaced by further pattern statements.
7633 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
7635 2018-07-03 Richard Biener <rguenther@suse.de>
7637 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
7638 always set *dt. Dump vectype in vectype overload.
7639 * dumpfile.h (dump_gimple_expr): New function.
7640 (dump_gimple_expr_loc): Likewise.
7641 * dumpfile.c (dump_gimple_expr): New function.
7642 (dump_gimple_expr_loc): Likewise.
7644 2018-07-02 Jeff Law <law@redhat.com>
7646 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
7647 the H8/300, H8/300H and H8/S variants into a single pattern.
7648 (movhi_h8300, movqi_h8300hs): Similarly.
7649 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
7650 (QHI mode iterator): New.
7652 * config/h8300/h8300.md: Remove trailing whitespace.
7654 2018-07-02 Jim Wilson <jimw@sifive.com>
7656 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
7657 instead of emit_insn for interrupt returns.
7658 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
7659 (riscv_sret, riscv_uret): Likewise.
7661 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7663 * pretty-print.c (selftest::test_pp_format): Move save and restore
7664 of quotes to class auto_fix_quotes, and add an instance.
7665 * selftest.c: Include "intl.h".
7666 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
7667 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
7668 * selftest.h (selftest::auto_fix_quotes): New class.
7670 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
7672 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
7673 (aarch64_sve_prepare_conditional_op): Remove.
7674 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
7675 Allow aarch64_simd_reg_or_zero as select operand; remove
7676 the aarch64_sve_prepare_conditional_op call.
7677 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
7678 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7679 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
7680 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
7681 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
7682 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
7683 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
7684 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
7685 and a splitters to match all of the *_any patterns.
7686 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
7688 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
7689 (SVE_COND_FP_BINARY_REV): Remove.
7690 (sve_int_op_rev, sve_fp_op_rev): New.
7691 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
7692 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
7693 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
7694 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
7695 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
7696 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
7697 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
7698 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
7699 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
7701 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
7702 Remove match_dup 1 from the inner unspec.
7703 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7705 * config/aarch64/aarch64.md (movprfx): New attr.
7706 (length): Default movprfx to 8.
7707 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
7708 (*madd<SVE_I>, *msub<SVE_I): Likewise.
7709 (*<su>mul<SVE_I>3_highpart): Likewise.
7710 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
7711 (*v<ASHIFT><SVE_I>3): Likewise.
7712 (*<su><MAXMIN><SVE_I>3): Likewise.
7713 (*<su><MAXMIN><SVE_F>3): Likewise.
7714 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
7715 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
7716 (*div<SVE_F>4): Likewise.
7718 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
7720 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
7723 2018-07-02 Richard Biener <rguenther@suse.de>
7725 PR tree-optimization/86363
7726 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
7727 memset argument refers to a non-variable address.
7729 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7731 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
7732 {PLUS,MINUS}_EXPR code to...
7733 (adjust_symbolic_bound): ...here,
7734 (combine_bound): ...here,
7735 (set_value_range_with_overflow): ...and here.
7737 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7739 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
7741 (extract_range_from_abs_expr): ...here.
7743 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
7745 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
7746 -fno-omit-frame-pointer when not optimizing.
7748 2018-07-02 Martin Liska <mliska@suse.cz>
7751 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
7752 (propagate_nothrow): Likewise.
7754 2018-07-02 Martin Liska <mliska@suse.cz>
7757 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
7759 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7761 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
7762 function in r262149, changing "loc" param from source_location to
7763 const dump_location_t &.
7764 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
7765 declaration, as above.
7767 2018-07-01 Paul Koning <ni1d@arrl.net>
7769 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7770 -munit-asm, -mgnu-asm, -mdec-asm.
7771 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
7772 (pdp11_output_labelref): New.
7773 (pdp11_output_def): New.
7774 (pdp11_output_addr_vec_elt): New.
7775 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
7776 %# and %@ format codes.
7777 (pdp11_option_override): New.
7778 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
7779 (pdp11_output_ident): New.
7780 (pdp11_asm_named_section): New.
7781 (pdp11_asm_init_sections): New.
7782 (pdp11_file_start): New.
7783 (pdp11_file_end): New.
7784 (output_ascii): Use .ascii/.asciz for -mdec-asm.
7785 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
7786 %o, like %c but octal.
7787 (pdp11_option_override): New.
7788 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
7790 (DATA_SECTION_ASM_OP): Ditto.
7791 (READONLY_DATA_SECTION_ASM_OP): New.
7792 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
7793 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
7794 (ASM_OUTPUT_LABELREF): Ditto.
7795 (ASM_OUTPUT_DEF): Ditto.
7796 (ASM_OUTPUT_EXTERNAL): New.
7797 (ASM_OUTPUT_SOURCE_FILENAME): New.
7798 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
7799 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
7800 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
7801 %# and %@ format codes.
7802 * config/pdp11/pdp11.opt (mgnu-asm): New.
7803 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
7804 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
7805 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
7807 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
7809 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
7810 dereferencing path[] beyond its length.
7812 (debug_all_paths): New.
7813 (rewire_first_differing_edge): New.
7814 (adjust_paths_after_duplication): New.
7815 (duplicate_thread_path): Call adjust_paths_after_duplication.
7817 (thread_through_all_blocks): Add new argument to
7818 duplicate_thread_path.
7820 2018-06-30 Jim Wilson <jimw@sifive.com>
7822 * config/riscv/predicates.md (p2m1_shift_operand): New.
7823 (high_mask_shift_operand): New.
7824 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
7825 pattern using p2m1_shift_operand.
7826 (lshsi3_zero_extend_3+2): New combiner pattern using
7827 high_mask_shift_operand.
7829 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7831 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
7833 (vect_recog_rotate_pattern): ...here.
7834 (vect_convert_input): Try to insert casts of invariants in the
7836 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
7837 preheader to be empty.
7839 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7841 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
7842 vector type. If given, install it in the new statement's
7844 (vect_element_precision): New function.
7845 (vect_unpromoted_value): New struct.
7846 (vect_unpromoted_value::vect_unpromoted_value): New function.
7847 (vect_unpromoted_value::set_op): Likewise.
7848 (vect_look_through_possible_promotion): Likewise.
7849 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
7850 (vect_widened_op_tree, vect_convert_input): Likewise.
7851 (vect_convert_inputs, vect_convert_output): Likewise.
7852 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7853 to handle the optional cast of the multiplication result and
7854 vect_widened_op_tree to detect the widened multiplication itself.
7855 Do not require the input and output of promotion casts to have
7856 the same sign, but base the signedness of the operation on the
7857 input rather than the result. If the pattern includes two
7858 promotions, check that those promotions have the same sign.
7859 Do not restrict the MULT_EXPR handling to a double-width result;
7860 handle quadruple-width results and wider. Use vect_convert_inputs
7861 to convert the inputs to the common type.
7862 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
7863 to handle the optional cast of the ABS result. Also allow a sign
7864 change or a sign extension between the ABS and MINUS.
7865 Use vect_widened_op_tree to detect the widened subtraction and use
7866 vect_convert_inputs to convert the inputs to the common type.
7867 (vect_handle_widen_op_by_const): Delete.
7868 (vect_recog_widen_op_pattern): New function.
7869 (vect_recog_widen_mult_pattern): Use it.
7870 (vect_recog_widen_shift_pattern): Likewise.
7871 (vect_recog_widen_sum_pattern): Use
7872 vect_look_through_possible_promotion to handle the promoted
7875 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7877 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7878 the containing gimple_seq *.
7879 * gimple-iterator.h (gsi_for_stmt): Declare it.
7880 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7881 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7882 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7883 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7884 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7886 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7888 (vect_mark_pattern_stmts): ...here. Handle cases in which the
7889 statement being replaced is part of an existing pattern
7890 definition sequence, inserting the new pattern statements before
7892 (vect_pattern_recog_1): Don't return a bool. If the statement
7893 is already part of a pattern, instead apply pattern matching
7894 to the pattern definition statements. Don't clear the
7895 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7896 (vect_pattern_recog): Don't break after the first match;
7897 continue processing the pattern definition statements instead.
7898 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7900 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7902 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7903 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7904 (vect_recog_widen_sum_pattern): Use it.
7906 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7908 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7909 phi is not a pattern statement and has not been replaced by
7910 a pattern statement.
7911 * tree-vect-patterns.c (type_conversion_p): Don't check
7912 STMT_VINFO_IN_PATTERN_P.
7913 (vect_recog_vector_vector_shift_pattern): Likewise.
7914 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7915 the pattern statement rather than the original statement; check
7916 directly for a WIDEN_MULT_EXPR here.
7917 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7918 vect_is_simple_use to return the pattern statement rather
7919 than the original statement; use is_pattern_stmt_p to check
7920 for such a pattern statement.
7921 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7922 to return the pattern statement rather than the original statement;
7923 don't do the same transformation here.
7924 (vect_is_simple_use): If the defining statement has been replaced
7925 by a pattern statement, return the pattern statement instead.
7926 Remove the corresponding (local) transformation from the vectype
7929 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7931 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7932 end and default to null.
7933 * tree-vect-loop.c (vect_create_epilog_for_reduction)
7934 (vectorizable_reduction): Update calls accordingly, dropping the
7935 gimple ** argument if the passed-back statement isn't needed.
7936 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7937 (vect_recog_rotate_pattern): Likewise.
7938 (vect_recog_mask_conversion_pattern): Likewise.
7939 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7940 (vect_mask_constant_operand_p): Likewise.
7941 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7942 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7943 (get_group_load_store_type, get_load_store_type): Likewise.
7944 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7945 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7946 (vectorizable_conversion, vectorizable_assignment): Likewise.
7947 (vectorizable_shift, vectorizable_operation): Likewise.
7948 (vectorizable_store, vect_is_simple_cond): Likewise.
7949 (vectorizable_condition, vectorizable_comparison): Likewise.
7950 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7951 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7952 and move it to the end. Cope with null def_stmt_outs.
7954 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7956 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7958 2018-06-29 Jeff Law <law@redhat.com>
7960 * config/v850/v850.c (v850_legitimate_address_p): Handle large
7961 displacements for TARGET_V850E2V3 and newer.
7962 (TARGET_LRA_P): Remove. Defaults to LRA now.
7963 * config/v850/v850.md (sign23byte_load): Remove.
7964 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7965 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7967 2018-06-29 Martin Liska <mliska@suse.cz>
7970 * coverage.c (coverage_init): Mangle full path name.
7971 * doc/invoke.texi: Document the change.
7972 * gcov-io.c (mangle_path): New.
7973 * gcov-io.h (mangle_path): Likewise.
7974 * gcov.c (mangle_name): Use mangle_path for path mangling.
7976 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7978 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7979 if starting source register is not even.
7981 2018-06-29 Martin Liska <mliska@suse.cz>
7983 PR tree-optimization/86263
7984 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7985 Make edge redirection.
7987 2018-06-29 David Malcolm <dmalcolm@redhat.com>
7989 * dumpfile.c (dump_loc): Add indentation based on scope depth.
7990 (dump_scope_depth): New variable.
7991 (get_dump_scope_depth): New function.
7992 (dump_begin_scope): New function.
7993 (dump_end_scope): New function.
7994 * dumpfile.h (get_dump_scope_depth): New declaration.
7995 (dump_begin_scope): New declaration.
7996 (dump_end_scope): New declaration.
7997 (class auto_dump_scope): New class.
7998 (AUTO_DUMP_SCOPE): New macro.
7999 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
8002 2018-06-29 Richard Biener <rguenther@suse.de>
8004 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
8005 compute_all_dependences succeeds.
8006 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
8007 exceed --param loop-max-datarefs-for-datadeps.
8009 2018-06-29 Jakub Jelinek <jakub@redhat.com>
8011 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
8013 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
8016 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
8017 alternative 0 in preferred_for_speed attribute.
8019 2018-06-28 Paul Koning <ni1d@arrl.net>
8021 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
8022 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
8023 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
8024 * config/pdp11/pdp11.md: Correct "length" attribute calculation
8025 for shift insn patterns.
8027 2018-06-28 David Malcolm <dmalcolm@redhat.com>
8029 * cgraph.c (cgraph_node::get_body): Replace assignments to
8030 "dump_file" with calls to set_dump_file.
8031 * dumpfile.c (alt_dump_file): Make static, and group with...
8032 (alt_flags): ...this definition.
8033 (dumps_are_enabled): New variable.
8034 (refresh_dumps_are_enabled): New function.
8035 (set_dump_file): New function.
8036 (set_alt_dump_file): New function.
8037 (gcc::dump_manager::dump_start): Replace assignments to
8038 "dump_file" and "alt_dump_file" with calls to set_dump_file and
8040 (gcc::dump_manager::dump_finish): Likewise.
8041 * dumpfile.h (alt_dump_file): Delete decl.
8042 (dumps_are_enabled): New variable decl.
8043 (set_dump_file): New function decl.
8044 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
8046 * tree-nested.c (lower_nested_functions): Replace assignments to
8047 "dump_file" with calls to set_dump_file.
8049 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
8051 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
8052 goto_locus of each outgoing edge of each basic block.
8054 2018-06-28 Richard Biener <rguenther@suse.de>
8056 * dwarf2out.c (decl_scope_table): Remove.
8057 (push_decl_scope): Likewise.
8058 (pop_decl_scope): Likewise.
8059 (gen_type_die_for_member): Do not call push/pop_decl_scope.
8060 (gen_struct_or_union_type_die): Likewise.
8061 (gen_tagged_type_die): Likewise.
8062 (dwarf2out_init): Do not initialize decl_scope_table.
8063 (dwarf2out_c_finalize): Do not free it.
8065 2018-06-28 Richard Biener <rguenther@suse.de>
8067 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
8068 deciding whether to not re-use a DIE.
8070 2018-06-28 Richard Biener <rguenther@suse.de>
8072 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
8073 DW_AT_abstract_origin attribute.
8075 2018-06-28 Martin Liska <mliska@suse.cz>
8077 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8078 Use newly introduced constants.
8079 * tree-switch-conversion.h (struct jump_table_cluster):
8080 Define max_ratio_for_size and max_ratio_for_speed.
8082 2018-06-28 Martin Liska <mliska@suse.cz>
8084 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8085 Add new checking assert to catch invalid state.
8086 (jump_table_cluster::can_be_handled): Handle single case
8088 (jump_table_cluster::is_beneficial): Bail out for such case.
8089 (bit_test_cluster::find_bit_tests):
8090 Add new checking assert to catch invalid state.
8091 (bit_test_cluster::can_be_handled): Handle single case
8093 (bit_test_cluster::is_beneficial): Bail out for such case.
8094 (switch_decision_tree::analyze_switch_statement):
8097 2018-06-28 Martin Liska <mliska@suse.cz>
8099 * common.opt: Introduce -completion option.
8100 * gcc.c (driver_handle_option): Handle it.
8101 (driver::main): Print completions if completion
8103 * opt-suggestions.c (option_proposer::get_completions):
8105 (option_proposer::suggest_completion): Likewise.
8106 (option_proposer::find_param_completions): Likewise.
8107 (verify_autocompletions): Likewise.
8108 (test_completion_valid_options): Likewise.
8109 (test_completion_valid_params): Likewise.
8110 (in_completion_p): Likewise.
8111 (empty_completion_p): Likewise.
8112 (test_completion_partial_match): Likewise.
8113 (test_completion_garbage): Likewise.
8114 (opt_proposer_c_tests): Likewise.
8115 * opt-suggestions.h: Declare new functions.
8116 * opts.c (common_handle_option): Handle OPT__completion_.
8117 * selftest-run-tests.c (selftest::run_tests): Add
8118 opt_proposer_c_tests.
8119 * selftest.c (assert_str_startswith): New.
8120 * selftest.h (assert_str_startswith): Likewise.
8121 (opt_proposer_c_tests): New.
8122 (ASSERT_STR_STARTSWITH): Likewise.
8124 2018-06-28 Martin Liska <mliska@suse.cz>
8126 * Makefile.in: Add opt-suggestions.o.
8127 * gcc-main.c: Include opt-suggestions.h.
8128 * gcc.c (driver::driver): Likewise.
8129 (driver::~driver): Remove m_option_suggestions.
8130 (driver::build_option_suggestions): Moved to option_proposer.
8131 (driver::suggest_option): Likewise.
8132 (driver::handle_unrecognized_options): Use option_proposer.
8133 * gcc.h (class driver): Add new memver m_option_proposer.
8134 * opt-suggestions.c: New file.
8135 * opt-suggestions.h: New file.
8137 2018-06-28 Martin Liska <mliska@suse.cz>
8139 * vec.h (class auto_string_vec): New (moved from auto_argvec).
8140 (auto_string_vec::~auto_string_vec): Likewise.
8142 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
8144 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
8145 prevent_decl_creation_for_types fields up and add reset_location field.
8146 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
8147 statement if id->reset_location is true.
8148 (copy_edges_for_bb): Do not set goto_locus on the new edges if
8149 id->reset_location is true.
8150 (copy_phis_for_bb): Force input_location on the arguments if
8151 id->reset_location is true.
8152 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
8153 is set on the function to be inlined.
8155 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
8157 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
8159 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
8161 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
8162 registers for Pmode.
8163 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
8164 hard registers for the clobbered pseudo.
8166 2018-06-27 Paul Koning <ni1d@arrl.net>
8168 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
8169 mutually exclusive options.
8170 * config/pdp11/constraints.md (h): New constraint.
8171 (O): Update definition to match shift code generation.
8172 (D): New constraint.
8173 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
8175 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
8177 (output_jump): Change arguments.
8178 (pdp11_fixed_cc_regs): New function.
8179 (pdp11_cc_mode): Ditto.
8180 (pdp11_expand_shift): Ditto.
8181 (pdp11_assemble_shift): Ditto.
8182 (pdp11_small_shift): Ditto.
8183 (pdp11_branch_cost): Remove.
8184 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
8186 (pdp11_register_move_cost): Update for CC registers.
8187 (pdp11_rtx_costs): Add case for LSHIFTRT.
8188 (pdp11_output_jump): Add CCNZ mode conditional branches.
8189 (notice_update_cc_on_set): Remove.
8190 (pdp11_cc_mode): New function.
8191 (simple_memory_operand): Correct pre/post decrement case.
8192 (no_side_effect_operand): New function.
8193 (pdp11_regno_reg_class): Add CC_REGS class.
8194 (pdp11_fixed_cc_regs): New function.
8195 (pdp11_small_shift): New function.
8196 (pdp11_expand_shift): New function to expand shift insns.
8197 (pdp11_assemble_shift): New function to output shifts.
8198 (pdp11_branch_cost): Remove.
8199 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
8200 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
8201 (WCHAR_TYPE): Ditto.
8202 (PTRDIFF_TYPE): Ditto.
8203 (ADJUST_INSN_LENGTH): New macro.
8204 (FIXED_REGISTERS): Add CC registers.
8205 (CALL_USED_REGISTERS): Ditto.
8207 (REG_CLASS_NAMES): Ditto.
8208 (REG_CLASS_CONTENTS): Ditto.
8209 (SELECT_CC_MODE): Use new function.
8210 (TARGET_FLAGS_REGNUM): New macro.
8211 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
8212 (cc0_reg_rtx): Remove.
8213 (CC_STATUS_MDEP): Remove.
8214 (CC_STATUS_MDEFP_INIT): Remove.
8215 (CC_IN_FPU): Remove.
8216 (NOTICE_UPDATE_CC): Remove.
8217 (REGISTER_NAMES): Add CC registers.
8218 (BRANCH_COST): Change to constant 1.
8219 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
8221 * config/pdp11/pdp11.opt (mbcopy): Remove.
8222 (mbcopy-builtin): Remove.
8223 (mbranch-cheap): Remove.
8224 (mbranch-expensive): Remove.
8225 * config/pdp11/predicates.md (expand_shift_operand): Update to
8226 match shift code generation.
8227 (ccnz_operator): New predicate.
8228 * doc/invoke.texi (PDP-11 Options): Remove deleted options
8229 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
8230 Remove non-existent option -mabshi, -mno-abshi. Document mutually
8232 * doc/md.texi (PDP-11): Document new D and h constraints. Update
8233 description of O constraint.
8235 2018-06-27 Jeff Law <law@redhat.com>
8236 Austin Law <austinklaw@gmail.com>
8238 * config/v850/v850.md (addsi3_set_flags): New pattern.
8239 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
8240 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
8241 (zero_extendhisi2_v850_set_flags): Likewise.
8242 (zero_extendqisi2_v850_set_flags): Likewise.
8243 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
8244 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
8245 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
8247 * config/v850/v850-protos.h (notice_update_cc): Remove.
8248 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
8249 (v850_print_operand): Handle 'D' and "d".
8250 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
8251 Add handling of arithmetic/logical operations compared against zero.
8252 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
8253 Do not look at v850_compare_op, instead get mode from last argument.
8254 (v850_gen_compare): Remove
8255 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
8256 after reload for prologue insns.
8257 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
8259 (construct_save_jarl): Likewise.
8260 (TARGET_FLAGS_REGNUM): Define.
8261 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
8262 (NOTICE_UPDATE_CC): Remove.
8263 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
8264 than cc0. Conditionalize on reload_completed.
8265 (cmpsi_insn, setfcc_insn): Likewise.
8266 (tst1 splitter): Turn into define_and_split which sets the flags
8268 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
8269 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
8270 (cstoresf4, cstoredf4): Clobber the flags.
8271 (cmpsi, cmpsf, cmpdf): Remove expanders.
8272 (setf_insn): Remove pattern.
8273 (addsi3): Turn into define_and_split which clobbers the flags after
8274 reload and a suitable pattern (addsi3_clobber_flags) for use after
8276 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
8277 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
8278 (ashrsi3, ashrsi3_v850e2): Likewise.
8279 (bins): Clobber the flags.
8280 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
8281 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
8282 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
8283 (call_value_internal_short, call_value_internal_long): Likewise.
8284 (callt_save_interrupt, callt_return_interrupt): Likewise.
8285 (save_interrupt, return_interrupt): Likewise.
8286 (callt_save_all_interrupt, save_all_interrupt): Likewise.
8287 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
8288 (restore_all_interrupt, _restore_all_interrupt): Likewise.
8289 (All FP comparisons): Only allow after reload has completed.
8291 (divh, divhu): Tweak output template.
8292 (branch_z_normal, branch_z_invert): Remove
8293 (branch_nz_normal, branch_nz_invert): Likewise.
8294 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
8296 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
8297 * config/v850/v850.c (notice_update_cc): Remove.
8298 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
8299 (CC_NO_CARRY): Likewise.
8300 (NOTICE_UPDATE_CC): Define to nothing.
8301 * config/v850/v850.md: Remove block comment on cc0 handling
8302 Remove "cc" attribute from all patterns. Remove cc_status handling
8303 from all patterns. Minor formatting fixes.
8305 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8307 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
8308 (cortex-a76.cortex-a55): Likewise.
8309 * config/aarch64/aarch64-tune.md: Regenerate.
8310 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
8311 cortex-a76.cortex-a55.
8313 2018-06-27 Jeff Law <law@redhat.com>
8315 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
8316 (MULTILIB_DIRNAMES): Similarly.
8318 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
8320 * gimple.h (gimple_return_retbnd): Delete.
8321 (gimple_return_set_retbnd): Likewise.
8322 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
8323 gimple_return_set_retbnd.
8324 * gimple-pretty-print.c (dump_gimple_return): Remove call to
8325 gimple_return_retbnd and adjust.
8326 * tree-inline.h (struct copy_body_data): Remove retbnd field.
8327 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
8328 Explicitly return NULL in a couple more cases. Move assertion
8329 on debug statements and remove unreachable code.
8330 (reset_debug_binding): Do not test id->retbnd.
8331 (expand_call_inline): Do not set it.
8333 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8335 * configure.ac: Add --disable-gcov option.
8336 * configure: Regenerate.
8337 * Makefile.in: Honour @enable_gcov@.
8338 * doc/install.texi: Document --disable-gcov.
8340 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8342 * config/arm/arm-cpus.in (cortex-a76): New entry.
8343 (cortex-a76.cortex-a55): Likewise.
8344 * config/arm/arm-tables.opt: Regenerate.
8345 * config/arm/arm-tune.md: Likewise.
8346 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
8347 * doc/invoke.texi (ARM Options): Document cortex-a76 and
8348 cortex-a76.cortex-a55.
8350 2018-06-27 Tamar Christina <tamar.christina@arm.com>
8353 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
8355 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
8357 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
8359 (EPILOGUE_USES): Likewise.
8361 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
8363 * tree-inline.c (remap_location): New function extracted from...
8364 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
8365 (copy_phis_for_bb): ...here. Call remap_location.
8366 (copy_cfg_body): Adjust call to copy_edges_for_bb.
8368 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
8370 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
8371 unaligned vsx for 16B memset.
8373 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
8376 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
8377 ieee128_float_type_node to long_double_type_node unless
8378 TARGET_LONG_DOUBLE_128 is set.
8380 2018-06-26 David Malcolm <dmalcolm@redhat.com>
8382 * cfgloop.c (get_loop_location): Convert return type from
8383 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
8384 by implicit construction from rtx_insn *, and using
8385 dump_user_location_t::from_function_decl for the fallback case.
8386 * cfgloop.h (get_loop_location): Convert return type from
8387 location_t to dump_user_location_t.
8388 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
8389 dump_printf_loc to pass in a dump_location_t rather than a
8390 location_t, via the gimple stmt.
8391 * coverage.c (get_coverage_counts): Update calls to
8392 dump_printf_loc to pass in dump_location_t rather than a
8394 * doc/optinfo.texi (Dump types): Convert example of
8395 dump_printf_loc from taking "locus" to taking "insn". Update
8396 description of the "_loc" calls to cover dump_location_t.
8397 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
8399 (dump_user_location_t::dump_user_location_t): New constructors,
8400 from gimple *stmt and rtx_insn *.
8401 (dump_user_location_t::from_function_decl): New function.
8402 (dump_loc): Make static.
8403 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
8404 const dump_location_t &.
8405 (dump_generic_expr_loc): Delete.
8406 (dump_printf_loc): Convert param "loc" from location_t to
8407 const dump_location_t &.
8408 (selftest::test_impl_location): New function.
8409 (selftest::dumpfile_c_tests): New function.
8410 * dumpfile.h: Include "profile-count.h".
8411 (class dump_user_location_t): New class.
8412 (struct dump_impl_location_t): New struct.
8413 (class dump_location_t): New class.
8414 (dump_printf_loc): Convert 2nd param from source_location to
8415 const dump_location_t &.
8416 (dump_generic_expr_loc): Delete.
8417 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
8418 const dump_location_t &.
8419 * gimple-fold.c (fold_gimple_assign): Update call to
8420 dump_printf_loc to pass in a dump_location_t rather than a
8421 location_t, via the gimple stmt.
8422 (gimple_fold_call): Likewise.
8423 * gimple-loop-interchange.cc
8424 (loop_cand::analyze_iloop_reduction_var): Update for change to
8425 check_reduction_path.
8426 (tree_loop_interchange::interchange): Update for change to
8428 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
8429 change in return-type of find_loop_location.
8430 (graphite_regenerate_ast_isl): Likewise.
8431 * graphite-optimize-isl.c (optimize_isl): Likewise.
8432 * graphite.c (graphite_transform_loops): Likewise.
8433 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
8434 pass in a dump_location_t rather than a location_t, via the
8436 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8437 * ipa.c (walk_polymorphic_call_targets): Likewise.
8438 * loop-unroll.c (report_unroll): Convert "locus" param from
8439 location_t to dump_location_t.
8440 (decide_unrolling): Update for change to get_loop_location's
8442 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
8443 location_t to dump_user_location_t.
8444 (grid_find_single_omp_among_assignments_1): Updates calls to
8445 dump_printf_loc to pass in a dump_location_t rather than a
8446 location_t, via the gimple stmt.
8447 (grid_parallel_clauses_gridifiable): Convert "tloc" from
8448 location_t to dump_location_t. Updates calls to dump_printf_loc
8449 to pass in a dump_location_t rather than a location_t, via the
8451 (grid_inner_loop_gridifiable_p): Likewise.
8452 (grid_dist_follows_simple_pattern): Likewise.
8453 (grid_gfor_follows_tiling_pattern): Likewise.
8454 (grid_target_follows_gridifiable_pattern): Likewise.
8455 (grid_attempt_target_gridification): Convert initialization
8456 of local "grid" from memset to zero-initialization; FIXME: does
8457 this require C++11? Update call to dump_printf_loc to pass in a
8458 optinfo_location rather than a location_t, via the gimple stmt.
8459 * profile.c (read_profile_edge_counts): Updates call to
8460 dump_printf_loc to pass in a dump_location_t rather than a
8462 (compute_branch_probabilities): Likewise.
8463 * selftest-run-tests.c (selftest::run_tests): Call
8465 * selftest.h (dumpfile_c_tests): New decl.
8466 * tree-loop-distribution.c (pass_loop_distribution::execute):
8467 Update for change in return type of find_loop_location.
8468 * tree-parloops.c (parallelize_loops): Likewise.
8469 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
8470 "locus" from location_t to dump_user_location_t.
8471 (canonicalize_loop_induction_variables): Likewise.
8472 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
8473 for change in return type of find_loop_location.
8474 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
8475 to dump_printf_loc to pass in a dump_location_t rather than a
8476 location_t, via the stmt.
8477 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
8479 * tree-vect-loop-manip.c (find_loop_location): Convert return
8480 type from source_location to dump_user_location_t.
8481 (vect_do_peeling): Update for above change.
8482 (vect_loop_versioning): Update for change in type of
8484 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
8485 from location_t to dump_user_location_t.
8486 (vect_estimate_min_profitable_iters): Update for change in type
8488 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
8489 location_t to dump_location_t.
8490 (vect_slp_bb): Update for change in type of vect_location.
8491 * tree-vectorizer.c (vect_location): Convert from source_location
8492 to dump_user_location_t.
8493 (try_vectorize_loop_1): Update for change in vect_location's type.
8494 (vectorize_loops): Likewise.
8495 (increase_alignment): Likewise.
8496 * tree-vectorizer.h (vect_location): Convert from source_location
8497 to dump_user_location_t.
8498 (find_loop_location): Convert return type from source_location to
8499 dump_user_location_t.
8500 (check_reduction_path): Convert 1st param from location_t to
8501 dump_user_location_t.
8502 * value-prof.c (check_counter): Update call to dump_printf_loc to
8503 pass in a dump_user_location_t rather than a location_t; update
8504 call to error_at for change in type of "locus".
8505 (check_ic_target): Update call to dump_printf_loc to
8506 pass in a dump_user_location_t rather than a location_t, via the
8509 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
8511 * config/s390/s390.h (enum processor_flags): Do not use
8512 default tune parameter when -march was specified.
8514 2018-06-26 Jakub Jelinek <jakub@redhat.com>
8517 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
8518 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
8521 2018-06-26 Richard Biener <rguenther@suse.de>
8523 PR tree-optimization/86287
8525 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
8526 (vect_analyze_loop): Initialize n_stmts.
8528 2018-06-26 Richard Biener <rguenther@suse.de>
8531 * fold-const.c (fold_convertible_p): Pointer extension
8534 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
8537 * dwarf2out.c (loc_list_has_views): Adjust comments.
8538 (dw_loc_list): Split single cross-partition range with
8541 2018-06-25 Jeff Law <law@redhat.com>
8543 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
8544 on -mbig-switch by default.
8546 * config/v850/predicates.md (const_float_1_operand): Fix match_code
8548 (const_float_0_operand): Remove unused predicate.
8549 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
8550 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
8551 (recipsf2): New expander. Original pattern now called
8553 (recipdf2, recipdf2_insn): Similarly.
8554 (rsqrtsf2, rsqrtsf2_insn): Similarly
8555 (rsqrtdf2, rsqrtdf2_insn): Similarly
8557 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
8559 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
8560 Simplify logic for FreeBSD (twice).
8562 2018-06-25 Martin Sebor <msebor@redhat.com>
8564 PR tree-optimization/86204
8565 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
8566 a strnlen result if it's less than the length of the string.
8568 2018-06-25 Martin Sebor <msebor@redhat.com>
8570 PR tree-optimization/85700
8571 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
8572 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
8573 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
8575 2018-06-25 Martin Sebor <msebor@redhat.com>
8577 * doc/extend.texi (Zero-length arrays): Update and clarify.
8579 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
8581 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
8582 added IEEE/IBM long double multilib support on PowerPC little
8583 endian Linux systems.
8584 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
8585 (MULTILIB_DEFAULTS): Likewise.
8586 * config/rs6000/rs6000.c (rs6000_option_override_internal):
8588 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
8589 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
8590 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
8592 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
8595 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
8596 (REORDER_45): Likewise.
8598 2018-06-25 Jeff Law <law@redhat.com>
8600 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
8601 dividend to 32 bits. Adjust length.
8602 (udivmodhi4): Cleanup output template. Fix length.
8604 2018-06-25 Carl Love <cel@us.ibm.com>
8606 * config/rs6000/vsx.md: Change word selector to prefered location.
8608 2018-06-25 Richard Biener <rguenther@suse.de>
8610 PR tree-optimization/86304
8611 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
8612 epilogue-if-converted loops as well.
8614 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
8616 * lto-section-out.c (lto_begin_section): Do not print section
8617 name for noaddr and unnumbered dumps.
8619 2018-06-25 Richard Biener <rguenther@suse.de>
8621 * tree-vectorizer.h (struct vec_info_shared): New structure
8622 with parts split out from struct vec_info and loop_nest from
8623 struct _loop_vec_info.
8624 (struct vec_info): Adjust accordingly.
8625 (struct _loop_vec_info): Likewise.
8626 (LOOP_VINFO_LOOP_NEST): Adjust.
8627 (LOOP_VINFO_DATAREFS): Likewise.
8628 (LOOP_VINFO_DDRS): Likewise.
8629 (struct _bb_vec_info): Likewise.
8630 (BB_VINFO_DATAREFS): Likewise.
8631 (BB_VINFO_DDRS): Likewise.
8632 (struct _stmt_vec_info): Add dr_aux member.
8633 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
8634 (DR_MISALIGNMENT_UNINITIALIZED): New.
8635 (set_dr_misalignment): Adjust.
8636 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
8637 (vect_analyze_loop): Adjust prototype.
8638 (vect_analyze_loop_form): Likewise.
8639 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8640 Compute dependences lazily.
8641 (vect_record_base_alignments): Use shared datarefs/ddrs.
8642 (vect_verify_datarefs_alignment): Likewise.
8643 (vect_analyze_data_refs_alignment): Likewise.
8644 (vect_analyze_data_ref_accesses): Likewise.
8645 (vect_analyze_data_refs): Likewise.
8646 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
8647 constructor parameter for shared part.
8648 (vect_analyze_loop_form): Pass in shared part and adjust.
8649 (vect_analyze_loop_2): Pass in storage for the number of
8650 stmts. Move loop nest finding to the caller. Compute
8652 (vect_analyze_loop): Pass in shared part.
8653 (vect_transform_loop): Verify shared datarefs are unchanged.
8654 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
8655 constructor parameter for shared part.
8656 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
8657 (vect_slp_bb): Verify shared datarefs are unchanged before
8659 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
8661 (new_stmt_vec_info): Initialize DR_AUX misalignment to
8662 DR_MISALIGNMENT_UNINITIALIZED.
8663 * tree-vectorizer.c (vec_info::vec_info): Add constructor
8664 parameter for shared part.
8665 (vec_info::~vec_info): Adjust.
8666 (vec_info_shared::vec_info_shared): New.
8667 (vec_info_shared::~vec_info_shared): Likewise.
8668 (vec_info_shared::save_datarefs): Likewise.
8669 (vec_info_shared::check_datarefs): Likewise.
8670 (try_vectorize_loop_1): Construct shared part live for analyses
8671 of a single loop for multiple vector sizes.
8672 * tree-parloops.c (gather_scalar_reductions): Adjust.
8674 2018-06-25 Richard Biener <rguenther@suse.de>
8676 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
8677 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
8678 (vect_analyze_data_refs): Remove similar code from here and
8679 simplify accordingly.
8681 2018-06-25 Richard Biener <rguenther@suse.de>
8683 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
8684 for reverse storage order accesses rather than asserting
8685 they cannot happen here.
8687 2018-06-25 Tom de Vries <tdevries@suse.de>
8690 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
8691 Use data16 instead of .byte for insn prefix.
8693 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
8696 * parser.c (make_char_string_pack): Pass this literal chars
8697 through cpp_interpret_string.
8698 (cp_parser_userdef_numeric_literal): Check the result of
8699 make_char_string_pack.
8701 2018-06-24 Maya Rashish <coypu@sdf.org>
8703 * ginclude/stddef.h: Simplify conditions around avoiding
8704 re-definition of __size_t.
8706 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8708 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
8709 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
8711 2018-06-22 Maya Rashish <coypu@sdf.org>
8713 * doc/invoke.texi (mno-fancy-math-387): Update for changes
8714 made to OpenBSD and NetBSD through the years.
8716 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
8718 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8719 behavior of vec_pack (vector double, vector double) to match
8720 behavior of vec_float2 (vector double, vector double).
8722 2018-06-22 Olivier Hainque <hainque@adacore.com>
8724 * gimplify.c (gimplify_function_tree): Prevent creation
8725 of a trampoline for the address of the current function
8726 passed to entry/exit instrumentation hooks.
8728 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
8731 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
8734 2018-06-22 Martin Liska <mliska@suse.cz>
8736 PR tree-optimization/86263
8737 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8738 Bail out if is_enabled is false.
8739 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
8741 (jump_table_cluster::is_enabled): New function.
8743 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8745 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8746 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
8747 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
8748 (lto_input_ts_binfo_tree_pointers): Likewise.
8749 * tree-streamer-out.c (streamer_write_tree_bitfields,
8750 write_ts_binfo_tree_pointers): Likewise.
8751 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
8753 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8755 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
8757 2018-06-22 Martin Liska <mliska@suse.cz>
8759 * symbol-summary.h (get): Make it pure and inline move
8760 functionality from ::get function.
8761 (get): Remove and inline into ::get and ::get_create.
8762 (get_create): Move code from ::get function.
8764 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8767 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
8768 -x assembler-with-cpp.
8770 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8772 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
8773 _FILE_OFFSET_BITS=64 for C++.
8775 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
8777 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
8778 conversion insn that shows up when pr85657-3.c is compiled using
8779 IEEE 128-bit long double.
8780 (neg<mode>2_internal): Use the correct mode to check whether the
8781 mode is IBM extended.
8782 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
8783 multiply and divide external functions from being created more
8786 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8788 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
8790 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
8791 the edge can be forwarded.
8792 (cfg_layout_merge_blocks): Likewise.
8794 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8796 * except.c (finish_eh_generation): Commit edge insertions only after
8797 the EH edges have been redirected from post-landing to landing pads.
8799 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8801 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
8802 create_tmp_var_for to create the FRAME decl.
8803 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
8805 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8807 * tree-inline.c (copy_edges_for_bb): Minor tweak.
8808 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
8809 debug statement when resetting its value.
8810 (expand_call_inline): Copy the locus of the call onto the assignment
8811 of the return value, if any. Use local variable in more cases.
8813 2018-06-21 Martin Liska <mliska@suse.cz>
8815 * ipa-pure-const.c (propagate_nothrow): Use
8816 funct_state_summaries->get.
8817 (dump_malloc_lattice): Likewise.
8818 (propagate_malloc): Likewise.
8820 2018-06-21 Richard Biener <rguenther@suse.de>
8822 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
8823 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
8824 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
8826 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
8827 BLOCK_ABSTRACT_ORIGIN unconditionally.
8829 2018-06-21 David Malcolm <dmalcolm@redhat.com>
8831 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
8833 * ipa-reference.c (ipa_reference_c_finalize): Delete
8834 ipa_ref_opt_sum_summaries and set it to NULL.
8836 2018-06-21 Tom de Vries <tdevries@suse.de>
8838 PR tree-optimization/85859
8839 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
8840 test with comment from bb_no_side_effects_p.
8842 2018-06-21 Richard Biener <rguenther@suse.de>
8844 PR tree-optimization/86232
8845 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
8846 max for constant niter.
8848 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8850 * config/aarch64/aarch64-simd.md
8851 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
8853 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8855 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8856 Make opernads of the unspec commutative.
8858 2018-06-21 Richard Biener <rguenther@suse.de>
8860 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8861 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8862 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8863 (vect_analyze_data_ref_dependence): Re-order checks to deal with
8865 (vect_record_base_alignments): Do not record base alignment
8866 for gathers or scatters.
8867 (vect_compute_data_ref_alignment): Drop return value that is always
8868 true. Bail out early for gathers or scatters.
8869 (vect_enhance_data_refs_alignment): Bail out early for gathers
8871 (vect_find_same_alignment_drs): Likewise.
8872 (vect_analyze_data_refs_alignment): Remove dead code.
8873 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8874 (vect_analyze_data_refs): For possible gathers or scatters do
8875 not create an alternate DR, just check their possible validity
8876 and mark them. Adjust DECL_NONALIASED handling to not rely
8878 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8879 update inits of gathers or scatters.
8880 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8881 Also copy gather/scatter flag to pattern vinfo.
8883 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
8885 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8886 behavior of vec_packsu (vector unsigned long long, vector unsigned
8887 long long) to match behavior of vec_packs with same signature.
8889 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
8890 Thomas Schwinge <thomas@codesourcery.com>
8891 Cesar Philippidis <cesar@codesourcery.com>
8893 * gimplify.c (gimplify_scan_omp_clauses): Add support for
8894 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8895 (gimplify_adjust_omp_clauses): Likewise.
8896 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8897 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8898 (gimplify_omp_target_update): Update handling of acc update and
8900 * omp-low.c (install_var_field): Remove unused parameter
8901 base_pointers_restrict.
8902 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8903 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8905 (omp_target_base_pointers_restrict_p): Delete.
8906 (scan_omp_target): Update call to scan_sharing_clauses.
8907 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8909 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8910 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8911 (convert_local_omp_clauses): Likewise.
8912 * tree-pretty-print.c (dump_omp_clause): Likewise.
8913 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
8915 (omp_clause_code_name): Likewise.
8917 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8920 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8923 PR tree-optimization/86231
8924 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
8925 anti-range don't overwrite *vr0min before using it to compute *vr0max.
8927 2018-06-20 Tom de Vries <tdevries@suse.de>
8929 PR tree-optimization/86097
8930 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8931 iv type if signedness of iv type is not the same as that of *nit.
8933 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8935 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
8936 EDGE_EH edges, verify they are all EDGE_EH.
8938 2018-06-20 Maya Rashish <coypu@sdf.org>
8940 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8942 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8944 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8945 * config/aarch64/aarch64.c (xgene1_tunings): Add
8946 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8947 (aarch64_mode_valid_for_sched_fusion_p):
8948 Allow 16-byte modes.
8949 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8950 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8952 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8954 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8955 * config/aarch64/iterators.md (VQ2): New mode iterator.
8957 2018-06-20 Martin Liska <mliska@suse.cz>
8959 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8960 Change default ratio from 10 to 8.
8962 2018-06-20 Martin Liska <mliska@suse.cz>
8964 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8966 (bit_test_cluster::find_bit_tests): Likewise.
8967 (switch_decision_tree::analyze_switch_statement): Find clusters.
8968 * tree-switch-conversion.h (struct jump_table_cluster): Document
8971 2018-06-20 Martin Liska <mliska@suse.cz>
8973 * tree-switch-conversion.c (switch_conversion::collect):
8974 Record m_uniq property.
8975 (switch_conversion::expand): Bail out for special conditions.
8976 (group_cluster::~group_cluster): New.
8977 (group_cluster::group_cluster): Likewise.
8978 (group_cluster::dump): Likewise.
8979 (jump_table_cluster::emit): New.
8980 (switch_decision_tree::fix_phi_operands_for_edges): New.
8981 (struct case_node): Remove struct.
8982 (jump_table_cluster::can_be_handled): New.
8983 (case_values_threshold): Moved to header.
8984 (reset_out_edges_aux): Likewise.
8985 (jump_table_cluster::is_beneficial): New.
8986 (bit_test_cluster::can_be_handled): Likewise.
8987 (add_case_node): Remove.
8988 (bit_test_cluster::is_beneficial): New.
8989 (case_bit_test::cmp): New.
8990 (bit_test_cluster::emit): New.
8991 (expand_switch_as_decision_tree_p): Remove.
8992 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8993 (fix_phi_operands_for_edge): Likewise.
8994 (switch_decision_tree::analyze_switch_statement): New.
8995 (compute_cases_per_edge): Move ...
8996 (switch_decision_tree::compute_cases_per_edge): ... here.
8997 (try_switch_expansion): Likewise.
8998 (switch_decision_tree::try_switch_expansion): Likewise.
8999 (record_phi_operand_mapping): Likewise.
9000 (switch_decision_tree::record_phi_operand_mapping): Likewise.
9001 (emit_case_decision_tree): Likewise.
9002 (switch_decision_tree::emit): Likewise.
9003 (balance_case_nodes): Likewise.
9004 (switch_decision_tree::balance_case_nodes): Likewise.
9005 (dump_case_nodes): Likewise.
9006 (switch_decision_tree::dump_case_nodes): Likewise.
9007 (emit_jump): Likewise.
9008 (switch_decision_tree::emit_jump): Likewise.
9009 (emit_cmp_and_jump_insns): Likewise.
9010 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
9011 (emit_case_nodes): Likewise.
9012 (switch_decision_tree::emit_case_nodes): Likewise.
9013 (conditional_probability): Remove.
9014 * tree-switch-conversion.h (enum cluster_type): New.
9016 (struct cluster): Likewise.
9017 (cluster::cluster): Likewise.
9018 (struct simple_cluster): Likewise.
9019 (simple_cluster::simple_cluster): Likewise.
9020 (struct group_cluster): Likewise.
9021 (struct jump_table_cluster): Likewise.
9022 (struct bit_test_cluster): Likewise.
9023 (struct min_cluster_item): Likewise.
9024 (struct case_tree_node): Likewise.
9025 (case_tree_node::case_tree_node): Likewise.
9026 (jump_table_cluster::case_values_threshold): Likewise.
9027 (struct case_bit_test): Likewise.
9028 (struct switch_decision_tree): Likewise.
9029 (struct switch_conversion): Likewise.
9030 (switch_decision_tree::reset_out_edges_aux): Likewise.
9032 2018-06-20 Martin Liska <mliska@suse.cz>
9034 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
9035 (hoist_edge_and_branch_if_true): Likewise.
9036 (expand_switch_using_bit_tests_p): Likewise.
9037 (struct case_bit_test): Likewise.
9038 (case_bit_test_cmp): Likewise.
9039 (emit_case_bit_tests): Likewise.
9040 (switch_conversion::switch_conversion): New class.
9041 (struct switch_conv_info): Remove old struct.
9042 (collect_switch_conv_info): More to ...
9043 (switch_conversion::collect): ... this.
9044 (check_range): Likewise.
9045 (switch_conversion::check_range): Likewise.
9046 (check_all_empty_except_final): Likewise.
9047 (switch_conversion::check_all_empty_except_final): Likewise.
9048 (check_final_bb): Likewise.
9049 (switch_conversion::check_final_bb): Likewise.
9050 (create_temp_arrays): Likewise.
9051 (switch_conversion::create_temp_arrays): Likewise.
9052 (free_temp_arrays): Likewise.
9053 (gather_default_values): Likewise.
9054 (switch_conversion::gather_default_values): Likewise.
9055 (build_constructors): Likewise.
9056 (switch_conversion::build_constructors): Likewise.
9057 (constructor_contains_same_values_p): Likewise.
9058 (switch_conversion::contains_same_values_p): Likewise.
9059 (array_value_type): Likewise.
9060 (switch_conversion::array_value_type): Likewise.
9061 (build_one_array): Likewise.
9062 (switch_conversion::build_one_array): Likewise.
9063 (build_arrays): Likewise.
9064 (switch_conversion::build_arrays): Likewise.
9065 (gen_def_assigns): Likewise.
9066 (switch_conversion::gen_def_assigns): Likewise.
9067 (prune_bbs): Likewise.
9068 (switch_conversion::prune_bbs): Likewise.
9069 (fix_phi_nodes): Likewise.
9070 (switch_conversion::fix_phi_nodes): Likewise.
9071 (gen_inbound_check): Likewise.
9072 (switch_conversion::gen_inbound_check): Likewise.
9073 (process_switch): Use the newly created class.
9074 (switch_conversion::expand): New.
9075 (switch_conversion::~switch_conversion): New.
9076 * tree-switch-conversion.h: New file.
9078 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9080 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
9081 tree-vect-patterns.c.
9082 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
9083 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
9084 (vect_recog_sad_pattern): Likewise.
9085 (vect_recog_widen_sum_pattern): Likewise.
9086 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
9087 (vect_recog_widen_shift_pattern): Remove the type_in argument.
9088 (vect_recog_rotate_pattern): Likewise.
9089 (vect_recog_mult_pattern): Likewise.
9090 (vect_recog_vector_vector_shift_pattern): Likewise.
9091 (vect_recog_divmod_pattern): Likewise.
9092 (vect_recog_mixed_size_cond_pattern): Likewise.
9093 (vect_recog_bool_pattern): Likewise.
9094 (vect_recog_mask_conversion_pattern): Likewise.
9095 (vect_try_gather_scatter_pattern): Likewise.
9096 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
9097 (vect_recog_over_widening_pattern): Likewise.
9098 (vect_recog_gather_scatter_pattern): Likewise.
9099 (vect_recog_func_ptr): Move from tree-vectorizer.h
9100 (vect_vect_recog_func_ptrs): Move further down the file.
9101 (vect_recog_func): Likewise. Remove the third argument.
9102 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
9103 (vect_pattern_recog_1): Expect the pattern function to do any
9104 necessary target tests. Also expect it to provide a vector type.
9105 Remove the type_in handling.
9107 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9109 * tree-vect-patterns.c (vect_pattern_detected): New function.
9110 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
9111 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
9112 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
9113 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
9114 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9115 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9116 (vect_recog_mask_conversion_pattern)
9117 (vect_try_gather_scatter_pattern): Likewise.
9119 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9121 * tree-vect-patterns.c (vect_get_internal_def): New function.
9122 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9123 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
9124 (search_type_for_mask_1): Use it.
9126 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9128 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
9129 redundant WIDEN_SUM_EXPR handling.
9130 (vect_recog_sad_pattern): Likewise.
9132 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9134 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
9135 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
9136 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
9137 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
9138 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
9140 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9142 * tree-vect-stmts.c (vectorizable_call): Make sure that we
9143 use the stmt_vec_info of the original bb statement for the
9144 new zero assignment, even if the call is part of a pattern.
9146 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9148 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
9149 that the sequence is attached to the original statement rather
9150 than the pattern statement.
9151 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
9152 PATTERN_DEF_SEQ from the original statement rather than
9153 the main pattern statement.
9154 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
9155 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
9156 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
9158 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
9160 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
9161 definition statements before the early exit for statements that aren't
9163 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
9165 (vect_transform_loop): ...here. Process pattern definition
9166 statements without first checking whether the main pattern
9167 statement is live or relevant.
9169 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
9171 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
9172 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
9174 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
9176 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
9177 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
9178 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
9179 (expand_block_compare): Change select_block_compare_mode call.
9180 (expand_strncmp_align_check): Use new functions, fix comment.
9181 (emit_final_str_compare_gpr): New function.
9182 (expand_strn_compare): Refactor and clean up code.
9183 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
9185 2018-06-19 Tony Reix <tony.reix@atos.com>
9186 Damien Bergamini <damien.bergamini@atos.com>
9187 David Edelsohn <dje.gcc@gmail.com>
9189 * collect2.c (static_obj): New variable.
9190 (static_libs): New variable.
9191 (is_in_list): Uncomment declaration.
9192 (main): Track AIX libraries linked statically.
9193 (is_in_list): Uncomment definition.
9194 (scan_prog_file): Don't add AIX shared libraries initializer
9195 to constructor list if linking statically.
9197 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
9199 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
9201 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
9203 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
9205 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
9208 2018-06-19 Martin Liska <mliska@suse.cz>
9210 * config/i386/i386.c (ix86_can_inline_p): Do not use
9211 ipa_fn_summaries::get_create.
9212 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
9214 (devirtualization_time_bonus): Likewise.
9215 (ipcp_propagate_stage): Likewise.
9216 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9217 (edge_set_predicate): Likewise.
9218 (evaluate_conditions_for_known_args): Likewise.
9219 (evaluate_properties_for_edge): Likewise.
9220 (ipa_call_summary::reset): Tranform to ...
9221 (ipa_call_summary::~ipa_call_summary): ... this.
9222 (ipa_fn_summary::reset): Transform to ...
9223 (ipa_fn_summary::~ipa_fn_summary): ... this.
9224 (ipa_fn_summary_t::remove): Rename to ...
9225 (ipa_fn_summary_t::remove_callees): ... this.
9226 (ipa_fn_summary_t::duplicate): Use placement new
9227 instead of memory copy.
9228 (ipa_call_summary_t::duplicate): Likewise.
9229 (ipa_call_summary_t::remove): Remove.
9230 (dump_ipa_call_summary): Change get_create to get.
9231 (ipa_dump_fn_summary): Dump only when summary exists.
9232 (analyze_function_body): Use symbol_summary::get instead
9234 (compute_fn_summary): Likewise.
9235 (estimate_edge_devirt_benefit): Likewise.
9236 (estimate_edge_size_and_time): Likewise.
9237 (inline_update_callee_summaries): Likewise.
9238 (remap_edge_change_prob): Likewise.
9239 (remap_edge_summaries): Likewise.
9240 (ipa_merge_fn_summary_after_inlining): Likewise.
9241 (write_ipa_call_summary): Likewise.
9242 (ipa_fn_summary_write): Likewise.
9243 (ipa_free_fn_summary): Likewise.
9244 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
9245 (struct ipa_call_summary): Likewise.
9246 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
9248 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
9249 (estimate_size_after_inlining): Likewise.
9250 (estimate_growth): Likewise.
9251 (growth_likely_positive): Likewise.
9252 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9253 (inline_call): Likewise.
9254 * ipa-inline.c (caller_growth_limits): Likewise.
9255 (can_inline_edge_p): Likewise.
9256 (can_inline_edge_by_limits_p): Likewise.
9257 (compute_uninlined_call_time): Likewise.
9258 (compute_inlined_call_time): Likewise.
9259 (want_inline_small_function_p): Likewise.
9260 (edge_badness): Likewise.
9261 (update_caller_keys): Likewise.
9262 (update_callee_keys): Likewise.
9263 (inline_small_functions): Likewise.
9264 (inline_to_all_callers_1): Likewise.
9265 (dump_overall_stats): Likewise.
9266 (early_inline_small_functions): Likewise.
9267 (early_inliner): Likewise.
9268 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9269 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9270 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9271 * ipa-split.c (execute_split_functions): Likewise.
9272 * symbol-summary.h: Likewise.
9273 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9275 2018-06-19 Richard Biener <rguenther@suse.de>
9277 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
9278 (vectorize_loops): ... here. Fix dbgcnt handling.
9279 (try_vectorize_loop): Wrap try_vectorize_loop_1.
9281 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
9284 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
9285 ieee128 argument takes up only one (vector) register, not two (floating
9288 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
9290 * gimplify.c (gimplify_init_constructor): Really never clear for an
9291 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
9293 2018-06-19 Richard Biener <rguenther@suse.de>
9295 PR tree-optimization/86179
9296 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
9297 after failed recognition.
9299 2018-06-18 Martin Sebor <msebor@redhat.com>
9302 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
9303 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
9304 Handle integer subtraction.
9305 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
9306 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
9308 2018-06-18 David Malcolm <dmalcolm@redhat.com>
9310 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
9311 param from rtx to rtx_insn *.
9312 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
9314 (frv_ifcvt_modify_insn): Likwise.
9315 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
9316 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
9317 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
9318 as_a <rtx_insn *> cast to local "unprotected_region" once
9319 it's been established that it's not NULL or pc_rtx.
9320 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
9321 param "sethi" from rtx to rtx_insn *.
9322 (nds32_group_float_insns): Likewise for param "insn".
9323 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
9325 (vax_output_int_subtract): Likewise.
9326 * config/vax/vax.c (vax_output_int_add): Likewise for param
9328 (vax_output_int_subtract): Likewise.
9329 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
9330 (emit_pattern_after): Likewise for param "after".
9331 (emit_insn_after): Likewise.
9332 (emit_jump_insn_after): Likewise.
9333 (emit_call_insn_after): Likewise.
9334 (emit_debug_insn_after): Likewise.
9335 (emit_pattern_before): Likewise for param "before".
9336 (emit_insn_before): Likewise.
9337 (emit_jump_insn_before): Likewise.
9338 * final.c (get_insn_template): Likewise for param "insn", removing
9340 * output.h (get_insn_template): Likewise for 2nd param.
9341 * rtl.h (emit_insn_before): Likewise.
9342 (emit_jump_insn_before): Likewise.
9343 (emit_debug_insn_before_noloc): Likewise.
9344 (emit_insn_after): Likewise.
9345 (emit_jump_insn_after): Likewise.
9346 (emit_call_insn_after): Likewise.
9347 (emit_debug_insn_after): Likewise.
9348 (set_insn_deleted): Likewise for param.
9350 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
9353 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
9354 floating point modes, so that IFmode is numerically greater than
9355 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
9356 to declare the ordering. This prevents IFmode from being
9357 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
9358 machine. Include rs6000-modes.h to share the fractional values
9359 between genmodes* and the rest of the compiler.
9363 * config/rs6000/rs6000-modes.h: New file.
9364 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
9365 meaning of rs6000_long_double_size so that 126..128 selects an
9366 appropriate 128-bit floating point type.
9367 (rs6000_option_override_internal): Likewise.
9368 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
9369 (TARGET_LONG_DOUBLE_128): Change the meaning of
9370 rs6000_long_double_size so that 126..128 selects an appropriate
9371 128-bit floating point type.
9372 (LONG_DOUBLE_TYPE_SIZE): Update comment.
9373 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
9374 source and destination to match the standard usage.
9375 (truncifkf2): Likewise.
9376 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
9377 ISA 2.07 to use an explicit clobber, instead of passing in a
9379 (copysign<mode>3_soft): Likewise.
9381 2018-06-18 David Malcolm <dmalcolm@redhat.com>
9383 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
9384 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
9385 (vect_slp_analyze_instance_dependence): Likewise.
9386 (vect_enhance_data_refs_alignment): Likewise.
9387 (vect_analyze_data_refs_alignment): Likewise.
9388 (vect_slp_analyze_and_verify_instance_alignment
9389 (vect_analyze_data_ref_accesses): Likewise.
9390 (vect_prune_runtime_alias_test_list): Likewise.
9391 (vect_analyze_data_refs): Likewise.
9392 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
9393 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
9394 (vect_analyze_scalar_cycles_1): Likewise.
9395 (vect_get_loop_niters): Likewise.
9396 (vect_analyze_loop_form_1): Likewise.
9397 (vect_update_vf_for_slp): Likewise.
9398 (vect_analyze_loop_operations): Likewise.
9399 (vect_analyze_loop): Likewise.
9400 (vectorizable_induction): Likewise.
9401 (vect_transform_loop): Likewise.
9402 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
9403 * tree-vect-slp.c (vect_analyze_slp): Likewise.
9404 (vect_make_slp_decision): Likewise.
9405 (vect_detect_hybrid_slp): Likewise.
9406 (vect_slp_analyze_operations): Likewise.
9407 (vect_slp_bb): Likewise.
9408 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
9409 (vectorizable_bswap): Likewise.
9410 (vectorizable_call): Likewise.
9411 (vectorizable_simd_clone_call): Likewise.
9412 (vectorizable_conversion): Likewise.
9413 (vectorizable_assignment): Likewise.
9414 (vectorizable_shift): Likewise.
9415 (vectorizable_operation): Likewise.
9416 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
9418 2018-06-18 Martin Sebor <msebor@redhat.com>
9420 PR tree-optimization/81384
9421 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
9422 * builtins.c (expand_builtin_strnlen): New function.
9423 (expand_builtin): Call it.
9424 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
9425 * builtins.def (BUILT_IN_STRNLEN): New.
9426 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
9427 Warn for bounds in excess of maximum object size.
9428 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
9429 single-value ranges. Handle strnlen.
9430 (handle_builtin_strlen): Handle strnlen.
9431 (strlen_check_and_optimize_stmt): Same.
9432 * doc/extend.texi (Other Builtins): Document strnlen.
9434 2018-06-18 Maya Rashish <coypu@sdf.org>
9436 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
9437 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
9438 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
9440 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
9442 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
9444 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9446 * tree.c (escaped_string::escape): Replace cast to char * by
9447 const_cast<char *> (unescaped).
9449 2018-06-18 Nick Clifton <nickc@redhat.com>
9452 * tree.c (escaped_string): New class. Converts an unescaped
9453 string into its escaped equivalent.
9454 (warn_deprecated_use): Use the new class to convert the
9455 deprecation message, if present.
9456 (test_escaped_strings): New self test.
9457 (test_c_tests): Add test_escaped_strings.
9458 * doc/extend.texi (deprecated): Add a note that the
9459 deprecation message is affected by the -fmessage-length
9460 option, and that control characters will be escaped.
9461 (#pragma GCC error): Document this pragma.
9462 (#pragma GCC warning): Likewise.
9463 * doc/invoke.texi (-fmessage-length): Document this option's
9464 effect on the #warning and #error preprocessor directives and
9465 the deprecated attribute.
9467 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
9469 * tree.c (decl_value_expr_lookup): Revert latest change.
9470 (decl_value_expr_insert): Likewise.
9472 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
9474 * gimplify.c (nonlocal_vlas): Delete.
9475 (nonlocal_vla_vars): Likewise.
9476 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
9478 (gimplify_body): Do not create and destroy nonlocal_vlas.
9479 * tree-nested.c: Include diagnostic.h.
9480 (use_pointer_in_frame): Tweak.
9481 (lookup_field_for_decl): Add assertion and declare the transformation.
9482 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
9483 internal error when the reference is in a wrong context. Do not
9484 create a debug decl by default.
9485 (note_nonlocal_block_vlas): Delete.
9486 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
9487 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
9488 create a debug decl by default.
9489 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
9490 call is in a wrong context.
9491 (fixup_vla_decls): New function.
9492 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
9493 debug variables were created.
9494 * tree.c (decl_value_expr_lookup): Add checking assertion.
9495 (decl_value_expr_insert): Likewise.
9497 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
9500 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
9501 * tree-scalar-evolution.c (interpret_expr): Likewise.
9502 (expression_expensive_p): Likewise.
9503 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
9504 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
9505 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
9506 (ssa_defined_by_minus_one_stmt_p): New.
9508 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
9511 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
9512 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
9513 * dojump.c (do_jump): Likewise.
9514 * expr.c (expand_expr_real_2): Check operand type's sign.
9515 * fold-const.c (const_unop): Handle ABSU_EXPR.
9516 (fold_abs_const): Likewise.
9517 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
9518 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
9519 (strip_sign_op_1): Likesise.
9520 * match.pd: Add new pattern to generate ABSU_EXPR.
9521 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
9522 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9523 * tree-eh.c (operation_could_trap_helper_p): Likewise.
9524 * tree-inline.c (estimate_operator_cost): Likewise.
9525 * tree-pretty-print.c (dump_generic_node): Likewise.
9526 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
9527 * tree.def (ABSU_EXPR): New.
9529 2018-06-16 Jakub Jelinek <jakub@redhat.com>
9532 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
9533 documented as preserved for backward compatibility only.
9534 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
9536 PR rtl-optimization/86108
9537 * bb-reorder.c (create_forwarder_block): Renamed to ...
9538 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
9539 jump from new landing pad to the second part.
9540 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
9543 2018-06-15 Jakub Jelinek <jakub@redhat.com>
9546 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
9547 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
9548 Only call store_expr for halves if the mode is the same.
9551 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
9552 Fix up comment formatting.
9554 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
9556 * typed-splay-tree.h (typed_splay_tree::remove): New function.
9557 (typed_splay_tree::closure,
9558 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
9559 (typed_splay_tree::typed_splay_tree,
9560 typed_splay_tree::operator =): Declared private.
9561 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
9562 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
9563 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
9564 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
9565 typed_splay_tree::splay_tree_splay,
9566 typed_splay_tree::splay_tree_foreach_helper,
9567 typed_splay_tree::splay_tree_insert,
9568 typed_splay_tree::splay_tree_remove,
9569 typed_splay_tree::splay_tree_lookup,
9570 typed_splay_tree::splay_tree_predecessor,
9571 typed_splay_tree::splay_tree_successor,
9572 typed_splay_tree::splay_tree_min,
9573 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
9574 (typed_splay_tree::root, typed_splay_tree::comp,
9575 typed_splay_tree::delete_key,
9576 typed_splay_tree::delete_value): New data members.
9577 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
9578 typed_splay_tree::remove.
9580 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
9582 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
9583 -mginv and -mno-ginv to the assembler.
9584 * config/mips/mips.opt (-mcrc): New option.
9586 * doc/invoke.text (-mcrc): Document.
9589 2018-06-15 Nick Clifton <nickc@redhat.com>
9592 * tree.c (escaped_string): New class. Converts an unescaped
9593 string into its escaped equivalent.
9594 (warn_deprecated_use): Use the new class to convert the
9595 deprecation message, if present.
9596 (test_escaped_strings): New self test.
9597 (test_c_tests): Add test_escaped_strings.
9598 * doc/extend.texi (deprecated): Add a note that the
9599 deprecation message is affected by the -fmessage-length
9600 option, and that control characters will be escaped.
9601 (#pragma GCC error): Document this pragma.
9602 (#pragma GCC warning): Likewise.
9603 * doc/invoke.texi (-fmessage-length): Document this option's
9604 effect on the #warning and #error preprocessor directives and
9605 the deprecated attribute.
9607 2018-06-15 Richard Biener <rguenther@suse.de>
9609 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
9610 here, also noting vector size used.
9611 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
9612 size used in MSG_OPTIMIZED_LOCATIONS dump.
9613 (pass_slp_vectorize::execute): Adjust.
9615 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
9618 * config/arc/arc.c (arc_return_address_register): Fix
9621 2018-06-15 Richard Biener <rguenther@suse.de>
9624 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
9625 leave useless conversion stripping to force_gimple_operand_gsi.
9626 (gimplify_build2): Likewise.
9627 (gimplify_build1): Likewise.
9629 2018-06-15 Richard Biener <rguenther@suse.de>
9632 * tree-cfg.c (move_stmt_op): unshare invariant addresses
9633 before adjusting their block.
9635 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
9637 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
9638 multilibs for *-*-rtems*.
9639 * config/riscv/t-rtems: New file.
9641 2018-06-14 Jakub Jelinek <jakub@redhat.com>
9644 * match.pd ((A +- CST1) +- CST2): Punt if last resort
9645 unsigned_type_for returns NULL.
9648 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
9649 subregs of multi-word pseudos unless the float mode has word size.
9651 2018-06-14 Richard Biener <rguenther@suse.de>
9654 * tree-vect-generic.c (build_word_mode_vector_type): Remove
9655 duplicate and harmful type_hash_canon.
9656 * tree.c (type_hash_canon): Assert we didn't find ourselves.
9658 2018-06-14 Richard Biener <rguenther@suse.de>
9661 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
9664 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
9666 * config/rtems.h (STDINT_LONG32): Define.
9668 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
9669 Prachi Godbole <prachi.godbole@imgtec.com>
9671 * config/mips/mips-cpus.def: Define P6600.
9672 * config/mips/mips-tables.opt: Regenerate.
9673 * config/mips/mips.c (mips_ucbranch_type): New enum.
9674 (mips_rtx_cost_data): Add support for P6600.
9675 (mips_issue_rate): Likewise.
9676 (mips_multipass_dfa_lookahead): Likewise.
9677 (mips_avoid_hazard): Likewise.
9678 (mips_reorg_process_insns): Likewise.
9679 (mips_classify_branch_p6600): New function.
9680 * config/mips/mips.h (TUNE_P6600): New define.
9681 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
9682 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
9683 * config/mips/mips.md: Include p6600.md.
9684 (processor): Add p6600.
9685 * config/mips/p6600.md: New file.
9686 * doc/invoke.texi: Add p6600 to supported architectures.
9688 2018-06-13 Martin Sebor <msebor@redhat.com>
9690 PR tree-optimization/86114
9691 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
9693 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
9695 2018-06-13 Richard Biener <rguenther@suse.de>
9697 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
9698 Properly set vector type of the intermediate stmt.
9699 * tree-vect-stmts.c (vectorizable_operation): The destination
9700 var always has vectype_out type.
9702 2018-06-13 Jeff Law <law@redhat.com>
9704 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
9705 integer 0 for argument to print_rtl_with_bb.
9706 (rl78_reorg): Likewise.
9708 2018-06-13 David Malcolm <dmalcolm@redhat.com>
9710 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
9711 from rtx to rtx_insn *.
9712 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
9714 (add_sched_insns_for_speculation): Likewise for local "target",
9715 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9716 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
9717 from rtx_insn ** to rtx_code_label **.
9718 (reorg_emit_nops): Likewise.
9719 (c6x_reorg): Likewise for local "call_labels".
9720 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
9722 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
9723 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
9724 the loops over LABEL_REFS.
9725 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
9727 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9728 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
9729 (split_branches): Strengthen local "olabel" from rtx to
9730 rtx_insn *, adding a safe_as_a cast.
9731 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
9733 (add_insn_after): Likewise for first two params.
9734 (add_insn_before): Likewise.
9735 (remove_insn): Likewise for param.
9736 (emit_pattern_before_noloc): Likewise for second and third params.
9737 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
9738 (emit_call_insn_before_noloc): Likewise.
9739 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
9741 (emit_barrier_before): Likewise.
9742 (emit_label_before): Strengthen "label" param from "rtx" to
9743 "rtx_code_label *". Strengthen "before" param from "rtx" to
9745 (emit_insn_after_1): Strengthen "after" param from "rtx" to
9747 (emit_pattern_after_noloc): Likewise.
9748 (emit_insn_after_noloc): Likewise.
9749 (emit_jump_insn_after_noloc): Likewise.
9750 (emit_call_insn_after_noloc): Likewise.
9751 (emit_debug_insn_after_noloc): Likewise.
9752 (emit_barrier_after): Likewise.
9753 (emit_label_after): Likewise for both params.
9754 (emit_pattern_after_setloc): Likewise for "after" param. Convert
9755 "loc" param from "int" to "location_t".
9756 (emit_insn_after_setloc): Likewise.
9757 (emit_jump_insn_after_setloc): Likewise.
9758 (emit_call_insn_after_setloc): Likewise.
9759 (emit_debug_insn_after_setloc): Likewise.
9760 (emit_pattern_before_setloc): Likewise for "before" param. Convert
9761 "loc" param from "int" to "location_t".
9762 (emit_pattern_before): Convert NULL_RTX to NULL.
9763 (emit_insn_before_setloc): Convert "loc" param from "int" to
9765 (emit_jump_insn_before_setloc): Likewise.
9766 (emit_call_insn_before_setloc): Likewise.
9767 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
9768 rtx_insn *. Convert "loc" param from "int" to "location_t".
9769 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
9770 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
9771 Convert 3rd param from "int" to "location_t".
9772 (emit_barrier_before, emit_barrier_after, next_real_insn):
9773 Strengthen param from rtx to rtx_insn *.
9774 (emit_label_before): Strengthen 1st param from "rtx" to
9775 "rtx_code_label *". Strengthen 2nd param from "rtx" to
9777 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
9778 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
9779 Strengthen 2nd param from "rtx" to "rtx_insn *".
9780 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
9781 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
9782 Likewise. Convert 3rd param from "int" to "location_t".
9783 (emit_label_after): Strengthen 1st param from "rtx" to
9785 (next_real_insn, remove_insn): Strengthen param from "rtx" to
9787 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
9788 from "rtx" to "rtx_insn *".
9790 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
9792 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
9793 bodies streamed in with -Q.
9794 * dumpfile.c (dump_files): Add lto-stream-out dump file.
9795 * dumpfile.h (tree_dump_index): Add lto_stream_out.
9796 * gimple-streamer-out.c: Include gimple-pretty-print.h
9797 (output_bb): Dump stmts streamed.
9798 * lto-section-out.c: Include print-tree.h
9799 (lto_begin_section): Dump sections created.
9800 (lto_output_decl_index): Dump decl encoded.
9801 * lto-streamer-out.c: Include print-tree.h
9802 (create_output_block): Dump output block created.
9803 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
9804 (output_function): Dump function output.
9805 (output_constructor): Dump constructor streamed.
9806 (write_global_stream): Output indexes encoded.
9807 (produce_asm_for_decls): Dump streams encoded.
9808 * lto-streamer.c (streamer_dump_file): New global var.
9809 * lto-streamer.h (streamer_dump_file): Declare.
9810 * passes.c (ipa_write_summaries): Initialize streamer dump.
9811 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
9814 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
9817 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
9818 offsets for register save directives. Emit a second batch of save
9819 directives, if need be, when the function accesses prior frames.
9821 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9823 * config/arc/fpu.md (fmasf4): Force operand to register.
9824 (fnmasf4): Likewise.
9826 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9828 * config/arc/arc-protos.h (arc_pad_return): Remove.
9829 * config/arc/arc.c (machine_function): Remove force_short_suffix
9831 (arc_print_operand): Adjust printing of '&'.
9832 (arc_verify_short): Remove conditional printing of short suffix.
9833 (arc_final_prescan_insn): Remove reference to size_reason.
9834 (pad_return): New function.
9835 (arc_reorg): Call pad_return.
9836 (arc_pad_return): Remove.
9837 (arc_init_machine_status): Remove reference to force_short_suffix.
9838 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
9839 (attr length): When attribute iscompact is true force to 2
9840 regardless; in the case of maybe check if we want to force the
9841 instruction to have 4 bytes length.
9842 (nopv): Change it to generate 4 byte long nop as well.
9843 (blockage): New pattern.
9844 (simple_return): Remove call to arc_pad_return.
9845 (p_return_i): Likewise.
9847 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9849 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
9851 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9853 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9856 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9858 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9859 for ARC700 and ARCv2.
9861 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
9864 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9865 operands[2] instead of operands[1].
9868 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9870 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9871 case, check whether the outer register overlaps an unallocatable
9872 register, not just whether it fits the required class.
9874 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9876 * poly-int.h (can_div_trunc_p): Add new overload in which all values
9878 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9879 (memrefs_conflict_p): Likewise.
9880 (init_alias_analysis): Likewise.
9881 * cfgexpand.c (expand_debug_expr): Likewise.
9882 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9883 * cse.c (fold_rtx): Likewise.
9884 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9885 * expr.c (emit_block_move_hints): Likewise.
9886 (clear_storage_hints, push_block, emit_push_insn): Likewise.
9887 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9888 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9889 (emit_group_store): Likewise.
9890 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
9891 to read the PRE/POST_MODIFY increment.
9892 * calls.c (store_one_arg): Use strip_offset.
9893 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9895 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9897 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9898 (simplify_binary_operation_1): Extend CONST_INT handling to
9900 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9901 than a HOST_WIDE_INT.
9902 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9904 (adjust_mems, add_stores): Update accodingly.
9905 (vt_canonicalize_addr): Track polynomial offsets.
9906 (emit_note_insn_var_location): Likewise.
9907 (vt_add_function_parameter): Likewise.
9908 (vt_initialize): Likewise.
9910 2018-06-12 Jeff Law <law@redhat.com>
9912 * config.gcc (alpha*-*-freebsd*): Remove.
9913 * config/alpha/freebsd.h: Remove.
9915 2018-06-12 David Malcolm <dmalcolm@redhat.com>
9918 * spellcheck-tree.c (levenshtein_distance): Rename to...
9919 (get_edit_distance): ...this, and update for underlying renaming.
9920 * spellcheck-tree.h (levenshtein_distance): Rename to...
9921 (get_edit_distance): ...this.
9922 * spellcheck.c (levenshtein_distance): Rename to...
9923 (get_edit_distance): ...this. Convert from Levenshtein distance
9924 to Damerau-Levenshtein distance by supporting transpositions of
9925 adjacent characters. Rename "v1" to "v_next" and "v0" to
9927 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9928 (selftest::test_edit_distance_unit_test_oneway): ...this, and
9929 update for underlying renaming.
9930 (selftest::levenshtein_distance_unit_test): Rename to...
9931 (selftest::test_get_edit_distance_unit): ...this, and update for
9932 underlying renaming.
9933 (selftest::test_find_closest_string): Add example from PR 69968
9934 where transposition helps
9935 (selftest::test_metric_conditions): Update for renaming.
9936 (selftest::test_metric_conditions): Likewise.
9937 (selftest::spellcheck_c_tests): Likewise.
9938 * spellcheck.h (levenshtein_distance): Rename both overloads to...
9939 (get_edit_distance): ...this.
9940 (best_match::consider): Update for renaming.
9942 2018-06-12 Martin Sebor <msebor@redhat.com>
9944 PR tree-optimization/85259
9945 * builtins.c (compute_objsize): Handle constant offsets.
9946 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9947 true iff a warning has been issued.
9948 * gimple.h (gimple_nonartificial_location): New function.
9949 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9950 gimple_nonartificial_location and handle -Wno-system-headers.
9951 (handle_builtin_stxncpy): Same.
9953 2018-06-12 Martin Sebor <msebor@redhat.com>
9956 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9958 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
9960 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9961 BUILTIN_VEC_XST entries for pointer to double and long long.
9963 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
9966 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9968 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9971 2018-06-12 Martin Liska <mliska@suse.cz>
9973 * doc/options.texi: Document IntegerRange.
9975 2018-06-12 Martin Liska <mliska@suse.cz>
9977 * config/i386/i386.opt: Make MPX-related options as Deprecated.
9978 * opt-functions.awk: Handle Deprecated flag.
9979 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9981 (read_cmdline_option): Report warning for a deprecated option.
9982 * opts.h (struct cl_option): Add new field cl_deprecated.
9983 (CL_ERR_DEPRECATED): New.
9985 2018-06-12 Martin Liska <mliska@suse.cz>
9987 * doc/options.texi: Document Deprecated option flag.
9989 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9991 * config/arc/arc-arch.h (arc_extras): New enum.
9992 (arc_cpu_t):Add field extra.
9993 (arc_cpu_types): Consider the extras.
9994 * config/arc/arc-cpus.def: Add extras info.
9995 * config/arc/arc-opts.h (processor_type): Consider extra field.
9996 * config/arc/arc.c (arc_override_options): Handle extra field.
9998 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
10000 * config/arc/arc-arch.h: Update ARC_OPTX macro.
10001 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
10003 * config/arc/arc.c (arc_init): Update pic warning.
10004 (irq_range): Update irq range parsing warnings.
10005 (arc_override_options): Update various warning messages.
10006 (arc_handle_aux_attribute): Likewise.
10008 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
10010 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
10012 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10014 * doc/sourcebuild.texi: Document usage of line number 0 in verify
10015 compiler messages directives.
10017 2018-06-12 Matthew Fortune <mfortune@gmail.com>
10019 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
10020 * config/mips/mips-tables.opt: Regenerate.
10021 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
10023 * doc/invoke.texi: Document -march=i6500.
10025 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
10027 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
10028 (i6400_gpmul): Add cpu_unit.
10029 (i6400_gpdiv): Likewise.
10030 (i6400_msa_add_d): Update reservations.
10031 (i6400_msa_int_add) Likewise.
10032 (i6400_msa_short_logic3) Likewise.
10033 (i6400_msa_short_logic2) Likewise.
10034 (i6400_msa_short_logic) Likewise.
10035 (i6400_msa_move) Likewise.
10036 (i6400_msa_cmp) Likewise.
10037 (i6400_msa_short_float2) Likewise.
10038 (i6400_msa_div_d) Likewise.
10039 (i6400_msa_long_logic1) Likewise.
10040 (i6400_msa_long_logic2) Likewise.
10041 (i6400_msa_mult) Likewise.
10042 (i6400_msa_long_float2) Likewise.
10043 (i6400_msa_long_float4) Likewise.
10044 (i6400_msa_long_float5) Likewise.
10045 (i6400_msa_long_float8) Likewise.
10046 (i6400_fpu_fadd): Include frint type.
10047 (i6400_fpu_store): New define_insn_reservation.
10048 (i6400_fpu_load): Likewise.
10049 (i6400_fpu_move): Likewise.
10050 (i6400_fpu_fcmp): Likewise.
10051 (i6400_fpu_fmadd): Likewise.
10052 (i6400_int_mult): Include imul3nc type and update reservation.
10053 (i6400_int_div): Include idiv3 type and update reservation.
10054 (i6400_int_load): Update to check type not move_type.
10055 (i6400_int_store): Likewise.
10056 (i6400_int_prefetch): Set zero latency.
10058 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
10060 * gcc.c: Document new %@{...} sequence.
10061 (LINK_COMMAND_SPEC): Use it for the -L switches.
10062 (cpp_unique_options): Use it for the -I switches.
10063 (at_file_argbuf): New global variable.
10064 (in_at_file): Likewise.
10065 (alloc_args): Create at_file_argbuf.
10066 (clear_args): Truncate at_file_argbuf.
10067 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
10068 (open_at_file): New function.
10069 (close_at_file): Likewise.
10070 (create_at_file): Delete.
10071 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
10074 (validate_switches_from_spec): Deal with %@{...} sequence.
10075 (validate_switches): Likewise.
10076 (driver::finalize): Call clear_args.
10078 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
10080 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
10082 2018-06-11 Martin Sebor <msebor@redhat.com>
10084 * doc/invoke.texi (-Wall): List -Wc++17-compat.
10085 (Wno-class-memaccess): Add @opindex.
10086 (Wno-templates, Wno-multiple-inheritance): Same.
10087 (Wno-virtual-inheritance, Wno-namespaces): Same.
10088 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
10089 (Wno-format-overflow, Wno-format-truncation): Same.
10090 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
10091 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
10092 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
10093 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
10094 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
10095 (Wno-misspelled-isr): Same.
10097 2018-06-11 Martin Sebor <msebor@redhat.com>
10099 * PR tree-optimization/86083
10100 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
10102 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
10104 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
10106 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
10109 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
10110 on the correct operand.
10111 (*movdi_internal64): Ditto.
10113 2018-06-11 Martin Liska <mliska@suse.cz>
10115 PR tree-optimization/86089
10116 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
10118 2018-06-11 Julia Koval <julia.koval@intel.com>
10120 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
10121 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
10122 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
10124 2018-06-11 Olivier Hainque <hainque@adacore.com>
10126 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
10127 for Ada with strict dwarf2.
10129 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
10132 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
10135 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
10137 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
10139 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
10141 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
10144 2018-06-08 Martin Liska <mliska@suse.cz>
10146 * tree-cfg.h (debug_function): Fix argument type to match
10149 2018-06-08 Martin Liska <mliska@suse.cz>
10151 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
10152 Remove usage of MPX-related (and removed) fields.
10153 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
10155 2018-06-08 David Malcolm <dmalcolm@redhat.com>
10157 * cfg.c (debug): Use TDF_NONE rather than 0.
10158 * cfghooks.c (debug): Likewise.
10159 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
10160 (struct dump_option_value_info): Convert to...
10161 (struct kv_pair): ...this template type.
10162 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
10164 (optinfo_verbosity_options): Likewise.
10165 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
10167 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
10168 than int for "optgroup_flags" param.
10169 (dump_generic_expr_loc): Use dump_flags_t rather than int for
10171 (dump_dec): Likewise.
10172 (dump_finish): Use TDF_NONE rather than 0.
10173 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
10174 rather than int for "optgroup_flags" param. Use TDF_NONE rather
10175 than 0. Update for change to option_ptr.
10176 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
10177 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
10178 0. Update for changes to optinfo_verbosity_options and
10180 (opt_info_switch_p): Convert optgroup_flags from int to
10182 (dump_basic_block): Use dump_flags_t rather than int
10183 for "dump_kind" param.
10184 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
10185 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
10186 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
10187 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
10188 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
10189 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
10190 TDF_NONE): Convert from macros to...
10191 (enum dump_flag): ...this new enum.
10192 (dump_flags_t): Update to use enum.
10193 (operator|, operator&, operator~, operator|=, operator&=):
10194 Implement for dump_flags_t.
10195 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
10196 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
10197 Convert from macros to...
10198 (enum optgroup_flag): ...this new enum.
10199 (optgroup_flags_t): New typedef.
10200 (operator|, operator|=): Implement for optgroup_flags_t.
10201 (struct dump_file_info): Convert field "alt_flags" to
10202 dump_flags_t. Convert field "optgroup_flags" to
10204 (dump_basic_block): Use dump_flags_t rather than int for param.
10205 (dump_generic_expr_loc): Likewise.
10206 (dump_dec): Likewise.
10207 (dump_register): Convert param "optgroup_flags" to
10209 (opt_info_enable_passes): Likewise.
10210 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
10212 * gimple-pretty-print.c (debug): Likewise.
10213 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
10214 (merged_store_group::apply_stores): Likewise.
10215 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
10216 * gimple.c (verify_gimple_pp): Likewise.
10217 * graphite-poly.c (print_pbb_body): Likewise.
10218 * passes.c (pass_manager::register_one_dump_file): Convert
10219 local "optgroup_flags" to optgroup_flags_t.
10220 * print-tree.c (print_node): Use TDF_NONE rather than 0.
10222 (debug_body): Likewise.
10223 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
10224 to optgroup_flags_t.
10225 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
10227 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
10228 (convert_mult_to_fma): Likewise.
10229 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
10230 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
10231 * tree-vect-data-refs.c (dump_lower_bound): Convert param
10232 "dump_kind" to dump_flags_t.
10234 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
10236 * config/rs6000/rs6000.c (min, max): Delete.
10238 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
10240 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
10241 -mabi=spe and -mabi=no-spe.
10243 2018-06-08 Martin Liska <mliska@suse.cz>
10245 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
10246 where we expect an existing summary.
10248 2018-06-08 Martin Liska <mliska@suse.cz>
10250 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
10251 * ipa-inline.h (estimate_edge_growth): Likewise.
10253 2018-06-08 Martin Liska <mliska@suse.cz>
10255 * cgraph.c (function_version_hasher::hash): Use
10256 cgraph_node::get_uid ().
10257 (function_version_hasher::equal):
10258 * cgraph.h (cgraph_node::get_uid): New method.
10259 * ipa-inline.c (update_caller_keys): Use
10260 cgraph_node::get_uid ().
10261 (update_callee_keys): Likewise.
10262 * ipa-utils.c (searchc): Likewise.
10263 (ipa_reduced_postorder): Likewise.
10264 * lto-cgraph.c (input_node): Likewise.
10265 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
10266 * symbol-summary.h (symtab_insertion): Likewise.
10267 (symtab_removal): Likewise.
10268 (symtab_duplication): Likewise.
10269 * tree-pretty-print.c (dump_function_header): Likewise.
10270 * tree-sra.c (convert_callers_for_node): Likewise.
10272 2018-06-08 Martin Liska <mliska@suse.cz>
10274 * cgraph.c (symbol_table::create_edge): Always assign a new
10276 (symbol_table::free_edge): Do not recycle numbers.
10277 * cgraph.h (cgraph_edge::get): New method.
10278 * symbol-summary.h (symtab_removal): Use it.
10279 (symtab_duplication): Likewise.
10280 (call_summary::hashable_uid): Remove.
10282 2018-06-08 Martin Liska <mliska@suse.cz>
10284 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
10285 (initialize_growth_caches): Remove.
10286 (free_growth_caches): Likewise.
10287 (do_estimate_edge_time): Use edge_growth_cache.
10288 (do_estimate_edge_size): Likewise.
10289 (do_estimate_edge_hints): Likewise.
10290 * ipa-inline.c (reset_edge_caches): Likewise.
10291 (recursive_inlining): Likewise.
10292 (inline_small_functions): Likewise.
10293 * ipa-inline.h (initialize_growth_caches): Remove.
10294 (estimate_edge_size): Likewise.
10295 (estimate_edge_time): Likewise.
10296 (estimate_edge_hints): Likewise.
10297 (reset_edge_growth_cache): Likewise.
10298 * symbol-summary.h (call_summary::remove): New method.
10300 2018-06-08 Martin Liska <mliska@suse.cz>
10302 * ipa-cp.c (class edge_clone_summary): New summary.
10303 (grow_edge_clone_vectors): Remove.
10304 (ipcp_edge_duplication_hook): Remove.
10305 (class edge_clone_summary_t): New call_summary class.
10306 (ipcp_edge_removal_hook): Remove.
10307 (edge_clone_summary_t::duplicate): New function.
10308 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
10309 (create_specialized_node): Likewise.
10310 (ipcp_driver): Initialize edge_clone_summaries and do not
10313 2018-06-08 Martin Liska <mliska@suse.cz>
10315 * symbol-summary.h (get): New function.
10316 (call_summary::m_initialize_when_cloning): New class member.
10318 2018-06-08 Martin Liska <mliska@suse.cz>
10320 * cgraph.c (cgraph_node::remove): Do not recycle uid.
10321 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
10322 (symbol_table::allocate_cgraph_symbol): Do not set uid.
10323 * passes.c (uid_hash_t): Record removed_nodes by their uids.
10324 (remove_cgraph_node_from_order): Use the removed_nodes set.
10325 (do_per_function_toporder): Likwise.
10326 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
10327 instead of summary_uid.
10328 (symtab_removal): Likewise.
10329 (symtab_duplication): Likewise.
10331 2018-06-08 Martin Liska <mliska@suse.cz>
10333 * ipa-cp.c (ipcp_store_bits_results): Use
10334 ipcp_transformation_sum.
10335 (ipcp_store_vr_results): Likewise.
10336 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
10338 (ipcp_transformation_initialize): ... this.
10339 (ipa_set_node_agg_value_chain):
10340 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
10341 (write_ipcp_transformation_info): Likewise.
10342 (read_ipcp_transformation_info): Likewise.
10343 (ipcp_update_bits): Likewise.
10344 (ipcp_update_vr): Likewise.
10345 (ipcp_transform_function): Likewise.
10346 * ipa-prop.h: Rename ipcp_transformation_summary to
10347 ipcp_transformation.
10348 (class ipcp_transformation_t): New function summary.
10349 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
10350 (ipa_get_agg_replacements_for_node): Likewise.
10352 2018-06-08 Martin Liska <mliska@suse.cz>
10354 * ipa-pure-const.c (struct funct_state_d): Do it class instead
10356 (class funct_state_summary_t): New function_summary class.
10357 (has_function_state): Remove.
10358 (get_function_state): Likewise.
10359 (set_function_state): Likewise.
10360 (add_new_function): Likewise.
10361 (funct_state_summary_t::insert): New function.
10362 (duplicate_node_data): Remove.
10363 (remove_node_data): Remove.
10364 (funct_state_summary_t::duplicate): New function.
10365 (register_hooks): Create new funct_state_summaries.
10366 (pure_const_generate_summary): Use it.
10367 (pure_const_write_summary): Likewise.
10368 (pure_const_read_summary): Likewise.
10369 (propagate_pure_const): Likewise.
10370 (propagate_nothrow): Likewise.
10371 (dump_malloc_lattice): Likewise.
10372 (propagate_malloc): Likewise.
10373 (execute): Do not register hooks, just remove summary
10375 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
10378 2018-06-08 Martin Liska <mliska@suse.cz>
10380 * ipa-reference.c (remove_node_data): Remove.
10381 (duplicate_node_data): Likewise.
10382 (class ipa_ref_var_info_summary_t): New class.
10383 (class ipa_ref_opt_summary_t): Likewise.
10384 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
10385 (get_reference_optimization_summary): Use
10386 ipa_ref_opt_sum_summaries.
10387 (set_reference_vars_info): Remove.
10388 (set_reference_optimization_summary): Likewise.
10389 (ipa_init): Create summaries.
10390 (init_function_info): Use function summary.
10391 (ipa_ref_opt_summary_t::duplicate): New function.
10392 (ipa_ref_opt_summary_t::remove): New function.
10393 (get_read_write_all_from_node): Fix GNU coding style.
10394 (propagate): Use function summary.
10395 (write_node_summary_p): Fix GNU coding style.
10396 (stream_out_bitmap): Likewise.
10397 (ipa_reference_read_optimization_summary): Use function summary.
10398 (ipa_reference_c_finalize): Do not release hooks.
10400 2018-06-08 Martin Liska <mliska@suse.cz>
10402 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
10403 (analyze_function_body): Extract multiple calls of get_create.
10404 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
10405 * ipa-inline.c (recursive_inlining): Use ::get method.
10406 * ipa-inline.h (estimate_edge_growth): Likewise.
10408 2018-06-08 Martin Liska <mliska@suse.cz>
10410 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
10412 (hsa_function_summary::hsa_function_summary): Use the new enum
10414 (hsa_gpu_implementation_p): Use hsa_summaries::get.
10415 * hsa-gen.c (hsa_get_host_function): Likewise.
10416 (get_brig_function_name): Likewise.
10417 * ipa-hsa.c (process_hsa_functions): Likewise.
10418 (ipa_hsa_write_summary): Likewise.
10419 * symbol-summary.h (symtab_duplication): Use ::get function/
10420 (get): New function.
10422 2018-06-08 Martin Liska <mliska@suse.cz>
10424 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
10426 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
10427 (hsa_register_kernel): Likewise.
10428 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
10429 * hsa-gen.c (hsa_get_host_function): Likewise.
10430 (get_brig_function_name): Likewise.
10431 (generate_hsa): Likewise.
10432 (pass_gen_hsail::execute): Likewise.
10433 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
10434 (devirtualization_time_bonus): Likewise.
10435 (ipcp_propagate_stage): Likewise.
10436 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10437 (edge_set_predicate): Likewise.
10438 (evaluate_conditions_for_known_args): Likewise.
10439 (evaluate_properties_for_edge): Likewise.
10440 (ipa_fn_summary::reset): Likewise.
10441 (ipa_fn_summary_t::duplicate): Likewise.
10442 (dump_ipa_call_summary): Likewise.
10443 (ipa_dump_fn_summary): Likewise.
10444 (analyze_function_body): Likewise.
10445 (compute_fn_summary): Likewise.
10446 (estimate_edge_devirt_benefit): Likewise.
10447 (estimate_edge_size_and_time): Likewise.
10448 (estimate_calls_size_and_time): Likewise.
10449 (estimate_node_size_and_time): Likewise.
10450 (inline_update_callee_summaries): Likewise.
10451 (remap_edge_change_prob): Likewise.
10452 (remap_edge_summaries): Likewise.
10453 (ipa_merge_fn_summary_after_inlining): Likewise.
10454 (ipa_update_overall_fn_summary): Likewise.
10455 (read_ipa_call_summary): Likewise.
10456 (inline_read_section): Likewise.
10457 (write_ipa_call_summary): Likewise.
10458 (ipa_fn_summary_write): Likewise.
10459 (ipa_free_fn_summary): Likewise.
10460 * ipa-hsa.c (process_hsa_functions): Likewise.
10461 (ipa_hsa_write_summary): Likewise.
10462 (ipa_hsa_read_section): Likewise.
10463 * ipa-icf.c (sem_function::merge): Likewise.
10464 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
10465 (do_estimate_edge_time): Likewise.
10466 (estimate_size_after_inlining): Likewise.
10467 (estimate_growth): Likewise.
10468 (growth_likely_positive): Likewise.
10469 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
10470 (inline_call): Likewise.
10471 * ipa-inline.c (caller_growth_limits): Likewise.
10472 (can_inline_edge_p): Likewise.
10473 (can_inline_edge_by_limits_p): Likewise.
10474 (compute_uninlined_call_time): Likewise.
10475 (compute_inlined_call_time): Likewise.
10476 (want_inline_small_function_p): Likewise.
10477 (edge_badness): Likewise.
10478 (update_caller_keys): Likewise.
10479 (update_callee_keys): Likewise.
10480 (recursive_inlining): Likewise.
10481 (inline_small_functions): Likewise.
10482 (inline_to_all_callers_1): Likewise.
10483 (dump_overall_stats): Likewise.
10484 (early_inline_small_functions): Likewise.
10485 (early_inliner): Likewise.
10486 * ipa-inline.h (estimate_edge_growth): Likewise.
10487 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
10488 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10489 * ipa-prop.h (IPA_NODE_REF): Likewise.
10490 (IPA_EDGE_REF): Likewise.
10491 * ipa-pure-const.c (malloc_candidate_p): Likewise.
10492 (propagate_malloc): Likewise.
10493 * ipa-split.c (execute_split_functions): Likewise.
10494 * symbol-summary.h: Rename get to get_create.
10496 (get_create): Likewise.
10497 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
10499 2018-06-08 Martin Liska <mliska@suse.cz>
10501 * symbol-summary.h (release): Move definition out of class
10503 (symtab_removal): Likewise.
10504 (symtab_duplication): Likewise.
10506 2018-06-08 Martin Liska <mliska@suse.cz>
10508 * symbol-summary.h (function_summary): Move constructor
10509 implementation out of class declaration.
10510 (release): Likewise.
10511 (symtab_insertion): Likewise.
10512 (symtab_removal): Likewise.
10513 (symtab_duplication): Likewise.
10516 2018-06-08 Martin Liska <mliska@suse.cz>
10518 * Makefile.in: Remove support for MPX (macros, related functions,
10519 fields in cgraph_node, ...).
10520 * builtin-types.def (BT_BND): Likewise.
10521 (BT_FN_BND_CONST_PTR): Likewise.
10522 (BT_FN_CONST_PTR_BND): Likewise.
10523 (BT_FN_VOID_PTR_BND): Likewise.
10524 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
10525 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
10526 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
10527 (expand_builtin_mempcpy_with_bounds): Likewise.
10528 (expand_builtin_memset_with_bounds): Likewise.
10529 (expand_builtin_memset_args): Likewise.
10530 (std_expand_builtin_va_start): Likewise.
10531 (expand_builtin): Likewise.
10532 (expand_builtin_with_bounds): Likewise.
10533 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
10534 (DEF_LIB_BUILTIN_CHKP): Likewise.
10535 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
10536 (DEF_CHKP_BUILTIN): Likewise.
10537 (BUILT_IN_MEMCPY): Likewise.
10538 (BUILT_IN_MEMMOVE): Likewise.
10539 (BUILT_IN_MEMPCPY): Likewise.
10540 (BUILT_IN_MEMSET): Likewise.
10541 (BUILT_IN_STPCPY): Likewise.
10542 (BUILT_IN_STRCAT): Likewise.
10543 (BUILT_IN_STRCHR): Likewise.
10544 (BUILT_IN_STRCPY): Likewise.
10545 (BUILT_IN_STRLEN): Likewise.
10546 (BUILT_IN_MEMCPY_CHK): Likewise.
10547 (BUILT_IN_MEMMOVE_CHK): Likewise.
10548 (BUILT_IN_MEMPCPY_CHK): Likewise.
10549 (BUILT_IN_MEMSET_CHK): Likewise.
10550 (BUILT_IN_STPCPY_CHK): Likewise.
10551 (BUILT_IN_STRCAT_CHK): Likewise.
10552 (BUILT_IN_STRCPY_CHK): Likewise.
10553 * calls.c (store_bounds): Likewise.
10554 (emit_call_1): Likewise.
10555 (special_function_p): Likewise.
10556 (maybe_warn_nonstring_arg): Likewise.
10557 (initialize_argument_information): Likewise.
10558 (finalize_must_preallocate): Likewise.
10559 (compute_argument_addresses): Likewise.
10560 (expand_call): Likewise.
10561 * cfgexpand.c (expand_call_stmt): Likewise.
10562 (expand_return): Likewise.
10563 (expand_gimple_stmt_1): Likewise.
10564 (pass_expand::execute): Likewise.
10565 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
10566 (cgraph_node::remove): Likewise.
10567 (cgraph_node::dump): Likewise.
10568 (cgraph_node::verify_node): Likewise.
10569 * cgraph.h (chkp_function_instrumented_p): Likewise.
10570 (symtab_node::get_alias_target): Likewise.
10571 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
10572 (cgraph_local_p): Likewise.
10573 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
10574 (cgraph_edge::rebuild_references): Likewise.
10575 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
10576 (walk_polymorphic_call_targets): Likewise.
10577 (cgraph_node::expand_thunk): Likewise.
10578 (symbol_table::output_weakrefs): Likewise.
10579 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
10580 (ix86_handle_option): Likewise.
10581 * config/i386/constraints.md: Likewise.
10582 * config/i386/i386-builtin-types.def (BND): Likewise.
10586 * config/i386/i386-builtin.def (BDESC_END): Likewise.
10587 (BDESC_FIRST): Likewise.
10589 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
10590 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
10591 * config/i386/i386.c (enum reg_class): Likewise.
10592 (ix86_target_string): Likewise.
10593 (ix86_option_override_internal): Likewise.
10594 (ix86_conditional_register_usage): Likewise.
10595 (ix86_valid_target_attribute_inner_p): Likewise.
10596 (ix86_set_indirect_branch_type): Likewise.
10597 (ix86_set_current_function): Likewise.
10598 (ix86_function_arg_regno_p): Likewise.
10599 (init_cumulative_args): Likewise.
10600 (ix86_function_arg_advance): Likewise.
10601 (ix86_function_arg): Likewise.
10602 (ix86_pass_by_reference): Likewise.
10603 (ix86_function_value_regno_p): Likewise.
10604 (ix86_function_value_1): Likewise.
10605 (ix86_function_value_bounds): Likewise.
10606 (ix86_return_in_memory): Likewise.
10607 (ix86_setup_incoming_vararg_bounds): Likewise.
10608 (ix86_va_start): Likewise.
10609 (indirect_thunk_need_prefix): Likewise.
10610 (print_reg): Likewise.
10611 (ix86_print_operand): Likewise.
10612 (ix86_expand_call): Likewise.
10613 (ix86_output_function_return): Likewise.
10614 (reg_encoded_number): Likewise.
10615 (BDESC_VERIFYS): Likewise.
10616 (ix86_init_mpx_builtins): Likewise.
10617 (ix86_init_builtins): Likewise.
10618 (ix86_emit_cmove): Likewise.
10619 (ix86_emit_move_max): Likewise.
10620 (ix86_expand_builtin): Likewise.
10621 (ix86_builtin_mpx_function): Likewise.
10622 (ix86_get_arg_address_for_bt): Likewise.
10623 (ix86_load_bounds): Likewise.
10624 (ix86_store_bounds): Likewise.
10625 (ix86_load_returned_bounds): Likewise.
10626 (ix86_store_returned_bounds): Likewise.
10627 (ix86_class_likely_spilled_p): Likewise.
10628 (ix86_hard_regno_mode_ok): Likewise.
10629 (x86_order_regs_for_local_alloc): Likewise.
10630 (ix86_mitigate_rop): Likewise.
10631 (ix86_bnd_prefixed_insn_p): Likewise.
10632 (ix86_mpx_bound_mode): Likewise.
10633 (ix86_make_bounds_constant): Likewise.
10634 (ix86_initialize_bounds): Likewise.
10635 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
10636 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
10637 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
10638 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
10639 (TARGET_CHKP_BOUND_MODE): Likewise.
10640 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
10641 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
10642 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
10643 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
10644 * config/i386/i386.h (TARGET_MPX): Likewise.
10645 (TARGET_MPX_P): Likewise.
10646 (VALID_BND_REG_MODE): Likewise.
10647 (FIRST_BND_REG): Likewise.
10648 (LAST_BND_REG): Likewise.
10649 (enum reg_class): Likewise.
10650 (BND_REG_P): Likewise.
10651 (BND_REGNO_P): Likewise.
10652 (BNDmode): Likewise.
10653 (ADJUST_INSN_LENGTH): Likewise.
10654 * config/i386/i386.md: Likewise.
10655 * config/i386/i386.opt: Likewise.
10656 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
10657 (defined): Likewise.
10658 (LINK_MPX): Likewise.
10659 (MPX_SPEC): Likewise.
10660 (LIBMPX_SPEC): Likewise.
10661 (LIBMPXWRAPPERS_SPEC): Likewise.
10662 (CHKP_SPEC): Likewise.
10663 * config/i386/predicates.md: Likewise.
10664 * dbxout.c (dbxout_type): Likewise.
10665 * doc/extend.texi: Likewise.
10666 * doc/invoke.texi: Likewise.
10667 * doc/md.texi: Likewise.
10668 * doc/tm.texi: Likewise.
10669 * doc/tm.texi.in: Likewise.
10670 * dwarf2out.c (is_base_type): Likewise.
10671 (gen_formal_types_die): Likewise.
10672 (gen_subprogram_die): Likewise.
10673 (gen_type_die_with_usage): Likewise.
10674 (gen_decl_die): Likewise.
10675 (dwarf2out_late_global_decl): Likewise.
10676 * expr.c (expand_assignment): Likewise.
10677 (emit_storent_insn): Likewise.
10678 (store_expr_with_bounds): Likewise.
10679 (store_expr): Likewise.
10680 (expand_expr_real_1): Likewise.
10681 * expr.h (store_expr_with_bounds): Likewise.
10682 * function.c (use_register_for_decl): Likewise.
10683 (struct bounds_parm_data): Likewise.
10684 (assign_parms_augmented_arg_list): Likewise.
10685 (assign_parm_find_entry_rtl): Likewise.
10686 (assign_parm_is_stack_parm): Likewise.
10687 (assign_parm_load_bounds): Likewise.
10688 (assign_bounds): Likewise.
10689 (assign_parms): Likewise.
10690 (expand_function_start): Likewise.
10691 * gcc.c (CHKP_SPEC): Likewise.
10692 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
10693 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
10694 (wrestrict_dom_walker::check_call): Likewise.
10695 * gimple.c (gimple_build_call_from_tree): Likewise.
10696 * gimple.h (enum gf_mask): Likewise.
10697 (gimple_call_with_bounds_p): Likewise.
10698 (gimple_call_set_with_bounds): Likewise.
10699 * gimplify.c (gimplify_init_constructor): Likewise.
10700 * ipa-cp.c (initialize_node_lattices): Likewise.
10701 (propagate_constants_across_call): Likewise.
10702 (find_more_scalar_values_for_callers_subset): Likewise.
10703 * ipa-hsa.c (process_hsa_functions): Likewise.
10704 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
10705 * ipa-icf.c (sem_function::merge): Likewise.
10706 * ipa-inline.c (early_inliner): Likewise.
10707 * ipa-pure-const.c (warn_function_noreturn): Likewise.
10708 (warn_function_cold): Likewise.
10709 (propagate_pure_const): Likewise.
10710 * ipa-ref.h (enum GTY): Likewise.
10711 * ipa-split.c (find_retbnd): Likewise.
10712 (consider_split): Likewise.
10713 (split_function): Likewise.
10714 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
10715 * ipa.c (walk_polymorphic_call_targets): Likewise.
10716 (symbol_table::remove_unreachable_nodes): Likewise.
10717 (process_references): Likewise.
10718 (cgraph_build_static_cdtor_1): Likewise.
10719 * lto-cgraph.c (lto_output_node): Likewise.
10720 (output_refs): Likewise.
10721 (compute_ltrans_boundary): Likewise.
10722 (input_overwrite_node): Likewise.
10723 (input_node): Likewise.
10724 (input_cgraph_1): Likewise.
10725 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
10726 * passes.c (pass_manager::execute_early_local_passes): Likewise.
10727 (class pass_chkp_instrumentation_passes): Likewise.
10728 (make_pass_chkp_instrumentation_passes): Likewise.
10729 * passes.def: Likewise.
10730 * rtl.h (struct GTY): Likewise.
10731 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
10732 * stor-layout.c (layout_type): Likewise.
10733 * symtab.c: Likewise.
10734 * target.def: Likewise.
10735 * targhooks.c (default_chkp_bound_type): Likewise.
10736 (default_chkp_bound_mode): Likewise.
10737 (default_builtin_chkp_function): Likewise.
10738 (default_chkp_function_value_bounds): Likewise.
10739 (default_chkp_make_bounds_constant): Likewise.
10740 (default_chkp_initialize_bounds): Likewise.
10741 * targhooks.h (default_chkp_bound_type): Likewise.
10742 (default_chkp_bound_mode): Likewise.
10743 (default_builtin_chkp_function): Likewise.
10744 (default_chkp_function_value_bounds): Likewise.
10745 (default_chkp_make_bounds_constant): Likewise.
10746 (default_chkp_initialize_bounds): Likewise.
10747 * toplev.c (compile_file): Likewise.
10748 (process_options): Likewise.
10749 * tree-core.h (DEF_BUILTIN): Likewise.
10750 (DEF_BUILTIN_CHKP): Likewise.
10751 * tree-inline.c (declare_return_variable): Likewise.
10752 (remap_gimple_stmt): Likewise.
10753 (copy_bb): Likewise.
10754 (initialize_inlined_parameters): Likewise.
10755 (expand_call_inline): Likewise.
10756 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
10757 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
10758 (make_pass_ipa_chkp_produce_thunks): Likewise.
10759 (make_pass_chkp): Likewise.
10760 (make_pass_chkp_opt): Likewise.
10761 (make_pass_chkp_instrumentation_passes): Likewise.
10762 * tree-pretty-print.c (dump_generic_node): Likewise.
10763 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
10764 * tree-ssa-dce.c (propagate_necessity): Likewise.
10765 (eliminate_unnecessary_stmts): Likewise.
10766 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
10767 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
10768 * tree-ssa-sccvn.h: Likewise.
10769 * tree-ssa-strlen.c (get_string_length): Likewise.
10770 (valid_builtin_call): Likewise.
10771 (adjust_last_stmt): Likewise.
10772 (handle_builtin_strchr): Likewise.
10773 (handle_builtin_strcpy): Likewise.
10774 (handle_builtin_stxncpy): Likewise.
10775 (handle_builtin_memcpy): Likewise.
10776 (handle_builtin_strcat): Likewise.
10777 (strlen_check_and_optimize_stmt): Likewise.
10778 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
10779 * tree-streamer-in.c: Likewise.
10780 * tree-streamer.c (record_common_node): Likewise.
10781 * tree.c (tree_code_size): Likewise.
10782 (wide_int_to_tree_1): Likewise.
10783 (type_contains_placeholder_1): Likewise.
10784 (build_common_tree_nodes): Likewise.
10785 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
10786 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
10787 (POINTER_BOUNDS_P): Likewise.
10788 (BOUNDED_TYPE_P): Likewise.
10789 (BOUNDED_P): Likewise.
10790 (CALL_WITH_BOUNDS_P): Likewise.
10791 (pointer_bounds_type_node): Likewise.
10792 * value-prof.c (gimple_ic): Likewise.
10793 * var-tracking.c (vt_add_function_parameters): Likewise.
10794 * varasm.c (make_decl_rtl): Likewise.
10795 (assemble_start_function): Likewise.
10796 (output_constant): Likewise.
10797 (maybe_assemble_visibility): Likewise.
10798 * varpool.c (ctor_for_folding): Likewise.
10799 * chkp-builtins.def: Remove.
10800 * ipa-chkp.c: Remove.
10801 * ipa-chkp.h: Remove.
10802 * rtl-chkp.c: Remove.
10803 * rtl-chkp.h: Remove.
10804 * tree-chkp-opt.c: Remove.
10805 * tree-chkp.c: Remove.
10806 * tree-chkp.h: Remove.
10808 2018-06-07 Carl Love <cel@us.ibm.com>
10810 * config/rs6000/vsx.md (vextract_fp_from_shorth,
10811 vextract_fp_from_shortl): Add BE support.
10813 2018-06-07 Paul Koning <ni1d@arrl.net>
10815 * compare-elim.c (try_merge_compare): Don't merge compare if
10816 address contains a side effect.
10817 (try_eliminate_compare): Likewise.
10819 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
10821 * config.gcc: Support "tremont".
10822 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
10823 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10825 * config/i386/i386.c (m_TREMONT): Define.
10826 (processor_target_table): Add "tremont".
10827 (PTA_TREMONT): Define.
10828 (ix86_lea_outperforms): Add TARGET_TREMONT.
10829 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
10830 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
10831 and M_INTEL_GOLDMONT_PLUS.
10832 (fold_builtin_cpu): Add "tremont".
10833 (ix86_add_stmt_cost): Add TARGET_TREMONT.
10834 (ix86_option_override_internal): Add "tremont".
10835 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
10836 (processor_type): Add PROCESSOR_TREMONT.
10837 * config/i386/x86-tune.def: Add m_TREMONT.
10838 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
10840 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10842 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
10843 symbol defined for msp430i* devices to be lower case.
10845 2018-06-07 Richard Biener <rguenther@suse.de>
10847 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
10848 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
10849 Properly wrap signed arithmetic if overflow wraps.
10851 2018-06-07 Jakub Jelinek <jakub@redhat.com>
10853 PR tree-optimization/69615
10854 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10855 of a cast from a same precision integral SSA_NAME in a bb dominated
10856 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
10857 cast to utype if rhs2 has already a compatible type.
10859 2018-06-07 Richard Biener <rguenther@suse.de>
10861 PR tree-optimization/85935
10862 * graphite-scop-detection.c (find_params_in_bb): Analyze
10863 condition operands with respect to the correct loop. Assert
10864 the analysis doesn't fail.
10866 2018-06-04 Carl Love <cel@us.ibm.com>
10868 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10869 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
10870 as it is slightly cheaper.
10871 (first_match_or_eos_index_<mode>):
10872 Calculate index using natural element order.
10873 (first_match_index_<mode>):
10874 Calculate index using natural element order.
10875 (first_match_or_eos_index_<mode>):
10876 Calculate index using natural order.
10877 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10878 for BE and LE modes.
10879 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10880 P9V_BUILTIN_VCLZLSBB_V16QI.
10881 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10884 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10886 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10887 indentation and line wrap for many prototypes. Add missing
10888 @smallexample directives around block of prototypes for vec_xl and
10891 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
10893 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10894 track if we pass or return IEEE 128-bit floating point.
10895 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10896 C++ mangling that is compatible with GCC 8.1.
10897 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10898 (init_cumulative_args): Note if we pass or return IEEE 128-bit
10899 floating point types.
10900 (rs6000_function_arg_advance_1): Likewise.
10901 (rs6000_mangle_type): Optionally generate mangled names that match
10902 what GCC 8.1 generated for IEEE 128-bit floating point types.
10903 (rs6000_globalize_decl_name): If we have an external function that
10904 passes or returns IEEE 128-bit types, generate a weak reference
10905 from the mangled name used in GCC 8.1 to the current mangled
10907 (rs6000_init_builtins): Make __ibm128 use the long double type if
10908 long double is IBM extended double. Make __float128 use the long
10909 double type if long double is IEEE 128-bit.
10912 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10913 macro for __ibm128 built-in functions.
10914 (PACK_IF): Add __ibm128 pack/unpack functions.
10915 (UNPACK_IF): Likewise.
10916 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10917 enable long double built-in functions if long double is IEEE
10918 128-bit floating point.
10919 (rs6000_invalid_builtin): Update long double built-in function
10921 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10922 functions, adjust the built-in function to use the long double
10923 built-in function if __ibm128 and long double are the same type.
10924 * doc/extend.texi (PowerPC builtins): Update documention for
10925 __builtin_{,un}pack_longdouble. Add documentation for
10926 __builtin_{,un}pack_ibm128.
10928 2018-06-06 Jim Wilson <jimw@sifive.com>
10930 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10931 (struct machine_function): New field interrupt_mode.
10932 (riscv_handle_type_attribute): New function. Add forward declaration.
10933 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10934 (riscv_expand_epilogue): Check interrupt_mode field.
10935 (riscv_set_current_function): Check interrupt attribute args and
10936 set interrupt_mode field.
10937 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10938 (riscv_sret, riscv_uret): New.
10939 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10940 new arguments to interrupt attribute.
10942 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
10945 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10946 Don't handle -mcpu=power8 if -mpower9-vector is also used.
10948 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10950 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10951 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10952 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10953 several redundant entries.
10955 2018-06-06 David Malcolm <dmalcolm@redhat.com>
10957 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10958 type from "rtx" to "rtx_insn *".
10959 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10960 for local "call_insn", removing cast.
10961 (ix86_expand_call): Likewise, introducing a "call_insn" local.
10963 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
10965 PR tree-optimization/86066
10966 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10967 for BIT_INSERT_EXPR stores.
10969 2018-06-06 Richard Biener <rguenther@suse.de>
10971 PR tree-optimization/86062
10972 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10973 component refs ontop
10974 of to be offsetted base.
10976 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10978 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10979 to be static and remove check on interrupt attribute name.
10981 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
10983 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10984 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10986 2018-06-05 Steve Ellcey <sellcey@cavium.com>
10989 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10991 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10992 Remove second argument, change how error is called.
10993 (aarch64_layout_arg): Remove second argument from
10994 aarch64_err_no_fpadvsimd call.
10995 (aarch64_init_cumulative_args): Ditto.
10996 (aarch64_gimplify_va_arg_expr): Ditto.
10997 * config/aarch64/aarch64.md (mov<mode>): Ditto.
10999 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
11001 * config/i386/i386.md (simple_return_indirect_internal): New expander.
11002 (*simple_return_indirect_internal<mode>): Rename from
11003 simple_return_indirect_internal. Use W mode iterator.
11004 (rstorssp): New expander.
11005 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
11006 (clrssbsy): New expander.
11007 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
11009 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
11011 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
11013 (cmse_check_pointed_object): Likewise.
11015 2018-06-05 Martin Liska <mliska@suse.cz>
11017 PR gcov-profile/47618
11018 * doc/invoke.texi: Document how -fprofile-dir format
11021 2018-06-05 Richard Biener <rguenther@suse.de>
11023 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
11024 removal pretend DOM info isn't available so we do not update
11025 it and only remove edges, not dominated blocks. Actually free
11026 DOM info in case we removed something. Remove unreachable blocks.
11027 (mfb_keep_latches): Work with either DOM info or marked backedges.
11028 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
11029 first. Mark backedges if DOM info isn't available.
11030 (Re-)compute DOM info after cleanup_control_flow_pre.
11032 2018-06-05 Richard Biener <rguenther@suse.de>
11034 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
11035 (locus_discrim_hasher::hash): Adjust.
11036 (locus_discrim_hasher::equal): Likewise.
11037 (next_discriminator_for_locus): Work on line directly.
11038 (same_line_p): Pass in expanded locus1 as well.
11039 (assign_discriminators): Avoid redundant location expansions.
11041 2018-06-05 Richard Biener <rguenther@suse.de>
11043 PR tree-optimization/86046
11044 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
11045 if required after clearing TREE_ADDRESSABLE.
11047 2018-06-05 Richard Biener <rguenther@suse.de>
11049 PR tree-optimization/86047
11050 * tree-ssa-loop.c (for_each_index): Glob handling of all
11051 decls and constants and really handle all of them.
11053 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11056 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
11057 qualifier_void_pointer and qualifier_const_void_pointer.
11058 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
11059 (arm_init_builtins): Handle the above.
11060 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
11061 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
11062 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
11065 2018-06-05 Martin Liska <mliska@suse.cz>
11067 * auto-profile.c (read_autofdo_file): Do not use
11068 gcov_ctr_summary struct.
11069 (afdo_callsite_hot_enough_for_early_inline): Likewise.
11070 * coverage.c (struct counts_entry): Likewise.
11071 (read_counts_file): Read just single summary entry.
11072 (get_coverage_counts): Use gcov_summary struct.
11073 * coverage.h (get_coverage_counts): Likewise.
11074 * gcov-dump.c (dump_working_sets): Likewise.
11075 (tag_summary): Dump just single summary.
11076 * gcov-io.c (gcov_write_summary): Write just histogram
11078 (gcov_read_summary): Read just single summary.
11079 (compute_working_sets): Use gcov_summary struct.
11080 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
11081 of GCOV_COUNTERS_SUMMABLE.
11082 (GCOV_COUNTERS_SUMMABLE): Remove.
11083 (GCOV_FIRST_VALUE_COUNTER): Replace with
11084 GCOV_COUNTER_V_INTERVAL.
11085 (struct gcov_ctr_summary): Remove.
11086 (struct gcov_summary): Directly use fields of former
11088 (compute_working_sets): Use gcov_summary struct.
11089 * gcov.c (read_count_file): Do not use ctrs fields.
11090 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
11092 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
11094 * profile.c: Likewise.
11095 * profile.h: Likewise.
11097 2018-06-05 Martin Liska <mliska@suse.cz>
11099 PR gcov-profile/84846
11100 * gcov.c (output_lines): Print working directory only
11101 in intermediate format.
11103 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
11105 * config/s390/s390-builtin-types.def: Add void function type.
11106 * config/s390/s390-builtins.def: Use the function type for the
11109 2018-06-04 Jim Wilson <jimw@sifive.com>
11111 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
11113 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
11114 and maybe_eh_return. Change regno to unsigned int. Use new args to
11115 handle EH_RETURN_DATA_REGNO registers properly.
11116 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
11117 (riscv_expand_epilogue): Update comment. Change argument name and
11118 type. Update code to use new name and type. Pass new args to
11119 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
11121 * config/riscv/riscv.md (NORMAL_RETURN): New.
11122 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
11123 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
11124 (eh_return): Call gen_eh_return_internal and emit barrier.
11125 (eh_return_internal): Call riscv_expand_epilogue.
11127 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
11129 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
11130 bit_insertion field and declare can_be_merged_into method.
11131 (merged_store_group::can_be_merged_into): New method.
11132 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
11133 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
11134 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
11136 2018-06-04 Richard Biener <rguenther@suse.de>
11138 PR tree-optimization/85955
11139 * builtins.c (fold_builtin_sincos): Convert pointers to
11140 destination to appropriate type before dereferencing.
11142 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
11144 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
11146 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
11148 * expr.c (expand_expr_real_1): Force the operand into memory if
11149 its TYPE_MODE is BLKmode and if there is no integer mode for
11150 the number of bits being extracted.
11152 2018-06-04 Jakub Jelinek <jakub@redhat.com>
11156 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11157 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
11159 2018-06-04 Richard Biener <rguenther@suse.de>
11161 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
11162 (cleanup_tree_cfg_noloop): ... single caller. Do
11163 start_recording_case_labels later.
11165 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
11167 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
11168 to _IMMINTRIN_H_INCLUDED.
11169 * config/i386/pconfigintrin.h: Ditto.
11170 * config/i386/waitpkgintrin.h: Ditto.
11171 * config/i386/immintrin.h: Add includes for sgxintrin.h,
11172 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
11173 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
11174 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
11175 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
11176 waitpkgintrin.h and cldemoteintrin.h.
11178 2018-06-04 Richard Biener <rguenther@suse.de>
11180 PR tree-optimization/86038
11181 * tracer.c (find_best_successor): Check probability for
11182 being initialized, bail out if not.
11184 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
11187 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
11188 of bits to ignore when comparing architectures.
11190 2018-06-04 Jakub Jelinek <jakub@redhat.com>
11192 PR tree-optimization/69615
11193 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
11194 maximum or minimum of the type, try to merge it also as if
11195 range1 is + [-, x - 1] or + [x + 1, -].
11198 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
11200 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
11202 PR tree-optimization/86034
11203 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
11204 the unsigned bitfield type in a bit insertion sequence if it does not
11205 have a larger precision than the bitfield size.
11206 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
11208 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
11210 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
11212 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
11214 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
11215 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
11216 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
11217 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
11219 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
11221 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
11222 Disable -fdelete-null-pointer-checks for ELF toolchain.
11224 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
11225 Kito Cheng <kito.cheng@gmail.com>
11227 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
11228 (nds32le-*-*, nds32be-*-*): Integrate checking process.
11229 (nds32*-*-*): Add glibc and uclibc conditions.
11230 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
11231 (TARGET_EXCEPT_UNWIND_INFO): Define.
11232 * config/nds32/elf.h: New file.
11233 * config/nds32/linux.h: New file.
11234 * config/nds32/nds32-elf.opt: New file.
11235 * config/nds32/nds32-linux.opt: New file.
11236 * config/nds32/nds32-fp-as-gp.c
11237 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
11238 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
11240 (nds32_asm_file_end): Ditto.
11241 (nds32_print_operand): Ditto.
11242 (nds32_insert_attributes): Ditto.
11243 (nds32_init_libfuncs): New function.
11244 (TARGET_HAVE_TLS): Define.
11245 (TARGET_INIT_LIBFUNCS): Define.
11246 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
11248 (TARGET_ELF): Apply different mcmodel setting.
11249 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
11250 been migrated into elf.h and linux.h files.
11251 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
11252 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
11253 (mcmodel): The content has been migrated into nds32-elf.opt and
11254 nds32-linux.opt files.
11255 * config/nds32/t-elf: New file.
11256 * config/nds32/t-linux: New file.
11258 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
11259 Shiva Chen <shiva0217@gmail.com>
11261 * config/nds32/constants.md (unspec_volatile_element): Add
11262 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
11263 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
11265 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
11266 (make_pass_nds32_fp_as_gp): Declare.
11267 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
11269 (nds32_asm_function_end_prologue): Remove unused asm output.
11270 (nds32_asm_function_begin_epilogue): Remove unused asm output.
11271 (nds32_asm_file_start): Output necessary fp_as_gp information.
11272 (nds32_option_override): Adjust register usage.
11273 (nds32_expand_prologue): Consider fp_as_gp situation.
11274 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
11275 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
11278 (simple_return): Ditto.
11279 (omit_fp_begin): Output special directive for fp_as_gp.
11280 (omit_fp_end): Output special directive for fp_as_gp.
11281 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
11282 mforbid-fp-as-gp): New options.
11284 2018-06-01 Mark Wielaard <mark@klomp.org>
11286 * dwarf2out.c (dwarf2out_finish): Remove generation of
11287 DW_AT_loclists_base.
11289 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
11291 * gimple-ssa-store-merging.c: Include gimple-fold.h.
11292 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
11293 (struct merged_store_group): Add bit_insertion field.
11294 (dump_char_array): Use standard hexadecimal format.
11295 (merged_store_group::merged_store_group): Set bit_insertion to false.
11296 (merged_store_group::apply_stores): Use optimal buffer size. Deal
11297 with BIT_INSERT_EXPR stores. Move up code updating the mask and
11298 also print the mask in the dump file.
11299 (pass_store_merging::gate): Minor tweak.
11300 (imm_store_chain_info::coalesce_immediate): Fix wrong association
11301 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
11302 stores with INTEGER_CST stores.
11303 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
11304 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
11305 and use it throughout. Generate bit insertion sequences if need be.
11306 (pass_store_merging::process_store): Remove redundant condition.
11307 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
11309 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
11311 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
11312 the 128-bit floating point types. Fix function comment.
11314 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11316 * config/aarch64/aarch64-simd.md
11317 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
11319 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
11322 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
11324 PR tree-optimization/85989
11325 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
11327 (backprop::intersect_uses): Check it when deciding whether this
11328 is a backedge reference.
11329 (backprop::process_block): Add each phi to m_visited_phis
11330 after visiting it, then clear it at the end.
11332 2018-06-01 Richard Biener <rguenther@suse.de>
11334 * tree-vectorizer.h (vect_dr_stmt): New function.
11335 (vect_get_load_cost): Adjust.
11336 (vect_get_store_cost): Likewise.
11337 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
11338 Use vect_dr_stmt instead of DR_SMTT.
11339 (vect_record_base_alignments): Likewise.
11340 (vect_calculate_target_alignment): Likewise.
11341 (vect_compute_data_ref_alignment): Likewise and make static.
11342 (vect_update_misalignment_for_peel): Likewise.
11343 (vect_verify_datarefs_alignment): Likewise.
11344 (vector_alignment_reachable_p): Likewise.
11345 (vect_get_data_access_cost): Likewise. Pass down
11346 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
11347 (vect_get_peeling_costs_all_drs): Likewise.
11348 (vect_peeling_hash_get_lowest_cost): Likewise.
11349 (vect_enhance_data_refs_alignment): Likewise.
11350 (vect_find_same_alignment_drs): Likewise.
11351 (vect_analyze_data_refs_alignment): Likewise.
11352 (vect_analyze_group_access_1): Likewise.
11353 (vect_analyze_group_access): Likewise.
11354 (vect_analyze_data_ref_access): Likewise.
11355 (vect_analyze_data_ref_accesses): Likewise.
11356 (vect_vfa_segment_size): Likewise.
11357 (vect_small_gap_p): Likewise.
11358 (vectorizable_with_step_bound_p): Likewise.
11359 (vect_prune_runtime_alias_test_list): Likewise.
11360 (vect_analyze_data_refs): Likewise.
11361 (vect_supportable_dr_alignment): Likewise.
11362 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11363 (vect_gen_prolog_loop_niters): Likewise.
11364 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11365 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
11367 (vect_recog_mask_conversion_pattern): Likewise.
11368 (vect_try_gather_scatter_pattern): Likewise.
11369 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
11370 to vect_get_store_cost.
11371 (vect_get_store_cost): Get stmt_info instead of DR.
11372 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
11373 (vect_get_load_cost): Get stmt_info instead of DR.
11375 2018-06-01 Richard Biener <rguenther@suse.de>
11377 PR middle-end/86017
11378 * gimple-fold.c (var_decl_component_p): Also allow offsetted
11379 vars wrapped in MEM_REFs.
11381 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
11383 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11384 Fix subreg tests so that we only return a choice between
11385 GENERAL_REGS and FP_REGS if the original classes included both.
11387 2018-06-01 Richard Biener <rguenther@suse.de>
11390 * tree-ssa-structalias.c (get_function_part_constraint):
11391 Handle NULL fi->decl.
11392 (find_func_aliases_for_call): Properly handle indirect
11393 fi from direct call.
11394 (find_func_clobbers): Likewise.
11395 (ipa_pta_execute): Likewise.
11396 (create_variable_info_for): For functions that are ifunc_resolver
11397 resolve to a varinfo that contains the result of the resolver call.
11398 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
11401 2018-05-31 Michael Collison <michael.collison@arm.com>
11403 * config/aarch64/aarch64.md:
11404 (*fix_to_zero_extenddfdi2): New pattern.
11405 * gcc.target/aarch64/fix_extend1.c: New testcase.
11407 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
11409 PR middle-end/78809
11410 PR middle-end/83026
11411 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
11412 and BUILT_IN_STRNCMP_EQ.
11413 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
11414 BUILT_IN_STRNCMP_EQ.
11415 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
11416 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
11417 (gimple_fold_builtin): Likewise.
11418 * tree-ssa-strlen.c (compute_string_length): New function.
11419 (determine_min_obsize): New function.
11420 (handle_builtin_string_cmp): New function to handle calls to
11421 string compare functions.
11422 (strlen_optimize_stmt): Add handling to builtin string compare
11424 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
11425 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
11426 * tree.c (build_common_builtin_nodes): Add new defines of
11427 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
11429 2018-05-31 Jakub Jelinek <jakub@redhat.com>
11432 * bb-reorder.c (pass_partition_blocks::gate): Return false for
11433 functions with naked attribute.
11435 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
11437 * config/i386/sse.md (avx_vec_concat<mode>):
11438 Substitute concat_tg_mode mode attribute with xtg_mode.
11439 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
11440 (concat_tg_mode): Remove mode attribute.
11442 2018-05-31 Martin Sebor <msebor@redhat.com>
11445 * calls.c (alloc_max_size): Correct a logic error/typo.
11446 Treat excessive arguments as infinite. Warn for invalid arguments.
11447 * doc/invoke.texi (-Walloc-size-larger-than): Update.
11449 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
11452 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
11453 and movx for Haswell.
11455 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
11456 Cesar Philippidis <cesar@codesourcery.com>
11458 PR middle-end/85879
11459 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
11460 when emitting error on private/firstprivate reductions.
11461 * omp-low.c (lower_omp_target): Avoid reference-type processing
11462 on pointers for firstprivate clause.
11464 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
11466 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
11469 * config/aarch64/aarch64-simd.md
11470 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
11471 (aarch64_ld1_x3_<mode>): Likewise
11472 (aarch64_st1x2<VALLDIF:mode>): Likewise
11473 (aarch64_st1_x2_<mode>): Likewise
11474 (aarch64_st1x3<VALLDIF:mode>): Likewise
11475 (aarch64_st1_x3_<mode>): Likewise
11476 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
11477 (vld1_s8_x3): Likewise.
11478 (vld1_u16_x3): Likewise.
11479 (vld1_s16_x3): Likewise.
11480 (vld1_u32_x3): Likewise.
11481 (vld1_s32_x3): Likewise.
11482 (vld1_u64_x3): Likewise.
11483 (vld1_s64_x3): Likewise.
11484 (vld1_f16_x3): Likewise.
11485 (vld1_f32_x3): Likewise.
11486 (vld1_f64_x3): Likewise.
11487 (vld1_p8_x3): Likewise.
11488 (vld1_p16_x3): Likewise.
11489 (vld1_p64_x3): Likewise.
11490 (vld1q_u8_x3): Likewise.
11491 (vld1q_s8_x3): Likewise.
11492 (vld1q_u16_x3): Likewise.
11493 (vld1q_s16_x3): Likewise.
11494 (vld1q_u32_x3): Likewise.
11495 (vld1q_s32_x3): Likewise.
11496 (vld1q_u64_x3): Likewise.
11497 (vld1q_s64_x3): Likewise.
11498 (vld1q_f16_x3): Likewise.
11499 (vld1q_f32_x3): Likewise.
11500 (vld1q_f64_x3): Likewise.
11501 (vld1q_p8_x3): Likewise.
11502 (vld1q_p16_x3): Likewise.
11503 (vld1q_p64_x3): Likewise.
11504 (vst1_s64_x2): Likewise.
11505 (vst1_u64_x2): Likewise.
11506 (vst1_f64_x2): Likewise.
11507 (vst1_s8_x2): Likewise.
11508 (vst1_p8_x2): Likewise.
11509 (vst1_s16_x2): Likewise.
11510 (vst1_p16_x2): Likewise.
11511 (vst1_s32_x2): Likewise.
11512 (vst1_u8_x2): Likewise.
11513 (vst1_u16_x2): Likewise.
11514 (vst1_u32_x2): Likewise.
11515 (vst1_f16_x2): Likewise.
11516 (vst1_f32_x2): Likewise.
11517 (vst1_p64_x2): Likewise.
11518 (vst1q_s8_x2): Likewise.
11519 (vst1q_p8_x2): Likewise.
11520 (vst1q_s16_x2): Likewise.
11521 (vst1q_p16_x2): Likewise.
11522 (vst1q_s32_x2): Likewise.
11523 (vst1q_s64_x2): Likewise.
11524 (vst1q_u8_x2): Likewise.
11525 (vst1q_u16_x2): Likewise.
11526 (vst1q_u32_x2): Likewise.
11527 (vst1q_u64_x2): Likewise.
11528 (vst1q_f16_x2): Likewise.
11529 (vst1q_f32_x2): Likewise.
11530 (vst1q_f64_x2): Likewise.
11531 (vst1q_p64_x2): Likewise.
11532 (vst1_s64_x3): Likewise.
11533 (vst1_u64_x3): Likewise.
11534 (vst1_f64_x3): Likewise.
11535 (vst1_s8_x3): Likewise.
11536 (vst1_p8_x3): Likewise.
11537 (vst1_s16_x3): Likewise.
11538 (vst1_p16_x3): Likewise.
11539 (vst1_s32_x3): Likewise.
11540 (vst1_u8_x3): Likewise.
11541 (vst1_u16_x3): Likewise.
11542 (vst1_u32_x3): Likewise.
11543 (vst1_f16_x3): Likewise.
11544 (vst1_f32_x3): Likewise.
11545 (vst1_p64_x3): Likewise.
11546 (vst1q_s8_x3): Likewise.
11547 (vst1q_p8_x3): Likewise.
11548 (vst1q_s16_x3): Likewise.
11549 (vst1q_p16_x3): Likewise.
11550 (vst1q_s32_x3): Likewise.
11551 (vst1q_s64_x3): Likewise.
11552 (vst1q_u8_x3): Likewise.
11553 (vst1q_u16_x3): Likewise.
11554 (vst1q_u32_x3): Likewise.
11555 (vst1q_u64_x3): Likewise.
11556 (vst1q_f16_x3): Likewise.
11557 (vst1q_f32_x3): Likewise.
11558 (vst1q_f64_x3): Likewise.
11559 (vst1q_p64_x3): Likewise.
11561 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11563 * config/msp430/msp430.c (msp430_output_labelref): Prepend
11564 user_label_prefix to name.
11566 * tree-core.h: Update comment about the format of NAME string
11567 passed to handler in attribute_spec.
11569 * config/msp430/msp430.md: Remove erroneous subreg expression from
11570 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
11571 zero_extend{q,h}isi2.
11573 2018-05-30 Borislav Petkov <bp@suse.de>
11575 * doc/extend.texi: Document some architecture specific
11576 constraints and sort entries.
11578 2018-05-30 Martin Sebor <msebor@redhat.com>
11580 PR middle-end/85369
11581 * builtins.c (expand_builtin_stpcpy_1): New function.
11582 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
11583 only if the former succeeds.
11585 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
11587 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
11590 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11592 * doc/invoke.texi (-flinker-output): Document
11594 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11596 * passes.c (ipa_write_summaries): Only modify statements if body
11598 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
11599 incrementally linking.
11600 (ipa_passes): Likewise.
11601 * lto-cgraph.c (lto_output_node): When incrementally linking do not
11602 pass down resolution info.
11603 * common.opt (flag_incremental_link): Update info.
11604 * gcc.c (plugin specs): Turn flinker-output=* to
11605 -plugin-opt=-linker-output-known
11606 * toplev.c (compile_file): Also cut compilation when doing incremental
11608 * flag-types. (enum lto_partition_model): Add
11609 LTO_LINKER_OUTPUT_NOLTOREL.
11610 (invoke.texi): Add -flinker-output docs.
11611 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
11612 link same way as WPA; do not stream in dead initializers.
11614 * dwarf2out.c (dwarf2out_die_ref_for_decl,
11615 darf2out_register_external_decl): Support incremental link.
11617 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11619 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
11621 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11623 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
11624 it down to simple_object_copy_lto_debug_sections.
11625 (run_gcc): Determine incremental LTO link time and configure
11626 lto1 into non-wpa mode, disable renaming of debug sections.
11628 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
11630 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
11631 descriptions of various incorrectly documented functions.
11633 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
11636 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11637 address check not strict.
11639 2018-05-30 Richard Biener <rguenther@suse.de>
11641 PR tree-optimization/85964
11642 * tracer.c (better_p): Drop initialized count check, we only
11643 call the function with initialized counts now.
11644 (find_best_successor): Do find a best edge if one
11645 has uninitialized count.
11646 (find_best_predecessor): Likewise. Do BB frequency check only
11647 if count is initialized.
11649 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
11651 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
11652 (aarch64_ldrstr_offset_compare): New.
11653 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
11654 load/store orderings.
11655 (aarch64_gen_adjusted_ldpstp): Likewise.
11657 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
11659 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11660 Check for subset of GENERAL_REGS and FP_REGS.
11661 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
11664 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
11666 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
11667 and wi::to_poly_offset. Add the current offset and then check
11668 whether the sum fits, rather than using an unchecked addition of
11669 a checked term. Check for a shwi rather than a uhwi.
11670 * expr.c (get_bit_range): Use tree_to_poly_uint64.
11671 (store_constructor): Use poly_int_tree_p.
11672 (expand_expr_real_1): Likewise.
11673 * function.c (assign_temp): Likewise.
11674 * fold-const.c (const_binop): Use poly_int_tree_p and
11675 wi::to_poly_offset.
11676 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
11678 * ipa-icf-gimple.c (func_checker::compare_operand): Use
11679 to_poly_offset for MEM offsets.
11680 * ipa-icf.c (sem_variable::equals): Likewise.
11681 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
11682 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
11683 wi::to_poly_offset for BIT_FIELD_REF offsets.
11684 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
11685 wi::to_poly_offset.
11686 * var-tracking.c (emit_note_insn_var_location): Use
11687 tree_to_poly_uint64.
11689 2018-05-29 Jim Wilson <jimw@sifive.com>
11691 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
11693 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
11696 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
11697 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
11699 (sse4_1_round<mode>2): Use nonimmediate_operand
11700 for operand 1 predicate.
11702 2018-05-29 Martin Sebor <msebor@redhat.com>
11703 Richard Biener <rguenther@suse.de>
11706 * calls.c (get_size_range): Call determine_value_range instead
11707 of get_value_range..
11708 * tree-vrp.h (determine_value_range): Declared new function.
11709 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
11711 2018-05-29 Richard Biener <rguenther@suse.de>
11713 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
11714 sure to use non-pattern stmts for get_earlier_stmt arguments.
11715 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
11716 called on pattern stmts.
11717 (get_later_stmt): Likewise.
11719 2018-05-29 Martin Liska <mliska@suse.cz>
11721 PR gcov-profile/85759
11722 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
11725 2018-05-29 Jakub Jelinek <jakub@redhat.com>
11727 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
11729 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
11733 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11734 VEC_PACK_FLOAT_EXPR): New tree codes.
11735 * tree-pretty-print.c (op_code_prio): Handle
11736 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11737 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11738 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11739 * tree-inline.c (estimate_operator_cost): Likewise.
11740 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
11741 * fold-const.c (const_binop): Likewise.
11742 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
11743 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11744 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11745 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
11746 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11747 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11748 * expr.c (expand_expr_real_2): Likewise.
11749 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
11750 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
11751 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
11753 * optabs.c (expand_widen_pattern_expr): For
11754 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
11755 sign from result type rather than operand's type.
11756 (expand_binop_directly): For vec_packu_float_optab and
11757 vec_packs_float_optab allow result type to be different from operand's
11759 * optabs-tree.c (optab_for_tree_code): Handle
11760 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11761 VEC_PACK_FLOAT_EXPR. Formatting fixes.
11762 * tree-vect-generic.c (expand_vector_operations_1): Handle
11763 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11764 VEC_PACK_FLOAT_EXPR.
11765 * tree-vect-stmts.c (supportable_widening_operation): Handle
11767 (supportable_narrowing_operation): Handle FLOAT_EXPR.
11768 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
11769 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
11770 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
11771 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
11773 (vec_pack<floatprefix>_float_<mode>): New expander.
11774 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
11776 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
11777 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
11778 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
11779 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
11780 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
11782 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
11783 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
11784 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11785 VEC_PACK_FLOAT_EXPR): Document.
11787 2018-05-29 Richard Biener <rguenther@suse.de>
11789 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
11791 (stmt_vec_info_vec): Make pointer.
11792 (init_stmt_vec_info_vec): Remove.
11793 (free_stmt_vec_info_vec): Likewise.
11794 (set_stmt_vec_info_vec): New function.
11795 (free_stmt_vec_infos): Likewise.
11796 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
11797 (set_vinfo_for_stmt): Likewise.
11798 (get_earlier_stmt): Likewise.
11799 (get_later_stmt): Likewise.
11800 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
11801 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
11802 (vec_info::~vec_info): Free stmt_vec_infos.
11803 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
11804 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
11805 (pass_slp_vectorize::execute): Likewise.
11806 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
11807 (free_stmt_vec_info_vec): Likewise.
11808 (set_stmt_vec_info_vec): New function.
11809 (free_stmt_vec_infos): Likewise.
11810 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
11811 the global stmt_vec_info_vec.
11812 * tree-parloops.c (gather_scalar_reductions): Use
11813 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
11816 2018-05-29 Richard Biener <rguenther@suse.de>
11818 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
11820 2018-05-29 Martin Liska <mliska@suse.cz>
11821 David Malcolm <dmalcolm@redhat.com>
11823 * vec.c (test_reverse): New.
11824 (vec_c_tests): Add new test.
11825 * vec.h (vl_ptr>::reverse): New function.
11827 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
11829 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
11831 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
11834 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
11836 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
11838 2018-05-28 Richard Biener <rguenther@suse.de>
11840 PR tree-optimization/85933
11841 * tree-vect-data-refs.c (vect_record_base_alignments): Only
11842 look at stmts marked as vectorizable.
11844 2018-05-28 Richard Biener <rguenther@suse.de>
11846 PR tree-optimization/85934
11847 * tree-vect-generic.c (expand_vector_operations_1): Hoist
11848 vector boolean check before scalar optimization.
11850 2018-05-28 Jakub Jelinek <jakub@redhat.com>
11852 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11855 2018-05-28 Mark Wielaard <mark@klomp.org>
11857 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11858 if it is an expression containing a minus sign.
11860 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
11862 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11864 2018-05-27 Paul Koning <ni1d@arrl.net>
11866 * config/pdp11/pdp11.md (truncsihi2): Remove.
11868 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
11869 Chung-Ju Wu <jasonwucj@gmail.com>
11871 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11873 (unaligned_store_dw): Ditto.
11874 * config/nds32/nds32-memory-manipulation.c
11875 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11876 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11877 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11878 (emit_setmem_word_loop): Rename to ...
11879 (emit_setmem_doubleword_loop): ... this.
11880 (nds32_gen_dup_4_byte_to_word_value): New function.
11881 (nds32_gen_dup_8_byte_to_double_word_value): New function.
11882 (nds32_expand_setmem_loop): Refine implementation.
11883 (nds32_expand_setmem_loop_v3m): Ditto.
11884 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11887 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11889 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11891 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11893 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11894 (nds32_init_machine_status): Initialize machine->attr_naked_p and
11895 machine->attr_no_prologue_p.
11896 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11897 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11898 (nds32_expand_epilogue): Consider attr_naked_p.
11899 (nds32_expand_epilogue_v3pop): Likewise.
11900 (nds32_can_use_return_insn): Likewise.
11901 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11902 attr_no_prologue_p fields.
11903 * config/nds32/nds32.opt (mret-in-naked-func): New option.
11905 2018-05-27 Jakub Jelinek <jakub@redhat.com>
11908 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11910 * config/i386/sse.md
11911 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11913 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11915 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11917 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11919 (*<floatsuffix>floatv2div2sf2): Rename to ...
11920 (*float<floatunssuffix>v2div2sf2): ... this.
11921 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11922 (float<floatunssuffix>v2div2sf2_mask): ... this.
11923 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11924 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11925 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11927 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11929 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11931 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11933 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11935 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11937 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11938 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11939 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11940 gen_ufix_truncv8dfv8si2.
11941 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11942 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11943 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11944 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11945 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11946 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11947 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11948 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11950 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11954 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11956 2018-05-25 Jim Wilson <jimw@sifive.com>
11958 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11959 * config/riscv/riscv.c (struct machine_function): Add
11960 interrupt_handler_p and attribute_checked_p fields.
11961 (riscv_attribute_table): Add interrupt.
11962 (riscv_interrupt_type_p): New.
11963 (riscv_save_reg_p): Save extra regs for interrupt handler.
11964 (riscv_use_save_libcall): Return false for interrupt handler.
11965 (riscv_first_stack_step): Add forward declaration.
11966 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
11967 for interrupt handler with large frame. Use it for saved reg list.
11968 (riscv_expand_prologue): Move flag_stack_usage_info support to
11969 eliminate duplication.
11970 (riscv_expand_epilogue): Generate mret for interrupt handler.
11971 (riscv_epilogue_uses): New.
11972 (riscv_can_use_return_insn): Return false for interrupt handler.
11973 (riscv_function_ok_for_sibcall): Likewise.
11974 (riscv_set_current_function): Add interrupt handler support.
11975 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11976 * config/riscv/riscv.md (UNSPECV_MRET): New.
11978 (riscv_frflags, riscv_fsflags): Use tab after opcode.
11980 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11982 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
11984 PR tree-optimization/85712
11985 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11986 this candidate has already been replaced in-situ by a copy.
11988 2018-05-25 Jason Merrill <jason@redhat.com>
11990 PR c++/80485 - inline function non-zero address.
11991 * symtab.c (nonzero_address): Check DECL_COMDAT.
11993 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
11996 * config/alpha/alpha.md (ashlsi3): New insn pattern.
11997 (*ashlsi_se): Rename from *ashldi_se. Define as sign
11998 extension of SImode operation. Use const123_operand predicate.
11999 (*saddsi_1): Remove.
12000 (*saddl_se_1): Ditto.
12001 (*ssubsi_1): Ditto.
12002 (*ssubl_se_1): Ditto.
12003 * config/alpha/predicates.md (const123_operand): New predicate.
12004 * config/alpha/constraints.md (P): Use IN_RANGE.
12006 2018-05-25 Richard Biener <rguenther@suse.de>
12008 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
12010 (ref_maybe_used_by_stmt_p): Likewise.
12011 (stmt_may_clobber_ref_p): Likewise.
12012 (stmt_may_clobber_ref_p_1): Likewise.
12013 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
12015 (ref_maybe_used_by_stmt_p): Likewise.
12016 (stmt_may_clobber_ref_p): Likewise.
12017 (stmt_may_clobber_ref_p_1): Likewise.
12018 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
12019 the alias oracle to disambiguate DRs with stmts DR analysis
12021 (vect_analyze_data_refs): Do not give up on not analyzable
12022 DRs for BB vectorization. Remove code truncating the dataref
12025 2018-05-25 Jakub Jelinek <jakub@redhat.com>
12028 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
12029 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
12030 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
12032 2018-05-25 Richard Biener <rguenther@suse.de>
12034 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
12035 function, combining stmt data ref gathering and fatal analysis
12037 (vect_analyze_data_refs): Remove now redudnant code and simplify.
12038 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
12039 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
12040 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
12041 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
12043 2018-05-25 Bin Cheng <bin.cheng@arm.com>
12045 PR tree-optimization/85720
12046 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
12047 SCC if all partitions are builtins.
12048 (version_loop_by_alias_check): New parameter. Generate cancelable
12049 runtime alias check if all partitions are builtins.
12050 (distribute_loop): Update call to above function.
12052 2018-05-25 Bin Cheng <bin.cheng@arm.com>
12054 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
12055 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
12056 (parm_default_def_partition_arg): Ditto.
12057 (set_parm_default_def_partition): Ditto.
12058 (get_parm_default_def_partitions): Ditto and make it static.
12059 (get_undefined_value_partitions): Ditto and make it static.
12060 (remove_ssa_form): Refactor call to init_var_map here.
12061 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
12062 computation for loop region.
12063 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
12064 (register_default_def): Delete.
12065 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
12066 (parm_default_def_partition_arg): Ditto.
12067 (set_parm_default_def_partition): Ditto.
12068 (get_parm_default_def_partitions): Ditto and make it static.
12069 (get_undefined_value_partitions): Ditto and make it static.
12070 (coalesce_with_default, coalesce_with_default): Update comment.
12071 (create_coalesce_list_for_region): New func factored out from
12072 create_outofssa_var_map.
12073 (populate_coalesce_list_for_outofssa): New func factored out from
12074 create_outofssa_var_map and coalesce_ssa_name.
12075 (create_outofssa_var_map): Delete.
12076 (coalesce_ssa_name): Refactor to support live range computation.
12077 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
12078 (get_parm_default_def_partitions): Delete.
12079 (get_undefined_value_partitions): Ditto.
12080 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
12081 computation for loop region.
12082 (new_tree_live_info, loe_visit_block): Ditto.
12083 (live_worklist, set_var_live_on_entry): Ditto.
12084 (calculate_live_on_exit, verify_live_on_entry): Ditto.
12085 * tree-ssa-live.h (struct _var_map): New fields.
12086 (init_var_map): Change decl.
12087 (region_contains_p): New.
12089 2018-05-25 Bin Cheng <bin.cheng@arm.com>
12091 * tree-ssa-live.h (live_merge_and_clear): Delete.
12093 2018-05-25 Richard Biener <rguenther@suse.de>
12096 * tree-dump.c (dequeue_and_dump): Remove access to removed
12097 operand 2 of a SWITCH_EXPR.
12099 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12101 * doc/sourcebuild.texi (vect_double_cond_arith): Include
12102 multiplication and division.
12103 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
12104 (cond_udiv@var{m}, cond_umod@var{m}): Document.
12105 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
12106 (cond_udiv_optab, cond_umod_optab): New optabs.
12107 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
12108 (IFN_COND_RDIV): New internal functions.
12109 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
12110 TRUNC_MOD_EXPR and RDIV_EXPR.
12111 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
12112 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
12114 (SVE_INT_BINARY): Include mult.
12115 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
12116 (optab, sve_int_op): Handle mult.
12117 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
12119 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
12120 for SVE_INT_BINARY_SD.
12122 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12124 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
12125 (optab, sve_int_op): Handle div and udiv.
12126 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
12127 for SVE_INT_BINARY_SD.
12128 (*<optab><mode>3): New insn for the same.
12130 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12132 * tree-vect-patterns.c: Include predict.h.
12133 (vect_recog_divmod_pattern): Restrict check for division support
12134 to when optimizing for size.
12136 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12138 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
12139 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
12140 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
12141 (gimple_match_op::set_op): Likewise.
12142 (gimple_resimplify4): Declare.
12143 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
12144 (expr::gen_transform): Likewise.
12145 (decision_tree::gen): Generate a simplification routine for 4 operands.
12146 * gimple-match-head.c (gimple_simplify): Add an overload for
12147 4 operands. In the top-level function, handle up to 4 call
12148 arguments and call gimple_resimplify4.
12149 (gimple_resimplify4): New function.
12150 (build_call_internal): Pass a fourth operand.
12151 (maybe_push_to_seq): Likewise.
12152 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
12153 Fold VEC_COND_EXPRs of an operation and a default value into
12154 an IFN_COND_* function if possible.
12155 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
12157 (SVE_COND_FP_BINARY): Include them.
12158 (optab, sve_fp_op): Handle them.
12159 (SVE_INT_BINARY_REV): New code iterator.
12160 (SVE_COND_FP_BINARY_REV): New int iterator.
12161 (commutative): New int attribute.
12162 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
12164 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
12166 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
12167 (*cond_<optab><mode>): New patterns for reversed operands.
12169 2018-05-25 Richard Biener <rguenther@suse.de>
12171 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
12172 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
12173 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
12174 (STMT_VINFO_GROUPED_ACCESS): Adjust.
12175 * tree-vect-data-refs.c (everywhere): Adjust users.
12176 * tree-vect-loop.c (everywhere): Likewise.
12177 * tree-vect-slp.c (everywhere): Likewise.
12178 * tree-vect-stmts.c (everywhere): Likewise.
12179 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
12181 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12183 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
12185 (gcc_cv_as_section_exclude): ... this.
12186 Try Solaris as #exclude syntax.
12187 * configure: Regenerate.
12188 * config.in: Regenerate.
12189 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
12191 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
12192 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
12194 * varasm.c (default_elf_asm_named_section): Don't check if
12195 HAVE_GAS_SECTION_EXCLUDE is defined.
12197 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12199 * doc/md.texi: Update the documentation of the cond_* optabs
12200 to mention the new final operand. Fix GET_MODE_NUNITS call.
12201 Describe the scalar case too.
12202 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
12203 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
12205 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
12206 (get_conditional_internal_fn): Update comment.
12207 * tree-vect-loop.c (vectorizable_reduction): Pass the original
12208 accumulator value as a final argument to conditional functions.
12209 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
12210 a define_expand and add an "else" operand. Assert for now that
12211 the else operand is equal to operand 2. Use SVE_INT_BINARY and
12212 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
12213 (*cond_<optab><mode>): New patterns.
12214 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
12215 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
12216 (UNSPEC_COND_EOR): Delete.
12217 (optab): Remove associated mappings.
12218 (SVE_INT_BINARY): New code iterator.
12219 (sve_int_op): Remove int attribute and add "minus" to the code
12221 (SVE_COND_INT_OP): Delete.
12222 (SVE_COND_FP_OP): Rename to...
12223 (SVE_COND_FP_BINARY): ...this.
12225 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12227 * optabs.c (can_reuse_operands_p): New function.
12228 (maybe_legitimize_operands): Try to reuse the results for
12231 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
12233 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
12234 Add {q} suffix to insn mnemonic.
12236 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12238 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
12239 (msp430_warn_func_return): New.
12241 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
12243 * fold-const.c (tree_nonzero_bits): New function.
12244 * fold-const.h (tree_nonzero_bits): Likewise.
12245 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
12246 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
12248 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
12252 * varasm.c (assemble_alias): Check ifunc_resolver only on
12255 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
12258 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
12259 when memory input operand is handled.
12261 2018-05-24 Luis Machado <luis.machado@linaro.org>
12263 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
12265 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
12267 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
12269 * match.pd: Delay FMA folds until after vectorization.
12271 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
12274 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12275 address check not strict.
12277 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
12279 * gimple-match.h (gimple_match_op): New class.
12280 (mprts_hook): Replace parameters with a gimple_match_op *.
12281 (maybe_build_generic_op): Likewise.
12282 (gimple_simplified_result_is_gimple_val): Replace parameters with
12283 a const gimple_match_op *.
12284 (gimple_simplify): Replace code_helper * and tree * parameters with
12285 a gimple_match_op * parameter.
12286 (gimple_resimplify1): Replace code_helper *, tree and tree *
12287 parameters with a gimple_match_op * parameter.
12288 (gimple_resimplify2): Likewise.
12289 (gimple_resimplify3): Likewise.
12290 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
12291 parameters with a gimple_match_op * parameter.
12292 * gimple-match-head.c (gimple_simplify): Change prototypes of
12293 auto-generated functions to take a gimple_match_op * instead of
12294 separate code_helper * and tree * parameters. Make the same
12295 change in the top-level overload and update calls to the
12296 gimple_resimplify routines. Update calls to the auto-generated
12297 functions and to maybe_push_res_to_seq in the publicly-facing
12298 operation-specific gimple_simplify overloads.
12299 (gimple_match_op::MAX_NUM_OPS): Define.
12300 (gimple_resimplify1): Replace rcode and ops with a single res_op
12301 parameter. Update call to gimple_simplify.
12302 (gimple_resimplify2): Likewise.
12303 (gimple_resimplify3): Likewise.
12304 (mprts_hook): Replace parameters with a gimple_match_op *.
12305 (maybe_build_generic_op): Likewise.
12306 (build_call_internal): Replace type, nargs and ops with
12307 a gimple_match_op *.
12308 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
12309 with a single gimple_match_op *. Update calls to mprts_hook,
12310 build_call_internal and gimple_simplified_result_is_gimple_val.
12311 Factor out code that is common to the tree_code and combined_fn cases.
12312 * genmatch.c (expr::gen_transform): Replace tem_code and
12313 tem_ops with a gimple_match_op called tem_op. Update calls
12314 to the gimple_resimplify functions and maybe_push_res_to_seq.
12315 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
12316 res_ops. Update call to the gimple_resimplify functions.
12317 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
12318 (decision_tree::gen): Make the functions take a gimple_match_op *
12319 called res_op instead of separate res_code and res_ops parameters.
12320 Update call accordingly.
12321 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
12322 and ops with a single res_op parameter. Update calls to
12323 maybe_build_generic_op and maybe_push_res_to_seq.
12324 (fold_stmt_1): Update calls to gimple_simplify and
12325 replace_stmt_with_simplification.
12326 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
12327 and gimple_simplified_result_is_gimple_val.
12328 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
12330 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
12331 with a gimple_match_op *.
12332 (vn_nary_build_or_lookup): Likewise. Update call to
12333 vn_nary_build_or_lookup_1.
12334 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
12335 gimple_match_op *. Update calls to the gimple_resimplify routines
12336 and to gimple_simplified_result_is_gimple_val.
12337 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
12338 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
12339 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
12340 (visit_nary_op): Likewise.
12341 (visit_reference_op_load): Likewise.
12343 2018-05-23 Luis Machado <luis.machado@linaro.org>
12345 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
12346 modifier for printing the step amount.
12348 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
12351 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
12354 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
12356 * doc/sourcebuild.texi (Endianness): New subsubsection.
12358 2018-05-23 Luis Machado <luis.machado@linaro.org>
12360 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12361 <prefetch_dynamic_strides>: New const bool field.
12362 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12363 prefetch_dynamic_strides.
12364 (exynosm1_prefetch_tune): Likewise.
12365 (thunderxt88_prefetch_tune): Likewise.
12366 (thunderx_prefetch_tune): Likewise.
12367 (thunderx2t99_prefetch_tune): Likewise.
12368 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
12370 (aarch64_override_options_internal): Update to set
12371 PARAM_PREFETCH_DYNAMIC_STRIDES.
12372 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12373 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12374 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12375 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12376 prefetch-dynamic-strides setting.
12378 2018-05-23 Luis Machado <luis.machado@linaro.org>
12380 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12381 <minimum_stride>: New const int field.
12382 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12383 minimum_stride field defaulting to -1.
12384 (exynosm1_prefetch_tune): Likewise.
12385 (thunderxt88_prefetch_tune): Likewise.
12386 (thunderx_prefetch_tune): Likewise.
12387 (thunderx2t99_prefetch_tune): Likewise.
12388 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
12389 <default_opt_level>: Set to 3.
12390 (aarch64_override_options_internal): Update to set
12391 PARAM_PREFETCH_MINIMUM_STRIDE.
12392 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12393 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12394 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12395 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12396 stride is constant and is below the minimum stride threshold.
12398 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12400 * config/arm/arm-cpus.in (mode26): Delete.
12401 (armv4): Delete mode26 reference.
12402 * config/arm/arm.c (arm_configure_build_target): Delete use of
12405 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
12407 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
12409 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
12410 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
12412 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
12413 (floatunsdidf2): Ditto.
12415 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
12417 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
12418 (fixuns_trunc<mode>si2_avx512f): Ditto.
12419 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
12420 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
12421 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
12423 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
12425 PR rtl-optimization/79985
12426 * df-scan.c (df_insn_refs_collect): Remove special case for
12427 global registers and asm statements.
12429 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
12431 * extend.texi (Global Register Variables): Rewrite the bullet list.
12432 Note that the register is available for allocation. Note that access
12433 via inline asm must use constraints. Add note about async-signal
12434 handlers. Remove paragraph about automagic register selection.
12436 2018-05-23 Richard Biener <rguenther@suse.de>
12438 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
12439 of fixed offset from memset VN.
12441 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
12443 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
12444 first_interp field.
12445 (alloc_cand_and_find_basis): Initialize first_interp field.
12446 (slsr_process_mul): Modify first_interp field.
12447 (slsr_process_add): Likewise.
12448 (slsr_process_cast): Modify first_interp field for each new
12450 (slsr_process_copy): Likewise.
12451 (dump_candidate): Dump first_interp field.
12452 (replace_mult_candidate): Process all interpretations, not just
12454 (replace_rhs_if_not_dup): Likewise.
12455 (replace_one_candidate): Likewise.
12457 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
12459 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
12461 (aarch64_needs_frame_chain): New function.
12462 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
12464 2018-05-23 Sudakshina Das <sudi.das@arm.com>
12467 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
12468 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
12469 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
12470 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
12471 as true for strict-align.
12472 (aarch64_can_inline_p): Perform checks even when callee has no
12473 attributes to check for strict alignment.
12474 * doc/extend.texi (AArch64 Function Attributes): Document
12476 * doc/invoke.texi: (AArch64 Options): Likewise.
12478 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
12480 PR tree-optimization/85853
12481 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
12482 the handling of the root of the node to...
12483 (vect_slp_analyze_node_operations_1): ...this new function,
12484 and run the whole thing with the child nodes' def types
12485 set according to their SLP node's def type.
12487 2018-05-23 Richard Biener <rguenther@suse.de>
12489 PR middle-end/85874
12490 * tree-data-ref.c (create_runtime_alias_checks): Defer
12491 and ignore overflow warnings.
12493 2018-05-23 Yury Gribov <tetra2005@gmail.com>
12495 PR tree-optimization/85822
12496 * tree-vrp.c (is_masked_range_test): Fix handling of negative
12499 2018-05-23 Richard Biener <rguenther@suse.de>
12501 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12502 memset constants via native_interpret_expr.
12504 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
12507 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
12509 (cgraph_node::create_alias): Likewise.
12510 (cgraph_node::get_availability): Check ifunc_resolver instead
12511 of looking up ifunc attribute.
12512 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
12513 * varasm.c (do_assemble_alias): Likewise.
12514 (assemble_alias): Likewise.
12515 (default_binds_local_p_3): Likewise.
12516 * cgraph.h (cgraph_node): Add ifunc_resolver.
12517 (cgraph_node::only_called_directly_or_aliased_p): Return false
12518 for IFUNC resolver.
12519 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
12521 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
12522 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
12523 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
12524 instead of looking up ifunc attribute.
12526 2018-05-22 Luis Machado <luis.machado@linaro.org>
12528 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
12530 2018-05-22 Martin Sebor <msebor@redhat.com>
12532 PR middle-end/85359
12533 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
12534 only when expasion succeeds.
12535 (expand_builtin_strcmp): Same.
12536 (expand_builtin_strncmp): Same.
12538 2018-05-22 Martin Sebor <msebor@redhat.com>
12540 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
12542 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
12543 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12545 * config/aarch64/aarch64-ldpstp.md: Replace uses of
12546 aarch64_mem_pair_operand with memory_operand and delete operand swapping
12548 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12549 Add check for legitimate_address.
12550 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
12551 (aarch64_swap_ldrstr_operands): New.
12552 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
12555 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
12556 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12558 * config/aarch64/aarch64.md: New patterns to generate stp
12560 (store_pair_sw, store_pair_dw): New patterns to generate stp for
12561 single words and double words.
12562 (load_pair_sw, load_pair_dw): Likewise.
12563 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
12565 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
12567 * config/aarch64/aarch64-ldpstp.md: Modify peephole
12568 for different mode ldpstp and add peephole for merged zero stores.
12569 Likewise for loads.
12570 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12572 (aarch64_gen_store_pair): Rename calls to match new patterns.
12573 (aarch64_gen_load_pair): Rename calls to match new patterns.
12574 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
12575 (load_pair<DREG:mode><DREG2:mode>): ... This.
12576 (store_pair<mode>): Rename to...
12577 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
12578 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
12579 New mode iterators.
12580 (V_INT_EQUIV): Handle SImode.
12581 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
12584 2018-05-22 Martin Sebor <msebor@redhat.com>
12587 * calls.c (maybe_warn_nonstring_arg): Use string length to set
12588 or ajust the presumed bound on an operation to avoid unnecessary
12591 2018-05-22 Martin Sebor <msebor@redhat.com>
12593 PR tree-optimization/85826
12594 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
12595 assuming that a DECL necesarily has a constant size.
12597 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
12599 PR middle-end/85862
12600 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
12602 2018-05-22 Richard Biener <rguenther@suse.de>
12604 PR tree-optimization/85834
12605 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
12606 non-constant and non-zero memset arguments.
12608 2018-05-22 Martin Liska <mliska@suse.cz>
12611 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
12613 2018-05-22 Richard Biener <rguenther@suse.de>
12615 PR tree-optimization/85863
12616 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
12617 comparisons when vectype is specified.
12618 (vectorizable_condition): Do not specify vectype for
12619 vect_is_simple_cond when SLP vectorizing.
12621 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
12624 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
12625 define __ibm128 as long double.
12626 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
12627 as a distinct type when IEEE 128-bit support is enabled.
12628 (init_float128_ieee): Fix up conversions between IFmode and IEEE
12629 128-bit types to use the correct functions.
12630 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
12631 convert between 128-bit floating point types that have different
12632 modes but the same representation, instead of using gen_lowpart to
12634 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
12636 (IFKF_reg): New attributes to give the register constraints for
12638 (extend<mode>tf2_internal): New insns to mark an explicit
12639 conversion between 128-bit floating point types that have a
12640 different mode but share the same representation.
12642 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
12644 PR tree-optimization/85814
12645 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
12646 a null return from get_strinfo when unsharing the next
12647 strinfo in the chain.
12649 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12652 * varasm.c (weak_finish): Clean up weak_decls.
12654 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12656 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
12657 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
12658 UNSPEC_UADALP values.
12659 * config/aarch64/iterators.md (ABAL): New int iterator.
12662 (sur): Add mappings for the above.
12663 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
12665 (aarch64_<sur>abal<mode>_4): Likewise.
12666 (aarch64_<sur>adalp<mode>_3): Likewise.
12667 (<sur>sadv16qi): New define_expand.
12669 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
12671 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
12672 (*movdf_internal): Ditto.
12673 (*rcpsf2_sse): Ditto.
12674 (*rsqrtsf2_sse): Ditto.
12675 (*sqrt<mode>2_sse): Ditto.
12677 2018-05-21 Tamar Christina <tamar.christina@arm.com>
12679 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
12681 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
12682 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
12683 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
12684 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
12686 * config/aarch64/arm_neon.h: Likewise.
12687 * config/aarch64/iterators.md (VQ_I): New.
12689 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
12691 * config.gcc: Add arc/t-multilib-linux to tmake_file for
12693 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
12696 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12698 * config/nds32/constraints.md (S): New constraint.
12699 * config/nds32/nds32.md (call_internal): Use constraint S.
12700 (call_value_internal): Likewise.
12701 (sibcall_internal): Likewise.
12702 (sibcall_value_internal): Likewise.
12704 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12705 Chung-Ju Wu <jasonwucj@gmail.com>
12707 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
12708 into consideration.
12710 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12711 Chung-Ju Wu <jasonwucj@gmail.com>
12713 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
12714 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
12715 (nds32_rtx_costs_impl): Simplify.
12716 (nds32_address_cost_impl): Simplify.
12717 (nds32_init_rtx_costs): New function.
12718 (nds32_rtx_costs_speed_prefer): Likewise.
12719 (nds32_rtx_costs_size_prefer): Likewise.
12720 (nds32_address_cost_speed_prefer): Likewise.
12721 (nds32_address_cost_speed_fwprop): Likewise.
12722 (nds32_address_cost_size_prefer): Likewise.
12723 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
12724 * config/nds32/nds32.c (nds32_option_override): Use
12725 nds32_init_rtx_costs function.
12727 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12729 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
12730 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
12731 (TARGET_PIPELINE_N8): Likewise.
12732 (TARGET_PIPELINE_N10): Likewise.
12733 (TARGET_PIPELINE_N13): Likewise.
12734 (TARGET_PIPELINE_GRAYWOLF): Likewise.
12736 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
12738 * config/nds32/nds32-fpu.md: Update copyright year.
12740 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12742 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
12744 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12746 * config/nds32/nds32.c
12747 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
12748 * config/nds32/nds32.opt (minline-asm-r15): New option.
12750 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12752 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
12754 * config/nds32/nds32.md (abssi2): New pattern.
12756 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
12758 * config/i386/i386.md (rex64namesuffix): New mode attribute.
12759 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
12760 Merge insn pattern from sse_cvtsi2ss<round_name> and
12761 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
12762 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
12763 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
12764 using SWI48 mode iterator.
12765 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
12766 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
12767 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
12768 pattern from sse_cvttss2si<round_saeonly_name>
12769 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
12770 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
12771 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
12772 using SWI48 mode iterator.
12773 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
12774 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
12775 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
12776 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
12777 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
12778 using SWI48 mode iterator.
12779 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
12780 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
12781 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
12782 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
12783 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
12784 SWI48 mode iterator.
12785 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
12786 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
12787 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
12788 pattern from sse_cvttsd2si<round_saeonly_name>
12789 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
12791 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12793 * config/nds32/nds32-md-auxiliary.c
12794 (nds32_valid_smw_lwm_base_p): Refine.
12795 (nds32_output_smw_single_word): Refine.
12796 (nds32_output_smw_double_word): New.
12797 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
12799 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12801 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
12802 (nds32_output_stack_pop): Refine.
12803 (nds32_expand_unaligned_load): Refine.
12804 (nds32_expand_unaligned_store): Refine.
12806 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12807 Chung-Ju Wu <jasonwucj@gmail.com>
12809 * config/nds32/constants.md: Add TP_REGNUM constant.
12810 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
12811 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
12813 * config/nds32/nds32-doubleword.md: Consider flag_pic.
12814 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
12815 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
12816 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
12817 and PIC code generation.
12818 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
12820 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
12822 * config/nds32/nds32.md: Support TLS and PIC.
12823 * config/nds32/nds32.c: Support TLS and PIC.
12824 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
12825 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
12828 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12830 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
12831 mode with E_ prefix.
12833 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12834 Chung-Ju Wu <jasonwucj@gmail.com>
12836 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
12837 * config/nds32/nds32-md-auxiliary.c
12838 (symbolic_reference_mentioned_p): New.
12839 (nds32_legitimize_ict_address): New.
12840 (nds32_expand_ict_move): New.
12841 (nds32_indirect_call_referenced_p): New.
12842 (nds32_symbol_binds_local_p): Delete.
12843 (nds32_long_call_p): Modify.
12844 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
12845 * config/nds32/nds32-protos.h
12846 (symbolic_reference_mentioned_p): Declare.
12847 (nds32_legitimize_ict_address): Declare.
12848 (nds32_expand_ict_move): Declare.
12849 (nds32_indirect_call_referenced_p): Declare.
12850 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
12851 (nds32_relax_group): Use nds32_ict_const_p as condition.
12852 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12853 (nds32_asm_file_start): Output ict_model directive in asm code.
12854 (nds32_legitimate_address_p): Consider indirect call.
12855 (nds32_print_operand): Consider indirect call.
12856 (nds32_print_operand_address): Consider indirect call.
12857 (nds32_insert_attributes): Handle "indirect_call" attribute.
12858 (TARGET_LEGITIMATE_ADDRESS_P): Define.
12859 (TARGET_LEGITIMATE_CONSTANT_P): Define.
12860 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12861 (TARGET_DELEGITIMIZE_ADDRESS): Define.
12862 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12863 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12864 (TARGET_ICT_MODEL_SMALL): Define.
12865 (TARGET_ICT_MODEL_LARGE): Define.
12866 * config/nds32/nds32.md (movsi): Consider ict model.
12867 (call, call_value): Consider ict model.
12868 (sibcall, sibcall_value): Consider ict model.
12869 * config/nds32/nds32.opt (mict-model): New option.
12870 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12873 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
12874 Monk Chiang <sh.chiang04@gmail.com>
12875 Jim Wilson <jimw@sifive.com>
12877 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12878 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
12879 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12880 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12881 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
12882 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12883 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12884 compute save_libcall_adjustment properly.
12885 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12886 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12887 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12888 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12889 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12890 (ABI_SPEC): Handle mabi=ilp32e.
12891 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12892 (RVE): Add RVE mask.
12893 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12894 <-march>: Add rv32e as an example.
12896 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
12899 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12900 (intra_create_variable_infos): Handle C++ constructors.
12902 2018-05-18 Martin Liska <mliska@suse.cz>
12904 * passes.def: Remove a redundant pass.
12906 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
12909 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12911 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12913 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12915 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12917 (armv2, armv2a, armv3, armv3m): Delete architectures.
12918 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12919 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12920 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12922 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12923 (*mulsidi3adddi): Likewise.
12924 (mulsidi3): Likewise.
12925 (*mulsidi3_nov6): Likewise.
12926 (umulsidi3): Likewise.
12927 (umulsidi3_nov6): Likewise.
12928 (umaddsidi4): Likewise.
12929 (*umulsidi3adddi): Likewise.
12930 (smulsi3_highpart): Likewise.
12931 (*smulsi3_highpart_nov6): Likewise.
12932 (umulsi3_highpart): Likewise.
12933 (*umulsi3_highpart_nov6): Likewise.
12934 * config/arm/arm.h (arm_arch3m): Delete.
12935 * config/arm/arm.c (arm_arch3m): Delete.
12936 (arm_option_override_internal): Update armv3-related comment.
12937 (arm_configure_build_target): Delete use of isa_bit_mode32.
12938 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12939 (arm_rtx_costs_internal): Delete check of arm_arch3m.
12940 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12941 (mulsa3): Likewise.
12942 (mulusa3): Likewise.
12943 * config/arm/arm-protos.h (arm_arch3m): Delete.
12944 * config/arm/arm-tables.opt: Regenerate.
12945 * config/arm/arm-tune.md: Likewise.
12946 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12947 deleted architectures.
12949 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12951 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12952 (armv5t, armv5te): New features.
12953 (ARMv5, ARMv5e): Delete fgroups.
12954 (ARMv5t, ARMv5te): Adjust for above changes.
12955 (ARMv6m): Likewise.
12956 (armv5, armv5e): Delete arches.
12957 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12959 (*call_reg_arm): Likewise.
12960 (*call_value_reg_armv5): Likewise.
12961 (*call_value_reg_arm): Likewise.
12962 (*call_symbol): Likewise.
12963 (*call_value_symbol): Likewise.
12964 (*sibcall_insn): Likewise.
12965 (*sibcall_value_insn): Likewise.
12966 (clzsi2): Likewise.
12967 (prefetch): Likewise.
12968 (define_split and define_peephole2 dependent on arm_arch5):
12970 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12972 (TARGET_ARM_QBIT): Likewise.
12973 (TARGET_DSP_MULTIPLY): Likewise.
12974 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12975 (arm_arch5, arm_arch5e): Delete.
12976 (arm_arch5t, arm_arch5te): Declare.
12977 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12978 (arm_arch5t): Declare.
12979 (arm_option_reconfigure_globals): Update for the above.
12980 (arm_options_perform_arch_sanity_checks): Update comment, replace
12981 use of arm_arch5 with arm_arch5t.
12982 (use_return_insn): Likewise.
12983 (arm_emit_call_insn): Likewise.
12984 (output_return_instruction): Likewise.
12985 (arm_final_prescan_insn): Likewise.
12986 (arm_coproc_builtin_available): Likewise.
12987 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12988 arm_arch5e with arm_arch5t and arm_arch5te.
12989 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12990 (arm_arch5t, arm_arch5te): Declare.
12991 * config/arm/arm-tables.opt: Regenerate.
12992 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12993 * config/arm/t-multilib: Likewise.
12994 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12995 instead of arm_arch5.
12996 (*call_reg_thumb1): Likewise.
12997 (*call_value_reg_thumb1_v5): Likewise.
12998 (*call_value_reg_thumb1): Likewise.
12999 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
13001 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
13003 2018-05-18 Martin Liska <mliska@suse.cz>
13005 PR gcov-profile/84846
13006 * doc/gcov.texi: Document -t option of gcov tool.
13008 2018-05-18 Martin Liska <mliska@suse.cz>
13010 PR gcov-profile/84846
13011 * gcov.c (print_usage): Add new -t option.
13012 (process_args): Handle the option.
13013 (generate_results): Use stdout as output when requested by
13016 2018-05-18 Martin Liska <mliska@suse.cz>
13018 PR gcov-profile/84846
13019 * coverage.c (coverage_init): Write PWD to .gcno file.
13020 * doc/gcov.texi: Document how working directory is printed.
13021 * gcov-dump.c (dump_gcov_file): Print PWD.
13022 * gcov.c (output_intermediate_file): Likewise.
13023 (read_graph_file): Read PWD string.
13024 (output_lines): Print PWD.
13026 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13028 PR middle-end/85817
13029 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
13030 for retval and return false if all args to phi are zero.
13032 2018-05-18 Richard Biener <rguenther@suse.de>
13034 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
13036 (evrp_dom_walker::before_dom_children): Call it.
13038 2018-05-18 Richard Biener <rguenther@suse.de>
13040 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
13041 results when processing array refs with variable index.
13043 2018-05-18 Toon Moene <toon@moene.org>
13045 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
13046 directly after that of -floop-interchange. Indicate that both
13047 options are enabled by default when specifying -O3.
13049 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13051 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
13052 iterator. Delete separate integer-mode vec_set<mode> expander.
13053 (aarch64_simd_vec_setv2di): Delete.
13054 (vec_setv2di): Delete.
13055 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
13056 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
13057 the "w, r" alternative.
13059 2018-05-18 Martin Liska <mliska@suse.cz>
13061 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
13062 * tree-pass.h (make_pass_lower_switch_O0): New function.
13063 * tree-switch-conversion.c (node_has_low_bound): Remove.
13064 (node_has_high_bound): Likewise.
13065 (node_is_bounded): Likewise.
13066 (class pass_lower_switch): Make it a template type and create
13068 (pass_lower_switch::execute): Add template argument.
13069 (make_pass_lower_switch): New function.
13070 (make_pass_lower_switch_O0): New function.
13071 (do_jump_if_equal): Remove.
13072 (emit_case_nodes): Simplify to just handle all 3 cases and leave
13073 all the hard work to tree optimization passes.
13075 2018-05-18 Martin Liska <mliska@suse.cz>
13077 * dbgcnt.c (limit_low): Renamed from limit.
13078 (limit_high): New variable.
13079 (dbg_cnt_is_enabled): Check for upper limit.
13080 (dbg_cnt): Adjust dumping.
13081 (dbg_cnt_set_limit_by_index): Add new argument for high
13083 (dbg_cnt_set_limit_by_name): Likewise.
13084 (dbg_cnt_process_single_pair): Parse new format.
13085 (dbg_cnt_process_opt): Use strtok.
13086 (dbg_cnt_list_all_counters): Remove 'value' and add
13088 * doc/invoke.texi: Document changes.
13090 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
13092 * doc/sourcebuild.texi (scalar_all_fma): Document.
13093 * tree.def (FMA_EXPR): Delete.
13094 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
13095 * internal-fn.c (ternary_direct): New macro.
13096 (expand_ternary_optab_fn): Likewise.
13097 (direct_ternary_optab_supported_p): Likewise.
13098 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
13099 * builtins.c (fold_builtin_fma): Delete.
13100 (fold_builtin_3): Don't call it.
13101 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
13102 * expr.c (expand_expr_real_2): Likewise.
13103 * fold-const.c (operand_equal_p): Likewise.
13104 (fold_ternary_loc): Likewise.
13105 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
13106 * gimple.c (DEFTREECODE): Likewise.
13107 * gimplify.c (gimplify_expr): Likewise.
13108 * optabs-tree.c (optab_for_tree_code): Likewise.
13109 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
13110 * tree-eh.c (operation_could_trap_p): Likewise.
13111 (stmt_could_throw_1_p): Likewise.
13112 * tree-inline.c (estimate_operator_cost): Likewise.
13113 * tree-pretty-print.c (dump_generic_node): Likewise.
13114 (op_code_prio): Likewise.
13115 * tree-ssa-loop-im.c (stmt_cost): Likewise.
13116 * tree-ssa-operands.c (get_expr_operands): Likewise.
13117 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
13118 * fold-const-call.h (fold_fma): Delete.
13119 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
13120 CFN_FNMA and CFN_FNMS.
13121 (fold_fma): Delete.
13122 * genmatch.c (combined_fn): New enum.
13123 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
13124 (commutative_op): New function.
13125 (commutate): Use it. Handle more than 2 operands.
13126 (dt_operand::gen_gimple_expr): Use commutative_op.
13127 (parser::parse_expr): Allow :c to be used with non-binary
13128 operators if the commutative operand is known.
13129 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
13130 CFN_FMS, CFN_FNMA and CFN_FNMS.
13131 (backprop::process_assign_use): Remove FMA_EXPR handling.
13132 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
13133 (gen_hsa_fma): New function.
13134 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
13135 IFN_FNMA and IFN_FNMS.
13136 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
13137 * gimple-fold.h (follow_all_ssa_edges): Declare.
13138 * gimple-fold.c (follow_all_ssa_edges): New function.
13139 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
13140 gimple_build interface and use follow_all_ssa_edges to fold the result.
13141 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
13142 instead of checking for optabs directly.
13143 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
13144 rather than FMA_EXPRs.
13145 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
13146 call to IFN_FMA instead of an FMA_EXPR.
13148 2018-05-17 Jim Wilson <jimw@sifive.com>
13150 * expr.c (do_tablejump): When converting index to Pmode, if we have a
13151 sign extended promoted subreg, and the range does not have the sign bit
13152 set, then do a sign extend.
13154 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
13155 test, check for sign extended subreg and/or constant operands, and
13156 do a sign extend in that case.
13158 2018-05-17 Steve Ellcey <sellcey@cavium.com>
13160 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
13161 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
13163 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
13164 Change logics_shift_reg to logics_shift_imm.
13165 (thunderx2t99_fp_loadpair_basic): Delete.
13166 (thunderx2t99_fp_storepair_basic): Delete.
13167 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
13168 (thunderx2t99_asimd_polynomial): Delete.
13169 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
13170 and neon_fp_mul_d_scalar_q.
13171 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
13172 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
13173 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
13174 (thunderx2t99_asimd_lut): Add missing tbl types.
13175 (thunderx2t99_asimd_ext): Delete.
13176 (thunderx2t99_asimd_load1_1_mult): Delete.
13177 (thunderx2t99_asimd_load1_2_mult): Delete.
13178 (thunderx2t99_asimd_load1_ldp): New.
13179 (thunderx2t99_asimd_load1): New.
13180 (thunderx2t99_asimd_load2): Add missing *load2* types.
13181 (thunderx2t99_asimd_load3): New.
13182 (thunderx2t99_asimd_load4): New.
13183 (thunderx2t99_asimd_store1_1_mult): Delete.
13184 (thunderx2t99_asimd_store1_2_mult): Delete.
13185 (thunderx2t99_asimd_store2_mult): Delete.
13186 (thunderx2t99_asimd_store2_onelane): Delete.
13187 (thunderx2t99_asimd_store_stp): New.
13188 (thunderx2t99_asimd_store1): New.
13189 (thunderx2t99_asimd_store2): New.
13190 (thunderx2t99_asimd_store3): New.
13191 (thunderx2t99_asimd_store4): New.
13193 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
13195 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
13196 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
13198 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
13199 Segher Boessenkool <segher@kernel.crashing.org>
13202 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
13205 2018-05-17 Richard Biener <rguenther@suse.de>
13207 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
13208 for pruning loop and prune defs feeding only already visited PHIs.
13210 2018-05-17 Richard Biener <rguenther@suse.de>
13212 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
13214 2018-05-17 Bin Cheng <bin.cheng@arm.com>
13215 Richard Biener <rguenther@suse.de>
13217 PR tree-optimization/85793
13218 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
13219 for VMAT_ELEMENTWISE.
13221 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
13223 * internal-fn.h (lookup_internal_fn): Declare
13224 * internal-fn.c (lookup_internal_fn): New function.
13225 * gimple.c (gimple_build_call_from_tree): Handle calls to
13226 internal functions.
13227 * gimple-pretty-print.c (dump_gimple_call): Print "." before
13228 internal function names.
13229 * tree-pretty-print.c (dump_generic_node): Likewise.
13230 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
13232 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
13234 * gimple-fold.h (gimple_build): Make the function forms take
13235 combined_fn rather than built_in_function.
13236 (gimple_simplify): Likewise.
13237 * gimple-match-head.c (gimple_simplify): Likewise.
13238 * gimple-fold.c (gimple_build): Likewise.
13239 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
13240 rather than gimple_build_call_internal.
13241 (get_initial_defs_for_reduction): Likewise.
13242 (vect_create_epilog_for_reduction): Likewise.
13243 (vectorizable_live_operation): Likewise.
13245 2018-05-17 Martin Liska <mliska@suse.cz>
13247 * gimple-ssa-sprintf.c (format_directive): Do not use
13248 space in between 'G_' and '('.
13250 2018-05-17 Jakub Jelinek <jakub@redhat.com>
13253 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
13254 even if the mask is not all ones.
13257 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
13259 (ix86_gimple_fold_builtin): Likewise.
13262 * config/i386/i386.c: Include tree-vector-builder.h.
13263 (ix86_vector_shift_count): New function.
13264 (ix86_fold_builtin): Fold shift builtins by scalar count.
13265 (ix86_gimple_fold_builtin): Likewise.
13267 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
13268 _mm512_setzero): New intrinsics.
13270 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
13271 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13273 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
13274 code generation for cases where splatting a value is not useful.
13275 * simplify-rtx.c (simplify_ternary_operation): Simplify
13276 vec_merge across a vec_duplicate and a paradoxical subreg forming
13277 a vector mode to a vec_concat.
13279 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
13281 * config.gcc: Support "goldmont-plus".
13282 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13284 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13285 PROCESSOR_GOLDMONT_PLUS.
13286 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
13287 (processor_target_table): Add "goldmont-plus".
13288 (PTA_GOLDMONT_PLUS): Define.
13289 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
13290 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
13291 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
13292 (fold_builtin_cpu): Add "goldmont-plus".
13293 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
13294 (ix86_option_override_internal): Add "goldmont-plus".
13295 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
13296 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
13297 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
13298 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
13300 2018-05-17 Richard Biener <rguenther@suse.de>
13302 PR tree-optimization/85757
13303 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
13304 remove defs that only feed that PHI from further processing.
13306 2018-05-16 Jim Wilson <jimw@sifive.com>
13308 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
13310 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
13312 2018-05-16 Mark Wielaard <mark@klomp.org>
13314 * dwarf2out.c (count_index_strings): New function.
13315 (output_indirect_strings): Call count_index_strings and generate
13316 header for dwarf_version >= 5.
13318 2018-05-16 Mark Wielaard <mark@klomp.org>
13320 * dwarf2out.c (dwarf_FORM): New function.
13321 (set_indirect_string): Use dwarf_FORM.
13322 (reset_indirect_string): Likewise.
13323 (size_of_die): Likewise.
13324 (value_format): Likewise.
13325 (output_die): Likewise.
13326 (add_skeleton_AT_string): Likewise.
13327 (output_macinfo_op): Likewise.
13328 (index_string): Likewise.
13329 (output_index_string_offset): Likewise.
13330 (output_index_string): Likewise.
13331 (count_index_strings): Likewise.
13333 2018-05-16 Carl Love <cel@us.ibm.com>
13335 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13336 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
13338 2018-05-16 Martin Jambor <mjambor@suse.cz>
13340 * ipa-prop.c (ipa_free_all_edge_args): Remove.
13341 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
13343 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
13345 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
13346 (fnma<mode>4): Likewise.
13347 (fms<mode>4): Likewise.
13348 (fnms<mode>4): Likewise.
13349 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
13350 (aarch64_fnma<mode>4): Likewise.
13351 (aarch64_fms<mode>4): Likewise.
13352 (aarch64_fnms<mode>4): Likewise.
13353 (aarch64_fnmadd<mode>4): Likewise.
13355 2018-05-16 Jason Merrill <jason@redhat.com>
13357 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
13359 2018-05-16 Richard Biener <rguenther@suse.de>
13361 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
13362 (dump_stmt_cost): Declare.
13363 (add_stmt_cost): Dump cost we add.
13364 (add_stmt_costs): New function.
13365 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
13366 No longer exported.
13367 (vect_analyze_stmt): Adjust prototype.
13368 (vectorizable_condition): Likewise.
13369 (vectorizable_live_operation): Likewise.
13370 (vectorizable_reduction): Likewise.
13371 (vectorizable_induction): Likewise.
13372 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
13373 cost vector to pass to vectorizable_ and record afterwards.
13374 (vect_model_reduction_cost): Take cost vector argument and adjust.
13375 (vect_model_induction_cost): Likewise.
13376 (vectorizable_reduction): Likewise.
13377 (vectorizable_induction): Likewise.
13378 (vectorizable_live_operation): Likewise.
13379 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
13380 SLP_TREE_NUMBER_OF_VEC_STMTS.
13381 (vect_analyze_slp_cost_1): Remove.
13382 (vect_analyze_slp_cost): Likewise.
13383 (vect_slp_analyze_node_operations): Take visited args and
13384 a target cost vector. Avoid processing already visited stmt sets.
13385 (vect_slp_analyze_operations): Use a local cost vector to gather
13386 costs and register those of non-discarded instances.
13387 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
13388 (vect_schedule_slp_instance): Remove copying of
13389 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
13391 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
13392 adding cost. Record cost entry location.
13393 (vect_prologue_cost_for_slp_op): Function to compute cost of
13394 a constant or invariant generated for SLP vect in the prologue,
13395 split out from vect_analyze_slp_cost_1.
13396 (vect_model_simple_cost): Make static. Adjust for SLP costing.
13397 (vect_model_promotion_demotion_cost): Likewise.
13398 (vect_model_store_cost): Likewise, make static.
13399 (vect_model_load_cost): Likewise.
13400 (vectorizable_bswap): Add cost vector arg and adjust.
13401 (vectorizable_call): Likewise.
13402 (vectorizable_simd_clone_call): Likewise.
13403 (vectorizable_conversion): Likewise.
13404 (vectorizable_assignment): Likewise.
13405 (vectorizable_shift): Likewise.
13406 (vectorizable_operation): Likewise.
13407 (vectorizable_store): Likewise.
13408 (vectorizable_load): Likewise.
13409 (vectorizable_condition): Likewise.
13410 (vectorizable_comparison): Likewise.
13411 (can_vectorize_live_stmts): Likewise.
13412 (vect_analyze_stmt): Likewise.
13413 (vect_transform_stmt): Adjust calls to vectorizable_*.
13414 * tree-vectorizer.c: Include gimple-pretty-print.h.
13415 (dump_stmt_cost): New function.
13417 2018-05-16 Richard Biener <rguenther@suse.de>
13419 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
13420 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
13421 * tree-ssa-dse.c: Include tree-ssa-loop.h.
13422 (check_name): New callback.
13423 (dse_classify_store): Track cycles via a visited bitmap of PHI
13424 defs and simplify handling of in-loop and across loop dead stores
13425 and properly fail for loop-variant refs. Handle byte-tracking with
13426 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
13429 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
13431 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
13432 (vect_get_mask_type_for_stmt): Likewise.
13433 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
13435 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
13436 to determine the statement's vector type and the vector type that
13437 should be used for calculating nunits. Deal with cases in which
13438 the type has to be deferred.
13439 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
13440 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
13441 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
13442 (vect_determine_vf_for_stmt): New functions, split out from...
13443 (vect_determine_vectorization_factor): ...here.
13444 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
13445 (vect_get_mask_type_for_stmt): New functions, split out from
13446 vect_determine_vectorization_factor.
13448 2018-05-16 Richard Biener <rguenther@suse.de>
13450 * tree-cfg.c (verify_gimple_assign_ternary): Properly
13451 verify the [VEC_]COND_EXPR embedded comparison.
13453 2018-05-15 Martin Sebor <msebor@redhat.com>
13455 PR tree-optimization/85753
13456 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
13457 RECORD_TYPE in addition to ARRAY_TYPE.
13459 2018-05-15 Martin Sebor <msebor@redhat.com>
13461 PR middle-end/85643
13462 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
13464 2018-05-15 Richard Biener <rguenther@suse.de>
13466 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
13467 add by_clobber_p one. Change algorithm to collect all defs
13468 representing uses we need to walk and try reducing them to
13469 a single one before failing.
13470 (dse_dom_walker::dse_optimize_stmt): Adjust.
13472 2018-05-13 Mark Wielaard <mark@klomp.org>
13474 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
13475 (size_of_loc_descr): Likewise.
13476 (output_loc_operands): Likewise.
13477 (output_loc_operands_raw): Likewise.
13478 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
13479 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
13480 (hash_loc_operands): Likewise.
13481 (compare_loc_operands): Likewise.
13483 2018-05-14 Mark Wielaard <mark@klomp.org>
13485 * dwarf2out.c (count_index_addrs): New function.
13486 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
13488 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13490 PR tree-optimization/83648
13491 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
13492 return value as malloc candidate.
13494 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13497 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
13498 param as true in call to suggest_attribute.
13500 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
13502 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
13503 -mreadonly-in-sdata.
13505 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13507 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
13509 (aarch64_crypto_aesd_fused): Likewise.
13511 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
13513 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
13514 (movsi_aarch64): Likewise.
13515 (load_pairsi): Likewise.
13516 (load_pairdi): Likewise.
13517 (store_pairsi): Likewise.
13518 (store_pairdi): Likewise.
13519 (load_pairsf): Likewise.
13520 (load_pairdf): Likewise.
13521 (store_pairsf): Likewise.
13522 (store_pairdf): Likewise.
13523 (zero_extend): Likewise.
13524 (trunc): Swap alternatives.
13525 (fcvt_target): Add '?' to prefer w over r.
13527 2018-05-14 Jakub Jelinek <jakub@redhat.com>
13530 * config/i386/i386.md: Disallow non-commutative arithmetics in
13531 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
13532 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
13533 in the peephole2 before it.
13535 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
13537 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
13538 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
13539 (ix86_handle_option): Handle -mcldemote.
13540 * config.gcc: New header.
13541 * config/i386/cldemoteintrin.h: New file.
13542 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
13543 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13545 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13546 OPTION_MASK_ISA_CLDEMOTE.
13547 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
13548 (ix86_valid_target_attribute_inner_p): Ditto.
13549 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
13550 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
13551 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
13552 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
13553 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
13555 * config/i386/i386.opt: Add -mcldemote.
13556 * config/i386/x86intrin.h: New header.
13557 * doc/invoke.texi: Add -mcldemote.
13559 2018-05-14 Richard Biener <rguenther@suse.de>
13561 * doc/match-and-simplify.texi: Adjust :s documentation.
13563 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
13565 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
13566 intended memcpy size.
13567 (REORDER_45): Likewise.
13569 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
13571 * sort.cc: New file.
13572 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
13573 * vec.c (qsort_chk): Use gcc_qsort.
13574 * Makefile.in (OBJS-libcommon): Add sort.o.
13575 (build/sort.o): New target. Use it...
13576 (BUILD_RTL): ... here, and...
13577 (build/gencfn-macros): ... here, and...
13578 (build/genmatch): ... here.
13580 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13581 Chung-Ju Wu <jasonwucj@gmail.com>
13583 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
13584 * config/nds32/nds32-graywolf.md: New file.
13585 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
13586 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
13588 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
13589 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
13590 * config/nds32/nds32.md (pipeline_model): Add graywolf.
13591 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
13592 * config/nds32/pipelines.md: Include n15 settings.
13594 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13595 Chung-Ju Wu <jasonwucj@gmail.com>
13597 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
13598 * config/nds32/nds32-n13.md: New file.
13599 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
13600 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
13602 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
13603 * config/nds32/nds32.md (pipeline_model): Add n13.
13604 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
13605 * config/nds32/pipelines.md: Include n13 settings.
13607 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13608 Chung-Ju Wu <jasonwucj@gmail.com>
13610 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
13611 * config/nds32/nds32-n10.md: New file.
13612 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
13613 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
13615 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
13616 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
13617 * config/nds32/nds32.md (pipeline_model): Add n10.
13618 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
13619 * config/nds32/pipelines.md: Include n10 settings.
13621 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
13622 Kito Cheng <kito.cheng@gmail.com>
13623 Chung-Ju Wu <jasonwucj@gmail.com>
13625 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
13626 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13627 Add enum values for DSP extension instructions.
13628 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
13630 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
13631 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
13632 New code iterators.
13633 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
13634 * config/nds32/nds32-dspext.md: New file for DSP implementation.
13635 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
13636 * config/nds32/nds32-intrinsic.md: Likewise.
13637 * config/nds32/nds32_intrinsic.h: Likewise.
13638 * config/nds32/nds32-md-auxiliary.c: Likewise.
13639 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
13640 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
13641 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
13642 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
13643 * config/nds32/nds32-protos.h: New declarations for DSP extension.
13644 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
13645 TYPE_DMAC in switch statement.
13646 * config/nds32/nds32.c: New checking and implementation for DSP
13647 extension instructions.
13648 * config/nds32/nds32.h: Likewise.
13649 * config/nds32/nds32.md: Likewise.
13650 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
13651 * config/nds32/predicates.md: Implement new predicates for DSP
13654 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
13656 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
13657 Reformat alternatives and attributes so it is easier to identify
13658 which constraints/attributes go with which instruction.
13659 (mov<mode>_hardfloat32, FMOVE64): Likewise.
13660 (mov<mode>_softfloat32, FMOVE64): Likewise.
13661 (mov<mode>_hardfloat64, FMOVE64): Likewise.
13662 (mov<mode>_softfloat64, FMOVE64): Likewise.
13664 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
13666 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13668 (Basic PowerPC Built-in Functions): The new name of the
13669 subsection previously known as "PowerPC Built-in Functions".
13670 (Basic PowerPC Built-in Functions Available on all Configurations):
13672 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
13673 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
13674 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
13675 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
13677 2018-05-11 Martin Jambor <mjambor@suse.cz>
13680 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
13683 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13686 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
13688 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
13690 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
13691 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
13692 (ix86_handle_option): Handle -mwaitpkg.
13693 * config.gcc: New header.
13694 * config/i386/cpuid.h (bit_WAITPKG): New bit.
13695 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
13696 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
13698 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13699 OPTION_MASK_ISA_WAITPKG.
13700 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
13701 (ix86_option_override_internal): Add PTA_WAITPKG.
13702 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
13703 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
13704 IX86_BUILTIN_TPAUSE.
13705 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
13706 __builtin_ia32_umwait and __builtin_ia32_tpause.
13707 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
13708 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
13709 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
13710 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
13711 UNSPECV_TPAUSE): New.
13712 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
13713 * config/i386/i386.opt: Add -mwaitpkg.
13714 * config/i386/waitpkgintrin.h: New file.
13715 * config/i386/x86intrin.h: New header.
13716 * doc/invoke.texi: Add -mwaitpkg.
13718 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13721 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
13723 (cortex-m0): Use armv6s-m isa.
13724 (cortex-m0plus): Likewise.
13725 (cortex-m1): Likewise.
13726 (cortex-m0.small-multiply): Likewise.
13727 (cortex-m0plus.small-multiply): Likewise.
13728 (cortex-m1.small-multiply): Likewise.
13730 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
13731 Jakub Jelinek <jakub@redhat.com>
13733 PR tree-optimization/85692
13734 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
13735 source permute as well.
13737 2018-05-11 Martin Liska <mliska@suse.cz>
13740 * doc/extend.texi: Document LLVM style format for no_sanitize
13743 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
13745 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
13746 mode_supports_vsx_dform_quad to mode_supports_dq_form.
13747 (mode_supports_vsx_dform_quad): Likewise.
13748 (mode_supports_vmx_dform): Move these functions to be next to the
13749 other mode_supports functions.
13750 (mode_supports_dq_form): Likewise.
13751 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
13752 mode_supports_dq_form.
13753 (reg_offset_addressing_ok_p): Likewise.
13754 (offsettable_ok_by_alignment): Likewise.
13755 (rs6000_legitimate_offset_address_p): Likewise.
13756 (legitimate_lo_sum_address_p): Likewise.
13757 (rs6000_legitimize_address): Likewise.
13758 (rs6000_legitimize_reload_address): Likewise.
13759 (rs6000_secondary_reload_inner): Likewise.
13760 (rs6000_preferred_reload_class): Likewise.
13761 (rs6000_output_move_128bit): Likewise.
13763 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13765 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
13766 Generate SImode target register for null target.
13767 <case IX86_BUILTIN_XGETBV>: Ditto.
13768 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
13769 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
13771 2018-05-10 Carl Love <cel@us.ibm.com>
13773 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13774 dcbtt and dcbtstt if operands[2] is 0.
13776 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13779 * config/i386/sse.md (usadv64qi): New expander.
13781 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
13783 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
13784 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
13785 -maltivec=be support.
13786 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
13787 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
13788 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
13789 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
13790 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
13791 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
13792 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
13793 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
13794 altivec_vsumsws): Adjust.
13795 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
13796 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
13797 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
13799 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
13800 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
13801 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
13802 (altivec_lve<VI_char>x): Delete expand.
13803 (*altivec_lve<VI_char>x_internal): Rename to...
13804 (altivec_lve<VI_char>x): ... this.
13805 (altivec_lvxl_<mode>): Delete expand.
13806 (*altivec_lvxl_<mode>_internal): Rename to ...
13807 (altivec_lvxl_<mode>): ... this.
13808 (altivec_stvxl_<mode>): Delete expand.
13809 (*altivec_stvxl_<mode>_internal): Rename to ...
13810 (altivec_stvxl_<mode>): ... this.
13811 (altivec_stve<VI_char>x): Delete expand.
13812 (*altivec_stve<VI_char>x_internal): Rename to ...
13813 (altivec_stve<VI_char>x): ... this.
13814 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
13815 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
13816 reduc_plus_scal_<mode>): Adjust.
13817 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
13819 (rs6000_cpu_cpp_builtins): Adjust.
13820 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
13821 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
13822 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
13823 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
13824 -maltivec=be support.
13825 (rs6000_split_vec_extract_var): Adjust.
13826 (rs6000_split_v4si_init): Adjust.
13827 (swap_selector_for_mode): Delete.
13828 (altivec_expand_lvx_be, altivec_expand_stvx_be,
13829 altivec_expand_stvex_be): Delete.
13830 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
13831 -maltivec=be support.
13832 (rs6000_gimple_fold_builtin): Ditto.
13833 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
13835 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
13836 (TARGET_DIRECT_MOVE_64BIT): Adjust.
13837 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
13838 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
13839 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
13840 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
13841 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
13842 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
13843 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
13844 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
13845 anonymous split): Adjust.
13846 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
13847 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
13849 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
13851 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
13852 when --with-gxx-include-dir is also specified.
13853 * configure: Regenerate.
13855 2018-05-09 Jim Wilson <jimw@sifive.com>
13858 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13859 * config/riscv/t-withmultilib: New.
13860 * config/riscv/withmultilib.h: New.
13861 * doc/install.texi: Document RISC-V --with-multilib-list support.
13863 2018-05-09 Richard Biener <rguenther@suse.de>
13865 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13867 (vect_bb_vectorization_profitable_p): Adjust. Compute
13868 actual scalar cost using the cost vector and the add_stmt_cost
13871 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13873 PR rtl-optimization/85645
13874 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13875 in the REG_CFA_REGISTER note for LR, don't leave it empty.
13877 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13879 PR rtl-optimization/85645
13880 * shrink-wrap.c (spread_components): Return a boolean saying if
13881 anything was changed.
13882 (try_shrink_wrapping_separate): Iterate spread_components until
13883 nothing changes anymore.
13885 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13887 PR rtl-optimization/85645
13888 * regrename.c (build_def_use): Also kill the chains that include the
13889 destination of a REG_CFA_REGISTER note.
13891 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13893 PR rtl-optimization/85645
13894 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13895 insn that has a REG_CFA_REGISTER note.
13897 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
13899 * cfgexpand.c (expand_clobber): New function.
13900 (expand_gimple_stmt_1): Use it.
13901 * tree-vect-stmts.c (vect_clobber_variable): New function,
13903 (vectorizable_simd_clone_call): ...here.
13904 (vectorizable_store): Emit a clobber either side of an
13905 IFN_STORE_LANES sequence.
13906 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13908 2018-05-09 Tom de Vries <tom@codesourcery.com>
13911 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13912 (define_insn "trap_if_false"): Add exit after trap.
13914 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
13916 PR rtl-optimization/85638
13917 * bb-reorder.c: Include common/common-target.h.
13918 (create_forwarder_block): New function extracted from...
13919 (fix_up_crossing_landing_pad): ...here. Rename into...
13920 (dw2_fix_up_crossing_landing_pad): ...this.
13921 (sjlj_fix_up_crossing_landing_pad): New function.
13922 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13923 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13924 from both partitions and exit the loop after one iteration.
13926 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13929 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13931 (Basic PowerPC Built-in Functions): The new name of the
13932 subsection previously known as "PowerPC Built-in Functions".
13933 (Basic PowerPC Built-in Functions Available on all Configurations):
13935 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13937 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13939 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13941 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13944 2018-05-08 Jim Wilson <jimw@sifive.com>
13946 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13947 (LD_EMUL_SUFFIX): New.
13948 (LINK_SPEC): Use it.
13950 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13952 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13954 (Basic PowerPC Built-in Functions): The new name of the
13955 subsection previously known as "PowerPC Built-in Functions".
13956 (Basic PowerPC Built-in Functions Available on all Configurations):
13958 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13960 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13962 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13964 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13967 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13970 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13971 after cmpelim optimization.
13973 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
13975 * config.gcc: Support "goldmont".
13976 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13977 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13978 PROCESSOR_GOLDMONT.
13979 * config/i386/i386.c (m_GOLDMONT): Define.
13980 (processor_target_table): Add "goldmont".
13981 (PTA_GOLDMONT): Define.
13982 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13983 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13984 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13985 (fold_builtin_cpu): Add "goldmont".
13986 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13987 (ix86_option_override_internal): Add "goldmont".
13988 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13989 (processor_type): Add PROCESSOR_GOLDMONT.
13990 * config/i386/i386.md: Add CPU "glm".
13991 * config/i386/glm.md: New file.
13992 * config/i386/x86-tune.def: Add m_GOLDMONT.
13993 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13995 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13998 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
14000 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
14001 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
14002 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
14005 * config/i386/i386.c (ix86_fold_builtin): Handle
14006 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
14009 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
14010 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
14012 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
14015 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
14016 (check_arch): Likewise.
14017 (check_fpu): Return the result rather than printing it.
14018 (end arch): Fix operator precedence.
14019 (end cpu): Likewise.
14020 (END): Print the result from check_fpu.
14022 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
14023 Alan Hayward <alan.hayward@arm.com>
14024 David Sherwood <david.sherwood@arm.com>
14026 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
14027 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
14028 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
14029 (*fcmuo<mode>_and): New patterns.
14031 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
14033 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
14034 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
14035 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
14036 (cmp_op, sve_imm_con): New code attributes.
14037 (SVE_COND_INT_CMP, imm_con): Delete.
14038 (cmp_op): Remove above unspecs from int attribute.
14039 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
14041 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
14042 comparison-specific unspecs.
14043 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
14044 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
14045 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
14046 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
14047 (*vec_fcm<cmp_op><mode>): Rename to...
14048 (*fcm<cmp_op><mode>): ...this and adjust likewise.
14049 (*vec_fcmuo<mode>): Rename to...
14050 (*fcmuo<mode>): ...this and adjust likewise.
14051 (*pred_fcm<cmp_op><mode>): New pattern.
14052 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
14053 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
14055 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
14057 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
14058 (aarch64_emit_sve_predicated_cond): New function.
14059 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
14060 (aarch64_emit_unspec_cond_or): Replace with...
14061 (aarch64_emit_sve_or_conds): ...this new function. Use
14062 aarch64_emit_sve_ptrue_op for the individual comparisons and
14063 aarch64_emit_binop to OR them together.
14064 (aarch64_emit_inverted_unspec_cond): Replace with...
14065 (aarch64_emit_sve_inverted_cond): ...this new function. Use
14066 aarch64_emit_sve_ptrue_op for the comparison and
14067 aarch64_emit_unop to invert the result.
14068 (aarch64_expand_sve_vec_cmp_float): Update after the above
14069 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
14071 2018-05-07 Nathan Sidwell <nathan@acm.org>
14073 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
14074 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
14075 (Backwards Compatibility): Likewise.
14077 2018-05-07 Luis Machado <luis.machado@linaro.org>
14081 2018-05-07 Luis Machado <luis.machado@linaro.org>
14083 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14084 <prefetch_dynamic_strides>: New const bool field.
14085 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14086 prefetch_dynamic_strides.
14087 (exynosm1_prefetch_tune): Likewise.
14088 (thunderxt88_prefetch_tune): Likewise.
14089 (thunderx_prefetch_tune): Likewise.
14090 (thunderx2t99_prefetch_tune): Likewise.
14091 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
14093 (aarch64_override_options_internal): Update to set
14094 PARAM_PREFETCH_DYNAMIC_STRIDES.
14095 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14096 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14097 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14098 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14099 prefetch-dynamic-strides setting.
14101 2018-05-07 Luis Machado <luis.machado@linaro.org>
14103 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14104 <minimum_stride>: New const int field.
14105 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14106 minimum_stride field.
14107 (exynosm1_prefetch_tune): Likewise.
14108 (thunderxt88_prefetch_tune): Likewise.
14109 (thunderx_prefetch_tune): Likewise.
14110 (thunderx2t99_prefetch_tune): Likewise.
14111 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
14112 (aarch64_override_options_internal): Update to set
14113 PARAM_PREFETCH_MINIMUM_STRIDE.
14114 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14115 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14116 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14117 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14118 stride is constant and is below the minimum stride threshold.
14120 2018-05-07 Luis Machado <luis.machado@linaro.org>
14122 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
14125 2018-05-07 Luis Machado <luis.machado@linaro.org>
14127 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14128 <prefetch_dynamic_strides>: New const bool field.
14129 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14130 prefetch_dynamic_strides.
14131 (exynosm1_prefetch_tune): Likewise.
14132 (thunderxt88_prefetch_tune): Likewise.
14133 (thunderx_prefetch_tune): Likewise.
14134 (thunderx2t99_prefetch_tune): Likewise.
14135 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
14137 (aarch64_override_options_internal): Update to set
14138 PARAM_PREFETCH_DYNAMIC_STRIDES.
14139 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14140 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14141 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14142 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14143 prefetch-dynamic-strides setting.
14145 2018-05-07 Luis Machado <luis.machado@linaro.org>
14147 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14148 <minimum_stride>: New const int field.
14149 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14150 minimum_stride field.
14151 (exynosm1_prefetch_tune): Likewise.
14152 (thunderxt88_prefetch_tune): Likewise.
14153 (thunderx_prefetch_tune): Likewise.
14154 (thunderx2t99_prefetch_tune): Likewise.
14155 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
14156 (aarch64_override_options_internal): Update to set
14157 PARAM_PREFETCH_MINIMUM_STRIDE.
14158 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14159 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14160 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14161 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14162 stride is constant and is below the minimum stride threshold.
14164 2018-05-06 Jakub Jelinek <jakub@redhat.com>
14167 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
14168 the type is addressable. Don't force op into register if it has
14171 2018-05-05 Roland McGrath <mcgrathr@google.com>
14174 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
14175 any section for which we don't know a specific type it should have,
14176 regardless of name. Previously this was done only for the exact
14177 names ".init_array", ".fini_array", and ".preinit_array".
14178 (default_elf_asm_named_section): Add comment about
14179 relationship with default_section_type_flags and SECTION_NOTYPE.
14180 (get_section): Don't consider it a type conflict if one side has
14181 SECTION_NOTYPE and the other doesn't, as long as neither has the
14182 SECTION_BSS et al used in the default_section_type_flags logic.
14184 2018-05-05 Tom de Vries <tom@codesourcery.com>
14187 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
14188 (workaround_barsyncs): New function.
14189 (nvptx_reorg): Use workaround_barsyncs.
14190 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14191 (define_expand "nvptx_membar_cta"): New define_expand.
14192 (define_insn "*nvptx_membar_cta"): New insn.
14194 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
14196 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
14197 To improve optimization opportunities.
14198 * builtin-types.def: The new needed builtin types for the above.
14200 2018-05-04 Richard Biener <rguenther@suse.de>
14202 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
14203 * gimple-ssa-store-merging.c
14204 (imm_store_chain_info::output_merged_store): Remove redundant create,
14205 release split_store vector contents on failure.
14206 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
14207 scalar stmt vector on cache hit.
14209 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
14211 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
14213 * config.gcc (powerpc-xilinx-eabi*): Remove.
14214 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
14216 (fusion_addis_mem_combo_load): Ditto.
14217 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
14219 (rs6000_cpu_cpp_builtins): Ditto.
14220 * config/rs6000/rs6000-linux.c
14221 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
14222 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
14223 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
14225 (rs6000_setup_reg_addr_masks): Ditto.
14226 (rs6000_init_hard_regno_mode_ok): Ditto.
14227 (rs6000_option_override_internal): Ditto.
14228 (legitimate_lo_sum_address_p): Ditto.
14229 (rs6000_legitimize_address): Ditto.
14230 (rs6000_legitimize_reload_address): Ditto.
14231 (rs6000_legitimate_address_p): Ditto.
14232 (abi_v4_pass_in_fpr): Ditto.
14233 (setup_incoming_varargs): Ditto.
14234 (rs6000_gimplify_va_arg): Ditto.
14235 (rs6000_split_multireg_move): Ditto.
14236 (rs6000_savres_strategy): Ditto.
14237 (rs6000_emit_prologue_components): Ditto.
14238 (rs6000_emit_epilogue_components): Ditto.
14239 (rs6000_emit_prologue): Ditto.
14240 (rs6000_emit_epilogue): Ditto.
14241 (rs6000_elf_file_end): Ditto.
14242 (rs6000_function_value): Ditto.
14243 (rs6000_libcall_value): Ditto.
14244 * config/rs6000/rs6000.h: Ditto.
14245 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
14246 (TARGET_MINMAX): ... this. New.
14247 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
14248 * config/rs6000/rs6000.md: Remove Xilinx FP support.
14249 (*movsi_internal1_single): Delete.
14250 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
14251 mfpu=, mxilinx-fpu): Delete.
14252 * config/rs6000/singlefp.h: Delete.
14253 * config/rs6000/sysv4.h: Remove Xilinx FP support.
14254 * config/rs6000/t-rs6000: Ditto.
14255 * config/rs6000/t-xilinx: Delete.
14256 * config/rs6000/titan.md: Adjust for fp_type removal.
14257 * config/rs6000/vsx.md: Remove Xilinx FP support.
14258 (VStype_simple): Delete.
14259 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
14260 * config/rs6000/xfpu.h: Delete.
14261 * config/rs6000/xfpu.md: Delete.
14262 * config/rs6000/xilinx.h: Delete.
14263 * config/rs6000/xilinx.opt: Delete.
14264 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
14265 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
14267 2018-05-04 Tom de Vries <tom@codesourcery.com>
14270 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
14273 2018-05-04 Richard Biener <rguenther@suse.de>
14275 PR middle-end/85627
14276 * tree-complex.c (update_complex_assignment): We are always in SSA form.
14277 (expand_complex_div_wide): Likewise.
14278 (expand_complex_operations_1): Likewise.
14279 (expand_complex_libcall): Preserve EH info of the original stmt.
14280 (tree_lower_complex): Handle removed blocks.
14281 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
14282 on complex multiplication and division libcall builtins.
14284 2018-05-04 Richard Biener <rguenther@suse.de>
14286 PR middle-end/85574
14287 * fold-const.c (negate_expr_p): Restrict negation of operand
14288 zero of a division to when we know that can happen without
14290 (fold_negate_expr_1): Likewise.
14292 2018-05-04 Jakub Jelinek <jakub@redhat.com>
14295 * real.h (real_nextafter): Declare.
14296 * real.c (real_nextafter): New function.
14297 * fold-const-call.c (fold_const_nextafter): New function.
14298 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
14299 CASE_CFN_NEXTTOWARD.
14300 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
14301 even when arg1_mode is different from arg0_mode.
14303 2018-05-03 Nathan Sidwell <nathan@acm.org>
14305 * doc/extend.texi (Deprecated Features): Remove
14306 -ffriend-injection.
14307 (Backwards Compatibility): Likewise.
14308 * doc/invoke.texi (C++ Language Options): Likewise.
14309 (C++ Dialect Options): Likewise.
14311 2018-05-03 Jakub Jelinek <jakub@redhat.com>
14314 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
14315 _mm512_mask_mullox_epi64): New intrinsics.
14317 2018-05-03 Tom de Vries <tom@codesourcery.com>
14320 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14321 dump files): Add offload-tree.
14323 2018-05-03 Richard Biener <rguenther@suse.de>
14325 PR tree-optimization/85615
14326 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
14327 to loops not nested in BBs loop father to avoid creating multi-entry
14330 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14332 PR tree-optimization/70291
14333 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
14334 arguments. Change return type to tree. Emit libcall as a new
14335 statement rather than replacing existing one when inplace_p is true.
14336 (expand_complex_multiplication_components): New function.
14337 (expand_complex_multiplication): Expand floating-point complex
14338 multiplication using the above.
14339 (expand_complex_division): Rename inner_type parameter to type.
14340 Update expand_complex_libcall call-site.
14341 (expand_complex_operations_1): Update expand_complex_multiplication
14342 and expand_complex_division call-sites.
14344 2018-05-02 Jakub Jelinek <jakub@redhat.com>
14347 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
14348 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
14349 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
14350 the highest significant bit of the shift count mask is clear. In
14351 check whether and[sq]i3 is needed verify that all significant bits
14352 of the shift count other than the highest are set.
14354 2018-05-02 Tom de Vries <tom@codesourcery.com>
14357 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
14358 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
14359 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
14360 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
14361 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
14362 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
14363 __builtin_goacc_parlevel_size.
14365 2018-05-02 Richard Biener <rguenther@suse.de>
14367 PR tree-optimization/85597
14368 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
14369 do not use split vect_get_vec_defs call but call vect_get_slp_defs
14372 2018-05-02 Tom de Vries <tom@codesourcery.com>
14375 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14376 dump files): Add ltrans-tree.
14378 2018-05-02 Tom de Vries <tom@codesourcery.com>
14381 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14382 dump files): Add wpa-ipa.
14384 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
14386 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
14387 powerpc*-*-linux*paired* target.
14388 * config/rs6000/750cl.h: Delete.
14389 * config/rs6000/paired.h: Delete.
14390 * config/rs6000/paired.md: Delete.
14391 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
14393 * config/rs6000/rs6000-builtin.def: Remove paired float support.
14394 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
14395 comment. Remove paired float support.
14396 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
14397 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
14399 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
14400 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
14402 * config/rs6000/rs6000.c: Remove paired float support.
14403 (paired_expand_vector_init, paired_expand_vector_move,
14404 paired_emit_vector_compare, paired_emit_vector_cond_expr,
14405 (paired_expand_lv_builtin, paired_expand_stv_builtin,
14406 paired_expand_builtin, paired_expand_predicate_builtin,
14407 paired_init_builtins): Delete.
14408 * config/rs6000/rs6000.h: Remove paired float support.
14409 * config/rs6000/rs6000.md: Remove paired float support.
14410 (move_from_CR_ov_bit): Delete.
14411 * config/rs6000/rs6000.opt (mpaired): Delete.
14412 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
14413 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
14415 2018-05-02 Richard Biener <rguenther@suse.de>
14417 PR middle-end/85567
14418 * gimplify.c (gimplify_save_expr): When in SSA form allow
14419 SAVE_EXPRs to compute to SSA vars.
14421 2018-05-02 Jakub Jelinek <jakub@redhat.com>
14424 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
14425 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
14426 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
14427 clobber operands[2], instead use a new pseudo. Formatting fixes.
14429 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
14431 PR tree-optimization/85586
14432 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
14433 exit early for statements in the same group if the accesses are
14436 2018-05-02 Tom de Vries <tom@codesourcery.com>
14439 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
14442 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
14444 PR tree-optimization/85143
14445 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
14447 2018-05-01 Tom de Vries <tom@codesourcery.com>
14450 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
14451 not found" error message.
14453 2018-05-01 Tom de Vries <tom@codesourcery.com>
14456 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
14457 * vec.c (test_ordered_remove_if): New function.
14458 (vec_c_tests): Call test_ordered_remove_if.
14459 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
14460 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
14461 * tree-vect-patterns.c (vect_pattern_recog_1): Use
14462 VEC_ORDERED_REMOVE_IF.
14464 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14466 PR tree-optimization/82665
14467 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
14468 pointer subtraction where arguments come from a memchr call.
14470 2018-05-01 Jakub Jelinek <jakub@redhat.com>
14472 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
14473 --push-state --as-needed and --pop-state instead of --as-needed and
14474 --no-as-needed if ld supports it.
14475 * configure: Regenerated.
14478 * doc/install.texi2html: Replace _002d with - and _002a with * in
14479 generated html files using sed.
14481 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14484 * gcc-rich-location.c (blank_line_before_p): New function.
14485 (use_new_line): New function.
14486 (gcc_rich_location::add_fixit_insert_formatted): New function.
14487 * gcc-rich-location.h
14488 (gcc_rich_location::add_fixit_insert_formatted): New function.
14490 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14492 * selftest.c (assert_streq): Rename "expected" and "actual" to
14493 "val1" and "val2". Extend NULL-handling to cover both inputs
14494 symmetrically, while still requiring both to be non-NULL for a pass.
14495 * selftest.h (assert_streq): Rename "expected" and "actual" to
14497 (ASSERT_EQ): Likewise.
14498 (ASSERT_EQ_AT): Likewise.
14499 (ASSERT_KNOWN_EQ): Likewise.
14500 (ASSERT_KNOWN_EQ_AT): Likewise.
14501 (ASSERT_NE): Likewise.
14502 (ASSERT_MAYBE_NE): Likewise.
14503 (ASSERT_MAYBE_NE_AT): Likewise.
14504 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
14505 the assertion to pass.
14506 (ASSERT_STREQ_AT): Likewise.
14508 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
14510 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
14511 interaction with -pie.
14513 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14515 * selftest.h: Fix alphabetization of per-source-file selftest
14518 2018-04-30 Jason Merrill <jason@redhat.com>
14520 PR c++/61982 - dead stores to destroyed objects.
14521 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
14524 2018-04-30 Jason Merrill <jason@redhat.com>
14526 * tree.c (build_clobber): New.
14527 * tree.h: Declare it.
14528 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
14530 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14532 * diagnostic-show-locus.c (layout::layout): Update for
14533 location_get_source_line returning a char_span.
14534 (struct char_span): Move to input.h.
14535 (struct correction): Update for fields in char_span becoming
14537 (struct source_line): Update for location_get_source_line
14538 returning a char_span.
14539 (layout::print_line): Likewise.
14540 * edit-context.c (edited_file::print_content): Likewise.
14541 (edited_file::print_diff_hunk): Likewise.
14542 (edited_file::print_run_of_changed_lines): Likewise.
14543 (edited_file::get_num_lines): Likewise.
14544 (edited_line::edited_line): Likewise.
14545 * final.c (asm_show_source): Likewise.
14546 * input.c (location_get_source_line): Convert return type
14547 from const char * to char_span, losing the final "line_len"
14549 (dump_location_info): Update for the above.
14550 (get_substring_ranges_for_loc): Likewise. Use a char_span
14551 when handling the literal within the line.
14552 (test_reading_source_line): Update for location_get_source_line
14553 returning a char_span.
14554 * input.h (class char_span): Move here from
14555 diagnostic-show-locus.c, converting from a struct to a class.
14556 Make data members private.
14557 (char_span::operator bool): New.
14558 (char_span::length): New.
14559 (char_span::get_buffer): New.
14560 (char_span::operator[]): New.
14561 (char_span::subspan): Make const.
14562 (char_span::xstrdup): New.
14563 (location_get_source_line): Convert return type from const char *
14564 to char_span, losing the final "line_size" param.
14566 2018-04-30 Jan Hubicka <jh@suse.cz>
14568 * lto-wrapper.c (ltrans_priorities): New static var.
14569 (cmp_priority): New.
14570 (run_gcc): Read priorities and if doing parallel build order
14571 the Makefile by them.
14573 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14575 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
14577 2018-04-30 Richard Biener <rguenther@suse.de>
14579 * tree-cfg.c (verify_address): Remove base argument, add
14580 flag whether to check TREE_ADDRESSABLE and do that.
14581 (verify_expr): Remove.
14582 (verify_types_in_gimple_reference): Add pieces from verify_expr.
14583 (verify_gimple_assign_single): Likewise.
14584 (verify_gimple_switch): Likewise.
14585 (verify_expr_location_1): Dereference tp once. Add (disabled)
14586 piece from verify_expr.
14587 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
14589 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14591 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
14593 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14595 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
14596 (small_data_pattern): Likewise.
14597 (arc_rewrite_small_data): Likewise.
14598 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
14599 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
14600 (get_symbol_alignment): New function.
14601 (legitimate_small_data_address_p): Likewise.
14602 (legitimate_scaled_address): Update, call
14603 legitimate_small_data_address_p.
14604 (output_sdata): New static variable.
14605 (arc_print_operand): Update how we handle small data operands.
14606 (arc_print_operand_address): Likewise.
14607 (arc_legitimate_address_p): Update, use
14608 legitimate_small_data_address_p.
14609 (arc_rewrite_small_data_p): Remove.
14610 (arc_rewrite_small_data_1): Likewise.
14611 (arc_rewrite_small_data): Likewise.
14612 (small_data_pattern): Likewise.
14613 (compact_sda_memory_operand): Update to use
14614 legitimate_small_data_address_p and get_symbol_alignment.
14615 (prepare_move_operands): Don't rewite sdata pattern.
14616 (prepare_extend_operands): Remove.
14617 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
14619 (zero_extendqisi2): Likewise.
14620 (zero_extendhisi2): Likewise.
14621 (extendqihi2): Likewise.
14622 (extendqisi2): Likewise.
14623 (extendhisi2): Likewise.
14624 (addsi3): Likewise.
14625 (subsi3): Likewise.
14626 (andsi3): Likewise.
14627 * config/arc/constraints.md (Usd): Change it to memory constraint.
14629 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14631 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
14632 as source of std instructions.
14633 * config/arc/arc.md (movsi_insn): Update pattern predicate to
14634 allow 6-bit constants as source for store instructions.
14635 (movdi_insn): Update instruction pattern to allow 6-bit constants
14636 as source for store instructions.
14638 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
14640 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
14642 2018-04-30 Nathan Sidwell <nathan@acm.org>
14643 Sandra Loosemore <sandra@codesourcery.com>
14645 * dumpfile.c (dump_open): Allow '-' for stdout.
14646 * doc/invoke.texi (Developer Options): Document dump filename
14647 determination early. Document stdin/stdout selection.
14649 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
14651 Microblaze Target: PIC data text relative
14653 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
14654 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
14656 * config/microblaze/microblaze.h (microblaze_constant_address_p):
14657 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
14658 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
14659 New addressing mode for data-text relative position indepenedent code.
14660 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
14661 'ADDRESS_SYMBOLIC_TXT_REL'.
14662 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
14663 (microblaze_legitimate_pic_operand): Exclude function calls from
14664 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
14665 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
14667 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14668 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14669 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
14670 for 'address + offset'.
14671 (microblaze_expand_prologue): Add new function prologue call for
14673 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
14674 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
14675 table in case of TARGET_PIC_DATA_TEXT_REL.
14676 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
14677 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
14678 Add new macros 'UNSPEC_TEXT',
14679 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
14680 + exclude function calls from 'UNSPEC_PLT' in case of data text
14682 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14683 new target hook for generating address diff vector tables in case of
14685 * doc/tm.texi : Regenerate.
14686 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
14687 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
14688 of addr diff vector generation.
14689 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14690 target hook definition.
14691 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
14692 Add default function for generate_pic_addr_diff_vec -> flag_pic.
14693 * doc/invoke.texi (Add new pic option): Add new microblaze pic
14694 option for data text relative.
14696 2018-04-30 Richard Biener <rguenther@suse.de>
14698 * tree-chrec.h (evolution_function_is_constant_p): Remove
14700 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
14702 2018-04-30 Richard Biener <rguenther@suse.de>
14705 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
14707 2018-04-30 Richard Biener <rguenther@suse.de>
14709 PR tree-optimization/28364
14710 PR tree-optimization/85275
14711 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
14712 copying first exit test.
14714 2018-04-28 Mark Wielaard <mark@klomp.org>
14716 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
14717 dwarf_version >= 5.
14718 (dwarf_AT): Handle DW_AT_addr_base.
14719 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
14721 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
14724 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
14725 (*ashl<dwi>3_doubleword_mask_1): Ditto.
14726 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
14727 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
14729 2018-04-28 Richard Biener <rguenther@suse.de>
14731 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
14732 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
14733 to reflect use. Only add interesting stmts.
14735 2018-04-27 Martin Jambor <mjambor@suse.cz>
14738 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
14739 the jump function allows for passing through aggregate values.
14741 2018-04-27 David Malcolm <dmalcolm@redhat.com>
14743 * input.h (in_system_header_at): Convert from macro to inline
14745 (from_macro_expansion_at): Likewise.
14746 (from_macro_definition_at): Likewise.
14748 2018-04-27 Jeff Law <law@redhat.com>
14750 * config.gcc: Mark tile* targets as deprecated/obsolete.
14752 2018-04-27 Richard Biener <rguenther@suse.de>
14754 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
14757 2018-04-27 Richard Biener <rguenther@suse.de>
14759 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
14761 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
14763 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
14764 with Yd constraint. Set "preferred_for_speed" attribute from
14765 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
14766 with Yd constraint.
14767 (*movdi_internal): Ditto.
14768 (movti_interunit splitters): Remove
14769 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
14770 (movdi_interunit splitters): Ditto.
14771 * config/i386/constraints.md (Ye): Remove.
14772 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
14774 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14777 * config/aarch64/constraints.md (Usg): Limit to 31.
14778 (Usj): Limit to 63.
14780 2018-04-27 Jakub Jelinek <jakub@redhat.com>
14782 PR tree-optimization/85529
14783 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
14784 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
14785 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
14786 zero extension or masking of the MSB bit.
14787 (optimize_range_tests): Add FIRST_BB argument, pass it through
14788 to optimize_range_tests_var_bound.
14789 (maybe_optimize_range_tests, reassociate_bb): Adjust
14790 optimize_range_tests callers.
14792 2018-04-26 Richard Biener <rguenther@suse.de>
14793 Jakub Jelinek <jakub@redhat.com>
14795 * cgraph.h (symbol_table): Just declare debug method here.
14796 * symtab.c (symbol_table::debug): Define.
14798 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
14800 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
14802 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
14804 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
14805 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
14806 (*movdi_internal): Substitute Yi and Yj constraint with x
14807 and Ym and Yn constraint with y constraint. Update "isa"
14808 attribute and set "preferred_for_speed" attribute from
14809 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
14810 (*movsi_internal): Ditto.
14811 (*movdf_internal): Ditto.
14812 (*movsf_internal): Ditto.
14813 (*zero_extendsidi2): Ditto.
14814 * config/i386/sse.md (vec_set<mode>_0): Ditto.
14815 (sse2_loadld): Ditto.
14816 (*vec_extract<ssevecmodelower>_0): Ditto.
14817 (*vec_extractv4si_0_zext_sse4): Ditto.
14818 (vec_concatv2di): Ditto.
14819 (*vec_dup<mode>): Ditto.
14820 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
14821 * config/i386/constraints.md (Yi): Remove.
14826 2018-04-26 Nathan Sidwell <nathan@acm.org>
14828 * dumpfile.c (dump_open): New.
14829 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
14830 (dump_finish): Detect stdio/stderr by value not name.
14832 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
14834 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
14836 2018-04-26 Tom de Vries <tom@codesourcery.com>
14839 * config/nvptx/nvptx.c (verify_neutering_jumps)
14840 (verify_neutering_labels): New function
14841 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
14843 2018-04-26 Tom de Vries <tom@codesourcery.com>
14846 * config/nvptx/nvptx.c (needs_neutering_p): New function.
14847 (nvptx_single): Use needs_neutering_p to skip over insns that do not
14850 2018-04-26 Richard Biener <rguenther@suse.de>
14851 Tom de Vries <tom@codesourcery.com>
14854 * lto-streamer-out.c (output_function): Fixup loops if required to match
14855 discovery done in the reader.
14857 2018-04-26 Richard Biener <rguenther@suse.de>
14859 PR tree-optimization/85116
14860 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14861 have a loop exit from the single latch predecessor. Remove
14862 case of header with just condition.
14863 (ch_base::copy_headers): Exclude infinite loops from any
14865 (pass_ch::execute): Record exits.
14867 2018-04-26 Richard Biener <rguenther@suse.de>
14869 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14870 prologue cost vector and pass it to vect_get_load_cost.
14871 (vect_get_peeling_costs_all_drs): Likewise.
14872 (vect_peeling_hash_get_lowest_cost): Likewise.
14873 (vect_enhance_data_refs_alignment): Likewise.
14875 2018-04-26 Richard Biener <rguenther@suse.de>
14877 PR middle-end/85450
14878 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14879 checking of integer<->pointer conversions.
14880 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14881 sign-/zero-extending pointer types.
14882 (expand_omp_for_static_chunk): Likewise.
14884 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
14885 Jean Lee <xiaoyur347@gmail.com>
14887 * config/mips/mips.c (mips_asan_shadow_offset): New function.
14888 (TARGET_ASAN_SHADOW_OFFSET): Define.
14889 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14890 true for -fsanitize=address.
14892 2018-04-25 Mark Wielaard <mark@klomp.org>
14894 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14897 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14899 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14900 than "alu", remove explicit "memory" and "imm_disp" attributes.
14901 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14903 PR middle-end/85414
14904 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14905 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14906 gen_lowpart_no_emit.
14908 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
14911 * config/i386/i386.c (ix86_expand_builtin): Change memory
14912 operand to XI, extend p0 to Pmode.
14913 * config/i386/i386.md: Change unspec volatile and operand
14914 1 mode to XI, change operand 0 mode to P.
14916 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14918 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14919 GET_MODE_MASK before any checking.
14920 (nds32_can_use_bset_p): Likewise.
14921 (nds32_can_use_btgl_p): Likewise.
14923 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14925 * config/nds32/nds32-doubleword.md: New define_split pattern for
14926 illegal register number.
14928 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14930 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14932 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14934 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14936 2018-04-25 Richard Biener <rguenther@suse.de>
14938 * lto-streamer.h (LTO_major_version): Bump to 8.
14940 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14942 * BASE-VER: Set to 9.0.0.
14944 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
14946 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14947 in __abskf2 and __powikf2.
14949 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14952 * config/aarch64/constraints.md (Usg, Usj): New constraints.
14953 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14954 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14955 Use the above on operand 2. Reindent.
14956 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14958 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14961 * common/config/i386/i386-common.c (ix86_handle_option): Don't
14963 * config/i386/i386.opt (mcet): Removed.
14964 * doc/install.texi: Remove -mcet documentation.
14965 * doc/invoke.texi: Likewise.
14967 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14970 * doc/install.texi: Remove -mcet from bootstrap-cet.
14972 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14975 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14976 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14980 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14981 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14982 containing a CONST_VECTOR.
14984 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
14986 * doc/install.texi: Update newlib dependency for nvptx.
14988 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14991 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14992 instead of INTVAL when shifting x left.
14994 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
14996 PR tree-optimization/85478
14997 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14998 vect_grouped_store_supported for single element vectors.
15000 2018-04-24 Richard Biener <rguenther@suse.de>
15003 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
15004 load cost increase to the case of non-constant step.
15006 2018-04-24 Jakub Jelinek <jakub@redhat.com>
15009 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
15010 destination if any_malformed_asm.
15012 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
15014 PR middle-end/85496
15015 * expr.c (store_field): In the bitfield case, if the value comes from
15016 a function call and is returned in registers by means of a PARALLEL,
15017 do not change the mode of the temporary unless BLKmode and VOIDmode.
15019 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
15021 PR rtl-optimization/85423
15022 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
15023 dependencies to debug insns when the previous insn is non-debug.
15025 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
15027 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
15028 enums into a single definition.
15029 (fls): Fix predicates and printing.
15032 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
15034 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
15035 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
15036 and short u6 immediate.
15037 (check_if_valid_sleep_operand): Remove.
15038 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
15040 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15042 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
15043 flag_always_save_lp condition.
15044 * config/nds32/nds32.opt (malways-save-lp): New option.
15046 2018-04-22 Shiva Chen <shiva0217@gmail.com>
15048 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
15049 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
15050 * config/nds32/nds32.h
15051 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
15052 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
15054 2018-04-22 Shiva Chen <shiva0217@gmail.com>
15056 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
15057 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
15059 2018-04-22 Shiva Chen <shiva0217@gmail.com>
15060 Chung-Ju Wu <jasonwucj@gmail.com>
15062 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
15064 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
15065 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
15067 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15069 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
15071 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15073 * config/nds32/nds32-protos.h (nds32_data_alignment,
15074 nds32_local_alignment): Declare.
15075 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
15076 nds32_local_alignment): New functions.
15077 (TARGET_CONSTANT_ALIGNMENT): Define.
15078 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
15080 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15082 * config/nds32/nds32.c
15083 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
15084 (TARGET_MODES_TIEABLE_P): Likewise.
15086 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
15088 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
15089 level Ofast and Og.
15091 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
15092 Chung-Ju Wu <jasonwucj@gmail.com>
15094 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15095 for unaligned access.
15096 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15098 * config/nds32/nds32-intrinsic.md: Likewise.
15099 * config/nds32/nds32_intrinsic.h: Likewise.
15100 * config/nds32/nds32.h (nds32_builtins): Likewise.
15101 * config/nds32/nds32.opt (munaligned-access): New option.
15102 * config/nds32/nds32.c (nds32_asm_file_start): Display
15103 flag_unaligned_access status.
15105 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
15107 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
15108 -mno-relax is present.
15109 * config/riscv/linux.h (LINK_SPEC): Ditto.
15111 2018-04-20 Martin Sebor <msebor@redhat.com>
15114 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
15116 (gimple_fold_builtin_stxcpy_chk): Same.
15117 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
15119 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
15122 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
15123 __powikf2 when long double is IEEE 128-bit.
15125 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
15127 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
15128 step to make sure stack always aligned.
15130 2018-04-20 Carl Love <cel@us.ibm.com>
15133 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
15134 size check for arg0.
15136 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
15137 Tom de Vries <tom@codesourcery.com>
15140 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
15141 Emit insns for calls too.
15142 (nvptx_find_par): Always look for worker-level predecessor insn.
15143 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
15145 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
15146 (nvptx_process_pars): Propagate frames for calls.
15148 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
15151 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
15153 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
15154 (ix86_handle_option): Don't handle OPT_mibt.
15155 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
15157 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
15159 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
15160 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
15161 (ix86_target_macros): Define __CET__ with flag_cf_protection
15162 for -fcf-protection.
15163 * config/i386/i386.c (isa2_opts): Remove -mibt.
15164 * config/i386/i386.h (TARGET_IBT): Removed.
15165 (TARGET_IBT_P): Likewise.
15166 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
15167 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
15168 * config/i386/i386.opt (mcet): Update help message.
15169 (mshstk): Likewise.
15171 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
15172 -mcet as an alias for -mshstk.
15174 2018-04-20 Richard Biener <rguenther@suse.de>
15176 PR middle-end/85475
15177 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
15178 complexity by forcing a single use of the multiply operand.
15180 2018-04-20 Martin Jambor <mjambor@suse.cz>
15183 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
15184 recursion dependency to only apply to non-clones.
15186 2018-04-20 Martin Jambor <mjambor@suse.cz>
15189 * ipa-cp.c (create_specialized_node): Check that clones of
15190 self-recursive edges exist during IPA-CP.
15192 2018-04-19 Toon Moene <toon@moene.org>
15194 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
15197 2018-04-19 Jakub Jelinek <jakub@redhat.com>
15199 PR tree-optimization/85467
15200 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
15201 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
15202 VECTOR_CST element to type.
15204 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15207 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
15208 * config/i386/i386.md (builtin_setjmp_setup): Removed.
15209 (builtin_longjmp): Likewise.
15210 (save_stack_nonlocal): New pattern.
15211 (restore_stack_nonlocal): Likewise.
15213 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15216 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
15217 Replace ASM_OUTPUT_LABEL with fprintf.
15219 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15222 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
15223 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
15224 * config/i386/i386-c.c (ix86_target_macros_internal): Also
15225 define __IBT__ and __SHSTK__ for -fcf-protection.
15226 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
15228 (ix86_trampoline_init): Likewise.
15229 (x86_output_mi_thunk): Likewise.
15230 (ix86_notrack_prefixed_insn_p): Likewise.
15231 (ix86_option_override_internal): Don't disallow -fcf-protection.
15232 * config/i386/i386.md (rdssp<mode>): Also enable for
15234 (incssp<mode>): Likewise.
15235 (nop_endbr): Likewise.
15236 * config/i386/i386.opt (mcet): Change help message to built-in
15239 (mshstk): Likewise.
15240 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
15241 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
15242 enable CET built-in functions.
15244 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
15246 * common/config/i386/i386-common.c
15247 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
15248 OPTION_MASK_ISA_MOVDIRI_UNSET,
15249 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
15250 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
15251 * config.gcc (movdirintrin.h): New header.
15252 * config/i386/cpuid.h (bit_MOVDIRI,
15253 bit_MOVDIR64B): New bits.
15254 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
15256 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
15257 (VOID, PVOID, PCVOID)): New function types.
15258 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
15259 __builtin_ia32_directstoreu_u64,
15260 __builtin_ia32_movdir64b): New builtins.
15261 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
15262 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
15264 (ix86_valid_target_attribute_inner_p): Ditto.
15265 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
15266 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
15267 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
15268 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
15269 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
15270 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
15271 (movdiri<mode>, movdir64b_<mode>): New.
15272 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
15273 * config/i386/immintrin.h: Include movdirintrin.h.
15274 * config/i386/movdirintrin.h: New file.
15275 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
15277 2018-04-19 Richard Biener <rguenther@suse.de>
15279 PR middle-end/85455
15280 * cfg.c (clear_bb_flags): When loop state says we have
15281 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
15283 2018-04-19 Richard Biener <rguenther@suse.de>
15285 PR tree-optimization/84737
15286 * tree-vect-data-refs.c (vect_copy_ref_info): New function
15287 copying restrict info.
15288 (vect_setup_realignment): Use it.
15289 * tree-vectorizer.h (vect_copy_ref_info): Declare.
15290 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
15291 the first DR to all generated stores.
15292 (vectorizable_load): Likewise for loads.
15294 2018-04-19 Jakub Jelinek <jakub@redhat.com>
15296 PR tree-optimization/85446
15297 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
15298 the integral and pointer types to have the same precision.
15300 * doc/install.texi: Document --disable-cet being the default and
15303 2018-04-18 Martin Liska <mliska@suse.cz>
15305 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
15308 2018-04-18 Martin Liska <mliska@suse.cz>
15311 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
15314 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15315 arguments if they are comparable.
15317 2018-04-18 Martin Liska <mliska@suse.cz>
15320 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
15323 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15326 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
15329 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
15330 ENDBR after calling __morestack.
15332 2018-04-18 David Malcolm <dmalcolm@redhat.com>
15335 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
15336 by using gcc_base_ver to generate a gcc_driver_version, and use
15337 it when generating GCC_DRIVER_NAME.
15338 * configure: Regenerate.
15340 2018-04-18 Jakub Jelinek <jakub@redhat.com>
15343 * config.gcc: Obsolete powerpc*-*-*spe*.
15345 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15348 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
15349 (stabstr_D): Change type of unum from unsigned int to
15350 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
15353 2018-04-17 Jim Wilson <jimw@sifive.com>
15356 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
15357 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
15358 Set arg_pointer_offset after using pretend_args_size.
15360 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15362 PR rtl-optimization/85431
15363 * dse.c (record_store): Ignore zero width stores.
15366 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
15367 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
15368 __builtin_stack_restore rather than after it.
15369 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
15370 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
15371 argument instead of virtual_dynamic_stack_rtx.
15373 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
15375 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
15377 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
15378 Add note to error message to explain internal mapping of overloaded
15379 built-in function name to non-overloaded built-in function name.
15380 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
15383 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
15386 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
15387 where the inputs overlap with the output.
15389 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15391 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
15392 (=v, v) alternative and explicit "memory" attribute.
15393 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
15394 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15396 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
15397 "sselog1" type instead of "sselog".
15398 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
15399 "sselog". Remove explicit "memory" attribute.
15400 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
15401 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15403 (vec_extract_hi_v32hi): Merge all alternatives into one, use
15404 "sselog1" type instead of "sselog". Remove explicit "memory"
15406 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
15407 use "sselog1" type instead of "sselog". Remove explicit "memory"
15409 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
15410 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15412 (vec_extract_hi_v64qi): Merge all alternatives into one, use
15413 "sselog1" type instead of "sselog". Remove explicit "memory"
15415 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
15416 use "sselog1" type instead of "sselog". Remove explicit "memory"
15420 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
15422 PR middle-end/85414
15423 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
15426 2018-04-17 Martin Jambor <mjambor@suse.cz>
15429 * ipa-cp.c (create_specialized_node): Call
15430 expand_all_artificial_thunks if necessary.
15432 2018-04-17 Martin Liska <mliska@suse.cz>
15435 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
15436 in message, remote space in between '_G' and '('.
15438 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15441 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
15442 avx512f_vmcmp<mode>3<round_saeonly_name>,
15443 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
15444 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
15445 avx512f_rndscale<mode><round_saeonly_name>,
15446 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
15447 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
15448 Use %<iptr>2 instead of %2 for -masm=intel.
15449 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
15450 avx512f_vcvttss2usi<round_saeonly_name>,
15451 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
15453 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
15454 avx512f_vcvttsd2usi<round_saeonly_name>,
15455 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
15456 Use %q1 instead of %1 for -masm=intel.
15457 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
15458 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
15459 of %3 for -masm=intel.
15460 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
15462 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
15464 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
15466 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
15467 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
15469 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
15471 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
15472 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
15473 %g1 and one with %0 and %1.
15474 (avx512er_vmrcp28<mode><round_saeonly_name>,
15475 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
15476 %1 for -masm=intel.
15477 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
15478 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
15479 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
15480 of %0 and %{%4%} for -masm=intel.
15481 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
15482 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
15483 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
15484 order of %0 and %{%5%}%{z%} for -masm=intel.
15486 2018-04-17 Jan Hubicka <jh@suse.cz>
15489 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
15491 2018-04-17 Martin Liska <mliska@suse.cz>
15494 * multiple_target.c (create_dispatcher_calls): Set apostrophes
15495 for target_clone error message. Make default implementation
15496 clone to be a local declaration.
15497 (separate_attrs): Add new argument and check for an empty
15499 (expand_target_clones): Handle it.
15500 (ipa_target_clone): Make redirection just for target_clones
15503 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
15504 Tom de Vries <tom@codesourcery.com>
15506 PR middle-end/84955
15507 * omp-expand.c (expand_oacc_for): Add dummy false branch for
15508 tiled basic blocks without omp continue statements.
15510 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
15513 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
15514 vec_extract expression as having side effects to make sure it gets
15517 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
15520 * config/i386/i386.c (get_builtin_code_for_version): Check
15523 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
15526 * config.gcc: Support "skylake".
15527 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15529 * config/i386/i386.c (m_SKYLAKE): Define.
15530 (processor_target_table): Add "skylake".
15531 (ix86_option_override_internal): Add "skylake".
15532 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
15533 PROCESSOR_CANNONLAKE.
15534 (get_builtin_code_for_version): Fix priority for
15535 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
15536 PROCESSOR_SKYLAKE-AVX512.
15537 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
15538 (processor_type): Add PROCESSOR_SKYLAKE.
15540 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
15541 Jason Merrill <jason@redhat.com>
15544 * convert.c (convert_to_integer_1): Use direct recursion for
15545 enumeral types and types with a precision less than the number
15546 of bits in their mode.
15548 2018-04-16 Julia Koval <julia.koval@intel.com>
15551 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
15552 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
15554 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
15557 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
15558 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
15559 and -mno-direct-move.
15561 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
15564 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
15565 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
15566 Ensure negative shifts result in {0}.
15568 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
15570 PR rtl-optimization/79916
15571 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
15572 regs (if any) to define how to gnerate SD moves when LRA is in
15575 2018-04-13 Jakub Jelinek <jakub@redhat.com>
15577 PR rtl-optimization/85393
15578 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
15579 * except.c (expand_dw2_landing_pad_for_region): Make static.
15580 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
15581 a label and unconditional jump to old_bb, rather than
15582 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
15585 PR rtl-optimization/85376
15586 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
15587 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
15588 instead of a specific value.
15590 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
15591 Bin Cheng <bin.cheng@arm.com>
15593 PR tree-optimization/82965
15594 PR tree-optimization/83991
15595 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
15596 by_profile_only parameter.
15597 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
15598 information if the loop was predicted to iterate too many times.
15599 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
15601 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
15604 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
15607 2018-04-13 Martin Liska <mliska@suse.cz>
15608 Jakub Jelinek <jakub@redhat.com>
15610 PR middle-end/81657
15611 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
15612 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
15613 * builtins.c (expand_builtin_memory_copy_args): Use
15614 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
15615 handle dest_addr == pc_rtx.
15617 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
15620 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
15621 asked to not generate direct moves.
15622 (fix_trunc<mode>si2_stfiwx): Similar.
15623 (fix_trunc<mode>si2_internal): Similar.
15625 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15628 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
15629 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
15630 lookup if dest in some wider mode is known to be const0_rtx and
15631 if so, record permanent equivalence for it to be ZERO_EXTEND of
15632 the narrower mode destination.
15634 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
15636 * lto-streamer-out.c (output_function): Revert 259346.
15637 * omp-expand.c (expand_oacc_for): Likewise.
15639 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
15641 PR rtl-optimization/85354
15642 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
15643 * sel-sched.c (sel_global_init): ... here.
15645 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
15648 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
15649 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
15650 mode for PE-COFF targets.
15651 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
15652 (i386_pe_asm_lto_end): Likewise.
15653 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
15654 (TARGET_ASM_LTO_END): Likewise.
15655 * config/i386/winnt.c (saved_debug_info_level): New static variable.
15656 (i386_pe_asm_lto_start): New function.
15657 (i386_pe_asm_lto_end): Likewise.
15659 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
15660 Richard Biener <rguenther@suse.de>
15662 PR middle-end/84955
15663 * lto-streamer-out.c (output_function): Fix CFG loop state before
15665 * omp-expand.c (expand_oacc_for): Handle calls to internal
15666 functions like regular functions.
15668 2018-04-12 Richard Biener <rguenther@suse.de>
15671 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
15672 for the early LTO debug to properly generate references to it
15673 during DIE emission. Do not re-use that for the skeleton for
15675 (dwarf2out_early_finish): Likewise.
15677 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15680 * config/i386/sse.md
15681 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
15682 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
15683 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
15684 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
15685 and output is a reg, avoid creating invalid lowpart subreg, but
15686 instead split into a 512-bit move. Don't split if not AVX512VL,
15687 input is xmm16+ reg and output is a mem.
15688 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
15689 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
15690 xmm16+ reg and output is a mem.
15692 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15694 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
15695 also for flag_dwarf2_cfi_asm.
15697 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15699 PR rtl-optimization/85342
15700 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
15701 a bool scalar var inside of the loop instead. Don't try to update
15702 recog_data.operand after failed apply_change_group.
15704 2018-04-12 Tom de Vries <tom@codesourcery.com>
15707 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
15708 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
15709 array with flexible array member as array without given dimension.
15710 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
15711 argument for undefined param to true.
15713 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
15716 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15717 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
15718 from PowerPC section.
15719 * config/rs6000/sysv4.opt (mcall-): Improve help text.
15720 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
15721 help text that is too long.
15722 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
15723 help text that is too long.
15724 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
15725 help text that is too long.
15727 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
15729 * config/alpha/alpha.md (stack_probe_internal): Rename
15730 from "probe_stack". Update all callers.
15732 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15734 PR rtl-optimization/84566
15735 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
15736 sched_macro_fuse_insns.
15738 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15741 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
15742 (compute_block_dependences): ... from here.
15744 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15746 PR tree-optimization/85331
15747 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
15748 from int to HOST_WIDE_INT.
15750 2018-04-11 Martin Jambor <mjambor@suse.cz>
15753 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
15754 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
15755 not the same as the source val.
15756 (cgraph_edge_brings_value_p): New parameter.
15757 (gather_edges_for_value): Pass destination value to
15758 cgraph_edge_brings_value_p.
15759 (perhaps_add_new_callers): Likewise.
15760 (get_info_about_necessary_edges): Likewise and exclude values brought
15761 only by self-recursive edges.
15762 (create_specialized_node): Redirect only clones of self-calling edges.
15763 (+self_recursive_pass_through_p): New function.
15764 (find_more_scalar_values_for_callers_subset): Use it.
15765 (find_aggregate_values_for_callers_subset): Likewise.
15766 (known_aggs_to_agg_replacement_list): Removed.
15767 (decide_whether_version_node): Re-calculate known constants for all
15768 remaining context clones.
15770 2018-04-11 Richard Biener <rguenther@suse.de>
15773 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
15774 from early DWARF output.
15775 (dwarf2out_early_finish): Output line info unconditionally into
15776 early DWARF and add reference to it.
15778 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15781 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
15782 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
15783 other than V2DFmode using iptr mode attribute.
15784 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
15786 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15788 PR rtl-optimization/84659
15789 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
15791 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15794 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
15796 (output_loc_list): Pass address of a dummy size variable even in the
15797 locview handling loop.
15798 (index_location_lists): Add comment on why skip_loc_list_entry can't
15801 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
15804 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
15807 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
15810 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15811 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
15812 and -mstring-compare-inline-limit.
15814 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15817 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
15818 for stack clash protection in a register whenever we need it to be in
15821 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15823 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
15824 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
15826 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15829 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
15831 (mlong-double-): Ditto.
15832 * config/rs6000/sysv4.opt (msdata=): Ditto.
15833 (mtls-size=): Ditto.
15835 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
15837 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15838 erroneous entries for
15839 "vector int vec_ldl (int, long int *)", and
15840 "vector unsigned int vec_ldl (int, unsigned long int *)".
15841 Add comments and entries for
15842 "vector bool char vec_ldl (int, bool char *)",
15843 "vector bool short vec_ldl (int, bool short *)",
15844 "vector bool int vec_ldl (int, bool int *)",
15845 "vector bool long long vec_ldl (int, bool long long *)",
15846 "vector pixel vec_ldl (int, pixel *)",
15847 "vector long long vec_ldl (int, long long *)",
15848 "vector unsigned long long vec_ldl (int, unsigned long long *)".
15849 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
15850 type tree bool_long_long_type_node and correct definition of
15851 bool_V2DI_type_node to make reference to this new type tree.
15852 (rs6000_mangle_type): Replace erroneous reference to
15853 bool_long_type_node with bool_long_long_type_node.
15854 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15855 comments to emphasize sign distinctions for char and int types and
15856 replace RS6000_BTI_bool_long constant with
15857 RS6000_BTI_bool_long_long constant. Also add comment to restrict
15858 use of RS6000_BTI_pixel.
15859 (bool_long_type_node): Remove this macro definition.
15860 (bool_long_long_type_node): New macro definition
15862 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15864 PR rtl-optimization/85300
15865 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15866 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15867 simplify_unary_operation fails.
15869 2018-04-10 Martin Liska <mliska@suse.cz>
15871 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15872 cgraph_edge and ipa_ref.
15874 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15878 * config/i386/sse.md
15879 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15880 computation of the VEC_MERGE selector from mask.
15881 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15882 Fix decoding of the VEC_MERGE selector into mask.
15884 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15886 PR tree-optimization/85286
15887 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15889 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15891 * final.c (final_1): Set insn_last_address as well as
15892 insn_current_address.
15894 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15897 * explow.c (emit_stack_probe): Call validize_mem on memory location
15898 before passing it to gen_probe_stack. Create address operand and
15899 legitimize it for the probe_stack_address case.
15901 2018-04-09 Jan Hubicka <jh@suse.cz>
15904 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15905 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15906 * tree.c (free_lang_data_in_type): Fix handling of binfos;
15908 (free_lang_data): Rebuild type inheritance graph.
15910 2018-04-09 Martin Sebor <msebor@redhat.com>
15912 * invoke.texi (-finline-small-functions): Mention other optimization
15914 (-findirect-inlining, -fpartial-inlining): Same.
15915 (-finline-functions-called-once): Same.
15916 (-freorder-blocks-and-partition): Same.
15918 2018-04-09 Jan Hubicka <jh@suse.cz>
15921 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15922 jumps; choose last target that matches the criteria (i.e.
15923 no partition changes for non-crossing jumps).
15924 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15925 support for redirecting crossing jumps to non-crossing.
15927 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
15929 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15930 also for naked functions.
15932 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
15934 * config/arc/arc.md (add_shift): New pattern.
15935 (add_shift2): Likewise.
15936 (sub_shift): Likewise.
15937 (sub_shift_cmp0_noout): Likewise.
15938 (compare_si_ashiftsi): Likewise.
15939 (xbfu_cmp0_noout): New combine pattern.
15940 (xbfu_cmp0"): Likewise.
15941 (movsi_set_cc_insn): Place the predicable variant first.
15942 (commutative_binary_cmp0_noout): Remove clobber.
15943 (commutative_binary_cmp0): New pattern.
15944 (noncommutative_binary_cmp0): Likewise.
15945 (noncommutative_binary_cmp0_noout): Likewise.
15946 (noncommutative_binary_comparison_result_used): Removed.
15947 (rsub_cmp0): New pattern.
15948 (rsub_cmp0_noout): Likewise.
15949 (extzvsi): Changed, keep only meaningful variants.
15950 (SQH, SEZ): New iterators.
15951 (SQH_postfix): New mode attribute.
15952 (SEZ_prefix): New code attribute.
15953 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15954 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15955 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15956 of numerical value.
15957 (noncommutative_operator): Check the availability of barrel
15960 2018-04-09 Richard Biener <rguenther@suse.de>
15962 PR tree-optimization/85284
15963 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15964 Only use the niter constraining form of simple_iv when the exit
15965 is always executed.
15967 2018-04-09 Tom de Vries <tom@codesourcery.com>
15970 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15971 (define_expand "*memory_barrier"): New define_expand.
15972 (define_insn "memory_barrier"): New insn.
15974 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15976 PR rtl-optimization/80463
15977 PR rtl-optimization/83972
15978 PR rtl-optimization/83480
15980 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15981 correct producer for the insn.
15982 (tidy_control_flow): Fixup seqnos in case of debug insns.
15984 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15986 PR rtl-optimization/83913
15988 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15989 different sched-times when merging exprs.
15991 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15993 PR rtl-optimization/83962
15995 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15996 tidy_fallthru_edge and tidy_control_flow.
15998 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
16000 PR rtl-optimization/83530
16002 * sel-sched.c (force_next_insn): New global variable.
16003 (remove_insn_for_debug): When force_next_insn is true, also leave only
16004 next insn in the ready list.
16005 (sel_sched_region): When the region wasn't scheduled, make another pass
16006 over it with force_next_insn set to 1.
16008 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
16010 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
16012 * config/nds32/constants.md (unspec_volatile_element): Add enum values
16013 for interrupt control.
16014 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
16015 functions for interrupt control.
16016 * config/nds32/nds32-intrinsic.md: Likewise.
16017 * config/nds32/nds32_intrinsic.h: Likewise.
16018 * config/nds32/nds32.h (nds32_builtins): Likewise.
16020 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
16022 * config/nds32/nds32.c (nds32_init_machine_status,
16023 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
16024 strict_aligned_p field.
16025 (nds32_expand_to_rtl_hook): New function.
16026 (TARGET_EXPAND_TO_RTL_HOOK): Define.
16027 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
16029 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
16030 Chung-Ju Wu <jasonwucj@gmail.com>
16032 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
16033 * config/nds32/nds32-n7.md: New file.
16034 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
16035 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
16037 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
16038 * config/nds32/nds32.md (pipeline_model): Add n7.
16039 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
16040 * config/nds32/pipelines.md: Include n7 settings.
16042 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
16043 Chung-Ju Wu <jasonwucj@gmail.com>
16045 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
16046 * config/nds32/nds32-e8.md: New file.
16047 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
16048 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
16050 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
16051 * config/nds32/nds32.md (pipeline_model): Add e8.
16052 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
16053 * config/nds32/pipelines.md: Include e8 settings.
16055 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
16056 Chung-Ju Wu <jasonwucj@gmail.com>
16058 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
16059 * config/nds32/nds32-n8.md: New file.
16060 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
16061 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
16063 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
16064 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
16065 * config/nds32/nds32.md (pipeline_model): Add n8.
16066 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
16067 * config/nds32/pipelines.md: Include n8 settings.
16069 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
16070 Chung-Ju Wu <jasonwucj@gmail.com>
16072 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
16073 * config/nds32/nds32-n9-2r1w.md: New file.
16074 * config/nds32/nds32-n9-3r2w.md: New file.
16075 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
16076 nds32_register_ports): New or modify for cpu n9.
16077 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
16079 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
16080 * config/nds32/nds32-utils.c: New file.
16081 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
16082 TARGET_MUL_SLOW): Define.
16083 * config/nds32/nds32.md (pipeline_model): New attribute.
16084 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
16085 New options that support cpu n9.
16086 * config/nds32/pipelines.md: Include n9 settings.
16087 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
16089 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
16091 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
16092 information if necessary.
16093 (output_cond_branch_compare_zero): Likewise.
16094 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
16095 (nds32_target_alignment): Refine for alignment.
16096 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
16097 (FUNCTION_BOUNDARY): Modify.
16098 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
16100 * config/nds32/nds32.opt (malways-align, malign-functions): New.
16102 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
16104 * config/nds32/constants.md (unspec_volatile_element): Add values for
16105 TLB operation and data prefetch.
16106 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
16107 functions for TLB operation and data prefetch.
16108 * config/nds32/nds32-intrinsic.md: Likewise.
16109 * config/nds32/nds32_intrinsic.h: Likewise.
16110 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
16111 (nds32_print_operand): Likewise.
16112 * config/nds32/nds32.h (nds32_builtins): Likewise.
16114 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
16115 Andrew Pinski <pinsika@gcc.gnu.org>
16117 PR middle-end/82976
16118 * match.pd: Use constant_boolean_node of correct type instead of
16119 boolean_true_node or boolean_false_node for simplifying
16120 pointer comparisons to zero.
16122 2018-04-07 Jakub Jelinek <jakub@redhat.com>
16124 PR tree-optimization/80021
16125 * tree.c (verify_type_variant): Make error call in verify_variant_match
16126 translatable and remove final full stop.
16128 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16130 * config/nds32/constants.md (unspec_volatile_element): Add
16131 UNSPEC_VOLATILE_EH_RETURN.
16132 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
16133 nds32_output_stack_pop): Support dwarf exception handling process.
16134 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
16135 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
16136 exception handling process.
16137 (nds32_compute_stack_frame): Likewise.
16138 (nds32_return_addr_rtx): Likewise.
16139 (nds32_initial_elimination_offset): Likewise.
16140 (nds32_expand_prologue): Likewise.
16141 (nds32_expand_epilogue): Likewise.
16142 (nds32_dynamic_chain_address): New function.
16143 * config/nds32/nds32.h (machine_function): Add fields for dwarf
16144 exception handling.
16145 (DYNAMIC_CHAIN_ADDRESS): Define.
16146 (EH_RETURN_DATA_REGNO): Define.
16147 (EH_RETURN_STACKADJ_RTX): Define.
16148 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
16149 patterns for dwarf exception handling.
16151 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16153 * config/nds32/nds32.h: Clean up obsolete macros.
16155 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16157 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16158 Add enum values for particular instructions.
16159 * config/nds32/nds32-intrinsic.c: Implementation of expanding
16160 particular intrinsic functions.
16161 * config/nds32/nds32-intrinsic.md: Likewise.
16162 * config/nds32/nds32_intrinsic.h: Likewise.
16163 * config/nds32/nds32.h (nds32_builtins): Likewise.
16164 * config/nds32/nds32.md (type): Add pbsad and pbsada.
16165 (btst, ave): New patterns for particular instructions.
16167 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16169 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16170 Add enum values for atomic load/store and memory sync.
16171 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
16173 * config/nds32/nds32-intrinsic.md: Likewise.
16174 * config/nds32/nds32_intrinsic.h: Likewise.
16175 * config/nds32/nds32.h (nds32_builtins): Likewise.
16177 2018-04-07 Jakub Jelinek <jakub@redhat.com>
16179 PR tree-optimization/85257
16180 * fold-const.c (native_encode_vector): If not all elts could fit
16181 and off is -1, return 0 rather than offset.
16182 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
16183 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
16184 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
16185 adjust buffer in native_interpret_expr call.
16187 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16189 * config/nds32/constants.md (unspec_volatile_element): Add cache
16190 control enum values.
16191 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
16192 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
16193 * config/nds32/nds32.c (nds32_cctl_names): New.
16194 (nds32_print_operand): Handle cache control register names.
16195 * config/nds32/nds32.h (nds32_builtins): New enum values.
16196 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
16198 * config/nds32/nds32.md (type): Add mmu.
16199 * config/nds32/pipelines.md (simple_insn): Add mmu.
16201 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16203 * config/nds32/nds32.md (type): Remove call.
16204 * config/nds32/pipelines.md (simple_insn): Likewise.
16206 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16208 * config/nds32/constants.md (unspec_volatile_element): Add
16209 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
16210 UNSPEC_VOLATILE_FMFCFG.
16211 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
16212 description for fmfcfg and fmfcsr.
16213 (bdesc_1arg): Add fmtcsr.
16214 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
16215 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
16216 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
16217 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
16218 unspec_fmfcfg): New patterns.
16219 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
16220 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
16221 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
16222 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
16223 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
16224 __nds32__fmfcfg): Define.
16226 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16228 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
16229 intrinsic register names.
16230 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
16231 intrinsic register enum values and macros.
16233 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16235 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
16236 for load/store addressing form.
16237 (nds32_print_operand_address): Likewise.
16239 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
16242 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
16243 based on LABEL_REF. Remove useless assertion.
16244 (pic_address_needs_scratch): Fix formatting.
16245 (sparc_legitimize_pic_address): Minor tweaks.
16246 (sparc_delegitimize_address): Adjust assertion accordingly.
16247 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
16248 into symbolic_operand.
16249 (movsi_high_pic_label_ref): Likewise.
16250 (movsi_lo_sum_pic_label_ref): Likewise.
16251 (movdi_pic_label_ref): Likewise.
16252 (movdi_high_pic_label_ref): Likewise.
16253 (movdi_lo_sum_pic_label_ref): Likewise.
16255 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
16257 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
16258 custom LIB_SPEC setup.
16260 2018-04-06 Ruslan Bukin <br@bsdpad.com>
16261 Kito Cheng <kito.cheng@gmail.com>
16263 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
16264 * config/riscv/freebsd.h: New.
16266 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16268 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
16269 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
16272 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16273 Kito Cheng <kito.cheng@gmail.com>
16275 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
16276 nds32_output_call, nds32_symbol_binds_local_p): New functions.
16277 * config/nds32/nds32-protos.h (nds32_output_call,
16278 nds32_output_return): Declare.
16279 * config/nds32/nds32.md: Refine all the call and return patterns.
16281 2018-04-06 Jakub Jelinek <jakub@redhat.com>
16284 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
16285 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
16287 PR rtl-optimization/84872
16288 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
16289 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
16290 EDGE_CROSSING edge.
16292 2018-04-06 Tamar Christina <tamar.christina@arm.com>
16294 * expr.c (copy_blkmode_to_reg): Revert 254862.
16295 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
16297 2018-04-06 Richard Biener <rguenther@suse.de>
16299 PR middle-end/85244
16300 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
16301 after seeing a component reference with an adjacent field. Treat
16302 refs to arrays at struct end of external decls similar to
16303 refs to unconstrained commons.
16305 2018-04-06 Jakub Jelinek <jakub@redhat.com>
16308 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
16309 look through SAVE_EXPRs with non-side-effects argument. Adjust
16311 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
16314 2018-04-06 Richard Biener <rguenther@suse.de>
16316 PR middle-end/85180
16317 * alias.c (find_base_term): New wrapper around find_base_term
16318 unwinding CSELIB_VAL_PTR changes.
16319 (find_base_term): Do not restore CSELIB_VAL_PTR during the
16322 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16324 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
16326 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
16327 constant definitions.
16328 ("nop"): lr 0,0 -> nopr r0
16329 ("nop_lr0", "nop_lr1"): New insn definitions.
16331 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16333 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
16334 NDS32_V3PUSH_AVAILABLE_P macro.
16336 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
16337 Chung-Ju Wu <jasonwucj@gmail.com>
16339 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
16340 (nds32*-*-*): Add float and fpu_config into supported_defaults.
16341 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
16342 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
16343 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
16344 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
16345 * config/nds32/constraints.md: New constraints and checking for hard
16346 float configuration.
16347 * config/nds32/iterators.md: New mode iterator and attribute for hard
16348 float configuration.
16349 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
16351 * config/nds32/nds32-fpu.md: New file.
16352 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
16353 deal with hard float code generation.
16354 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
16356 (abi_type, float_reg_number): New enum type.
16357 * config/nds32/nds32-predicates.c: New predicates for hard float.
16358 * config/nds32/nds32-protos.h: Declare functions for hard float.
16359 * config/nds32/nds32.c: Implementation for hard float configuration.
16360 * config/nds32/nds32.h: Definitions for hard float configuration.
16361 * config/nds32/nds32.md: Include hard float machine description and
16362 modify patterns for hard float configuration.
16363 * config/nds32/nds32.opt: New options for hard float configuration.
16364 * config/nds32/predicates.md: New predicates for hard float
16367 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16369 * common/config/nds32/nds32-common.c
16370 (nds32_option_optimization_table): Enable -mreleax-hint by default.
16372 2018-04-05 Jakub Jelinek <jakub@redhat.com>
16374 PR middle-end/85195
16375 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
16376 CONSTRUCTOR_ELT (ctor, ...)->value.
16378 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
16381 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
16383 2018-04-05 Tom de Vries <tom@codesourcery.com>
16386 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
16389 2018-04-05 Shiva Chen <shiva0217@gmail.com>
16390 Kito Cheng <kito.cheng@gmail.com>
16392 * config/nds32/constraints.md (U33): Fine-tune checking condition.
16393 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
16394 * config/nds32/nds32.h (nds32_16bit_address_type): Add
16395 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
16397 2018-04-05 Shiva Chen <shiva0217@gmail.com>
16398 Kito Cheng <kito.cheng@gmail.com>
16400 * config/nds32/constraints.md (Ufe): New memory constraint.
16401 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
16402 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
16403 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
16405 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
16406 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
16408 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16410 * config/nds32/nds32.md: Use optimize_size in the condition for
16411 alu-shift instructions.
16413 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16415 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
16417 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16419 * config/nds32/nds32.md (negsi2): Refine pattern.
16421 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
16422 Chung-Ju Wu <jasonwucj@gmail.com>
16424 * config/nds32/iterators.md (shift_rotate): New code iterator.
16425 (shift): New code attribute.
16426 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
16427 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
16428 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
16429 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
16430 bit-wise operations.
16431 (andsi3, *andsi3): Ditto.
16432 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
16433 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
16434 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
16435 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
16436 nds32_ior_operand, nds32_xor_operand): New predicates.
16438 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16440 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
16441 (addsi3, subsi3): ... this.
16443 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16445 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
16447 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16449 * config/nds32/nds32.md: Adjust indention.
16451 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
16453 * config/nds32/nds32.md (feature): New attribute.
16455 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16457 * config/nds32/nds32.md (subtype): New attribute.
16459 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
16462 * config/arm/arm-builtins.c (arm_expand_builtin): Change
16463 expansion to perform a bitwise AND of the argument followed by a
16464 boolean negation of the result.
16466 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
16468 PR rtl-optimization/84878
16469 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
16470 the basic block. Assert the use reference is not artificial and that
16471 it has an associated insn.
16473 2018-04-04 Michael Matz <matz@suse.de>
16475 * builtins.c (compute_objsize): Pass correct operand
16476 to array_at_struct_end_p.
16478 2018-04-04 Richard Biener <rguenther@suse.de>
16481 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
16482 from contexts for DINFO_LEVEL_TERSE and below.
16484 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16486 * config/nds32/nds32-doubleword.md (move_<mode>): Require
16487 resiter_operand condition.
16488 * config/nds32/nds32.md (*move<mode>): Ditto.
16490 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16491 Monk Chiang <sh.chiang04@gmail.com>
16493 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
16495 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16497 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
16499 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16500 Kito Cheng <kito.cheng@gmail.com>
16502 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
16503 nds32_cond_code_str, output_cond_branch,
16504 output_cond_branch_compare_zero, nds32_expand_cbranch,
16505 nds32_expand_cstore, nds32_expand_movcc,
16506 nds32_output_cbranchsi4_equality_zero,
16507 nds32_output_cbranchsi4_equality_reg,
16508 nds32_output_cbranchsi4_equality_reg_or_const_int,
16509 nds32_output_cbranchsi4_greater_less_zero: New functions.
16510 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
16511 nds32_expand_cstore, nds32_expand_movcc,
16512 nds32_output_cbranchsi4_equality_zero,
16513 nds32_output_cbranchsi4_equality_reg,
16514 nds32_output_cbranchsi4_equality_reg_or_const_int,
16515 nds32_output_cbranchsi4_greater_less_zero): Declare.
16516 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
16517 nds32_rimm11s_operand): New predicates.
16518 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
16519 * config/nds32/nds32.md: Rewrite all the branch and conditional move
16522 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16524 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
16525 * config/nds32/nds32.md: Ditto.
16526 * config/nds32/pipelines.md: Ditto.
16528 2018-04-04 Richard Biener <rguenther@suse.de>
16530 PR tree-optimization/85168
16531 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
16532 propagating abnormals.
16534 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16536 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
16538 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16539 Kito Cheng <kito.cheng@gmail.com>
16541 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
16542 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
16543 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
16544 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
16545 * config/nds32/nds32.md (sibcall_internal): New.
16546 (sibcall_register): Remove.
16547 (sibcall_immediate): Remove.
16548 (sibcall_value_internal): New.
16549 (sibcall_value_register): Remove.
16550 (sibcall_value_immediate): Remove.
16551 * config/nds32/predicates.md (nds32_general_register_operand): New.
16552 (nds32_call_address_operand): New.
16554 2018-04-03 Jakub Jelinek <jakub@redhat.com>
16556 PR rtl-optimization/85167
16557 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
16558 bb_defs if *split_p, instead preinitialize it to NULL.
16560 PR tree-optimization/85156
16561 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
16562 evaluating the argument multiple times.
16564 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
16566 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
16568 (_mm_cvtpd_ps): Likewise.
16569 (_mm_cvttpd_epi32): Likewise.
16570 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
16571 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
16572 vector, pixel, and bool following altivec.h include.
16574 2018-04-03 Martin Sebor <msebor@redhat.com>
16576 * doc/extend.texi (Common Function Attributes): Clarify.
16577 (const attribute): Likewise.
16578 (pure attribute): Likewise.
16580 2018-04-03 Jakub Jelinek <jakub@redhat.com>
16583 * config/i386/i386.c (ix86_expand_vector_set): Use
16584 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
16586 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
16588 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
16589 instructions when changing rounding bits to preserve precision bits
16590 in the x87 control word.
16592 2018-04-03 Martin Liska <mliska@suse.cz>
16594 PR tree-optimization/82491
16595 * rtl.h (strip_offset_and_add): Replace += suboffset with
16596 poly_uint64 () + suboffset.
16598 2018-03-29 Martin Liska <mliska@suse.cz>
16599 Martin Jambor <mjambor@suse.cz>
16602 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
16603 param_type is not an integral or pointer type.
16605 2018-04-03 Richard Biener <rguenther@suse.de>
16607 * sese.h (recompute_all_dominators): Remove.
16609 2018-04-02 Martin Sebor <msebor@redhat.com>
16611 * doc/invoke.texi (-Wrestrict): Fix typos.
16613 2018-04-02 Jim Wilson <jimw@sifive.com>
16615 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
16616 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
16617 (<optab>di3, <optab>si3_extend): Likewise.
16618 (<optab>si3_mask, <optab>si3_mask_1): New.
16619 (<optab>di3_mask, <optab>di3_mask_1): New.
16620 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
16621 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
16622 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
16624 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
16626 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
16629 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
16631 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
16632 (nds32_canonicalize_comparison): New function.
16634 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16635 Kito Cheng <kito.cheng@gmail.com>
16636 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16638 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
16639 * config/nds32/constants.md (unspec_volatile_element): Add
16640 UNSPEC_VOLATILE_RELAX_GROUP.
16641 * config/nds32/nds32-relax-opt.c: New file.
16642 * config/nds32/nds32-predicates.c
16643 (nds32_symbol_load_store_p): New function.
16644 * config/nds32/nds32-protos.h
16645 (nds32_symbol_load_store_p): Declare function.
16646 (make_pass_nds32_relax_opt): Declare new rtl pass function.
16647 * config/nds32/nds32.c
16648 (nds32_register_pass): New function to register pass.
16649 (nds32_register_passes): New function to register passes.
16650 * config/nds32/nds32.md (relax_group): New pattern.
16651 * config/nds32/nds32.opt (mrelax-hint): New option.
16652 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
16654 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
16656 * config/nds32/t-nds32: Modify files dependency.
16658 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16660 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
16661 (PROFILE_HOOK): Define its implementation.
16663 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16665 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
16666 type and 32-bit size.
16668 2018-04-01 Jakub Jelinek <jakub@redhat.com>
16670 PR middle-end/85090
16671 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
16672 (V_128_256): New mode iterator.
16673 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
16674 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
16675 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
16677 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
16678 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
16680 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
16683 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
16684 NaN inputs correctly.
16686 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
16689 * config/rs6000/vsx.md (??r): New mode attribute.
16690 (*vsx_mov<mode>_64bit): Use it.
16691 (*vsx_mov<mode>_32bit): Likewise.
16693 2018-03-30 Martin Sebor <msebor@redhat.com>
16695 PR tree-optimization/84818
16696 * builtins.c (check_access): Use warning_n.
16698 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16701 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
16703 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
16706 2018-03-30 Julia Koval <julia.koval@intel.com>
16709 * x86-tune.def (movx, partial_reg_dependency): Enable for
16712 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
16714 PR inline-asm/84985
16715 * lra-constraints.c (process_alt_operands): Move setting
16716 this_alternative_matches below.
16718 2018-03-29 Martin Liska <mliska@suse.cz>
16721 * doc/invoke.texi: Document how LTO works with debug info.
16722 Describe auto-load support of binutils. Mention 'x86-64'
16723 as valid option value of -march option.
16725 2018-03-29 Jakub Jelinek <jakub@redhat.com>
16727 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
16730 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
16731 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
16732 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
16735 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16738 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
16739 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
16740 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
16741 for RS6000_BTM_POWERPC64.
16742 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
16743 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
16744 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
16747 (DIVDEU): Likewise.
16749 2018-03-28 Carl Love <cel@us.ibm.com>
16752 2017-09-27 Carl Love <cel@us.ibm.com>
16754 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
16755 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
16756 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
16759 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16761 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
16762 instead of __vector bool.
16763 (_mm_max_pu8): Likewise.
16764 (_mm_min_pi16): Likewise.
16766 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16769 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
16770 (DIVWEUO): Likewise.
16771 (DIVDEO): Likewise.
16772 (DIVDEUO): Likewise.
16773 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
16774 DIVWEUO and DIVDEUO.
16775 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
16776 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
16777 (div_extend): Likewise.
16778 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
16780 (__builtin_divweuo): Likewise.
16781 (__builtin_divdeo): Likewise.
16782 (__builtin_divdeuo): Likewise.
16784 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16787 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
16788 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
16790 PR tree-optimization/82004
16791 * gimple-match-head.c (optimize_pow_to_exp): New function.
16792 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
16793 Don't fold to exp if optimize_pow_to_exp is false.
16795 2018-03-28 Martin Liska <mliska@suse.cz>
16798 * calls.c (initialize_argument_information): Fix trailing space.
16799 * common.opt: Fix typo and provide better explanation for
16800 -fsanitize-coverage option.
16801 * config/i386/i386.opt: Fix typo.
16803 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16804 Martin Liska <mliska@suse.cz>
16807 * gimplify.c (asan_poison_variable): Don't do the check for
16808 gimplify_omp_ctxp here.
16809 (gimplify_decl_expr): Do it here.
16810 (gimplify_target_expr): Likewise.
16812 2018-03-28 Martin Liska <mliska@suse.cz>
16815 * config/i386/i386.c (ix86_function_arg_advance): Do not call
16816 chkp_type_bounds_count if MPX is not enabled.
16818 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
16820 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
16822 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
16825 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
16826 function to create the function decl for complex long double
16827 multiply and divide for -mabi=ieeelongdouble.
16828 (init_float128_ieee): Call it.
16830 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
16833 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
16834 -fcf-protection=branch -mibt.
16835 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
16837 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16840 * config/arm/arm.c (arm_valid_symbolic_address): Handle
16841 arm_word_relocations.
16843 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
16846 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
16847 extern array declarations.
16849 2018-03-27 Richard Biener <rguenther@suse.de>
16851 PR middle-end/84067
16852 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16853 explicit single_use checks.
16855 2018-03-27 Richard Biener <rguenther@suse.de>
16857 PR tree-optimization/85082
16858 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16861 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16863 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16864 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16865 Turn on fasynchronous-unwind-tables and funwind-tables.
16867 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
16870 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16871 (*bmi_blsr_<mode>_ccz): Ditto.
16873 2018-03-26 Tom de Vries <tom@codesourcery.com>
16875 PR tree-optimization/85063
16876 * omp-general.c (offloading_function_p): New function. Factor out
16878 * omp-offload.c (pass_omp_target_link::gate): ... here.
16879 * omp-general.h (offloading_function_p): Declare.
16880 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16881 with attribute omp declare target for offloading functions.
16883 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
16885 PR tree-optimization/84005
16886 * tree-data-ref.h (get_base_for_alignment): Declare.
16887 * tree-data-ref.c (get_base_for_alignment_1): New function.
16888 (get_base_for_alignment): Likewise.
16889 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16890 get_base_for_alignment to find a suitable base object, instead
16891 of always using drb->base_address.
16893 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16895 PR inline-asm/85022
16896 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16897 known size by default.
16899 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
16901 PR inline-asm/85030
16902 * lra-constraints.c (process_alt_operands): Don't match BLKmode
16903 and non BLKmode operands.
16905 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16908 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16909 Clean up attributes.
16911 2018-03-23 Richard Biener <rguenther@suse.de>
16914 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16915 we are going to emit early debug for LTO.
16917 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16919 PR inline-asm/85034
16920 * function.c (match_asm_constraints_1): Don't optimize if input
16921 doesn't satisfy general_operand predicate for output's mode.
16923 PR inline-asm/85022
16924 * alias.c (write_dependence_p): Don't require for x_canonicalized
16925 non-VOIDmode if x has VOIDmode.
16928 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16929 just don't try to optimize it rather than assert it never happens.
16931 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16933 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16934 macro expansions for definition of ST_INTERNAL_<mode> and
16935 LD_INTERNAL_<mode> builtins.
16936 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16938 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16940 (altivec_expand_st_builtin): Likewise.
16941 (altivec_expand_builtin): Remove calls to deleted functions.
16942 (rs6000_address_for_altivec): Delete this function.
16943 * config/rs6000/vector.md: Remove expands for
16944 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16946 2018-03-22 Sudakshina Das <sudi.das@arm.com>
16949 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16950 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16951 re-computing once computed.
16952 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16953 (arm_init_machine_status): Initialize
16954 machine->static_chain_stack_bytes.
16956 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16959 * doc/extend.texi: Add four new prototypes for vec_ld.
16960 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16961 definitions for more logical presentation.
16962 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16963 entries for V1TI variants of __builtin_altivec_ld builtin.
16964 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16965 handling of V1TI variant of LVX icode pattern.
16966 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16967 (rs6000_gimple_fold_builtin): Likewise.
16968 (altivec_init_builtins): Add code to define
16969 __builtin_altivec_lvx_v1ti function.
16971 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16973 PR inline-asm/84941
16974 * function.c (match_asm_constraints_1): Don't do the optimization
16975 if input isn't a REG, SUBREG, MEM or constant.
16977 2018-03-22 Tom de Vries <tom@codesourcery.com>
16979 PR tree-optimization/84956
16980 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16981 bb_has_abnormal_pred.
16983 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16986 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16987 DECL_INITIAL (decl) to decl at the end.
16988 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16989 adjust the comment.
16991 2018-03-21 Joseph Myers <joseph@codesourcery.com>
16993 * doc/extend.texi (__builtin_tgmath): Document when complex
16994 integer types are treated as _Complex _Float64.
16996 2018-03-21 Tom de Vries <tom@codesourcery.com>
16998 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
17000 2018-03-21 Jakub Jelinek <jakub@redhat.com>
17002 PR tree-optimization/84960
17003 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
17004 if it is ENTRY block, move them into single succ of ENTRY in that case.
17006 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
17008 PR tree-optimization/84811
17009 * poly-int.h (poly_span_traits): Remove the T3 parameter and
17010 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
17011 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
17012 (known_subrange_p): Update accordingly. Cast each value involved
17013 in the size comparison, rather than casting the result of the
17016 2018-03-21 Jakub Jelinek <jakub@redhat.com>
17018 PR tree-optimization/84982
17019 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
17020 by flipping the least significant bit rather than all bits from
17021 bitpos to bitpos + bitsize - 1.
17023 2018-03-21 Nathan Sidwell <nathan@acm.org>
17025 * doc/extend.texi (Deprecated Features): Remove mention of
17026 long-deleted deprecations.
17028 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17031 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
17032 * configure: Regenerate.
17034 2018-03-21 Tom de Vries <tom@codesourcery.com>
17036 PR tree-optimization/83126
17037 * tree-parloops.c (num_phis): New function.
17038 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
17040 2018-03-21 Nathan Sidwell <nathan@acm.org>
17042 * doc/extend.texi (Deprecated Features): Update deprecated flags,
17043 mention anon-struct/union members and trailing attributes.
17045 2018-03-21 Bin Cheng <bin.cheng@arm.com>
17047 PR tree-optimization/84969
17048 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
17049 builtin memset partitions if they set different rhs values.
17051 2018-03-21 Jakub Jelinek <jakub@redhat.com>
17053 PR rtl-optimization/84989
17054 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
17055 VEC_DUPLICATE with scalar result mode.
17057 2018-03-21 Martin Liska <mliska@suse.cz>
17060 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
17061 not intended return statement.
17063 2018-03-21 Martin Liska <mliska@suse.cz>
17066 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
17067 (chkp_find_bound_slots_1): Limit number of iterations.
17069 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
17072 * Minor grammar fixes for x86 options.
17074 2018-03-20 Jakub Jelinek <jakub@redhat.com>
17077 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
17078 holding REG_CFA_RESTORE notes, instead turn them into a USE.
17080 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
17083 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
17084 (altivec_lvx_<mode>_1op): Likewise.
17085 (altivec_stvx_<mode>_2op): Likewise.
17086 (altivec_stvx_<mode>_1op): Likewise.
17087 (altivec_lvx_<VM2:mode>): New define_expand.
17088 (altivec_stvx_<VM2:mode>): Likewise.
17089 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
17090 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
17091 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
17092 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
17093 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
17094 (rs6000_gen_lvx): Likewise.
17095 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
17096 (altivec_expand_stv_builtin): Likewise.
17097 (altivec_expand_builtin): Likewise.
17098 * config/rs6000/vector.md: Likewise.
17100 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17103 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
17106 2018-03-20 Richard Biener <rguenther@suse.de>
17109 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
17110 sign-conversions as zero, fall back to standard scalar_stmt
17113 2018-03-20 Martin Liska <mliska@suse.cz>
17116 * predict.c (rebuild_frequencies): Handle case when we have
17117 PROFILE_ABSENT, but flag_guess_branch_prob is false.
17119 2018-03-20 Jakub Jelinek <jakub@redhat.com>
17122 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
17123 flag_section_anchors.
17124 * varasm.c (use_blocks_for_decl_p): Remove hack for
17125 dw2_force_const_mem.
17128 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
17130 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
17131 be created, use lowpart_subreg of operands[0] rather than operands[0]
17133 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
17134 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
17135 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
17136 and n constraint instead of aarch64_shift_imm_di and Usd.
17137 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
17138 (*aarch64_<optab>_reg_minus<mode>3): ... this.
17140 2018-03-20 Sudakshina Das <sudi.das@arm.com>
17143 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
17144 to favor GPR over NEON registers.
17145 (<shift>di3_neon): Likewise.
17147 2018-03-20 Tom de Vries <tom@codesourcery.com>
17150 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
17151 (nvptx_process_pars): Emit bar.sync asap and alap.
17153 2018-03-20 Tom de Vries <tom@codesourcery.com>
17156 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
17157 seen_label if seen_label is already set.
17159 2018-03-20 Jakub Jelinek <jakub@redhat.com>
17162 * config/i386/i386.c (fold_builtin_cpu): For features above 31
17163 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
17164 Use 1U instead of 1. Formatting fixes.
17167 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
17168 instead of TREE_TYPE (s1) for the return value.
17170 2018-03-19 Jakub Jelinek <jakub@redhat.com>
17172 PR tree-optimization/84946
17173 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
17174 bitsize + bitsize in poly_uint64 rather than poly_int64.
17177 * dwarf2asm.c: Include fold-const.c.
17178 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
17179 of decl rather than decl itself.
17181 PR rtl-optimization/84643
17182 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
17184 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
17187 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
17188 calling assemble_variable.
17190 2018-03-19 Sudakshina Das <sudi.das@arm.com>
17193 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
17194 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
17196 2018-03-19 Jim Wilson <jimw@sifive.com>
17199 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
17200 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
17201 (riscv_first_stack_step): Likewise.
17202 (riscv_option_override): Use STACK_BOUNDARY instead of
17203 MIN_STACK_BOUNDARY.
17204 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
17205 MIN_STACK_BOUNDARY.
17206 (BIGGEST_ALIGNMENT): Set to 128.
17207 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
17208 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
17211 2018-03-19 Richard Biener <rguenther@suse.de>
17213 PR tree-optimization/84933
17214 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
17215 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
17217 2018-03-19 Richard Biener <rguenther@suse.de>
17219 PR tree-optimization/84859
17220 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
17221 (cond_if_else_store_replacement): Perform sinking operation on
17222 single-store BBs regardless of MAX_STORES_TO_SINK setting.
17223 Generalize what a BB with a single eligible store is.
17225 2018-03-19 Richard Biener <rguenther@suse.de>
17227 PR tree-optimization/84929
17228 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
17229 chrec_is_positive against non-chrec arg.
17231 2018-03-19 Tamar Christina <tamar.christina@arm.com>
17234 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
17236 2018-03-18 Martin Liska <mliska@suse.cz>
17238 PR rtl-optimization/84635
17239 * regrename.c (build_def_use): Use matches_mode only when
17242 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
17244 PR tree-optimization/84913
17245 * tree-vect-loop.c (vectorizable_reduction): Don't try to
17246 vectorize chains of COND_EXPRs.
17248 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17250 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
17252 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17254 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
17256 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17258 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
17260 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
17261 Kito Cheng <kito.cheng@gmail.com>
17263 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
17264 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
17265 (nds32_adjust_reg_alloc_order): New function.
17266 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
17268 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
17270 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
17271 nds32_print_operand, nds32_print_operand_address): Use
17272 HOST_WIDE_INT_PRINT_DEC instead.
17274 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
17276 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
17278 2018-03-17 Jakub Jelinek <jakub@redhat.com>
17281 * config/i386/i386.c (initial_ix86_tune_features,
17282 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
17283 unsigned long long.
17284 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
17285 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
17286 rather than 1u << ix86_tune. Formatting fix.
17287 (ix86_option_override_internal): Change ix86_arch_mask from
17288 unsigned int to unsigned HOST_WIDE_INT, initialize to
17289 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
17290 (ix86_function_specific_restore): Likewise.
17292 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17295 * postreload.c (reload_combine_recognize_pattern): Perform
17296 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
17297 truncate_int_for_mode the result for the destination's mode.
17300 * hsa-gen.c (mem_type_for_type): Fix comment typo.
17301 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
17303 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17306 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
17309 * lra-assigns.c (lra_split_hard_reg_for): Don't use
17310 regno_allocno_class_array and sorted_pseudos.
17311 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
17312 insns where regno is used.
17314 2018-03-16 Martin Liska <mliska@suse.cz>
17317 * multiple_target.c (create_dispatcher_calls): Redirect
17318 reference in the symbol table.
17320 2018-03-16 Martin Liska <mliska@suse.cz>
17323 * multiple_target.c (create_dispatcher_calls): Redirect also
17326 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17330 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
17331 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
17332 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
17334 2018-03-16 Julia Koval <julia.koval@intel.com>
17336 * doc/invoke.texi (Skylake Server): Add CLWB.
17337 Cannonlake): Remove CLWB.
17339 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17341 PR tree-optimization/84841
17342 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
17344 (FLOAT_ONE_CONST_TYPE): Define.
17345 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
17346 (sort_by_operand_rank): Put entries with higher constant_type last
17347 rather than first to match comments.
17349 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
17351 * config/nios2/nios2.md (movsi_internal): Fix thinko in
17354 2018-03-15 Jakub Jelinek <jakub@redhat.com>
17357 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
17358 check and use address of target always.
17360 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
17363 * config/i386/i386.c (indirect_thunk_needed): Update comments.
17364 (indirect_thunk_bnd_needed): Likewise.
17365 (indirect_thunks_used): Likewise.
17366 (indirect_thunks_bnd_used): Likewise.
17367 (indirect_return_needed): New.
17368 (indirect_return_bnd_needed): Likewise.
17369 (output_indirect_thunk_function): Add a bool argument for
17371 (output_indirect_thunk_function): Don't generate alias for
17372 function return thunk.
17373 (ix86_code_end): Call output_indirect_thunk_function to generate
17374 function return thunks.
17375 (ix86_output_function_return): Set indirect_return_bnd_needed
17376 and indirect_return_needed instead of indirect_thunk_bnd_needed
17377 and indirect_thunk_needed.
17379 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
17381 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
17382 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
17383 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
17385 2018-03-15 David Malcolm <dmalcolm@redhat.com>
17386 Paul Hua <paul.hua.gm@gmail.com>
17389 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
17391 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
17393 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
17394 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
17395 resp. SFmode cases.
17397 2018-03-15 Tamar Christina <tamar.christina@arm.com>
17400 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
17401 instead of GET_MODE_SIZE when comparing Units.
17403 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
17406 * varasm.c (hash_section): Return an unchangeble hash value
17407 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
17408 Return !aarch64_can_use_per_function_literal_pools_p ().
17410 2018-03-15 Jakub Jelinek <jakub@redhat.com>
17413 * optabs.c (emit_conditional_move): Pass address of cmode's copy
17414 rather than address of cmode as last argument to prepare_cmp_insn.
17416 2018-03-15 Julia Koval <julia.koval@intel.com>
17418 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
17419 F_AVX512VNNI, F_AVX512BITALG): New.
17421 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
17424 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
17425 insn for floating-point loads and stores.
17427 2018-03-14 Carl Love <cel@us.ibm.com>
17429 * config/rs6000/rs6000-c.c: Add macro definitions for
17430 ALTIVEC_BUILTIN_VEC_PERMXOR.
17431 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
17432 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
17433 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
17434 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
17436 * config/doc/extend.texi: Add prototypes for vec_permxor.
17438 2018-03-14 David Malcolm <dmalcolm@redhat.com>
17441 * diagnostic-show-locus.c (class layout_point): Convert m_line
17442 from int to linenum_type.
17443 (line_span::comparator): Use linenum "compare" function when
17444 comparing line numbers.
17445 (test_line_span): New function.
17446 (layout_range::contains_point): Convert param "row" from int to
17448 (layout_range::intersects_line_p): Likewise.
17449 (layout::will_show_line_p): Likewise.
17450 (layout::print_source_line): Likewise.
17451 (layout::should_print_annotation_line_p): Likewise.
17452 (layout::print_annotation_line): Likewise.
17453 (layout::print_leading_fixits): Likewise.
17454 (layout::annotation_line_showed_range_p): Likewise.
17455 (struct line_corrections): Likewise for field m_row.
17456 (line_corrections::line_corrections): Likewise for param "row".
17457 (layout::print_trailing_fixits): Likewise.
17458 (layout::get_state_at_point): Likewise.
17459 (layout::get_x_bound_for_row): Likewise.
17460 (layout::print_line): Likewise.
17461 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
17462 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
17463 * input.c (selftest::test_linenum_comparisons): New function.
17464 (selftest::input_c_tests): Call it.
17465 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
17466 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
17467 * selftest.h (ASSERT_GT): New macro.
17468 (ASSERT_GT_AT): New macro.
17469 (ASSERT_LT): New macro.
17470 (ASSERT_LT_AT): New macro.
17472 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
17474 PR rtl-optimization/84780
17475 * combine.c (distribute_links): Don't make a link based on pc_rtx.
17477 2018-03-14 Martin Liska <mliska@suse.cz>
17479 * tree.c (record_node_allocation_statistics): Use
17480 get_stats_node_kind.
17481 (get_stats_node_kind): New function extracted from
17482 record_node_allocation_statistics.
17483 (free_node): Use get_stats_node_kind.
17485 2018-03-14 Richard Biener <rguenther@suse.de>
17487 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
17488 that the value-set of ANTIC_IN doesn't grow.
17491 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17493 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17494 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17496 2018-03-14 Julia Koval <julia.koval@intel.com>
17498 * config.gcc (icelake-client, icelake-server): New.
17500 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
17501 (initial_ix86_arch_features): Ditto.
17502 (PTA_SKYLAKE): Add SGX.
17503 (PTA_ICELAKE): Remove.
17504 (PTA_ICELAKE_CLIENT): New.
17505 (PTA_ICELAKE_SERVER): New.
17506 (ix86_option_override_internal): Split up icelake on icelake client and
17508 (get_builtin_code_for_version): Ditto.
17509 (fold_builtin_cpu): Ditto.
17510 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
17511 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
17512 * config/i386/i386.h (processor_type): Ditto.
17513 * doc/invoke.texi: Ditto.
17515 2018-03-14 Jakub Jelinek <jakub@redhat.com>
17518 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
17519 INTEGER_CST offset, add it together with bitpos / 8 and
17520 sign extend based on POINTER_SIZE.
17524 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
17527 * config/i386/constraints.md (Yc): New register constraint.
17528 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
17529 Use Yc constraint for alternative 2 of operand 0. Remove
17530 preferred_for_speed attribute.
17532 2018-03-14 Richard Biener <rguenther@suse.de>
17534 PR tree-optimization/84830
17535 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
17536 with the old one to avoid oscillations.
17538 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
17541 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
17543 (assign_by_spills): Return a flag of reload assignment failure.
17544 Do not process the reload assignment failures. Do not spill other
17545 reload pseudos if they has the same reg class. Update n if
17547 (lra_assign): Add a return arg. Set up from the result of
17548 assign_by_spills call.
17549 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17550 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17551 usage_insns if it is not NULL.
17552 (spill_hard_reg_in_range): New function.
17553 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17554 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17555 function prototypes.
17556 (lra_assign): Change prototype.
17557 * lra.c (lra): Add code to deal with fails by splitting hard reg
17560 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
17562 * config/riscv/riscv.opt (mrelax): New option.
17563 * config/riscv/riscv.c (riscv_file_start): Emit ".option
17564 "norelax" when riscv_mrelax is disabled.
17565 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
17567 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17570 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
17571 reassociation for int modes.
17573 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17575 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
17576 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
17578 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
17579 * config/aarch64/aarch64-sve.md
17580 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
17581 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
17582 (*extend<mode><Vwide>2): Rename to...
17583 (aarch64_sve_extend<mode><Vwide>2): ...this.
17584 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
17585 renaming the old pattern to...
17586 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
17588 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
17589 define_expand, renaming the old pattern to...
17590 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
17591 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
17592 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
17593 account when deciding which SVE instruction the optab should use.
17594 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
17596 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17598 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
17599 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
17600 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
17601 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
17602 (tlsdesc_small_<mode>): Turn a define_expand and use
17603 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
17604 (tlsdesc_small_advsimd_<mode>): ...this.
17605 (tlsdesc_small_sve_<mode>): New pattern.
17607 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17609 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
17610 (UNSPEC_UMUL_HIGHPART): New constants.
17611 (MUL_HIGHPART): New int iteraor.
17612 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
17613 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
17615 (*<su>mul<mode>3_highpart): New define_insn.
17617 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
17620 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17623 2018-03-13 Martin Liska <mliska@suse.cz>
17626 * (sem_item_optimizer::sem_item_optimizer): Initialize new
17628 (sem_item_optimizer::~sem_item_optimizer): Release it.
17629 (sem_item_optimizer::merge_classes): Register variable aliases.
17630 (sem_item_optimizer::fixup_pt_set): New function.
17631 (sem_item_optimizer::fixup_points_to_sets): Likewise.
17632 * ipa-icf.h: Declare new variables and functions.
17634 2018-03-13 Jakub Jelinek <jakub@redhat.com>
17636 PR middle-end/84834
17637 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
17638 integer_pow2p@2 and test integer_pow2p in condition.
17639 (A < 0 ? C : 0): Similarly for @1.
17641 PR middle-end/84831
17642 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
17643 characters starting at p contain '\0' character, don't look beyond
17647 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
17648 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
17651 * reg-stack.c (change_stack): Change update_end var from int to
17652 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
17653 also call set_block_for_insn on the newly added insns and rescan.
17656 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
17657 on the last operand.
17660 * tree.c (stabilize_reference_1): Return save_expr (e) for
17661 STATEMENT_LIST even if it doesn't have side-effects.
17663 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
17665 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
17667 2018-03-12 Renlin Li <renlin.li@arm.com>
17669 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
17670 aarch64_output_scalar_simd_mov_immediate.
17672 2018-03-12 Martin Sebor <msebor@redhat.com>
17674 PR tree-optimization/83456
17675 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
17676 for perfectly overlapping calls to memcpy.
17677 (gimple_fold_builtin_memory_chk): Same.
17678 (gimple_fold_builtin_strcpy): Handle no-warning.
17679 (gimple_fold_builtin_stxcpy_chk): Same.
17680 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
17682 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17684 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
17685 parameter. Use it for SFmode.
17686 (rs6000_function_arg_advance_1): Adjust.
17687 (rs6000_function_arg): Adjust.
17688 (rs6000_gimplify_va_arg): Pass false for that new parameter.
17690 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17692 PR rtl-optimization/84169
17693 PR rtl-optimization/84780
17694 * combine.c (can_combine_p): Check for a 2-insn combination whether
17695 the destination register is used between the two insns, too.
17697 2018-03-12 Richard Biener <rguenther@suse.de>
17699 PR tree-optimization/84803
17700 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
17701 for refs DR analysis didn't process.
17703 2018-03-12 Richard Biener <rguenther@suse.de>
17705 PR tree-optimization/84777
17706 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
17707 force-vectorize loops ignore whether we are optimizing for size.
17709 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
17711 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
17712 (TARGET_MD_ASM_ADJUST): Define.
17714 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
17715 Kito Cheng <kito.cheng@gmail.com>
17716 Chung-Ju Wu <jasonwucj@gmail.com>
17718 * config/nds32/nds32.c (nds32_compute_stack_frame,
17719 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
17720 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
17721 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
17722 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
17723 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
17724 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
17725 * config/nds32/nds32.md (prologue, epilogue): Use macro
17726 NDS32_V3PUSH_AVAILABLE_P to do checking.
17728 2018-03-11 Jakub Jelinek <jakub@redhat.com>
17731 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
17732 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
17733 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
17734 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
17735 addition of most attributes on !orig_type_die or the attribute not
17736 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
17738 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17739 Chung-Ju Wu <jasonwucj@gmail.com>
17741 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
17742 __NDS32_VH__ macro.
17743 * config/nds32/nds32.opt (mvh): New option.
17745 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17746 Chung-Ju Wu <jasonwucj@gmail.com>
17748 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
17750 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
17751 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
17754 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17755 Chung-Ju Wu <jasonwucj@gmail.com>
17757 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
17759 * config/nds32/nds32-multiple.md (strlensi): New pattern.
17760 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
17762 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
17763 Kito Cheng <kito.cheng@gmail.com>
17764 Chung-Ju Wu <jasonwucj@gmail.com>
17766 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
17767 UNSPEC_FFMISM and UNSPEC_FLMISM.
17768 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
17769 for ffb, ffmism and flmism.
17770 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
17771 (unspec_ffmism): Ditto.
17772 (unspec_flmism): Ditto.
17773 (nds32_expand_builtin_impl): Check if string extension is available.
17774 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
17775 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
17777 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
17780 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17783 * lra-assigns.c (assign_by_spills): Return a flag of reload
17784 assignment failure. Do not process the reload assignment
17785 failures. Do not spill other reload pseudos if they has the same
17787 (lra_assign): Add a return arg. Set up from the result of
17788 assign_by_spills call.
17789 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17790 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17791 usage_insns if it is not NULL.
17792 (spill_hard_reg_in_range): New function.
17793 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17794 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17795 function prototypes.
17796 (lra_assign): Change prototype.
17797 * lra.c (lra): Add code to deal with fails by splitting hard reg
17800 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
17803 * config/i386/i386.opt: Replace Enforcment with Enforcement.
17805 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
17808 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
17809 (dw_val_node): Add val_symbolic_view.
17810 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
17811 (symview_upper_bound): New.
17812 (new_line_info_table): Initialize symviews_since_reset.
17813 (dwarf2out_source_line): Count symviews_since_reset and set
17814 symview_upper_bound.
17815 (dw_val_equal_p): Handle symview.
17816 (add_AT_symview): New.
17817 (print_dw_val): Handle symview.
17818 (attr_checksum, attr_checksum_ordered): Likewise.
17819 (same_dw_val_p, size_of_die): Likewise.
17820 (value_format, output_die): Likewise.
17821 (add_high_low_attributes): Use add_AT_symview for entry_view.
17822 (dwarf2out_finish): Reset symview_upper_bound, clear
17825 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
17828 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
17829 Add strict argument and use it.
17830 (rs6000_split_multireg_move): Update for new strict argument.
17831 (mem_operand_gpr): Disallow all non-offsettable addresses.
17832 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
17834 2018-03-09 Jakub Jelinek <jakub@redhat.com>
17837 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
17838 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
17839 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
17842 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
17843 decl, use remap_type if we want to use the type.
17845 2018-03-09 Martin Sebor <msebor@redhat.com>
17847 PR tree-optimization/84526
17848 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17850 (builtin_access::generic_overlap): Be prepared to handle non-array
17853 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
17855 PR rtl-optimization/84682
17856 * lra-constraints.c (process_address_1): Check is_address flag
17857 for address constraints.
17858 (process_alt_operands): Likewise.
17859 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17860 preprocess_constraints.
17861 * recog.h (preprocess_constraints): Add oploc parameter.
17863 * recog.c (preprocess_constraints): Test address_operand for
17864 CT_ADDRESS constraints.
17866 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17869 * lra-assigns.c (assign_by_spills): Return a flag of reload
17870 assignment failure. Do not process the reload assignment
17871 failures. Do not spill other reload pseudos if they has the same
17873 (lra_assign): Add a return arg. Set up from the result of
17874 assign_by_spills call.
17875 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17876 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17877 usage_insns if it is not NULL.
17878 (spill_hard_reg_in_range): New function.
17879 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17880 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17881 function prototypes.
17882 (lra_assign): Change prototype.
17883 * lra.c (lra): Add code to deal with fails by splitting hard reg
17886 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17889 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17890 Accept complain bool parameter. Only emit errors if it is true.
17891 (arm_parse_cpu_option_name): Likewise.
17892 (arm_target_thumb_only): Adjust callers of the above.
17893 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17894 prototype to take a default true bool parameter.
17895 (arm_parse_arch_option_name): Likewise.
17897 2018-03-09 David Malcolm <dmalcolm@redhat.com>
17898 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
17902 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17903 * configure: Regenerate.
17904 * configure.ac ("linker --version-script option"): New.
17905 ("linker soname option"): New.
17907 2018-03-09 Richard Biener <rguenther@suse.de>
17909 PR tree-optimization/84775
17910 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17911 immediate uses of predicate stmts and mark them modified.
17914 PR tree-optimization/84178
17915 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17917 (version_loop_for_if_conversion): Delay update_ssa call.
17918 (tree_if_conversion): Delay update_ssa until after predicate
17921 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
17924 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17925 when the function accesses prior frames.
17927 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17930 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17931 gen_llsym, otherwise call maybe_gen_llsym.
17933 PR inline-asm/84742
17934 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17935 has ',' character inside of it.
17937 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17940 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17941 as clobbering CC_REGNUM.
17943 2018-03-08 Richard Biener <rguenther@suse.de>
17945 PR middle-end/84552
17946 * tree-scalar-evolution.c: Include tree-into-ssa.h.
17947 (follow_copies_to_constant): Do not follow SSA names registered
17950 2018-03-08 Richard Biener <rguenther@suse.de>
17952 PR tree-optimization/84178
17953 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17955 (version_loop_for_if_conversion): Delay update_ssa call.
17956 (tree_if_conversion): Delay update_ssa until after predicate
17959 2018-03-08 David Malcolm <dmalcolm@redhat.com>
17961 PR tree-optimization/84178
17962 * tree-if-conv.c (release_bb_predicate): Remove the
17963 the assertion that the stmts have NULL use_ops.
17964 Discard the statements, asserting that they haven't
17965 yet been added to a BB.
17967 2018-03-08 Richard Biener <rguenther@suse.de>
17969 PR tree-optimization/84746
17970 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17971 (phi_translate): Pass in destination ANTIC_OUT set.
17972 (phi_translate_1): Likewise. For a simplified result lookup
17973 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17974 (phi_translate_set): Adjust.
17975 (do_pre_regular_insertion): Likewise.
17976 (do_pre_partial_partial_insertion): Likewise.
17978 2018-03-08 Martin Liska <mliska@suse.cz>
17980 PR gcov-profile/84735
17981 * doc/gcov.texi: Document usage of profile files.
17982 * gcov-io.h: Document changes in the format.
17984 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
17988 * dwarf2out.c (struct dw_line_info_table): Update comments for
17990 (FORCE_RESET_NEXT_VIEW): New.
17991 (FORCE_RESETTING_VIEW_P): New.
17992 (RESETTING_VIEW_P): Check for -1 too.
17993 (ZERO_VIEW_P): Likewise.
17994 (new_line_info_table): Force-reset next view.
17995 (dwarf2out_begin_function): Likewise.
17996 (dwarf2out_source_line): Simplify zero_view_p initialization.
17997 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17998 view directly. Omit view when omitting .loc at line 0.
18000 2018-03-08 Jakub Jelinek <jakub@redhat.com>
18002 PR tree-optimization/84740
18003 * tree-switch-conversion.c (process_switch): Call build_constructors
18004 only if info.phi_count is non-zero.
18006 PR tree-optimization/84739
18007 * tree-tailcall.c (find_tail_calls): Check call arguments against
18008 DECL_ARGUMENTS (current_function_decl) rather than
18009 DECL_ARGUMENTS (func) when checking for tail recursion.
18011 2018-03-07 Jakub Jelinek <jakub@redhat.com>
18013 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
18014 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
18015 Volker Reichelt's entry and add entries for people that perform
18016 GCC fuzzy testing and report numerous bugs.
18018 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
18021 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
18022 readonly data in sdata, if that is disabled.
18023 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
18024 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
18025 -mreadonly-in-sdata option.
18027 2018-03-07 Martin Sebor <msebor@redhat.com>
18029 PR tree-optimization/84468
18030 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
18031 basic block when looking for nul assignment.
18033 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
18036 * except.h (output_function_exception_table): Adjust prototype.
18037 * except.c (output_function_exception_table): Remove FNNAME parameter
18038 and add SECTION parameter. Ouput one part of the table at a time.
18039 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
18040 the first part of the exception table and emit unwind directives.
18041 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
18042 (i386_pe_seh_cold_init): Likewise.
18043 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
18044 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
18045 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
18046 (ix86_output_call_insn): Emit a nop in one more case for SEH.
18047 * config/i386/winnt.c: Include except.h.
18048 (struct seh_frame_state): Add reg_offset, after_prologue and
18049 in_cold_section fields.
18050 (i386_pe_seh_end_prologue): Set seh->after_prologue.
18051 (i386_pe_seh_cold_init): New function.
18052 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
18053 to seh->in_cold_section.
18054 (seh_emit_push): Record the offset of the push.
18055 (seh_emit_save): Record the offet of the save.
18056 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
18057 Test seh->after_prologue to disregard the epilogue.
18058 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
18059 (i386_pe_end_cold_function): New function.
18061 2018-03-07 Jakub Jelinek <jakub@redhat.com>
18064 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
18065 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
18068 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
18070 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
18071 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
18073 PR middle-end/84723
18074 * multiple_target.c: Include tree-inline.h and intl.h.
18075 (expand_target_clones): Diagnose and fail if node->definition and
18076 !tree_versionable_function_p (node->decl).
18078 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
18080 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
18082 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
18083 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
18084 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
18086 2018-03-06 Jakub Jelinek <jakub@redhat.com>
18089 * combine.c (try_combine): Use reg_or_subregno instead of handling
18090 just paradoxical SUBREGs and REGs.
18092 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
18094 * config/arc/arc.c (arc_finalize_pic): Remove function.
18095 (arc_must_save_register): We use single base PIC register, remove
18096 checks to save/restore the PIC register.
18097 (arc_expand_prologue): Likewise.
18098 * config/arc/arc-protos.h (arc_set_default_type_attributes):
18100 (arc_verify_short): Likewise.
18101 (arc_attr_type): Likewise.
18102 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
18103 (walk_stores): Likewise.
18104 (arc_address_cost): Make it static.
18105 (arc_verify_short): Likewise.
18106 (branch_dest): Likewise.
18107 (arc_attr_type): Likewise.
18108 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
18109 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
18110 (arc_final_prescan_insn): Remove inserting the nops due to
18111 hardware hazards. It is done in reorg step.
18112 (insn_length_variant_t): Remove.
18113 (insn_length_parameters_t): Likewise.
18114 (arc_insn_length_parameters): Likewise.
18115 (arc_get_insn_variants): Likewise.
18116 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
18118 2018-03-06 Jakub Jelinek <jakub@redhat.com>
18120 PR inline-asm/84683
18121 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
18124 PR tree-optimization/84687
18125 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
18127 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
18129 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18131 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
18132 Rename to ppc_speculation_barrier.
18133 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
18134 __builtin_ppc_speculation_barrier.
18136 2018-03-05 Jakub Jelinek <jakub@redhat.com>
18139 * combine.c (combine_simplify_rtx): Don't try to simplify if
18140 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
18143 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
18145 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
18146 to 32 bytes when compiling for POWER9.
18148 2018-03-05 Jakub Jelinek <jakub@redhat.com>
18151 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
18152 regparm >= 3 with no arg reg available also for calls with
18153 flag_force_indirect_call. Pass decl to ix86_function_regparm.
18156 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
18158 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
18160 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
18163 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
18165 2018-03-05 Richard Biener <rguenther@suse.de>
18167 PR tree-optimization/84486
18168 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
18169 When inserting a __builtin_assume_aligned call set the LHS
18170 SSA name alignment info accordingly.
18172 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
18174 PR tree-optimization/84114
18175 * config/aarch64/aarch64.c (aarch64_reassociation_width)
18176 Avoid reassociation of FLOAT_MODE addition.
18178 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
18180 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
18181 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
18182 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
18183 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
18184 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
18185 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
18186 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
18188 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
18189 __builtin_ia32_wbinvd): New builtins.
18190 (SPECIAL_ARGS2): New.
18191 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
18192 (SPECIAL_ARGS2): New.
18193 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
18194 (ix86_valid_target_attribute_inner_p): Ditto.
18195 (ix86_init_mmx_sse_builtins): Add special_args2.
18196 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
18197 TARGET_WBNOINVD_P): New.
18198 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
18199 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
18200 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
18201 * config/i386/immintrin.h (_wbinvd): New intrinsic.
18202 * config/i386/pconfigintrin.h: New file.
18203 * config/i386/wbnoinvdintrin.h: Ditto.
18204 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
18206 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
18208 2018-03-05 Richard Biener <rguenther@suse.de>
18210 PR tree-optimization/84670
18211 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
18213 (BB_VISITED_WITH_VISITED_SUCCS): New define.
18214 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
18215 (compute_antic_aux): Only assert the number of values in ANTIC_IN
18216 doesn't grow if all successors (recursively) were visited at least
18219 2018-03-05 Richard Biener <rguenther@suse.de>
18221 PR tree-optimization/84650
18222 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
18223 if executed in the loop pipeline.
18225 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
18227 * doc/configfiles.texi (Configuration Files): Move info about
18228 conditionalizing $target-protos.h to...
18229 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
18230 differs from $target-protos.h.
18232 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
18233 Chung-Ju Wu <jasonwucj@gmail.com>
18235 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
18236 * config/nds32/nds32-multiple.md (setmemsi): Define.
18237 * config/nds32/nds32-memory-manipulation.c
18238 (nds32_gen_dup_4_byte_to_word_value): New.
18239 (emit_setmem_word_loop): New.
18240 (emit_setmem_byte_loop): New.
18241 (nds32_expand_setmem_loop): New.
18242 (nds32_expand_setmem_loop_v3m): New.
18243 (nds32_expand_setmem_unroll): New.
18244 (nds32_expand_setmem): New.
18246 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18247 Chung-Ju Wu <jasonwucj@gmail.com>
18249 * config/nds32/nds32-memory-manipulation.c
18250 (nds32_emit_load_store): New.
18251 (nds32_emit_post_inc_load_store): New.
18252 (nds32_emit_mem_move): New.
18253 (nds32_emit_mem_move_block): New.
18254 (nds32_expand_movmemsi_loop_unknown_size): New.
18255 (nds32_expand_movmemsi_loop_known_size): New.
18256 (nds32_expand_movmemsi_loop): New.
18257 (nds32_expand_movmemsi_unroll): New.
18258 (nds32_expand_movmemqi): Rename ...
18259 (nds32_expand_movmemsi): ... to this.
18260 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
18261 (movmemsi): ... to this.
18262 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
18263 (nds32_expand_movmemsi): ... to this.
18265 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18266 Monk Chiang <sh.chiang04@gmail.com>
18267 Chung-Ju Wu <jasonwucj@gmail.com>
18269 * config/nds32/nds32-protos.h
18270 (nds32_expand_load_multiple): New arguments.
18271 (nds32_expand_store_multiple): Ditto.
18272 (nds32_valid_multiple_load_store): Rename ...
18273 (nds32_valid_multiple_load_store_p): ... to this.
18274 * config/nds32/nds32-memory-manipulation.c
18275 (nds32_expand_load_multiple): Refine implementation.
18276 (nds32_expand_store_multiple): Ditto.
18277 * config/nds32/nds32-multiple.md
18278 (load_multiple): Update nds32_expand_load_multiple interface.
18279 (store_multiple): Update nds32_expand_store_multiple interface.
18280 * config/nds32/nds32-predicates.c
18281 (nds32_valid_multiple_load_store): Rename ...
18282 (nds32_valid_multiple_load_store_p): ... to this and refine
18284 * config/nds32/predicates.md
18285 (nds32_load_multiple_and_update_address_operation): New predicate.
18286 (nds32_store_multiple_and_update_address_operation): New predicate.
18288 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18289 Chung-Ju Wu <jasonwucj@gmail.com>
18291 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
18292 (combo): New attribute.
18293 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
18295 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
18297 * config/nds32/nds32.opt: Change -mcmodel= default value.
18299 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
18300 Monk Chiang <sh.chiang04@gmail.com>
18301 Chung-Ju Wu <jasonwucj@gmail.com>
18303 * config/nds32/constants.md (unspec_element): New enum.
18304 * config/nds32/constraints.md (Umw): New constraint.
18305 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
18306 * config/nds32/nds32-intrinsic.md: Likewise.
18307 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
18308 (nds32_valid_smw_lwm_base_p): New.
18309 (nds32_output_smw_single_word): New.
18310 (nds32_output_lmw_single_word): New.
18311 (nds32_expand_unaligned_load): New.
18312 (nds32_expand_unaligned_store): New.
18313 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
18314 (nds32_output_smw_single_word): Declare.
18315 (nds32_output_lmw_single_word): Declare.
18316 (nds32_expand_unaligned_load): Declare.
18317 (nds32_expand_unaligned_store): Declare.
18318 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
18319 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
18320 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
18321 NDS32_BUILTIN_UASTORE_DW.
18322 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
18325 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
18326 Kito Cheng <kito.cheng@gmail.com>
18327 Chung-Ju Wu <jasonwucj@gmail.com>
18329 * config/nds32/nds32-intrinsic.c
18330 (nds32_expand_builtin_null_ftype_reg): Delete.
18331 (nds32_expand_builtin_reg_ftype_imm): Ditto.
18332 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
18333 (nds32_read_argument): New.
18334 (nds32_legitimize_target): Ditto.
18335 (nds32_legitimize_argument): Ditto.
18336 (nds32_check_constant_argument): Ditto.
18337 (nds32_expand_unop_builtin): Ditto.
18338 (nds32_expand_unopimm_builtin): Ditto.
18339 (nds32_expand_binop_builtin): Ditto.
18340 (nds32_builtin_decl_impl): Ditto.
18341 (builtin_description): Ditto.
18342 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
18343 (nds32_init_builtins_impl): Ditto.
18344 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
18345 (nds32_builtin_decl): New.
18346 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
18347 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
18349 2018-03-02 Jeff Law <law@redhat.com>
18351 * reorg.c (stop_search_p): Handle DEBUG_INSN.
18352 (redundant_insn, fill_simple_delay_slots): Likewise.
18353 (fill_slots_from_thread): Likewise.
18354 * resource.c (mark_referenced_resources): Likewise.
18355 (mark_set_resources, find_dead_or_set_registers): Likewise.
18357 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18359 * substring-locations.h (format_warning_va): Formatting fix for
18360 ATTRIBUTE_GCC_DIAG.
18361 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
18363 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
18364 * substring-locations.c: Include intl.h.
18365 (format_warning_va): Turned into small wrapper around
18366 format_warning_n_va, renamed to ...
18367 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
18368 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
18370 (format_warning_at_substring_n): New function.
18371 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
18372 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
18373 format_warning_at_substring with just a shorter name instead of
18374 const function pointer.
18375 (fmtwarn_n): New function.
18376 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
18377 appropriate, get rid of all the fmtstr temporaries, move conditionals
18378 with G_() wrapped string literals directly into fmtwarn arguments,
18379 cast dir.len to (int), formatting fixes.
18381 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
18383 * doc/invoke.texi: Remove "Cilk Plus" references.
18385 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18386 Richard Biener <rguenther@suse.de>
18389 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
18390 for error or warning attributes if CALL_FROM_THUNK_P is set.
18393 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18396 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
18397 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
18400 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
18401 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
18403 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
18404 instead of -1U in last predictors element's probability member.
18406 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
18409 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18410 arguments if they are comparable.
18412 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
18414 PR tree-optimization/84634
18415 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
18416 masks and masked_loop_p with a single loop_masks, making sure it's
18417 null for bb vectorization.
18419 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
18421 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
18422 (vect_analyze_data_ref_access): Use loop->safe_len rather than
18423 loop->force_vectorize to check whether there is no alias.
18425 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18428 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
18430 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
18432 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
18433 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
18434 instead of a loop around prev_real_insn.
18435 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
18438 PR inline-asm/84625
18439 * config/i386/i386.c (ix86_print_operand): Use conditional
18440 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
18443 2018-03-02 Richard Biener <rguenther@suse.de>
18445 PR tree-optimization/84427
18446 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
18447 (bitmap_set_subtract_values): Rewrite to handle multiple
18450 (prune_clobbered_mems): Likewise.
18451 (phi_translate): Take edge instead of pred/phiblock.
18452 (phi_translate_1): Likewise.
18453 (phi_translate_set): Likewise. Insert all translated
18454 exprs for a value into the set, keeping possibly multiple
18455 expressions per value.
18456 (compute_antic_aux): Adjust for phi_translate changes.
18457 When intersecting union the expressions and prune those
18458 not in the final value set, keeping possibly multiple
18459 expressions per value. Do not use value-insertion
18460 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
18461 all expressions. Add verification that the value-sets
18462 only shrink during iteration.
18463 (compute_partial_antic_aux): Adjust for the phi_translate changes.
18464 (do_pre_regular_insertion): Likewise.
18465 (do_pre_partial_partial_insertion): Likewise.
18467 2018-03-02 Richard Biener <rguenther@suse.de>
18470 * config/darwin.c (saved_debug_info_level): New static global.
18471 (darwin_asm_lto_start): Disable debug info generation for LTO out.
18472 (darwin_asm_lto_end): Restore debug info generation settings.
18474 2018-03-01 Martin Liska <mliska@suse.cz>
18477 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
18478 volatile arguments.
18480 2018-03-01 Richard Biener <rguenther@suse.de>
18483 * dwarf2out.c (gen_variable_die): Properly handle late VLA
18484 type annotation with LTO when debug was disabled at compile-time.
18486 2018-03-01 Matthew Fortune <mfortune@gmail.com>
18488 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
18490 (mips_final_postscan_insn): Likewise.
18492 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
18494 PR rtl-optimization/84528
18495 * alias.c (init_alias_target): Add commentary.
18496 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
18497 a unique base value if the frame pointer is not eliminated
18498 to the stack pointer.
18500 2018-03-01 Tom de Vries <tom@codesourcery.com>
18502 PR rtl-optimization/83327
18503 * lra-int.h (hard_regs_spilled_into): Declare.
18504 * lra.c (hard_regs_spilled_into): Define.
18505 (init_reg_info): Init hard_regs_spilled_into.
18506 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
18507 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
18508 (process_bb_lives): Handle hard_regs_spilled_into.
18509 (lra_create_live_ranges_1): Before doing liveness propagation, clear
18510 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
18512 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
18514 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
18515 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
18516 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
18517 * config/rs6000/aix72.h: New file.
18519 2018-02-28 Jakub Jelinek <jakub@redhat.com>
18521 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
18522 instead of warning_at with conditional singular and plural messages
18526 * stor-layout.c (update_alignment_for_field): For
18527 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
18528 && !DECL_PACKED (field), do the alignment update, just use
18529 only desired_align instead of MAX (type_align, desired_align)
18531 (place_field): Don't do known_align < desired_align handling
18532 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
18533 is non-NULL, instead do it after rli->prev_field handling and
18534 only if not within a bitfield word. For DECL_PACKED (field)
18535 use type_align of BITS_PER_UNIT.
18537 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
18539 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
18540 superfluous parentheses and trailing spaces.
18542 2018-02-28 Richard Biener <rguenther@suse.de>
18544 PR tree-optimization/84584
18545 * graphite-scop-detection.c (scop_detection::add_scop): Discard
18546 SCoPs with fake exit edge.
18548 2018-02-28 Martin Liska <mliska@suse.cz>
18551 * timevar.c (timer::print): Fix format to properly print 100%
18554 2018-02-28 Richard Biener <rguenther@suse.de>
18556 PR middle-end/84607
18557 * genmatch.c (capture_info::walk_match): Do not mark
18558 captured expressions without operands as expr_p given
18559 they act more like predicates and should be subject to
18560 "lost tail" side-effect preserving.
18562 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
18564 PR rtl-optimization/81611
18565 * auto-inc-dec.c (attempt_change): Move dead note from
18566 mem_insn if it's the next use of regno
18567 (find_address): Take address use of reg holding
18568 non-incremented value. Add parm to limit search to the named
18570 (merge_in_block): Attempt to use a mem insn that is the next
18571 use of the original regno.
18573 2018-02-27 Martin Sebor <msebor@redhat.com>
18576 * doc/invoke.texi (-Wmissing-attributes): New option.
18577 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
18579 2018-02-27 Martin Sebor <msebor@redhat.com>
18581 PR translation/84207
18582 * diagnostic-core.h (warning_n, error_n, inform_n): Change
18583 n argument to unsigned HOST_WIDE_INT.
18584 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
18585 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
18586 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
18587 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
18589 2018-02-27 Richard Biener <rguenther@suse.de>
18591 PR tree-optimization/84512
18592 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
18593 Do not use the estimate returned from record_stmt_cost for
18594 the scalar iteration cost but sum properly using add_stmt_cost.
18596 2018-02-27 Richard Biener <rguenther@suse.de>
18598 PR tree-optimization/84466
18599 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18600 Adjust last change to less strictly validate use operands.
18602 2018-02-27 Martin Liska <mliska@suse.cz>
18604 PR gcov-profile/84548
18605 * gcov.c (process_file): Allow partial overlap and consider it
18606 also as group functions.
18607 (output_lines): Properly calculate range of lines for a group.
18609 2018-02-27 Martin Liska <mliska@suse.cz>
18611 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
18612 'ggc' suffixes. Change first column width.
18613 (timer::print): Fix formatting of the column.
18615 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
18617 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
18618 preserve inline entry blocks for the sake of debug inline
18619 entry point markers alone.
18620 (remove_unused_locals): Suggest in comments a better place to
18621 force the preservation of inline entry blocks that are
18622 otherwise unused, but do not preserve them.
18624 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18626 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
18628 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18631 * config/i386/constraints.md (Bs): Replace
18632 ix86_indirect_branch_register with
18633 TARGET_INDIRECT_BRANCH_REGISTER.
18635 * config/i386/i386.md (indirect_jump): Likewise.
18636 (tablejump): Likewise.
18637 (*sibcall_memory): Likewise.
18638 (*sibcall_value_memory): Likewise.
18639 Peepholes of indirect call and jump via memory: Likewise.
18640 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
18641 (*sibcall_value_GOT_32): Likewise.
18642 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18643 (GOT_memory_operand): Likewise.
18644 (call_insn_operand): Likewise.
18645 (sibcall_insn_operand): Likewise.
18646 (GOT32_symbol_operand): Likewise.
18647 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
18649 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
18651 PR rtl-optimization/83496
18652 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
18653 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
18654 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
18655 redundant insn, if any.
18656 (relax_delay_slots): Likewise.
18657 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
18659 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
18661 PR tree-optimization/83965
18662 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
18663 that grouped statements are part of a reduction chain. Return
18664 true if the statement is not marked as a reduction itself but
18665 is part of a group.
18666 (vect_recog_dot_prod_pattern): Don't check whether the statement
18667 is part of a group here.
18668 (vect_recog_sad_pattern): Likewise.
18669 (vect_recog_widen_sum_pattern): Likewise.
18671 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
18674 * final.c (rest_of_clean_state): Also look for calls inside sequences.
18676 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18679 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
18681 (ix86_output_indirect_function_return): New prototype.
18682 (ix86_split_simple_return_pop_internal): Likewise.
18683 * config/i386/i386.c (indirect_return_via_cx): New.
18684 (indirect_return_via_cx_bnd): Likewise.
18685 (indirect_thunk_name): Handle return va CX_REG.
18686 (output_indirect_thunk_function): Create alias for
18687 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
18688 (ix86_output_indirect_jmp): Remove the bool argument.
18689 (ix86_output_indirect_function_return): New function.
18690 (ix86_split_simple_return_pop_internal): Likewise.
18691 * config/i386/i386.md (*indirect_jump): Don't pass false
18692 to ix86_output_indirect_jmp.
18693 (*tablejump_1): Likewise.
18694 (simple_return_pop_internal): Change it to define_insn_and_split.
18695 Call ix86_split_simple_return_pop_internal to split it for
18696 -mfunction-return=.
18697 (simple_return_indirect_internal): Call
18698 ix86_output_indirect_function_return instead of
18699 ix86_output_indirect_jmp.
18701 2018-02-26 Jakub Jelinek <jakub@redhat.com>
18704 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
18705 memset and value initialization afterwards.
18707 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
18709 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
18711 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18714 * common/config/aarch64/aarch64-common.c
18715 (aarch_option_optimization_table[]): Switch
18716 off fomit-frame-pointer
18718 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18719 Chung-Ju Wu <jasonwucj@gmail.com>
18721 * config/nds32/nds32-multiple.md (load_multiple): Disallow
18723 (store_multiple): Ditto.
18725 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18727 * config.gcc: Add --with-cpu support for nds32 target.
18728 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
18729 * config/nds32/nds32.opt: Add -mcpu= option.
18731 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
18733 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
18734 isel=yes): Warn for these deprecated options.
18736 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
18738 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
18739 ISA_2_5_MASKS_EMBEDDED.
18741 2018-02-23 Jakub Jelinek <jakub@redhat.com>
18743 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
18744 p->max as pointers rather than using iterative_hash_expr.
18746 2018-02-23 Carl Love <cel@us.ibm.com>
18748 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
18749 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
18751 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
18752 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
18753 P8V_BUILTIN_VEC_VUNSIGNED2.
18755 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
18758 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
18759 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
18761 * lra-constraints.c (curr_insn_transform): Set up
18762 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
18764 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
18765 * lra-eliminations.c (spill_pseudos): Ditto.
18766 (process_insn_for_elimination): Ditto.
18767 * lra-lives.c (reg_early_clobber_p): Use the new macros.
18768 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
18769 LRA_NON_CLOBBERED_ALT.
18771 2018-02-22 Martin Sebor <msebor@redhat.com>
18773 PR tree-optimization/84480
18774 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
18775 to maybe_diag_stxncpy_trunc. Call it.
18776 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
18777 from gimple_fold_builtin_strcpy. Print inlining stack.
18778 (handle_builtin_stxncpy): Print inlining stack.
18779 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
18781 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
18784 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
18785 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
18786 and -fcheck-pointer-bounds are used together.
18787 (indirect_thunk_prefix): New enum.
18788 (indirect_thunk_need_prefix): New function.
18789 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
18790 "_nt" instead of "_bnd" for NOTRACK prefix.
18791 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
18792 (output_indirect_thunk_function): Likewise.
18794 (ix86_code_end): Update output_indirect_thunk_function calls.
18795 (ix86_output_indirect_branch_via_reg): Replace
18796 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
18797 (ix86_output_indirect_branch_via_push): Likewise.
18798 (ix86_output_function_return): Likewise.
18799 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
18800 incompatible with -fcf-protection=branch and
18801 -fcheck-pointer-bounds.
18803 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18806 * config/aarch64/aarch64.c (aarch64_print_address_internal):
18807 Change gcc_assert call to output_operand_lossage.
18809 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18811 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
18813 2018-02-22 DJ Delorie <dj@redhat.com>
18814 Sebastian Perta <sebastian.perta@renesas.com>
18815 Oleg Endo <olegendo@gcc.gnu.org>
18817 * config/rx/rx.c (rx_rtx_costs): New function.
18818 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
18820 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
18822 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
18824 2018-02-22 Martin Liska <mliska@suse.cz>
18827 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
18828 Add "native" as a possible value.
18830 2018-02-22 Martin Liska <mliska@suse.cz>
18833 * config/i386/i386.c (ix86_option_override_internal):
18834 Add "native" as a possible value for -march and -mtune.
18836 2018-02-22 Jakub Jelinek <jakub@redhat.com>
18839 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
18840 to all type variants.
18842 PR tree-optimization/84503
18843 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
18844 width as info->bitpos + info->bitsize - start.
18845 (merged_store_group::merge_overlapping): Simplify width computation.
18846 (check_no_overlap): New function.
18847 (imm_store_chain_info::try_coalesce_bswap): Compute expected
18848 start + width and last_order of the group, fail if check_no_overlap
18850 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
18851 to group if check_no_overlap fails.
18853 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18855 * config/rs6000/altivec.md: Delete contraint arguments to
18856 define_expand, define_split, and define_peephole2, and in
18857 define_insn_and_split if always unused.
18858 * config/rs6000/darwin.md: Ditto.
18859 * config/rs6000/dfp.md: Ditto.
18860 * config/rs6000/rs6000.md: Ditto.
18861 * config/rs6000/sync.md: Ditto.
18862 * config/rs6000/vector.md: Ditto.
18863 * config/rs6000/vsx.md: Ditto.
18865 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18867 * config/rs6000/altivec.md: Write output control strings as braced
18868 blocks instead of double-quoted strings.
18869 * config/rs6000/darwin.md: Ditto.
18870 * config/rs6000/rs6000.md: Ditto.
18871 * config/rs6000/vector.md: Ditto.
18872 * config/rs6000/vsx.md: Ditto.
18874 2018-02-21 Jason Merrill <jason@redhat.com>
18876 PR c++/84314 - ICE with templates and fastcall attribute.
18877 * attribs.c (build_type_attribute_qual_variant): Remove assert.
18879 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18881 * ipa-cp.c (determine_versionability): Fix comment typos.
18883 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18886 * ipa-cp.c (determine_versionability): Do not version functions caling
18889 2018-02-21 Martin Liska <mliska@suse.cz>
18892 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18893 Add "native" as a possible value.
18894 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
18895 the macro when native cpu detection is available.
18897 2018-02-21 Martin Liska <mliska@suse.cz>
18900 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18901 Add "native" as a possible value.
18902 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18903 when native cpu detection is available.
18905 2018-02-21 Jakub Jelinek <jakub@redhat.com>
18906 Martin Sebor <msebor@redhat.com>
18908 PR tree-optimization/84478
18909 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18911 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18912 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18913 support which is conservatively correct, for 2 only stay conservative
18914 for maxlen. Formatting and comment capitalization fixes. Add STRICT
18915 argument to the 2 argument get_range_strlen, adjust 6 arg
18916 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18918 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18919 (gimple_fold_builtin_strlen): Pass true as last argument to
18922 2018-02-20 Martin Sebor <msebor@redhat.com>
18924 PR middle-end/84095
18925 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18926 (builtin_memref::set_base_and_offset): Same. Handle inner references.
18927 (builtin_memref::builtin_memref): Factor out parts into
18928 set_base_and_offset and call it.
18930 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18932 PR middle-end/84406
18933 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18934 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18935 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
18936 search at the associated MODE_INT.
18938 2018-02-20 Jeff Law <law@redhat.com>
18940 PR middle-end/82123
18941 PR tree-optimization/81592
18942 PR middle-end/79257
18943 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18944 for range data rather than using global data.
18945 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18946 range data rather than using global data.
18947 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18948 pass it to children as needed.
18949 (struct directive::fmtresult): Similarly.
18950 (struct directive::set_width): Similarly.
18951 (struct directive::set_precision): Similarly.
18952 (format_integer, format_directive, parse_directive): Similarly.
18953 (format_none): Accept unnamed vr_values parameter.
18954 (format_percent, format_floating, format_character): Similarly.
18955 (format_string, format_plain): Similarly.
18956 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18957 the EVRP range analyzer for range data rather than using global data.
18958 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18959 gimple-ssa-evrp-analyze.h
18960 (class sprintf_dom_walker): Add after_dom_children member function.
18961 Add evrp_range_analyzer member.
18962 (sprintf_dom_walker::before_dom_children): Call into the EVRP
18963 range analyzer as needed.
18964 (sprintf_dom_walker::after_dom_children): New member function.
18965 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18967 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18968 (evrp_range_analyzer::pop_to_marker): Likewise.
18970 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18972 PR tree-optimization/84419
18973 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18974 with the required type if its current type is compatible but
18977 2018-02-20 Jakub Jelinek <jakub@redhat.com>
18979 PR middle-end/82004
18980 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18981 after vectorization.
18983 2018-02-20 Martin Liska <mliska@suse.cz>
18986 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18987 possible values if we don't have a hint.
18989 2018-02-20 Martin Liska <mliska@suse.cz>
18993 * final.c (shorten_branches): Build align_tab array with one
18995 * opts.c (finish_options): Add alignment option limit check.
18996 (MAX_CODE_ALIGN): Likewise.
18997 (MAX_CODE_ALIGN_VALUE): Likewise.
18998 * doc/invoke.texi: Document maximum allowed option value for
18999 all -falign-* options.
19001 2018-02-19 Jakub Jelinek <jakub@redhat.com>
19004 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
19005 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
19006 * var-tracking.c (emit_note_insn_var_location): Remove all references
19007 to NOTE_INSN_CALL_ARG_LOCATION.
19008 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
19009 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
19010 Use copy_rtx_if_shared.
19011 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
19012 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
19013 (dwarf2out_var_location): Remove handling of
19014 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
19016 * final.c (final_scan_insn): Remove all references to
19017 NOTE_INSN_CALL_ARG_LOCATION.
19018 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
19019 before dumping final insns.
19020 * except.c (emit_note_eh_region_end): Remove all references to
19021 NOTE_INSN_CALL_ARG_LOCATION.
19022 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
19023 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
19024 * config/arc/arc.c (hwloop_optimize): Likewise.
19025 * config/arm/arm.c (create_fix_barrier): Likewise.
19026 * config/s390/s390.c (s390_chunkify_start): Likewise.
19027 * config/sh/sh.c (find_barrier): Likewise.
19028 * config/i386/i386.c (rest_of_insert_endbranch,
19029 ix86_seh_fixup_eh_fallthru): Likewise.
19030 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
19031 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
19032 * config/frv/frv.c (frv_function_prologue): Likewise.
19033 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
19035 (note_outside_basic_block_p): Remove all references to
19036 NOTE_INSN_CALL_ARG_LOCATION.
19037 * gengtype.c (adjust_field_rtx_def): Likewise.
19038 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
19040 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
19041 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
19044 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
19047 PR tree-optimization/84452
19048 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
19049 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
19052 2018-02-19 Martin Liska <mliska@suse.cz>
19055 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
19057 2018-02-19 Martin Liska <mliska@suse.cz>
19058 Richard Sandiford <richard.sandiford@linaro.org>
19060 PR tree-optimization/82491
19061 * gimple-fold.c (get_base_constructor): Make earlier bail out
19064 2018-02-19 Carl Love <cel@us.ibm.com>
19066 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
19067 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
19069 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
19070 P8V_BUILTIN_VEC_NEG.
19072 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
19074 * config/rl78/rl78.md (movdf): New define expand.
19076 2018-02-19 Martin Liska <mliska@suse.cz>
19079 * doc/invoke.texi: Fix typo.
19080 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
19082 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
19084 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
19085 handle rs6000_single_float and rs6000_double_float specially for
19088 2018-02-16 Jeff Law <law@redhat.com>
19090 * config/rx/rx.c (add_pop_cfi_notes): New function.;
19091 (pop_regs): Use it.
19093 2018-02-16 Jakub Jelinek <jakub@redhat.com>
19096 * ipa-inline.c (inline_small_functions): Fix a typo.
19098 2018-02-16 Nathan Sidwell <nathan@acm.org>
19100 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
19102 2018-02-16 Carl Love <cel@us.ibm.com>
19104 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
19105 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
19106 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
19107 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
19108 expansion to P8V_BUILTIN_VEC_FLOAT2.
19110 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
19112 PR rtl-optimization/70023
19113 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
19114 src_regno into account.
19116 2018-02-16 Carl Love <cel@us.ibm.com>
19118 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
19119 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
19120 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
19121 * config/rs6000/rs6000.c: Remove case statements for
19122 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
19123 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
19124 and P9V_BUILTIN_VEC_VINSERT4B.
19125 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
19126 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
19127 * config/rs6000/vsx.md:
19128 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
19131 2018-02-16 Carl Love <cel@us.ibm.com>
19133 * config/rs6000/altivec.h: Add builtin names vec_extract4b
19135 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
19137 * config/rs6000/rs6000-c.c: Add the definitions for
19138 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
19139 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
19140 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
19141 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
19142 definition for insert4b and define insn *insert3b_internal.
19143 * doc/extend.texi: Add documentation for vec_extract4b.
19145 2018-02-16 Nathan Sidwell <nathan@acm.org>
19147 * doc/extend.texi (Backwards Compatibility): Mention friend
19148 injection. Note for-scope is deprecated.
19149 * doc/invoke.texi (-ffriend-injection): Deprecate.
19151 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
19153 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
19154 that moved to I2, also allow destinations that are a paradoxical
19155 subreg (instead of a normal reg).
19157 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
19160 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
19163 2018-02-16 Richard Biener <rguenther@suse.de>
19165 PR tree-optimization/84037
19166 PR tree-optimization/84016
19168 * config/i386/i386.c (ix86_builtin_vectorization_cost):
19169 Adjust vec_construct for the fact we need additional higher latency
19170 128bit inserts for AVX256 and AVX512 vector builds.
19171 (ix86_add_stmt_cost): Scale vector construction cost for
19174 2018-02-16 Richard Biener <rguenther@suse.de>
19176 PR tree-optimization/84417
19177 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
19178 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
19179 (non_rewritable_lvalue_p): Likewise, use poly-ints.
19181 2018-02-16 Martin Liska <mliska@suse.cz>
19184 * internal-fn.def (ASAN_CHECK): Set proper flags.
19185 (ASAN_MARK): Likewise.
19187 2018-02-16 Julia Koval <julia.koval@intel.com>
19189 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
19190 from PTA_CANNONLAKE.
19192 2018-02-16 Jakub Jelinek <jakub@redhat.com>
19195 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
19196 Use ++iter rather than iter++ for std::list iterators.
19197 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
19198 defer deleting them until all nodes in the forest are processed. Do
19199 free even leaf nodes. Change to_process into auto_vec.
19202 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
19203 * vec.h (vec_default_construct): Use memset instead of placement new
19204 if BROKEN_VALUE_INITIALIZATION is defined.
19205 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
19206 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
19209 PR rtl-optimization/83723
19210 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
19211 * lra.c (lra_substitute_pseudo): Likewise. If true, use
19212 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
19214 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
19216 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
19218 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
19220 PR rtl-optimization/81443
19221 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
19222 from inner REGs to paradoxical SUBREGs.
19224 2018-02-16 Richard Biener <rguenther@suse.de>
19226 PR tree-optimization/84399
19227 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
19228 For operands we can analyze at their definition make sure we can
19229 analyze them at each use as well.
19231 2018-02-16 Richard Biener <rguenther@suse.de>
19233 PR tree-optimization/84190
19234 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
19235 volatile accesses if the decl isn't volatile.
19237 2018-02-15 Jason Merrill <jason@redhat.com>
19239 PR c++/84314 - ICE with templates and fastcall attribute.
19240 * attribs.c (build_type_attribute_qual_variant): Don't clobber
19241 TYPE_CANONICAL on an existing type.
19243 2018-02-15 Jakub Jelinek <jakub@redhat.com>
19245 PR tree-optimization/84383
19246 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
19247 dstoff nor call operand_equal_p if dstbase is NULL.
19249 PR tree-optimization/84334
19250 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
19251 also a CONSTANT_CLASS_P, punt.
19253 2018-02-14 Jim Wilson <jimw@sifive.com>
19255 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
19256 first SMALL_OPERAND check. New local min_second_step. Move assert
19257 to where locals are set. Add TARGET_RVC support.
19258 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
19260 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
19262 * doc/invoke.texi: Correct -Wformat-overflow code sample.
19264 2018-02-14 Martin Sebor <msebor@redhat.com>
19266 PR tree-optimization/83698
19267 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
19268 arrays constrain the offset range to their bounds.
19269 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
19270 (builtin_access::overlap): Avoid setting the size of overlap if it's
19272 (maybe_diag_overlap): Also consider arrays when deciding what values
19273 of offsets to include in diagnostics.
19275 2018-02-14 Martin Sebor <msebor@redhat.com>
19278 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
19279 that correspond to the kind of a declaration.
19281 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
19284 * config/pa/pa.md: Load address of PIC label using the linkage table
19285 if the label is nonlocal.
19287 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
19289 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
19290 warning message if user requests -maltivec=be.
19291 * doc/invoke.texi: Document deprecation of -maltivec=be.
19293 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
19296 * config/rs6000/rs6000-c.c: Update definitions for
19297 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
19298 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
19300 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19303 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
19304 add _get_ssp intrinsics. Remove argument from
19305 __builtin_ia32_rdssp[d|q].
19306 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
19307 * config/i386/i386-builtin.def: Remove argument from
19308 __builtin_ia32_rdssp[d|q].
19309 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
19310 ix86_expand_special_args_builtin for _rdssp[d|q].
19311 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
19312 Clear register before usage.
19313 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
19314 Add documentation for new _get_ssp and _inc_ssp intrinsics.
19316 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
19318 PR tree-optimization/84357
19319 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
19320 operand 1 of an ARRAY_REF too.
19322 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
19325 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
19326 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
19328 (set_of_reg): New struct.
19329 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
19330 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
19331 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
19333 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
19334 Split into bitclr, bitset, bitinvert patterns if appropriate.
19335 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
19336 use rx_fuse_in_memory_bitop.
19337 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
19338 to named insn, correct maximum insn length.
19340 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
19343 * machmode.def: Define a complex mode for PARTIAL_INT.
19344 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
19346 * doc/rtl.texi: Document CSPImode.
19347 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
19349 (msp430_hard_regno_nregs_with_padding): Likewise.
19351 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
19354 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
19356 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
19358 PR rtl-optimization/84169
19359 * combine.c (try_combine): New variable split_i2i3. Set it to true if
19360 we generated a parallel as new i3 and we split that to new i2 and i3
19361 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
19362 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
19363 those to i2, not i1. Partially rewrite this scan code.
19365 2018-02-13 Jakub Jelinek <jakub@redhat.com>
19368 * stor-layout.c (place_field): For variable length fields, adjust
19369 offset_align afterwards not just based on the field's alignment,
19370 but also on the size.
19372 PR middle-end/84309
19373 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
19374 of exps and logs in the use_exp2 case.
19376 2018-02-13 Jeff Law <law@redhat.com>
19378 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
19379 entry for "vector".
19381 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
19384 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
19388 * common.opt (gas-loc-support, gas-locview-support): New.
19389 (ginline-points, ginternal-reset-location-views): New.
19390 * doc/invoke.texi: Document them. Use @itemx where intended.
19391 (gvariable-location-views): Adjust.
19392 * target.def (reset_location_view): New.
19393 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
19394 (TARGET_RESET_LOCATION_VIEW): New.
19395 * doc/tm.texi: Rebuilt.
19396 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
19397 (dwarf2out_default_as_locview_support): New.
19398 (output_asm_line_debug_info): Use option variables.
19399 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
19400 (output_loc_list): Likewise.
19401 (add_high_low_attributes): Check option variables.
19402 Don't output entry view attribute in strict mode.
19403 (gen_inlined_subroutine_die): Check option variables.
19404 (dwarf2out_inline_entry): Likewise.
19405 (init_sections_and_labels): Likewise.
19406 (dwarf2out_early_finish): Likewise.
19407 (maybe_reset_location_view): New, from...
19408 (dwarf2out_var_location): ... here. Call it.
19409 * debug.h (dwarf2out_default_as_loc_support): Declare.
19410 (dwarf2out_default_as_locview_support): Declare.
19411 * hooks.c (hook_int_rtx_insn_0): New.
19412 * hooks.h (hook_int_rtx_insn_0): Declare.
19413 * toplev.c (process_options): Take -gas-loc-support and
19414 -gas-locview-support from dwarf2out. Enable
19415 -gvariable-location-views by default only with locview
19416 assembler support. Enable -ginternal-reset-location-views by
19417 default only if the target defines the corresponding hook.
19418 Enable -ginline-points by default if location views are
19419 enabled; force it disabled if statement frontiers are
19421 * tree-inline.c (expand_call_inline): Check option variables.
19422 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
19424 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
19426 PR tree-optimization/84321
19427 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
19428 handling. Also check whether the anti-range contains any values
19429 that satisfy the mask; switch to a VR_RANGE if not.
19431 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
19434 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
19436 2018-02-13 Martin Jambor <mjambor@suse.cz>
19439 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
19440 of call statements, also set location of a load to a temporary.
19442 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
19444 * config/rl78/rl78.c (add_vector_labels): New function.
19445 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
19446 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
19447 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
19448 which checks that no arguments are passed.
19449 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
19450 * doc/extend.texi: Documentation for the new attribute.
19452 2018-02-13 Andreas Schwab <schwab@suse.de>
19454 * config/riscv/linux.h (CPP_SPEC): Define.
19456 2018-02-13 Jakub Jelinek <jakub@redhat.com>
19459 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
19460 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
19461 OPTION_MASK_ISA_AES as first argument to def_builtin_const
19462 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
19463 instead of OPTION_MASK_ISA_PCLMUL as first argument to
19464 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
19465 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
19466 temporarily for AES and PCLMUL builtins.
19468 PR tree-optimization/84339
19469 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
19470 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
19473 PR middle-end/84309
19474 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
19475 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
19476 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
19478 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
19480 * omp-simd-clone.h: New file.
19481 * omp-simd-clone.c: Include omp-simd-clone.h.
19482 (expand_simd_clones): No longer static.
19483 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
19484 cgraph.h and omp-simd-clone.h.
19485 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
19486 (vect_recog_widen_shift_pattern): Formatting fix.
19487 (vect_pattern_recog_1): Don't check optab for calls.
19490 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
19491 operands[2] into a REG before using gen_lowpart on it.
19493 2018-02-12 Jeff Law <law@redhat.com>
19496 * config/sh/sh.c (find_barrier): Consider a sibling call
19499 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
19500 successfully back substituting a reg.
19502 2018-02-12 Richard Biener <rguenther@suse.de>
19504 PR tree-optimization/84037
19505 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
19506 parameter, move visited init to caller.
19507 (vect_slp_analyze_operations): Separate cost from validity
19508 check, initialize visited once for all instances.
19509 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
19511 * tree-vect-stmts.c (vect_model_simple_cost): Make early
19513 (vect_model_promotion_demotion_cost): Likewise.
19514 (vectorizable_bswap): Guard cost modeling with !slp_node
19515 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
19517 (vectorizable_call): Likewise.
19518 (vectorizable_conversion): Likewise.
19519 (vectorizable_assignment): Likewise.
19520 (vectorizable_shift): Likewise.
19521 (vectorizable_operation): Likewise.
19522 (vectorizable_store): Likewise.
19523 (vectorizable_load): Likewise.
19524 (vectorizable_condition): Likewise.
19525 (vectorizable_comparison): Likewise.
19527 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
19530 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
19531 (ASAN_MARK): Fix fnspec to account for return value, change pointer
19532 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
19534 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19536 PR middle-end/83665
19537 * params.def (inline-min-speedup): Increase from 8 to 15.
19538 (max-inline-insns-auto): Decrease from 40 to 30.
19539 * ipa-split.c (consider_split): Add some buffer for function to
19540 be considered inlining candidate.
19541 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
19544 2018-02-12 Richard Biener <rguenther@suse.de>
19546 PR tree-optimization/84037
19547 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
19548 matched stmts if we cannot swap the non-matched ones.
19550 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
19552 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
19553 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
19554 _mm_maskz_scalef_round_ss): New intrinsics.
19555 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
19556 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
19557 __builtin_ia32_scalefss_round): Remove.
19558 (__builtin_ia32_scalefsd_mask_round,
19559 __builtin_ia32_scalefss_mask_round): New intrinsics.
19560 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
19561 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
19562 ((match_operand:VF_128 2 "<round_nimm_predicate>"
19563 "<round_constraint>")): Changed to ...
19564 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
19565 "<round_scalar_constraint>")): ... this.
19566 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
19567 %0, %1, %2<round_op3>}"): Changed to ...
19568 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
19569 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
19570 %2<round_scalar_mask_op3>}"): ... this.
19571 * config/i386/subst.md (round_scalar_nimm_predicate): New.
19573 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
19575 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
19576 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
19577 (_mm_maskz_sqrt_round_ss): New intrinsics.
19578 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
19579 (__builtin_ia32_sqrtsd_mask_round)
19580 (__builtin_ia32_sqrtss_mask_round): New builtins.
19581 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
19582 (__builtin_ia32_sqrtss_round): Remove.
19583 (__builtin_ia32_sqrtsd_mask_round)
19584 (__builtin_ia32_sqrtss_mask_round): New builtins.
19585 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
19586 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
19587 ((match_operand:VF_128 1 "vector_operand"
19588 "xBm,<round_constraint>")): Changed to ...
19589 ((match_operand:VF_128 1 "vector_operand"
19590 "xBm,<round_scalar_constraint>")): ... this.
19591 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
19592 %0, %2, %<iptr>1<round_op3>}): Changed to ...
19593 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
19594 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
19595 %<iptr>1<round_scalar_mask_op3>}): ... this.
19596 ((set_attr "prefix" "<round_prefix>")): Changed to ...
19597 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
19599 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
19602 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
19603 Cast vec_cmpeq result to correct type.
19604 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
19605 Cast vec_cmpgt result to correct type.
19607 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
19609 * final.c (final_scan_insn_1): Renamed from...
19610 (final_scan_insn): ... this. New wrapper, to recover
19611 seen from the outermost call in recursive ones.
19612 * config/sparc/sparc.c (output_return): Drop seen from call.
19613 (output_sibcall): Likewise.
19614 * config/visium/visium.c (output_branch): Likewise.
19616 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
19618 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
19621 2018-02-10 Alan Modra <amodra@gmail.com>
19624 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
19625 Specify LR as an input.
19627 2018-02-10 Jakub Jelinek <jakub@redhat.com>
19630 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
19631 remove_member_access_dummy_vars): New functions.
19632 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
19633 lower_omp_1, execute_lower_omp): Use them.
19635 PR rtl-optimization/84308
19636 * shrink-wrap.c (spread_components): Release todo vector.
19638 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
19640 PR rtl-optimization/57193
19641 * ira-color.c (struct allocno_color_data): Add member
19642 conflict_allocno_hard_prefs.
19643 (update_conflict_allocno_hard_prefs): New.
19644 (bucket_allocno_compare_func): Add a preference based on
19645 conflict_allocno_hard_prefs.
19646 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
19647 (color_allocnos): Remove a dead code. Initiate
19648 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
19650 2018-02-09 Jakub Jelinek <jakub@redhat.com>
19653 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
19654 constraint from =wa to wa. Avoid a subreg on the output operand,
19655 instead use a pseudo and subreg it in a move.
19656 (p9_xxbrd_<mode>): Changed to ...
19657 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
19658 (p9_xxbrd_v2df): New expander.
19659 (p9_xxbrw_<mode>): Changed to ...
19660 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
19661 (p9_xxbrw_v4sf): New expander.
19663 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19665 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
19667 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
19670 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
19671 multiply in 32-bit mode.
19672 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
19673 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
19676 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19678 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
19679 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
19680 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
19681 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
19683 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
19686 * dwarf2out.c (is_trivial_indirect_ref): New function.
19687 (dwarf2out_late_global_decl): Do not generate a location
19688 attribute for variables that have a non-trivial DECL_VALUE_EXPR
19689 and that are not defined in the current unit.
19691 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19693 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
19694 instead of a libcall for UNORDERED.
19696 2018-02-09 Tamar Christina <tamar.christina@arm.com>
19699 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
19700 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
19702 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19705 * config/s390/s390.c (s390_set_current_function): Invoke
19706 s390_indirect_branch_settings also if fndecl didn't change.
19708 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19710 * config/rs6000/rs6000.md (blockage): Set length to zero.
19712 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19714 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
19716 2018-02-09 Jakub Jelinek <jakub@redhat.com>
19719 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
19720 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
19724 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
19725 PARALLEL incoming that failed vt_get_decl_and_offset check.
19727 PR middle-end/84237
19728 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
19729 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
19731 (get_variable_section): For decls in named .bss* sections pass true as
19732 second argument to bss_initializer_p.
19734 2018-02-09 Marek Polacek <polacek@redhat.com>
19735 Jakub Jelinek <jakub@redhat.com>
19738 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
19739 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
19740 Sync some changes from cxx_fold_indirect_ref.
19742 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19744 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
19746 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
19747 (BLOCK_INLINE_ENTRY_LABEL): New.
19748 (dwarf2out_var_location): Disregard inline entry markers.
19749 (inline_entry_data): New struct.
19750 (inline_entry_data_hasher): New hashtable type.
19751 (inline_entry_data_hasher::hash): New.
19752 (inline_entry_data_hasher::equal): New.
19753 (inline_entry_data_table): New variable.
19754 (add_high_low_attributes): Add DW_AT_entry_pc and
19755 DW_AT_GNU_entry_view attributes if a pending entry is found
19756 in inline_entry_data_table. Add old entry_pc attribute only
19757 if debug nonbinding markers are disabled.
19758 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
19759 markers are enabled.
19760 (block_within_block_p, dwarf2out_inline_entry): New.
19761 (dwarf2out_finish): Check that no entries remained in
19762 inline_entry_data_table.
19763 * final.c (reemit_insn_block_notes): Handle inline entry notes.
19764 (final_scan_insn, notice_source_line): Likewise.
19765 (rest_of_clean_state): Skip inline entry markers.
19766 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
19768 * gimple.c (gimple_build_debug_inline_entry): New.
19769 * gimple.h (enum gimple_debug_subcode): Add
19770 GIMPLE_DEBUG_INLINE_ENTRY.
19771 (gimple_build_debug_inline_entry): Declare.
19772 (gimple_debug_inline_entry_p): New.
19773 (gimple_debug_nonbind_marker_p): Adjust.
19774 * insn-notes.def (INLINE_ENTRY): New.
19775 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
19776 inline entry marker notes.
19777 (print_insn): Likewise.
19778 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
19779 (INSN_DEBUG_MARKER_KIND): Likewise.
19780 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
19781 * tree-inline.c (expand_call_inline): Build and insert
19782 debug_inline_entry stmt.
19783 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
19784 inline entry blocks early, if nonbind markers are enabled.
19785 (dump_scope_block): Dump fragment info.
19786 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
19787 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
19788 (gimple_build_debug_inline_entry): New.
19789 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
19790 Enable/disable inline entry points too.
19791 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
19792 (DEBUG_INSN): Describe inline entry markers.
19794 * common.opt (gvariable-location-views): New.
19795 (gvariable-location-views=incompat5): New.
19796 * config.in: Rebuilt.
19797 * configure: Rebuilt.
19798 * configure.ac: Test assembler for view support.
19799 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
19800 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
19801 * dwarf2out.c (var_loc_view): New typedef.
19802 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
19803 (dwarf2out_locviews_in_attribute): New.
19804 (dwarf2out_locviews_in_loclist): New.
19805 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
19806 (enum dw_line_info_opcode): Add LI_adv_address.
19807 (struct dw_line_info_table): Add view.
19808 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
19809 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
19810 (zero_view_p): New variable.
19811 (ZERO_VIEW_P): New macro.
19812 (output_asm_line_debug_info): New.
19813 (struct var_loc_node): Add view.
19814 (add_AT_view_list, AT_loc_list): New.
19815 (add_var_loc_to_decl): Add view param. Test it against last.
19816 (new_loc_list): Add view params. Record them.
19817 (AT_loc_list_ptr): Handle loc and view lists.
19818 (view_list_to_loc_list_val_node): New.
19819 (print_dw_val): Handle dw_val_class_view_list.
19820 (size_of_die): Likewise.
19821 (value_format): Likewise.
19822 (loc_list_has_views): New.
19823 (gen_llsym): Set vl_symbol too.
19824 (maybe_gen_llsym, skip_loc_list_entry): New.
19825 (dwarf2out_maybe_output_loclist_view_pair): New.
19826 (output_loc_list): Output view list or entries too.
19827 (output_view_list_offset): New.
19828 (output_die): Handle dw_val_class_view_list.
19829 (output_dwarf_version): New.
19830 (output_compilation_unit_header): Use it.
19831 (output_skeleton_debug_sections): Likewise.
19832 (output_rnglists, output_line_info): Likewise.
19833 (output_pubnames, output_aranges): Update version comments.
19834 (output_one_line_info_table): Output view numbers in asm comments.
19835 (dw_loc_list): Determine current endview, pass it to new_loc_list.
19836 Call maybe_gen_llsym.
19837 (loc_list_from_tree_1): Adjust.
19838 (add_AT_location_description): Create view list attribute if
19839 needed, check it's absent otherwise.
19840 (convert_cfa_to_fb_loc_list): Adjust.
19841 (maybe_emit_file): Call output_asm_line_debug_info for test.
19842 (dwarf2out_var_location): Reset views as needed. Precompute
19843 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
19844 attribute. Set view.
19845 (new_line_info_table): Reset next view.
19846 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
19847 (dwarf2out_source_line): Likewise. Output view resets and labels to
19848 the assembler, or select appropriate line info opcodes.
19849 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
19850 (optimize_string_length): Catch it. Adjust.
19851 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
19852 dw_val_class_view_list, and remove it if no longer needed.
19853 (hash_loc_list): Hash view numbers.
19854 (loc_list_hasher::equal): Compare them.
19855 (optimize_location_lists): Check whether a view list symbol is
19856 needed, and whether the locview attribute is present, and
19857 whether they match. Remove the locview attribute if no longer
19859 (index_location_lists): Call skip_loc_list_entry for test.
19860 (dwarf2out_finish): Call output_asm_line_debug_info for test.
19861 Use output_dwarf_version.
19862 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19863 (struct dw_val_node): Add val_view_list.
19864 * final.c (SEEN_NEXT_VIEW): New.
19865 (set_next_view_needed): New.
19866 (clear_next_view_needed): New.
19867 (maybe_output_next_view): New.
19868 (final_start_function): Rename to...
19869 (final_start_function_1): ... this. Take pointer to FIRST,
19870 add SEEN parameter. Emit param bindings in the initial view.
19871 (final_start_function): Reintroduce SEEN-less interface.
19872 (final): Rename to...
19873 (final_1): ... this. Take SEEN parameter. Output final pending
19874 next view at the end.
19875 (final): Reintroduce seen-less interface.
19876 (final_scan_insn): Output pending next view before switching
19877 sections or ending a block. Mark the next view as needed when
19878 outputting variable locations. Notify debug backend of section
19879 changes, and of location view changes.
19880 (rest_of_handle_final): Adjust.
19881 * toplev.c (process_options): Autodetect value for debug variable
19882 location views option. Warn on incompat5 without -gdwarf-5.
19883 * doc/invoke.texi (gvariable-location-views): New.
19884 (gvariable-location-views=incompat5): New.
19885 (gno-variable-location-views): New.
19887 2018-02-08 David Malcolm <dmalcolm@redhat.com>
19889 PR tree-optimization/84136
19890 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19891 that the result of find_edge is non-NULL.
19893 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19896 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19897 storing integer register in SImode. Fix cost of 256 and 512
19898 byte aligned SSE register store.
19900 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19902 * config/i386/i386.c (ix86_multiplication_cost): Fix
19903 multiplication cost for TARGET_AVX512DQ.
19905 2018-02-08 Marek Polacek <polacek@redhat.com>
19907 PR tree-optimization/84238
19908 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19911 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19913 PR tree-optimization/84265
19914 * tree-vect-stmts.c (vectorizable_store): Don't treat
19915 VMAT_CONTIGUOUS accesses as grouped.
19916 (vectorizable_load): Likewise.
19918 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19920 PR tree-optimization/81635
19921 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19922 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19923 (test_round_for_mask): New functions.
19924 (wide_int_cc_tests): Call test_round_for_mask.
19925 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19926 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19927 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19928 range returned by get_range_info.
19930 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19933 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19934 * symtab.c: Include builtins.h
19935 (symtab_node::output_to_lto_symbol_table_p): Move here
19936 from lto-streamer-out.c:output_symbol_p.
19937 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19938 (output_symbol_p): Move all logic to symtab.c
19939 (produce_symtab): Update.
19941 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19943 * config/s390/s390-opts.h (enum indirect_branch): Define.
19944 * config/s390/s390-protos.h (s390_return_addr_from_memory)
19945 (s390_indirect_branch_via_thunk)
19946 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19947 (enum s390_indirect_branch_type): Define.
19948 * config/s390/s390.c (struct s390_frame_layout, struct
19949 machine_function): Remove.
19950 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19951 (indirect_branch_table_label_no, indirect_branch_table_name):
19953 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19954 (enum s390_indirect_branch_option): Define.
19955 (s390_return_addr_from_memory): New function.
19956 (s390_handle_string_attribute): New function.
19957 (s390_attribute_table): Add new attribute handler.
19958 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19959 (s390_indirect_branch_via_thunk): New function.
19960 (s390_indirect_branch_via_inline_thunk): New function.
19961 (s390_function_ok_for_sibcall): When jumping via thunk disallow
19962 sibling call optimization for non z10 compiles.
19963 (s390_emit_call): Force indirect branch target to be a single
19964 register. Add r1 clobber for non-z10 compiles.
19965 (s390_emit_epilogue): Emit return jump via return_use expander.
19966 (s390_reorg): Handle JUMP_INSNs as execute targets.
19967 (s390_option_override_internal): Perform validity checks for the
19968 new command line options.
19969 (s390_indirect_branch_attrvalue): New function.
19970 (s390_indirect_branch_settings): New function.
19971 (s390_set_current_function): Invoke s390_indirect_branch_settings.
19972 (s390_output_indirect_thunk_function): New function.
19973 (s390_code_end): Implement target hook.
19974 (s390_case_values_threshold): Implement target hook.
19975 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19977 * config/s390/s390.h (struct s390_frame_layout)
19978 (struct machine_function): Move here from s390.c.
19979 (TARGET_INDIRECT_BRANCH_NOBP_RET)
19980 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19981 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19982 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19983 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19984 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19985 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19986 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19987 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19988 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19989 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19990 (mnemonic attribute): Add values which aren't recognized
19992 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19993 pattern for branch conversion. Fix mnemonic attribute.
19994 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19995 indirect branch via thunk if requested.
19996 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19997 ("*indirect_jump"): Disable for branch conversion using out of
19999 ("indirect_jump_via_thunk<mode>_z10")
20000 ("indirect_jump_via_thunk<mode>")
20001 ("indirect_jump_via_inlinethunk<mode>_z10")
20002 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
20003 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
20004 ("casesi_jump_via_inlinethunk<mode>_z10")
20005 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
20006 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
20007 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
20008 ("*indirect2_jump"): Disable for branch conversion.
20009 ("casesi_jump"): Turn into expander and expand patterns for branch
20011 ("return_use"): New expander.
20012 ("*return"): Emit return via thunk and rename it to ...
20013 ("*return<mode>"): ... this one.
20014 * config/s390/s390.opt: Add new options and and enum for the
20017 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
20019 * lra-constraints.c (match_reload): Unconditionally use
20020 gen_lowpart_SUBREG, rather than selecting between that
20021 and equivalent gen_rtx_SUBREG code.
20023 2018-02-08 Richard Biener <rguenther@suse.de>
20025 PR tree-optimization/84233
20026 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
20027 changed flag instead of boguously re-using phi_inserted.
20029 2018-02-08 Martin Jambor <mjambor@suse.cz>
20031 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
20032 static local variables.
20034 2018-02-08 Richard Biener <rguenther@suse.de>
20036 PR tree-optimization/84278
20037 * tree-vect-stmts.c (vectorizable_store): When looking for
20038 smaller vector types to perform grouped strided loads/stores
20039 make sure the mode is supported by the target.
20040 (vectorizable_load): Likewise.
20042 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
20044 * config/aarch64/aarch64.c (aarch64_components_for_bb):
20045 Increase LDP/STP opportunities by adding adjacent callee-saves.
20047 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
20049 PR rtl-optimization/84068
20050 PR rtl-optimization/83459
20051 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
20053 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
20055 PR tree-optimization/84224
20056 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
20057 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
20058 non-zero arguments.
20060 2018-02-07 Iain Sandoe <iain@codesourcery.com>
20063 * config/rs6000/altivec.md (*restore_world): Remove LR use.
20064 * config/rs6000/predicates.md (restore_world_operation): Adjust op
20065 count, remove one USE.
20067 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
20069 * doc/install.texi (Configuration): Document the
20070 --with-long-double-format={ibm,ieee} PowerPC configuration
20074 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
20075 Convert from define_expand to be define_insn_and_split. Rework
20076 float/double/_Float128 conversions to QI/HI/SImode to work with
20077 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
20078 conversions to QI/HImode types did a store and then a load to
20079 truncate the value. For conversions to VSX registers, don't split
20080 the insn, instead emit the code directly. Use the code iterator
20081 any_fix to combine signed and unsigned conversions.
20082 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
20083 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
20084 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
20085 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
20086 (fix_<mode>di2_hw): Likewise.
20087 (fixuns_<mode>di2_hw): Likewise.
20088 (fix_<mode>si2_hw): Likewise.
20089 (fixuns_<mode>si2_hw): Likewise.
20090 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
20091 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
20092 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
20093 fix<uns>_trunc<SFDF:mode>si2_p8.
20094 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
20095 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
20096 (fix<uns>_<mode>_mem): Likewise.
20097 (fctiw<u>z_<mode>_mem): Likewise.
20098 (fix<uns>_<mode>_mem): Likewise.
20099 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
20100 the register allocator from doing a direct move to the GPRs to do
20101 a store, and instead use the ISA 3.0 store byte/half-word from
20102 vector register instruction. For IEEE 128-bit floating point,
20103 also optimize stores of 32-bit ints.
20104 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
20106 2018-02-07 Alan Hayward <alan.hayward@arm.com>
20108 * genextract.c (push_pathstr_operand): New function to support
20110 (walk_rtx): Call push_pathstr_operand.
20111 (print_path): Support [a-zA-Z].
20113 2018-02-07 Richard Biener <rguenther@suse.de>
20115 PR tree-optimization/84037
20116 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
20117 (cse_and_gimplify_to_preheader): Declare.
20118 (vect_get_place_in_interleaving_chain): Likewise.
20119 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20121 (_loop_vec_info::~_loop_vec_info): Delete it.
20122 (cse_and_gimplify_to_preheader): New function.
20123 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
20124 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
20125 (vectorizable_load): Likewise. For grouped stores always base
20126 the IV on the first element.
20127 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
20128 condition before gimplifying.
20130 2018-02-07 Jakub Jelinek <jakub@redhat.com>
20132 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
20133 *DIV_EXPR and *MOD_EXPR.
20135 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
20138 * config/i386/i386.c (ix86_option_override_internal): Mask out
20139 the CF_SET bit when checking -fcf-protection.
20141 2018-02-07 Tom de Vries <tom@codesourcery.com>
20144 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
20147 2018-02-07 Richard Biener <rguenther@suse.de>
20149 PR tree-optimization/84204
20150 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
20153 PR tree-optimization/84205
20154 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
20155 special-case isl_ast_op_zdiv_r.
20157 PR tree-optimization/84223
20158 * graphite-scop-detection.c (gather_bbs::before_dom_children):
20159 Only add conditions from within the region.
20160 (gather_bbs::after_dom_children): Adjust.
20162 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
20165 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
20166 * config/avr/avr.md: Only post-reload split REG-REG moves if
20167 either register is GENERAL_REG_P.
20169 2018-02-07 Jakub Jelinek <jakub@redhat.com>
20171 PR tree-optimization/84235
20172 * tree-ssa-scopedtables.c
20173 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
20174 if the subtraction is performed in floating point type where NaNs are
20175 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
20176 build 1. Formatting fix.
20178 2018-02-06 Jakub Jelinek <jakub@redhat.com>
20181 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
20182 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
20183 and skip it regardless of bb boundaries. Use CALL_P macro,
20184 don't test INSN_P (insn) together with CALL_P or JUMP_P check
20185 unnecessarily, formatting fix.
20187 2018-02-06 Michael Collison <michael.collison@arm.com>
20189 * config/arm/thumb2.md:
20190 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
20191 (*thumb_mov_notscc): Ditto.
20193 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
20196 * config/rs6000/rs6000.md (su code attribute): Use "u" for
20197 unsigned_fix, not "s".
20199 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20201 * configure.ac (gcc_fn_eh_frame_ro): New function.
20202 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
20203 correct .eh_frame permissions.
20204 * configure: Regenerate.
20206 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
20208 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
20209 irrelevant options.
20211 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20213 * config/rs6000/rs6000.c (rs6000_option_override_internal):
20214 Display warning message for -mno-speculate-indirect-jumps.
20216 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
20218 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
20220 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
20222 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
20224 PR tree-optimization/84225
20225 * tree-eh.c (find_trapping_overflow): Only call
20226 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
20228 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
20231 * config/i386/i386.c: Reimplement the check of possible options
20232 -mibt/-mshstk conbination. Change error messages.
20233 * doc/invoke.texi: Fix a typo: remove extra '='.
20235 2018-02-06 Marek Polacek <polacek@redhat.com>
20237 PR tree-optimization/84228
20238 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
20240 2018-02-06 Tamar Christina <tamar.christina@arm.com>
20243 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
20244 emitted arch directives.
20245 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
20246 __ARM_FEATURE_COPROC before changing architectures.
20248 2018-02-06 Richard Biener <rguenther@suse.de>
20250 * config/i386/i386.c (print_reg): Fix typo.
20251 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
20253 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
20255 * configure: Regenerate.
20257 2018-02-05 Martin Sebor <msebor@redhat.com>
20259 PR tree-optimization/83369
20260 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
20263 2018-02-05 Martin Liska <mliska@suse.cz>
20265 * doc/invoke.texi: Cherry-pick upstream r323995.
20267 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
20269 * ira.c (ira_init_register_move_cost): Adjust comment.
20271 2018-02-05 Martin Liska <mliska@suse.cz>
20273 PR gcov-profile/84137
20274 * doc/gcov.texi: Fix typo in documentation.
20276 2018-02-05 Martin Liska <mliska@suse.cz>
20278 PR gcov-profile/83879
20279 * doc/gcov.texi: Document necessity of --dynamic-list-data when
20280 using dlopen functionality.
20282 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
20284 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
20285 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
20286 _mm_maskz_range_ss, _mm_mask_range_round_ss,
20287 _mm_maskz_range_round_ss): New intrinsics.
20288 (__builtin_ia32_rangesd128_round)
20289 (__builtin_ia32_rangess128_round): Remove.
20290 (__builtin_ia32_rangesd128_mask_round,
20291 __builtin_ia32_rangess128_mask_round): New builtins.
20292 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
20293 __builtin_ia32_rangess128_round): Remove.
20294 (__builtin_ia32_rangesd128_mask_round,
20295 __builtin_ia32_rangess128_mask_round): New builtins.
20296 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
20297 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
20298 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
20299 "<round_saeonly_constraint>")): Changed to ...
20300 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
20301 "<round_saeonly_scalar_constraint>")): ... this.
20302 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
20303 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
20304 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
20305 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
20306 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
20308 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
20310 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
20312 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
20313 Remove all values except native, 8540 and 8548.
20315 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
20317 * config/i386/i386.c (ix86_output_function_return): Pass
20318 INVALID_REGNUM, instead of -1, as invalid register number to
20319 indirect_thunk_name and output_indirect_thunk.
20321 2018-02-02 Julia Koval <julia.koval@intel.com>
20323 * config.gcc: Add -march=icelake.
20324 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
20325 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
20326 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
20327 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
20328 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
20329 (processor_target_table): Add icelake.
20330 (ix86_option_override_internal): Handle new PTAs.
20331 (get_builtin_code_for_version): Handle icelake.
20332 (M_INTEL_COREI7_ICELAKE): New.
20333 (fold_builtin_cpu): Handle icelake.
20334 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
20335 * doc/invoke.texi: Add -march=icelake.
20337 2018-02-02 Julia Koval <julia.koval@intel.com>
20339 * config/i386/i386.c (ix86_option_override_internal): Change flags type
20340 to wide_int_bitmask.
20341 * wide-int-bitmask.h: New.
20343 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
20346 * config/i386/i386.md: Replace Pmode with word_mode in
20347 builtin_setjmp_setup and builtin_longjmp to support x32.
20349 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
20353 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
20355 (rs6000_supported_cpu_names): New static variable.
20356 (linux_cpu_translation_table): Likewise.
20357 (elf_platform) <cpu>: Define new static variable and use it.
20358 Translate kernel AT_PLATFORM name to canonical name if needed.
20359 Error if platform name is unknown.
20361 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
20364 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
20366 2018-02-01 Jeff Law <law@redhat.com>
20369 * config/i386/i386.c (release_scratch_register_on_entry): Add new
20370 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
20371 the scratch if RELEASE_VIA_POP is false.
20372 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
20373 If we have to save a temporary register, decrement SIZE appropriately.
20374 Pass new arguments to release_scratch_register_on_entry.
20375 (ix86_adjust_stack_and_probe): Likewise.
20376 (ix86_emit_probe_stack_range): Pass new arguments to
20377 release_scratch_register_on_entry.
20379 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
20381 PR rtl-optimization/84157
20382 * combine.c (change_zero_ext): Use REG_P predicate in
20383 front of HARD_REGISTER_P predicate.
20385 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
20387 * config/avr/avr.c (avr_option_override): Move disabling of
20388 -fdelete-null-pointer-checks to...
20389 * common/config/avr/avr-common.c (avr_option_optimization_table):
20392 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20394 PR tree-optimization/81635
20395 * tree-data-ref.c (split_constant_offset_1): For types that
20396 wrap on overflow, try to use range info to prove that wrapping
20399 2018-02-01 Renlin Li <renlin.li@arm.com>
20402 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
20403 TAILCALL_ADDR_REGS.
20404 (aarch64_register_move_cost): Likewise.
20405 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
20406 TAILCALL_ADDR_REGS.
20407 (REG_CLASS_NAMES): Likewise.
20408 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
20409 TAILCALL_ADDR_REGS. Remove IP registers.
20410 * config/aarch64/aarch64.md (Ucs): Update register constraint.
20412 2018-02-01 Richard Biener <rguenther@suse.de>
20414 * domwalk.h (dom_walker::dom_walker): Add additional constructor
20415 for specifying RPO order and allow NULL for that.
20416 * domwalk.c (dom_walker::dom_walker): Likewise.
20417 (dom_walker::walk): Handle NULL RPO order.
20418 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
20420 (rewrite_update_dom_walker): Likewise.
20421 (mark_def_dom_walker): Likewise.
20423 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20425 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
20426 (aarch64_maybe_expand_sve_subreg_move): Declare.
20427 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
20428 * config/aarch64/predicates.md (aarch64_any_register_operand): New
20430 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
20431 that are semantically a reverse operation.
20432 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
20433 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
20434 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
20436 (aarch64_can_change_mode_class): For big-endian, forbid changes
20437 between two SVE modes if they have different element sizes.
20439 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20441 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
20442 the TImode handling for big-endian targets.
20444 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20446 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
20447 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
20449 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
20450 Remove BSWAP handing for big-endian targets and use the form of
20451 LD1RQ appropariate for the mode.
20453 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20455 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
20456 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
20457 duplicated element.
20459 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20462 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
20463 check for operands that need to go through aarch64_sve_reload_be.
20465 2018-02-01 Jakub Jelinek <jakub@redhat.com>
20467 PR tree-optimization/81661
20468 PR tree-optimization/84117
20469 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
20470 * tree-eh.c: Include gimplify.h.
20471 (find_trapping_overflow, replace_trapping_overflow,
20472 rewrite_to_non_trapping_overflow): New functions.
20473 * tree-vect-loop.c: Include tree-eh.h.
20474 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
20475 * tree-data-ref.c: Include tree-eh.h.
20476 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
20478 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
20480 PR rtl-optimization/84123
20481 * combine.c (change_zero_ext): Check if hard register satisfies
20482 can_change_dest_mode before calling gen_lowpart_SUBREG.
20484 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
20487 * ira.c (ira_init_register_move_cost): Remove assert.
20489 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20491 PR rtl-optimization/84071
20492 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
20493 * doc/tm.texi: Regenerate.
20495 2018-01-31 Richard Biener <rguenther@suse.de>
20497 PR tree-optimization/84132
20498 * tree-data-ref.c (analyze_miv_subscript): Properly
20499 check whether evolution_function_is_affine_multivariate_p
20500 before calling gcd_of_steps_may_divide_p.
20502 2018-01-31 Julia Koval <julia.koval@intel.com>
20505 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
20506 * config/i386/i386.md (rdpid_rex64) New.
20507 (rdpid): Make 32bit only.
20509 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
20512 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
20513 an IDENTIFIER_NODE for FUNCTION_TYPE's.
20515 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20518 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
20520 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20522 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20524 PR rtl-optimization/84071
20525 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
20526 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
20528 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
20530 * config/arc/arc.c (arc_handle_aux_attribute): New function.
20531 (arc_attribute_table): Add 'aux' attribute.
20532 (arc_in_small_data_p): Consider aux like variables.
20533 (arc_is_aux_reg_p): New function.
20534 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
20535 (arc_get_aux_arg): New function.
20536 (prepare_move_operands): Handle aux-register access.
20537 (arc_handle_aux_attribute): New function.
20538 * doc/extend.texi (ARC Variable attributes): Add subsection.
20540 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
20542 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
20543 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
20544 (arc_attribute_table): Add 'uncached' attribute.
20545 (arc_print_operand): Print '.di' flag for uncached memory
20547 (arc_in_small_data_p): Do not consider for small data the uncached
20549 (arc_is_uncached_mem_p): New function.
20550 * config/arc/predicates.md (compact_store_memory_operand): Check
20551 for uncached memory accesses.
20552 (nonvol_nonimm_operand): Likewise.
20553 * doc/extend.texi (ARC Type Attribute): New subsection.
20555 2018-01-31 Jakub Jelinek <jakub@redhat.com>
20558 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
20559 falign-loops=): Add Optimization flag.
20561 2018-01-30 Jeff Law <law@redhat.com>
20564 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
20565 INT_REGISTERS_SAVED. Check it prior to calling
20566 get_scratch_register_on_entry.
20567 (ix86_adjust_stack_and_probe): Similarly.
20568 (ix86_emit_probe_stack_range): Similarly.
20569 (ix86_expand_prologue): Corresponding changes.
20571 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20574 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
20575 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
20577 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
20580 * lra-constraints.c (curr_insn_transform): Process AND in the
20583 2018-01-30 Jakub Jelinek <jakub@redhat.com>
20585 PR rtl-optimization/83986
20586 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
20587 dependence against last_pending_memory_flush in addition to
20588 pending_jump_insns.
20590 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
20592 PR tree-optimization/81611
20593 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
20596 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20599 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
20602 2018-01-30 Richard Biener <rguenther@suse.de>
20603 Jakub Jelinek <jakub@redhat.com>
20605 PR tree-optimization/84111
20606 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
20607 inner loops added during recursion, as they don't have up-to-date
20610 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
20613 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
20614 (can_inline_edge_by_limits_p): ... here.
20615 (can_early_inline_edge_p, check_callers,
20616 update_caller_keys, update_callee_keys, recursive_inlining,
20617 add_new_edges_to_heap, speculation_useful_p,
20618 inline_small_functions,
20619 inline_small_functions, flatten_function,
20620 inline_to_all_callers_1): Update.
20622 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
20624 * profile-count.c (profile_count::combine_with_ipa_count): Handle
20627 2018-01-30 Richard Biener <rguenther@suse.de>
20629 PR tree-optimization/83008
20630 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
20631 invariant and constant vector uses in stmts when they need
20632 more than one stmt.
20634 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20637 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
20638 * configure: Regenerate.
20640 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20642 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
20644 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
20645 Use gen_rtx_REG rather than gen_lowpart.
20647 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20649 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
20650 rather than 0 when creating partial subregs.
20652 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20654 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
20657 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
20660 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
20661 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
20662 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
20663 flags. This restores the settings used before the 2017-07-24.
20664 Turning off pre increment/decrement/modify allows IVOPTS to
20665 optimize DF/SF loops where the index is an int.
20667 2018-01-29 Richard Biener <rguenther@suse.de>
20668 Kelvin Nilsen <kelvin@gcc.gnu.org>
20671 * tree-vect-stmts.c (vectorizable_call): Don't call
20672 targetm.vectorize_builtin_md_vectorized_function if callee is
20675 2018-01-22 Carl Love <cel@us.ibm.com>
20677 * doc/extend.tex: Fix typo in second arg in
20678 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
20680 2018-01-29 Richard Biener <rguenther@suse.de>
20682 PR tree-optimization/84086
20683 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
20684 (flush_ssaname_freelist): When SSA names were released reset
20685 the SCEV hash table.
20687 2018-01-29 Richard Biener <rguenther@suse.de>
20689 PR tree-optimization/84057
20690 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
20691 removed paths when removing edges.
20693 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
20695 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
20696 -mfunction-return=@var{choice}.
20698 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
20700 PR diagnostic/84034
20701 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
20702 Handle CR like TAB.
20703 (layout::print_source_line): Likewise.
20704 (test_get_line_width_without_trailing_whitespace): Add test cases.
20706 2018-01-27 Jakub Jelinek <jakub@redhat.com>
20708 PR middle-end/84040
20709 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
20712 2018-01-26 Jim Wilson <jimw@sifive.com>
20714 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
20716 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
20719 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20721 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
20722 and CMP + SUB-immediate -> SUBS.
20724 2018-01-26 Martin Sebor <msebor@redhat.com>
20726 PR tree-optimization/83896
20727 * tree-ssa-strlen.c (get_string_len): Rename...
20728 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
20729 Avoid assuming length is constant.
20730 (handle_char_store): Use HOST_WIDE_INT for string length.
20732 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
20735 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
20736 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
20738 2018-01-26 Richard Biener <rguenther@suse.de>
20740 PR rtl-optimization/84003
20741 * dse.c (record_store): Only record redundant stores when
20742 the earlier store aliases at least all accesses the later one does.
20744 2018-01-26 Jakub Jelinek <jakub@redhat.com>
20746 PR rtl-optimization/83985
20747 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
20748 REG_CFA_RESTORE insns.
20749 (delete_unmarked_insns): Don't ignore separate shrink wrapping
20750 REG_CFA_RESTORE insns here.
20753 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
20754 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
20756 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20758 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
20759 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
20760 (arc_init): Likewise.
20761 (arc_override_options): Likewise.
20762 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
20764 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
20766 * config/arc/arc.h (TARGET_DBNZ): Define.
20767 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
20768 properly set the tune attribute.
20769 (dbnz): Use TARGET_DBNZ guard.
20770 * config/arc/arc.opt (mtune): Add core3 option.
20772 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20774 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
20775 recognize new pic like addresses.
20776 (arc_delegitimize_address): Clean up.
20778 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20780 * config/arc/arc-arches.def: Option mrf16 valid for all
20782 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
20783 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
20784 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
20785 * config/arc/arc-tables.opt: Regenerate.
20786 * config/arc/arc.c (arc_conditional_register_usage): Handle
20787 reduced register file case.
20788 (arc_file_start): Set must have build attributes.
20789 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
20790 mrf16 option value.
20791 * config/arc/arc.opt (mrf16): Add new option.
20792 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
20793 * config/arc/genmultilib.awk: Handle new mrf16 option.
20794 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
20795 * config/arc/t-multilib: Regenerate.
20796 * doc/invoke.texi (ARC Options): Document mrf16 option.
20798 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20800 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
20801 * config/arc/arc.c (arc_handle_secure_attribute): New function.
20802 (arc_attribute_table): Add 'secure_call' attribute.
20803 (arc_print_operand): Print secure call operand.
20804 (arc_function_ok_for_sibcall): Don't optimize tail calls when
20806 (arc_is_secure_call_p): New function. * config/arc/arc.md
20807 (call_i): Add support for sjli instruction.
20808 (call_value_i): Likewise.
20809 * config/arc/constraints.md (Csc): New constraint.
20811 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20812 John Eric Martin <John.Martin@emmicro-us.com>
20814 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
20815 * config/arc/arc.c (_arc_jli_section): New struct.
20816 (arc_jli_section): New type.
20817 (rc_jli_sections): New static variable.
20818 (arc_handle_jli_attribute): New function.
20819 (arc_attribute_table): Add jli_always and jli_fixed attribute.
20820 (arc_file_end): New function.
20821 (TARGET_ASM_FILE_END): Define.
20822 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
20823 (arc_add_jli_section): New function.
20824 (jli_call_scan): Likewise.
20825 (arc_reorg): Call jli_call_scan.
20826 (arc_output_addsi): Remove 'S' from printing asm operand.
20827 (arc_is_jli_call_p): New function.
20828 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
20830 (movhi_insn): Likewise.
20831 (movsi_insn): Likewise.
20832 (movsi_set_cc_insn): Likewise.
20833 (loadqi_update): Likewise.
20834 (load_zeroextendqisi_update): Likewise.
20835 (load_signextendqisi_update): Likewise.
20836 (loadhi_update): Likewise.
20837 (load_zeroextendhisi_update): Likewise.
20838 (load_signextendhisi_update): Likewise.
20839 (loadsi_update): Likewise.
20840 (loadsf_update): Likewise.
20841 (movsicc_insn): Likewise.
20842 (bset_insn): Likewise.
20843 (bxor_insn): Likewise.
20844 (bclr_insn): Likewise.
20845 (bmsk_insn): Likewise.
20846 (bicsi3_insn): Likewise.
20847 (cmpsi_cc_c_insn): Likewise.
20848 (movsi_ne): Likewise.
20849 (movsi_cond_exec): Likewise.
20850 (clrsbsi2): Likewise.
20851 (norm_f): Likewise.
20861 (call_i): Remove 'S' asm letter, add jli instruction.
20862 (call_value_i): Likewise.
20863 * config/arc/arc.op (mjli-always): New option.
20864 * config/arc/constraints.md (Cji): New constraint.
20865 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20867 (subsf3_fpx): Likewise.
20868 (mulsf3_fpx): Likewise.
20869 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20871 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20872 function attrbutes.
20873 * doc/invoke.texi (ARC): Document mjli-always option.
20875 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
20877 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20878 avoid addition with 0 and use incw and decw where possible.
20880 2018-01-26 Richard Biener <rguenther@suse.de>
20882 PR tree-optimization/81082
20883 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20884 association if it requires casting to unsigned.
20885 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20886 from fold_plusminus_mult_expr to catch important cases late when
20887 range info is available.
20889 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20891 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20892 * configure.ac (hidden_linkonce): New test.
20893 * configure: Regenerate.
20894 * config.in: Regenerate.
20896 2018-01-26 Julia Koval <julia.koval@intel.com>
20898 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20899 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20900 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20901 _mm_mask_bitshuffle_epi64_mask): Fix type.
20902 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20903 USI_FTYPE_V4DI_V4DI_USI): Remove.
20904 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20905 __builtin_ia32_vpshufbitqmb256_mask,
20906 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20907 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20908 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20910 2018-01-26 Alan Modra <amodra@gmail.com>
20913 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20914 UNSPEC_VBPERMQ. Sort other unspecs.
20916 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
20918 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20920 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
20922 PR middle-end/83055
20923 * predict.c (drop_profile): Do not push/pop cfun; update also
20925 (handle_missing_profiles): Fix logic looking for zero profiles.
20927 2018-01-25 Jakub Jelinek <jakub@redhat.com>
20929 PR middle-end/83977
20930 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20931 on functions with #pragma omp declare simd or functions with simd
20933 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20934 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20935 Remove trailing \n from warning_at calls.
20937 2018-01-25 Tom de Vries <tom@codesourcery.com>
20940 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20941 for neutered workers.
20943 2018-01-24 Joseph Myers <joseph@codesourcery.com>
20946 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20947 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20949 2018-01-24 Jeff Law <law@redhat.com>
20952 * i386.c (get_probe_interval): Move to earlier point.
20953 (ix86_compute_frame_layout): If -fstack-clash-protection and
20954 the frame is larger than the probe interval, then use pushes
20955 to save registers rather than reg->mem moves.
20956 (ix86_expand_prologue): Remove conditional for int_registers_saved
20959 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
20962 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20963 min/max for never referenced object.
20965 2018-01-24 Jakub Jelinek <jakub@redhat.com>
20967 PR middle-end/83977
20968 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20970 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20971 attributes from DECL_ATTRIBUTES (decl) without affecting
20972 DECL_ATTRIBUTES (current_function_decl).
20973 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20974 functions with non-NULL DECL_ABSTRACT_ORIGIN.
20976 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
20978 PR tree-optimization/83979
20979 * fold-const.c (fold_comparison): Use constant_boolean_node
20980 instead of boolean_{true,false}_node.
20982 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
20984 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20987 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20989 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20990 Simplify the clause that sets the length attribute.
20991 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20992 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20993 clause that sets the length attribute.
20994 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20996 2018-01-24 Tom de Vries <tom@codesourcery.com>
20999 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
21000 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
21001 Add strict parameter.
21002 (prevent_branch_around_nothing): Insert dummy insn between branch to
21003 label and label with no ptx insn inbetween.
21004 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
21006 2018-01-24 Tom de Vries <tom@codesourcery.com>
21009 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
21010 for neutered threads in warp.
21011 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
21013 2018-01-24 Richard Biener <rguenther@suse.de>
21015 PR tree-optimization/83176
21016 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
21019 2018-01-24 Richard Biener <rguenther@suse.de>
21021 PR tree-optimization/82819
21022 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
21023 code generating pluses that are no-ops in the target precision.
21025 2018-01-24 Richard Biener <rguenther@suse.de>
21027 PR middle-end/84000
21028 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
21030 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
21032 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
21033 to merge probabilities.
21034 * predict.c (probably_never_executed): Also mark as cold functions
21035 with global 0 profile and guessed local profile.
21036 * profile-count.c (profile_probability::combine_with_count): New
21038 * profile-count.h (profile_probability::operator*,
21039 profile_probability::operator*=, profile_probability::operator/,
21040 profile_probability::operator/=): Reduce precision to adjusted
21041 and set value to guessed on contradictory divisions.
21042 (profile_probability::combine_with_freq): Remove.
21043 (profile_probability::combine_wiht_count): Declare.
21044 (profile_count::force_nonzero):: Set to adjusted.
21045 (profile_count::probability_in):: Set quality to adjusted.
21046 * tree-ssa-tail-merge.c (replace_block_by): Use
21047 combine_with_count.
21049 2018-01-23 Andrew Waterman <andrew@sifive.com>
21050 Jim Wilson <jimw@sifive.com>
21052 * config/riscv/riscv.c (riscv_stack_boundary): New.
21053 (riscv_option_override): Set riscv_stack_boundary. Handle
21054 riscv_preferred_stack_boundary_arg.
21055 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
21056 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
21057 (STACK_BOUNDARY): Set to riscv_stack_boundary.
21058 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
21059 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
21060 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
21062 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
21065 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
21066 of struct ix86_frame.
21067 (ix86_expand_epilogue): Likewise. Add a local variable for
21068 the reg_save_offset field in struct ix86_frame.
21070 2018-01-23 Bin Cheng <bin.cheng@arm.com>
21072 PR tree-optimization/82604
21073 * tree-loop-distribution.c (enum partition_kind): New enum item
21074 PKIND_PARTIAL_MEMSET.
21075 (partition_builtin_p): Support above new enum item.
21076 (generate_code_for_partition): Ditto.
21077 (compute_access_range): Differentiate cases that equality can be
21078 proven at all loops, the innermost loops or no loops.
21079 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
21080 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
21081 (finalize_partitions, distribute_loop): Don't fuse partition of
21082 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
21083 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
21084 parloop is enabled.
21086 2018-01-23 Martin Liska <mliska@suse.cz>
21088 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
21089 order to ignore the predictor.
21090 (PRED_POLYMORPHIC_CALL): Likewise.
21091 (PRED_RECURSIVE_CALL): Likewise.
21093 2018-01-23 Martin Liska <mliska@suse.cz>
21095 * tree-profile.c (tree_profiling): Print function header to
21096 aware reader which function we are working on.
21097 * value-prof.c (gimple_find_values_to_profile): Do not print
21098 not interesting value histograms.
21100 2018-01-23 Martin Liska <mliska@suse.cz>
21102 * profile-count.h (enum profile_quality): Add
21103 profile_uninitialized as the first value. Do not number values
21104 as they are zero based.
21105 (profile_count::verify): Update sanity check.
21106 (profile_probability::verify): Likewise.
21108 2018-01-23 Nathan Sidwell <nathan@acm.org>
21110 * doc/invoke.texi (ffor-scope): Deprecate.
21112 2018-01-23 David Malcolm <dmalcolm@redhat.com>
21114 PR tree-optimization/83510
21115 * domwalk.c (set_all_edges_as_executable): New function.
21116 (dom_walker::dom_walker): Convert bool param
21117 "skip_unreachable_blocks" to enum reachability. Move setup of
21118 edge flags to set_all_edges_as_executable and only do it when
21119 reachability is REACHABLE_BLOCKS.
21120 * domwalk.h (enum dom_walker::reachability): New enum.
21121 (dom_walker::dom_walker): Convert bool param
21122 "skip_unreachable_blocks" to enum reachability.
21123 (set_all_edges_as_executable): New decl.
21124 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
21125 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
21127 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
21128 but converting true to REACHABLE_BLOCKS.
21129 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
21131 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
21132 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
21133 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
21135 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
21136 if check_all_array_refs will be called.
21138 2018-01-23 David Malcolm <dmalcolm@redhat.com>
21140 * tree.c (selftest::test_location_wrappers): Add more test
21143 2018-01-23 David Malcolm <dmalcolm@redhat.com>
21145 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
21146 (selftest::test_bit_in_range): Likewise.
21148 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
21151 * doc/sourcebuild.texi (vect_float): Say that the selector
21152 only describes the situation when -funsafe-math-optimizations is on.
21153 (vect_float_strict): Document.
21155 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
21157 PR tree-optimization/83965
21158 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
21159 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
21160 instead of checking only for a reduction.
21161 (vect_recog_widen_sum_pattern): Likewise.
21163 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
21165 * predict.c (probably_never_executed): Only use precise profile info.
21166 (compute_function_frequency): Skip after inlining hack since we now
21167 have quality checking.
21169 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
21171 * profile-count.h (profile_probability::very_unlikely,
21172 profile_probability::unlikely, profile_probability::even): Set
21173 precision to guessed.
21175 2018-01-23 Richard Biener <rguenther@suse.de>
21177 PR tree-optimization/83963
21178 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
21179 Properly terminate dominator walk when crossing the exit edge not
21180 when visiting its source block.
21182 2018-01-23 Jakub Jelinek <jakub@redhat.com>
21185 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
21186 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
21188 2018-01-22 Jakub Jelinek <jakub@redhat.com>
21190 PR tree-optimization/83957
21191 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
21192 semicolon after for body surrounded by braces.
21194 PR tree-optimization/83081
21195 * profile-count.h (profile_probability::split): New method.
21196 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
21197 Use profile_probability::split.
21198 (do_compare_rtx_and_jump): Fix adjustment of probabilities
21199 when splitting a single conditional jump into 2.
21201 2018-01-22 David Malcolm <dmalcolm@redhat.com>
21203 PR tree-optimization/69452
21204 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
21207 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21209 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
21210 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
21211 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
21213 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21215 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
21217 * config/rl78/rl78.md (movdi): New define_expand.
21218 * config/rl78/rl78.c (rl78_split_movdi): New function.
21220 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
21223 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
21225 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
21226 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
21227 128-bit to produce an UNSPEC move to get the double word with the
21228 signbit and then a shift directly to do signbit.
21229 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
21230 implementation with a new version that just does either a direct
21231 move or a regular move. Move memory interface to separate insns.
21232 Move insns so they are next to the expander.
21233 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
21234 with signbit move. Split big and little endian case.
21235 (signbit<mode>2_dm_mem_le): Likewise.
21236 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
21237 (signbit<mode>2_dm2): Likewise.
21239 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21241 * config/rl78/rl78.md (anddi3): New define_expand.
21243 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21245 * config/rl78/rl78.md (umindi3): New define_expand.
21247 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21249 * config/rl78/rl78.md (smindi3): New define_expand.
21251 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21253 * config/rl78/rl78.md (smaxdi3): New define_expand.
21255 2018-01-22 Carl Love <cel@us.ibm.com>
21257 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
21258 LVX_V1TI): Add macro expansion.
21259 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
21260 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
21261 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
21262 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
21263 Change check to determine if the instruction is a byte reversing
21264 entry. Fix typo in comment.
21265 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
21266 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
21267 Add def_builtin calls for new builtins.
21268 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
21269 Add define_insn expansion.
21271 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21273 * config/rl78/rl78.md (umaxdi3): New define_expand.
21275 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21277 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
21278 for non-QImode registers.
21280 2018-01-22 Richard Biener <rguenther@suse.de>
21282 PR tree-optimization/83963
21283 * graphite-scop-detection.c (scop_detection::get_sese): Delay
21284 including the loop exit block.
21285 (scop_detection::merge_sese): Likewise.
21286 (scop_detection::add_scop): Do it here instead.
21288 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21290 * doc/sourcebuild.texi (arm_softfloat): Document.
21292 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
21295 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
21296 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
21297 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
21299 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21300 David Edelsohn <dje.gcc@gmail.com>
21303 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21304 Change "crset eq" to "crset 2".
21305 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21306 (*call_indirect_aix<mode>_nospec): Likewise.
21307 (*call_value_indirect_aix<mode>_nospec): Likewise.
21308 (*call_indirect_elfv2<mode>_nospec): Likewise.
21309 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
21310 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
21311 change assembly output from . to $.
21312 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21313 (indirect_jump<mode>_nospec): Change assembly output from . to $.
21314 (*tablejump<mode>_internal1_nospec): Likewise.
21316 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
21319 * config/sh/sh_optimize_sett_clrt.cc:
21320 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
21322 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
21324 PR tree-optimization/83940
21325 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
21326 offset_dt to vect_constant_def rather than vect_unknown_def_type.
21327 (vect_check_load_store_mask): Add a mask_dt_out parameter and
21328 use it to pass back the definition type.
21329 (vect_check_store_rhs): Likewise rhs_dt_out.
21330 (vect_build_gather_load_calls): Add a mask_dt argument and use
21331 it instead of a call to vect_is_simple_use.
21332 (vectorizable_store): Update calls to vect_check_load_store_mask
21333 and vect_check_store_rhs. Use the dt returned by the latter instead
21334 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
21335 instead of calls to vect_is_simple_use. Pass the scalar rather
21336 than the vector operand to vect_is_simple_use when handling
21337 second and subsequent copies of an rhs value.
21338 (vectorizable_load): Update calls to vect_check_load_store_mask
21339 and vect_build_gather_load_calls. Use the cached mask_dt and
21340 gs_info.offset_dt instead of calls to vect_is_simple_use.
21342 2018-01-20 Jakub Jelinek <jakub@redhat.com>
21344 PR middle-end/83945
21345 * tree-emutls.c: Include gimplify.h.
21346 (lower_emutls_2): New function.
21347 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
21348 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
21349 it before further processing.
21352 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
21353 UINTVAL (trueop1) instead of INTVAL (op1).
21355 2018-01-19 Jakub Jelinek <jakub@redhat.com>
21359 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
21360 INCOMING_FRAME_SP_OFFSET if not defined.
21361 (scan_trace): Add ENTRY argument. If true and
21362 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
21363 emit a note to adjust the CFA offset.
21364 (create_cfi_notes): Adjust scan_trace callers.
21365 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
21366 INCOMING_FRAME_SP_OFFSET in the CIE.
21367 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
21368 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
21370 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
21371 * doc/tm.texi: Regenerated.
21373 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21375 PR rtl-optimization/83147
21376 * lra-constraints.c (remove_inheritance_pseudos): Use
21377 lra_substitute_pseudo_within_insn.
21379 2018-01-19 Tom de Vries <tom@codesourcery.com>
21380 Cesar Philippidis <cesar@codesourcery.com>
21383 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
21385 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
21388 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
21389 spaces for function labels.
21391 2018-01-19 Martin Liska <mliska@suse.cz>
21393 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
21394 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
21395 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
21396 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
21397 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
21398 (PRED_CONST_RETURN): Change from 69 to 65.
21399 (PRED_NULL_RETURN): Change from 91 to 71.
21400 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
21401 (PRED_LOOP_GUARD): Change from 66 to 73.
21403 2018-01-19 Martin Liska <mliska@suse.cz>
21405 * predict.c (predict_insn_def): Add new assert.
21406 (struct branch_predictor): Change type to signed integer.
21407 (test_prediction_value_range): Amend test to cover
21408 PROB_UNINITIALIZED.
21409 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
21410 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
21411 (PRED_LOOP_ITERATIONS_MAX): Likewise.
21412 (PRED_LOOP_IV_COMPARE): Likewise.
21413 * predict.h (PROB_UNINITIALIZED): Define new constant.
21415 2018-01-19 Martin Liska <mliska@suse.cz>
21417 * predict.c (dump_prediction): Add new format for
21418 analyze_brprob.py script which is enabled with -details
21420 * profile-count.h (precise_p): New function.
21422 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
21424 PR tree-optimization/83922
21425 * tree-vect-loop.c (vect_verify_full_masking): Return false if
21426 there are no statements that need masking.
21427 (vect_active_double_reduction_p): New function.
21428 (vect_analyze_loop_operations): Use it when handling phis that
21429 are not in the loop header.
21431 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
21433 PR tree-optimization/83914
21434 * tree-vect-loop.c (vectorizable_induction): Don't convert
21435 init_expr or apply the peeling adjustment for inductions
21436 that are nested within the vectorized loop.
21438 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21440 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
21443 2018-01-18 Jakub Jelinek <jakub@redhat.com>
21447 * function.h (gimplify_parameters): Add gimple_seq * argument.
21448 * function.c: Include gimple.h and options.h.
21449 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
21450 for the added local temporaries if needed.
21451 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
21452 if there are any parameter cleanups, wrap whole body into a
21453 try/finally with the cleanups.
21455 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
21458 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
21459 Use GET_MODE_CLASS for scalar floating point.
21461 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
21465 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
21466 Fix call of call_cgraph_insertion_hooks.
21468 2018-01-18 Martin Sebor <msebor@redhat.com>
21470 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
21472 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
21475 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
21478 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
21481 * common.opt: (-ffile-prefix-map): New option.
21482 * opts.c (common_handle_option): Defer it.
21483 * opts-global.c (handle_common_deferred_options): Handle it.
21484 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
21485 * file-prefix-map.h: New file.
21486 (remap_debug_filename, add_debug_prefix_map): ...here.
21487 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
21488 * final.c (debug_prefix_map, add_debug_prefix_map
21489 remap_debug_filename): Move to...
21490 * file-prefix-map.c: New file.
21491 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
21492 generalize, get rid of alloca(), use strrchr() instead of strchr().
21493 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
21494 Implement in terms of add_prefix_map().
21495 (remap_macro_filename, remap_debug_filename): Implement in term of
21497 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
21498 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
21499 * dbxout.c: Include file-prefix-map.h.
21500 * varasm.c: Likewise.
21501 * vmsdbgout.c: Likewise.
21502 * xcoffout.c: Likewise.
21503 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
21504 * doc/cppopts.texi (-fmacro-prefix-map): Document.
21505 * doc/invoke.texi (-ffile-prefix-map): Document.
21506 (-fdebug-prefix-map): Update description.
21508 2018-01-18 Martin Liska <mliska@suse.cz>
21510 * config/i386/i386.c (indirect_thunk_name): Document that also
21512 (output_indirect_thunk): Document why both instructions
21513 (pause and lfence) are generated.
21515 2018-01-18 Richard Biener <rguenther@suse.de>
21517 PR tree-optimization/83887
21518 * graphite-scop-detection.c
21519 (scop_detection::get_nearest_dom_with_single_entry): Remove.
21520 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
21521 (scop_detection::merge_sese): Re-implement with a flood-fill
21522 algorithm that properly finds a SESE region if it exists.
21524 2018-01-18 Jakub Jelinek <jakub@redhat.com>
21527 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
21528 pointer_diff optimizations use view_convert instead of convert.
21530 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21532 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21533 Generate different code for -mno-speculate-indirect-jumps.
21534 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21535 (*call_indirect_aix<mode>): Disable for
21536 -mno-speculate-indirect-jumps.
21537 (*call_indirect_aix<mode>_nospec): New define_insn.
21538 (*call_value_indirect_aix<mode>): Disable for
21539 -mno-speculate-indirect-jumps.
21540 (*call_value_indirect_aix<mode>_nospec): New define_insn.
21541 (*sibcall_nonlocal_sysv<mode>): Generate different code for
21542 -mno-speculate-indirect-jumps.
21543 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21545 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
21547 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
21548 long double type, set the flags for noting the default long double
21549 type, even if we don't pass or return a long double type.
21551 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
21554 * ipa-inline.c (flatten_function): Do not overwrite final inlining
21557 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
21559 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
21560 support for merge[hl].
21561 (fold_mergehl_helper): New helper function.
21562 (tree-vector-builder.h): New #include for tree_vector_builder usage.
21563 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
21564 (altivec_vmrglw_direct): Add xxmrglw insn.
21566 2018-01-17 Andrew Waterman <andrew@sifive.com>
21568 * config/riscv/riscv.c (riscv_conditional_register_usage): If
21569 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
21571 2018-01-17 David Malcolm <dmalcolm@redhat.com>
21574 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
21575 call the lto_location_cache before reading the
21576 DECL_SOURCE_LOCATION of the types.
21578 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
21579 Richard Sandiford <richard.sandiford@linaro.org>
21581 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
21582 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
21583 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
21584 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
21585 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
21587 * config/aarch64/constraints.md (aarch64_movti_operand):
21589 * config/aarch64/predicates.md (Uti): Add new constraint.
21591 2018-01-17 Carl Love <cel@us.ibm.com>
21593 * config/rs6000/vsx.md (define_expand xl_len_r,
21594 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
21595 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
21597 (define_expand, define_insn): Move the shift left from the
21598 define_insn to the define_expand for lxvl and stxvl instructions.
21599 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
21600 and XL_LEN_R definitions to PURE.
21602 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
21604 * config/i386/i386.c (indirect_thunk_name): Declare regno
21605 as unsigned int. Compare regno with INVALID_REGNUM.
21606 (output_indirect_thunk): Ditto.
21607 (output_indirect_thunk_function): Ditto.
21608 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
21609 in the call to output_indirect_thunk_function.
21611 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
21613 PR middle-end/83884
21614 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
21615 rather than the size of inner_type to determine the stack slot size
21616 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
21618 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
21621 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
21624 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
21626 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
21627 endian Linux systems to optionally enable multilibs for selecting
21628 the long double type if the user configured an explicit type.
21629 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
21630 have no long double multilibs if not defined.
21631 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
21632 warn if the user used -mabi={ieee,ibm}longdouble and we built
21633 multilibs for long double.
21634 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
21635 appropriate multilib option.
21636 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
21638 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
21639 for building long double multilibs.
21640 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
21642 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
21644 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
21647 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
21649 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
21652 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
21655 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
21658 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21660 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
21661 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
21663 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
21665 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
21666 different rtl trees depending on TARGET_64BIT.
21667 (rs6000_gen_lvx): Likewise.
21669 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21671 * config/visium/visium.md (nop): Tweak comment.
21672 (hazard_nop): Likewise.
21674 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21676 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
21677 -mspeculate-indirect-jumps.
21678 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
21679 for -mno-speculate-indirect-jumps.
21680 (*call_indirect_elfv2<mode>_nospec): New define_insn.
21681 (*call_value_indirect_elfv2<mode>): Disable for
21682 -mno-speculate-indirect-jumps.
21683 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
21684 (indirect_jump): Emit different RTL for
21685 -mno-speculate-indirect-jumps.
21686 (*indirect_jump<mode>): Disable for
21687 -mno-speculate-indirect-jumps.
21688 (*indirect_jump<mode>_nospec): New define_insn.
21689 (tablejump): Emit different RTL for
21690 -mno-speculate-indirect-jumps.
21691 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
21692 (tablejumpsi_nospec): New define_expand.
21693 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
21694 (tablejumpdi_nospec): New define_expand.
21695 (*tablejump<mode>_internal1): Disable for
21696 -mno-speculate-indirect-jumps.
21697 (*tablejump<mode>_internal1_nospec): New define_insn.
21698 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
21701 2018-01-16 Artyom Skrobov tyomitch@gmail.com
21703 * caller-save.c (insert_save): Drop unnecessary parameter. All
21706 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21707 Richard Biener <rguenth@suse.de>
21710 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
21711 return early, inline manually is_gimple_sizepos. Make sure if we
21712 call gimplify_expr we don't end up with a gimple constant.
21713 * tree.c (variably_modified_type_p): Don't return true for
21714 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
21715 * gimplify.h (is_gimple_sizepos): Remove.
21717 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21719 PR tree-optimization/83857
21720 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
21721 vectorizable_live_operation for pure SLP statements.
21722 (vectorizable_live_operation): Handle PHIs.
21724 2018-01-16 Richard Biener <rguenther@suse.de>
21726 PR tree-optimization/83867
21727 * tree-vect-stmts.c (vect_transform_stmt): Precompute
21728 nested_in_vect_loop_p since the scalar stmt may get invalidated.
21730 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21733 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
21734 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
21735 If off is not INTEGER_CST, issue a may not be aligned warning
21736 rather than isn't aligned. Use isn%'t rather than isn't.
21737 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
21739 <case MULT_EXPR>: Improve the case when bottom and one of the
21740 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
21741 operand, in that case check if the other operand is multiple of
21742 bottom divided by the INTEGER_CST operand.
21744 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21747 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
21748 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
21749 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
21750 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
21751 * config/pa/pa.c (pa_function_arg_advance): Likewise.
21752 (pa_function_arg, pa_arg_partial_bytes): Likewise.
21753 (pa_function_arg_size): New function.
21755 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21757 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
21758 in a separate statement.
21760 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21762 PR tree-optimization/83847
21763 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
21764 group gathers and scatters.
21766 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21768 PR rtl-optimization/86620
21769 * params.def (max-sched-ready-insns): Bump minimum value to 1.
21771 PR rtl-optimization/83213
21772 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
21773 to last if both are JUMP_INSNs.
21775 PR tree-optimization/83843
21776 * gimple-ssa-store-merging.c
21777 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
21778 store_immediate_info for bswap/nop orig_stores.
21780 2018-01-15 Andrew Waterman <andrew@sifive.com>
21782 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
21784 <UDIV>: Increase cost if !TARGET_DIV.
21786 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
21788 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
21789 (define_attr "cr_logical_3op"): New.
21790 (cceq_ior_compare): Adjust.
21791 (cceq_ior_compare_complement): Adjust.
21792 (*cceq_rev_compare): Adjust.
21793 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
21794 (is_cracked_insn): Adjust.
21795 (insn_must_be_first_in_group): Adjust.
21796 * config/rs6000/40x.md: Adjust.
21797 * config/rs6000/440.md: Adjust.
21798 * config/rs6000/476.md: Adjust.
21799 * config/rs6000/601.md: Adjust.
21800 * config/rs6000/603.md: Adjust.
21801 * config/rs6000/6xx.md: Adjust.
21802 * config/rs6000/7450.md: Adjust.
21803 * config/rs6000/7xx.md: Adjust.
21804 * config/rs6000/8540.md: Adjust.
21805 * config/rs6000/cell.md: Adjust.
21806 * config/rs6000/e300c2c3.md: Adjust.
21807 * config/rs6000/e500mc.md: Adjust.
21808 * config/rs6000/e500mc64.md: Adjust.
21809 * config/rs6000/e5500.md: Adjust.
21810 * config/rs6000/e6500.md: Adjust.
21811 * config/rs6000/mpc.md: Adjust.
21812 * config/rs6000/power4.md: Adjust.
21813 * config/rs6000/power5.md: Adjust.
21814 * config/rs6000/power6.md: Adjust.
21815 * config/rs6000/power7.md: Adjust.
21816 * config/rs6000/power8.md: Adjust.
21817 * config/rs6000/power9.md: Adjust.
21818 * config/rs6000/rs64.md: Adjust.
21819 * config/rs6000/titan.md: Adjust.
21821 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21823 * config/i386/predicates.md (indirect_branch_operand): Rewrite
21824 ix86_indirect_branch_register logic.
21826 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21828 * config/i386/constraints.md (Bs): Update
21829 ix86_indirect_branch_register check. Don't check
21830 ix86_indirect_branch_register with GOT_memory_operand.
21832 * config/i386/predicates.md (GOT_memory_operand): Don't check
21833 ix86_indirect_branch_register here.
21834 (GOT32_symbol_operand): Likewise.
21836 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21838 * config/i386/predicates.md (constant_call_address_operand):
21839 Rewrite ix86_indirect_branch_register logic.
21840 (sibcall_insn_operand): Likewise.
21842 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21844 * config/i386/constraints.md (Bs): Replace
21845 ix86_indirect_branch_thunk_register with
21846 ix86_indirect_branch_register.
21848 * config/i386/i386.md (indirect_jump): Likewise.
21849 (tablejump): Likewise.
21850 (*sibcall_memory): Likewise.
21851 (*sibcall_value_memory): Likewise.
21852 Peepholes of indirect call and jump via memory: Likewise.
21853 * config/i386/i386.opt: Likewise.
21854 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21855 (GOT_memory_operand): Likewise.
21856 (call_insn_operand): Likewise.
21857 (sibcall_insn_operand): Likewise.
21858 (GOT32_symbol_operand): Likewise.
21860 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21862 PR middle-end/83837
21863 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21864 type rather than type addr's type points to.
21865 (expand_omp_atomic_mutex): Likewise.
21866 (expand_omp_atomic): Likewise.
21868 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21871 * config/i386/i386.c (output_indirect_thunk_function): Use
21872 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21873 for __x86_return_thunk.
21875 2018-01-15 Richard Biener <rguenther@suse.de>
21877 PR middle-end/83850
21878 * expmed.c (extract_bit_field_1): Fix typo.
21880 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21883 * config/arm/iterators.md (VF): New mode iterator.
21884 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21885 Remove integer-related logic from pattern.
21886 (neon_vabd<mode>_3): Likewise.
21888 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21890 PR middle-end/82694
21891 * common.opt (fstrict-overflow): No longer an alias.
21892 (fwrapv-pointer): New option.
21893 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21894 also for pointer types based on flag_wrapv_pointer.
21895 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21896 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21897 opts->x_flag_wrapv got set.
21898 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21899 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21900 POINTER_TYPE_OVERFLOW_UNDEFINED.
21901 * match.pd: Likewise in address comparison pattern.
21902 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21904 2018-01-15 Richard Biener <rguenther@suse.de>
21907 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21908 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
21909 Reset type names to their identifier if their TYPE_DECL doesn't
21910 have linkage (and thus is used for ODR and devirt).
21911 (save_debug_info_for_decl): Remove.
21912 (save_debug_info_for_type): Likewise.
21913 (add_tree_to_fld_list): Adjust.
21914 * tree-pretty-print.c (dump_generic_node): Make dumping of
21915 type names more robust.
21917 2018-01-15 Richard Biener <rguenther@suse.de>
21919 * BASE-VER: Bump to 8.0.1.
21921 2018-01-14 Martin Sebor <msebor@redhat.com>
21924 * builtins.c (check_access): Avoid warning when the no-warning bit
21927 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
21929 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21930 * ira-color (allocno_hard_regs_compare): Likewise.
21932 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
21935 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21936 Use .pushsection/.popsection.
21938 2018-01-14 Martin Sebor <msebor@redhat.com>
21941 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21943 2018-01-14 Jakub Jelinek <jakub@redhat.com>
21945 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21946 entry from extra_headers.
21947 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21948 extra_headers, make the list bitwise identical to the i?86-*-* one.
21950 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21952 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21953 -mcmodel=large with -mindirect-branch=thunk,
21954 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21955 -mfunction-return=thunk-extern.
21956 * doc/invoke.texi: Document -mcmodel=large is incompatible with
21957 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21958 -mfunction-return=thunk and -mfunction-return=thunk-extern.
21960 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21962 * config/i386/i386.c (print_reg): Print the name of the full
21963 integer register without '%'.
21964 (ix86_print_operand): Handle 'V'.
21965 * doc/extend.texi: Document 'V' modifier.
21967 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21969 * config/i386/constraints.md (Bs): Disallow memory operand for
21970 -mindirect-branch-register.
21972 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21973 (GOT_memory_operand): Likewise.
21974 (call_insn_operand): Likewise.
21975 (sibcall_insn_operand): Likewise.
21976 (GOT32_symbol_operand): Likewise.
21977 * config/i386/i386.md (indirect_jump): Call convert_memory_address
21978 for -mindirect-branch-register.
21979 (tablejump): Likewise.
21980 (*sibcall_memory): Likewise.
21981 (*sibcall_value_memory): Likewise.
21982 Disallow peepholes of indirect call and jump via memory for
21983 -mindirect-branch-register.
21984 (*call_pop): Replace m with Bw.
21985 (*call_value_pop): Likewise.
21986 (*sibcall_pop_memory): Replace m with Bs.
21987 * config/i386/i386.opt (mindirect-branch-register): New option.
21988 * doc/invoke.texi: Document -mindirect-branch-register option.
21990 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21992 * config/i386/i386-protos.h (ix86_output_function_return): New.
21993 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21994 set function_return_type.
21995 (indirect_thunk_name): Add ret_p to indicate thunk for function
21997 (output_indirect_thunk_function): Pass false to
21998 indirect_thunk_name.
21999 (ix86_output_indirect_branch_via_reg): Likewise.
22000 (ix86_output_indirect_branch_via_push): Likewise.
22001 (output_indirect_thunk_function): Create alias for function
22002 return thunk if regno < 0.
22003 (ix86_output_function_return): New function.
22004 (ix86_handle_fndecl_attribute): Handle function_return.
22005 (ix86_attribute_table): Add function_return.
22006 * config/i386/i386.h (machine_function): Add
22007 function_return_type.
22008 * config/i386/i386.md (simple_return_internal): Use
22009 ix86_output_function_return.
22010 (simple_return_internal_long): Likewise.
22011 * config/i386/i386.opt (mfunction-return=): New option.
22012 (indirect_branch): Mention -mfunction-return=.
22013 * doc/extend.texi: Document function_return function attribute.
22014 * doc/invoke.texi: Document -mfunction-return= option.
22016 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
22018 * config/i386/i386-opts.h (indirect_branch): New.
22019 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
22020 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
22021 with local indirect jump when converting indirect call and jump.
22022 (ix86_set_indirect_branch_type): New.
22023 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
22024 (indirectlabelno): New.
22025 (indirect_thunk_needed): Likewise.
22026 (indirect_thunk_bnd_needed): Likewise.
22027 (indirect_thunks_used): Likewise.
22028 (indirect_thunks_bnd_used): Likewise.
22029 (INDIRECT_LABEL): Likewise.
22030 (indirect_thunk_name): Likewise.
22031 (output_indirect_thunk): Likewise.
22032 (output_indirect_thunk_function): Likewise.
22033 (ix86_output_indirect_branch_via_reg): Likewise.
22034 (ix86_output_indirect_branch_via_push): Likewise.
22035 (ix86_output_indirect_branch): Likewise.
22036 (ix86_output_indirect_jmp): Likewise.
22037 (ix86_code_end): Call output_indirect_thunk_function if needed.
22038 (ix86_output_call_insn): Call ix86_output_indirect_branch if
22040 (ix86_handle_fndecl_attribute): Handle indirect_branch.
22041 (ix86_attribute_table): Add indirect_branch.
22042 * config/i386/i386.h (machine_function): Add indirect_branch_type
22043 and has_local_indirect_jump.
22044 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
22046 (tablejump): Likewise.
22047 (*indirect_jump): Use ix86_output_indirect_jmp.
22048 (*tablejump_1): Likewise.
22049 (simple_return_indirect_internal): Likewise.
22050 * config/i386/i386.opt (mindirect-branch=): New option.
22051 (indirect_branch): New.
22054 (thunk-inline): Likewise.
22055 (thunk-extern): Likewise.
22056 * doc/extend.texi: Document indirect_branch function attribute.
22057 * doc/invoke.texi: Document -mindirect-branch= option.
22059 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
22062 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
22064 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
22066 * ipa-inline.c (want_inline_small_function_p): Return false if
22067 inlining has already failed with CIF_FINAL_ERROR.
22068 (update_caller_keys): Call want_inline_small_function_p before
22070 (update_callee_keys): Likewise.
22072 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
22074 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
22076 (rs6000_quadword_masked_address_p): Likewise.
22077 (quad_aligned_load_p): Likewise.
22078 (quad_aligned_store_p): Likewise.
22079 (const_load_sequence_p): Add comment to describe the outer-most loop.
22080 (mimic_memory_attributes_and_flags): New function.
22081 (rs6000_gen_stvx): Likewise.
22082 (replace_swapped_aligned_store): Likewise.
22083 (rs6000_gen_lvx): Likewise.
22084 (replace_swapped_aligned_load): Likewise.
22085 (replace_swapped_load_constant): Capitalize argument name in
22086 comment describing this function.
22087 (rs6000_analyze_swaps): Add a third pass to search for vector loads
22088 and stores that access quad-word aligned addresses and replace
22089 with stvx or lvx instructions when appropriate.
22090 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
22091 New function prototype.
22092 (rs6000_quadword_masked_address_p): Likewise.
22093 (rs6000_gen_lvx): Likewise.
22094 (rs6000_gen_stvx): Likewise.
22095 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
22096 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
22097 when memory address is aligned.
22098 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
22099 this split to select lvx instruction when memory address is aligned.
22100 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
22101 instruction when memory address is aligned.
22102 (*vsx_le_perm_load_v16qi): Likewise.
22103 (four unnamed splitters): Modify to select the stvx instruction
22104 when memory is aligned.
22106 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
22108 * predict.c (determine_unlikely_bbs): Handle correctly BBs
22109 which appears in the queue multiple times.
22111 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22112 Alan Hayward <alan.hayward@arm.com>
22113 David Sherwood <david.sherwood@arm.com>
22115 * tree-vectorizer.h (vec_lower_bound): New structure.
22116 (_loop_vec_info): Add check_nonzero and lower_bounds.
22117 (LOOP_VINFO_CHECK_NONZERO): New macro.
22118 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
22119 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
22120 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
22121 fields. Make seg_len the distance travelled, not including the
22123 (dr_direction_indicator): Declare.
22124 (dr_zero_step_indicator): Likewise.
22125 (dr_known_forward_stride_p): Likewise.
22126 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
22128 (runtime_alias_check_p): Allow runtime alias checks with
22130 (operator ==): Compare access_size and align.
22131 (prune_runtime_alias_test_list): Rework for new distinction between
22132 the access_size and seg_len.
22133 (create_intersect_range_checks_index): Likewise. Cope with polynomial
22135 (get_segment_min_max): New function.
22136 (create_intersect_range_checks): Use it.
22137 (dr_step_indicator): New function.
22138 (dr_direction_indicator): Likewise.
22139 (dr_zero_step_indicator): Likewise.
22140 (dr_known_forward_stride_p): Likewise.
22141 * tree-loop-distribution.c (data_ref_segment_size): Return
22142 DR_STEP * (niters - 1).
22143 (compute_alias_check_pairs): Update call to the dr_with_seg_len
22145 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
22146 (vect_preserves_scalar_order_p): New function, split out from...
22147 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
22148 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
22149 (vect_vfa_access_size): New function.
22150 (vect_vfa_align): Likewise.
22151 (vect_compile_time_alias): Take access_size_a and access_b arguments.
22152 (dump_lower_bound): New function.
22153 (vect_check_lower_bound): Likewise.
22154 (vect_small_gap_p): Likewise.
22155 (vectorizable_with_step_bound_p): Likewise.
22156 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
22157 depencies if the vectorization factor is 1. Convert the checks
22158 for nonzero steps into checks on the bounds of DR_STEP. Try using
22159 a bunds check for variable steps if the minimum required step is
22160 relatively small. Update calls to the dr_with_seg_len
22161 constructor and to vect_compile_time_alias.
22162 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
22164 (vect_loop_versioning): Call it.
22165 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
22167 (vect_estimate_min_profitable_iters): Account for any bounds checks.
22169 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22170 Alan Hayward <alan.hayward@arm.com>
22171 David Sherwood <david.sherwood@arm.com>
22173 * doc/sourcebuild.texi (vect_scatter_store): Document.
22174 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
22176 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
22178 * genopinit.c (main): Add supports_vec_scatter_store and
22179 supports_vec_scatter_store_cached to target_optabs.
22180 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
22181 IFN_MASK_SCATTER_STORE.
22182 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
22184 * internal-fn.h (internal_store_fn_p): Declare.
22185 (internal_fn_stored_value_index): Likewise.
22186 * internal-fn.c (scatter_store_direct): New macro.
22187 (expand_scatter_store_optab_fn): New function.
22188 (direct_scatter_store_optab_supported_p): New macro.
22189 (internal_store_fn_p): New function.
22190 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
22191 IFN_MASK_SCATTER_STORE.
22192 (internal_fn_mask_index): Likewise.
22193 (internal_fn_stored_value_index): New function.
22194 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
22195 for scatter stores.
22196 * optabs-query.h (supports_vec_scatter_store_p): Declare.
22197 * optabs-query.c (supports_vec_scatter_store_p): New function.
22198 * tree-vectorizer.h (vect_get_store_rhs): Declare.
22199 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
22200 true for scatter stores.
22201 (vect_gather_scatter_fn_p): Handle scatter stores too.
22202 (vect_check_gather_scatter): Consider using scatter stores if
22203 supports_vec_scatter_store_p.
22204 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
22205 scatter stores too.
22206 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
22207 internal_fn_stored_value_index.
22208 (check_load_store_masking): Handle scatter stores too.
22209 (vect_get_store_rhs): Make public.
22210 (vectorizable_call): Use internal_store_fn_p.
22211 (vectorizable_store): Handle scatter store internal functions.
22212 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
22213 when deciding whether the end of the group has been reached.
22214 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
22215 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
22216 (mask_scatter_store<mode>): New insns.
22218 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22219 Alan Hayward <alan.hayward@arm.com>
22220 David Sherwood <david.sherwood@arm.com>
22222 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
22223 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
22224 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
22226 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
22227 Use vect_truncate_gather_scatter_offset if we can't treat the
22228 operation as a normal gather load or scatter store.
22229 (get_group_load_store_type): Take the gather_scatter_info
22230 as argument. Try using a gather load or scatter store for
22231 single-element groups.
22232 (get_load_store_type): Update calls to get_group_load_store_type
22233 and vect_use_strided_gather_scatters_p.
22235 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22236 Alan Hayward <alan.hayward@arm.com>
22237 David Sherwood <david.sherwood@arm.com>
22239 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
22240 optional tree argument.
22241 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
22243 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
22244 but continue to use the current value as a fallback.
22245 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
22246 to compare the updates.
22247 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
22248 (get_load_store_type): Use it when handling a strided access.
22249 (vect_get_strided_load_store_ops): New function.
22250 (vect_get_data_ptr_increment): Likewise.
22251 (vectorizable_load): Handle strided gather loads. Always pass
22252 a step to vect_create_data_ref_ptr and bump_vector_ptr.
22254 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22255 Alan Hayward <alan.hayward@arm.com>
22256 David Sherwood <david.sherwood@arm.com>
22258 * doc/md.texi (gather_load@var{m}): Document.
22259 (mask_gather_load@var{m}): Likewise.
22260 * genopinit.c (main): Add supports_vec_gather_load and
22261 supports_vec_gather_load_cached to target_optabs.
22262 * optabs-tree.c (init_tree_optimization_optabs): Use
22263 ggc_cleared_alloc to allocate target_optabs.
22264 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
22265 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
22267 * internal-fn.h (internal_load_fn_p): Declare.
22268 (internal_gather_scatter_fn_p): Likewise.
22269 (internal_fn_mask_index): Likewise.
22270 (internal_gather_scatter_fn_supported_p): Likewise.
22271 * internal-fn.c (gather_load_direct): New macro.
22272 (expand_gather_load_optab_fn): New function.
22273 (direct_gather_load_optab_supported_p): New macro.
22274 (direct_internal_fn_optab): New function.
22275 (internal_load_fn_p): Likewise.
22276 (internal_gather_scatter_fn_p): Likewise.
22277 (internal_fn_mask_index): Likewise.
22278 (internal_gather_scatter_fn_supported_p): Likewise.
22279 * optabs-query.c (supports_at_least_one_mode_p): New function.
22280 (supports_vec_gather_load_p): Likewise.
22281 * optabs-query.h (supports_vec_gather_load_p): Declare.
22282 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
22283 and memory_type field.
22284 (NUM_PATTERNS): Bump to 15.
22285 * tree-vect-data-refs.c: Include internal-fn.h.
22286 (vect_gather_scatter_fn_p): New function.
22287 (vect_describe_gather_scatter_call): Likewise.
22288 (vect_check_gather_scatter): Try using internal functions for
22289 gather loads. Recognize existing calls to a gather load function.
22290 (vect_analyze_data_refs): Consider using gather loads if
22291 supports_vec_gather_load_p.
22292 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
22293 (vect_get_gather_scatter_offset_type): Likewise.
22294 (vect_convert_mask_for_vectype): Likewise.
22295 (vect_add_conversion_to_patterm): Likewise.
22296 (vect_try_gather_scatter_pattern): Likewise.
22297 (vect_recog_gather_scatter_pattern): New pattern recognizer.
22298 (vect_vect_recog_func_ptrs): Add it.
22299 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
22300 internal_fn_mask_index and internal_gather_scatter_fn_p.
22301 (check_load_store_masking): Take the gather_scatter_info as an
22302 argument and handle gather loads.
22303 (vect_get_gather_scatter_ops): New function.
22304 (vectorizable_call): Check internal_load_fn_p.
22305 (vectorizable_load): Likewise. Handle gather load internal
22307 (vectorizable_store): Update call to check_load_store_masking.
22308 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
22309 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
22310 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
22311 (aarch64_gather_scale_operand_d): New predicates.
22312 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
22313 (mask_gather_load<mode>): New insns.
22315 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22316 Alan Hayward <alan.hayward@arm.com>
22317 David Sherwood <david.sherwood@arm.com>
22319 * optabs.def (fold_left_plus_optab): New optab.
22320 * doc/md.texi (fold_left_plus_@var{m}): Document.
22321 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
22322 * internal-fn.c (fold_left_direct): Define.
22323 (expand_fold_left_optab_fn): Likewise.
22324 (direct_fold_left_optab_supported_p): Likewise.
22325 * fold-const-call.c (fold_const_fold_left): New function.
22326 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
22327 * tree-parloops.c (valid_reduction_p): New function.
22328 (gather_scalar_reductions): Use it.
22329 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
22330 (vect_finish_replace_stmt): Declare.
22331 * tree-vect-loop.c (fold_left_reduction_fn): New function.
22332 (needs_fold_left_reduction_p): New function, split out from...
22333 (vect_is_simple_reduction): ...here. Accept reductions that
22334 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
22335 (vect_force_simple_reduction): Also store the reduction type in
22336 the assignment's STMT_VINFO_REDUC_TYPE.
22337 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
22338 (merge_with_identity): New function.
22339 (vect_expand_fold_left): Likewise.
22340 (vectorize_fold_left_reduction): Likewise.
22341 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
22342 scalar phi in place for it. Check for target support and reject
22343 cases that would reassociate the operation. Defer the transform
22344 phase to vectorize_fold_left_reduction.
22345 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
22346 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
22347 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
22349 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22351 * tree-if-conv.c (predicate_mem_writes): Remove redundant
22352 call to ifc_temp_var.
22354 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22355 Alan Hayward <alan.hayward@arm.com>
22356 David Sherwood <david.sherwood@arm.com>
22358 * target.def (legitimize_address_displacement): Take the original
22359 offset as a poly_int.
22360 * targhooks.h (default_legitimize_address_displacement): Update
22362 * targhooks.c (default_legitimize_address_displacement): Likewise.
22363 * doc/tm.texi: Regenerate.
22364 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
22365 as an argument, moving assert of ad->disp == ad->disp_term to...
22366 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
22367 Try calling targetm.legitimize_address_displacement before expanding
22368 the address rather than afterwards, and adjust for the new interface.
22369 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
22370 Match the new hook interface. Handle SVE addresses.
22371 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
22372 new hook interface.
22374 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22376 * Makefile.in (OBJS): Add early-remat.o.
22377 * target.def (select_early_remat_modes): New hook.
22378 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
22379 * doc/tm.texi: Regenerate.
22380 * targhooks.h (default_select_early_remat_modes): Declare.
22381 * targhooks.c (default_select_early_remat_modes): New function.
22382 * timevar.def (TV_EARLY_REMAT): New timevar.
22383 * passes.def (pass_early_remat): New pass.
22384 * tree-pass.h (make_pass_early_remat): Declare.
22385 * early-remat.c: New file.
22386 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
22388 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
22390 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22391 Alan Hayward <alan.hayward@arm.com>
22392 David Sherwood <david.sherwood@arm.com>
22394 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
22395 vfm1 with a bound_epilog parameter.
22396 (vect_do_peeling): Update calls accordingly, and move the prologue
22397 call earlier in the function. Treat the base bound_epilog as 0 for
22398 fully-masked loops and retain vf - 1 for other loops. Add 1 to
22399 this base when peeling for gaps.
22400 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
22401 with fully-masked loops.
22402 (vect_estimate_min_profitable_iters): Handle the single peeled
22403 iteration in that case.
22405 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22406 Alan Hayward <alan.hayward@arm.com>
22407 David Sherwood <david.sherwood@arm.com>
22409 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
22410 single-element interleaving even if the size is not a power of 2.
22411 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
22412 accesses for single-element interleaving if the group size is
22415 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22416 Alan Hayward <alan.hayward@arm.com>
22417 David Sherwood <david.sherwood@arm.com>
22419 * doc/md.texi (fold_extract_last_@var{m}): Document.
22420 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
22421 * optabs.def (fold_extract_last_optab): New optab.
22422 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
22423 * internal-fn.c (fold_extract_direct): New macro.
22424 (expand_fold_extract_optab_fn): Likewise.
22425 (direct_fold_extract_optab_supported_p): Likewise.
22426 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
22427 * tree-vect-loop.c (vect_model_reduction_cost): Handle
22428 EXTRACT_LAST_REDUCTION.
22429 (get_initial_def_for_reduction): Do not create an initial vector
22430 for EXTRACT_LAST_REDUCTION reductions.
22431 (vectorizable_reduction): Leave the scalar phi in place for
22432 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
22433 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
22434 epilogue code for EXTRACT_LAST_REDUCTION and defer the
22435 transform phase to vectorizable_condition.
22436 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
22438 (vect_finish_stmt_generation): ...here.
22439 (vect_finish_replace_stmt): New function.
22440 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
22441 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
22443 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
22445 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22446 Alan Hayward <alan.hayward@arm.com>
22447 David Sherwood <david.sherwood@arm.com>
22449 * doc/md.texi (extract_last_@var{m}): Document.
22450 * optabs.def (extract_last_optab): New optab.
22451 * internal-fn.def (EXTRACT_LAST): New internal function.
22452 * internal-fn.c (cond_unary_direct): New macro.
22453 (expand_cond_unary_optab_fn): Likewise.
22454 (direct_cond_unary_optab_supported_p): Likewise.
22455 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
22456 loops using EXTRACT_LAST.
22457 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
22458 (extract_last_<mode>): ...this optab.
22459 (vec_extract<mode><Vel>): Update accordingly.
22461 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22462 Alan Hayward <alan.hayward@arm.com>
22463 David Sherwood <david.sherwood@arm.com>
22465 * target.def (empty_mask_is_expensive): New hook.
22466 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
22467 * doc/tm.texi: Regenerate.
22468 * targhooks.h (default_empty_mask_is_expensive): Declare.
22469 * targhooks.c (default_empty_mask_is_expensive): New function.
22470 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
22471 if the target says that empty masks are expensive.
22472 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
22474 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
22476 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22477 Alan Hayward <alan.hayward@arm.com>
22478 David Sherwood <david.sherwood@arm.com>
22480 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
22481 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
22482 (vect_use_loop_mask_for_alignment_p): New function.
22483 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
22484 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
22485 niters_skip argument. Make sure that the first niters_skip elements
22486 of the first iteration are inactive.
22487 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
22488 Update call to vect_set_loop_masks_directly.
22489 (get_misalign_in_elems): New function, split out from...
22490 (vect_gen_prolog_loop_niters): ...here.
22491 (vect_update_init_of_dr): Take a code argument that specifies whether
22492 the adjustment should be added or subtracted.
22493 (vect_update_init_of_drs): Likewise.
22494 (vect_prepare_for_masked_peels): New function.
22495 (vect_do_peeling): Skip prologue peeling if we're using a mask
22496 instead. Update call to vect_update_inits_of_drs.
22497 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22499 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
22500 alignment. Do not include the number of peeled iterations in
22501 the minimum threshold in that case.
22502 (vectorizable_induction): Adjust the start value down by
22503 LOOP_VINFO_MASK_SKIP_NITERS iterations.
22504 (vect_transform_loop): Call vect_prepare_for_masked_peels.
22505 Take the number of skipped iterations into account when calculating
22507 * tree-vect-stmts.c (vect_gen_while_not): New function.
22509 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22510 Alan Hayward <alan.hayward@arm.com>
22511 David Sherwood <david.sherwood@arm.com>
22513 * doc/sourcebuild.texi (vect_fully_masked): Document.
22514 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
22515 default value to 0.
22516 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
22518 (vect_analyze_loop_2): ...here. Don't check the vectorization
22519 factor against the number of loop iterations if the loop is
22522 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22523 Alan Hayward <alan.hayward@arm.com>
22524 David Sherwood <david.sherwood@arm.com>
22526 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
22527 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
22528 (dump_groups): Update accordingly.
22529 (iv_use::mem_type): New member variable.
22530 (address_p): New function.
22531 (record_use): Add a mem_type argument and initialize the new
22533 (record_group_use): Add a mem_type argument. Use address_p.
22534 Remove obsolete null checks of base_object. Update call to record_use.
22535 (find_interesting_uses_op): Update call to record_group_use.
22536 (find_interesting_uses_cond): Likewise.
22537 (find_interesting_uses_address): Likewise.
22538 (get_mem_type_for_internal_fn): New function.
22539 (find_address_like_use): Likewise.
22540 (find_interesting_uses_stmt): Try find_address_like_use before
22541 calling find_interesting_uses_op.
22542 (addr_offset_valid_p): Use the iv mem_type field as the type
22543 of the addressed memory.
22544 (add_autoinc_candidates): Likewise.
22545 (get_address_cost): Likewise.
22546 (split_small_address_groups_p): Use address_p.
22547 (split_address_groups): Likewise.
22548 (add_iv_candidate_for_use): Likewise.
22549 (autoinc_possible_for_pair): Likewise.
22550 (rewrite_groups): Likewise.
22551 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
22552 (determine_group_iv_cost): Update after split of USE_ADDRESS.
22553 (get_alias_ptr_type_for_ptr_address): New function.
22554 (rewrite_use_address): Rewrite address uses in calls that were
22555 identified by find_address_like_use.
22557 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22558 Alan Hayward <alan.hayward@arm.com>
22559 David Sherwood <david.sherwood@arm.com>
22561 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
22563 * gimple-expr.h (is_gimple_addressable: Likewise.
22564 * gimple-expr.c (is_gimple_address): Likewise.
22565 * internal-fn.c (expand_call_mem_ref): New function.
22566 (expand_mask_load_optab_fn): Use it.
22567 (expand_mask_store_optab_fn): Likewise.
22569 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22570 Alan Hayward <alan.hayward@arm.com>
22571 David Sherwood <david.sherwood@arm.com>
22573 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
22574 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
22575 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
22576 (cond_umax@var{mode}): Document.
22577 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
22578 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
22579 (cond_umin_optab, cond_umax_optab): New optabs.
22580 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
22581 (COND_IOR, COND_XOR): New internal functions.
22582 * internal-fn.h (get_conditional_internal_fn): Declare.
22583 * internal-fn.c (cond_binary_direct): New macro.
22584 (expand_cond_binary_optab_fn): Likewise.
22585 (direct_cond_binary_optab_supported_p): Likewise.
22586 (get_conditional_internal_fn): New function.
22587 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
22588 Cope with reduction statements that are vectorized as calls rather
22590 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
22591 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
22592 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
22593 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
22594 (UNSPEC_COND_EOR): New unspecs.
22595 (optab): Add mappings for them.
22596 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
22597 (sve_int_op, sve_fp_op): New int attributes.
22599 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22600 Alan Hayward <alan.hayward@arm.com>
22601 David Sherwood <david.sherwood@arm.com>
22603 * optabs.def (while_ult_optab): New optab.
22604 * doc/md.texi (while_ult@var{m}@var{n}): Document.
22605 * internal-fn.def (WHILE_ULT): New internal function.
22606 * internal-fn.h (direct_internal_fn_supported_p): New override
22607 that takes two types as argument.
22608 * internal-fn.c (while_direct): New macro.
22609 (expand_while_optab_fn): New function.
22610 (convert_optab_supported_p): Likewise.
22611 (direct_while_optab_supported_p): New macro.
22612 * wide-int.h (wi::udiv_ceil): New function.
22613 * tree-vectorizer.h (rgroup_masks): New structure.
22614 (vec_loop_masks): New typedef.
22615 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
22616 and fully_masked_p.
22617 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
22618 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
22619 (vect_max_vf): New function.
22620 (slpeel_make_loop_iterate_ntimes): Delete.
22621 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
22622 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
22623 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
22624 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
22625 internal-fn.h, stor-layout.h and optabs-query.h.
22626 (vect_set_loop_mask): New function.
22627 (add_preheader_seq): Likewise.
22628 (add_header_seq): Likewise.
22629 (interleave_supported_p): Likewise.
22630 (vect_maybe_permute_loop_masks): Likewise.
22631 (vect_set_loop_masks_directly): Likewise.
22632 (vect_set_loop_condition_masked): Likewise.
22633 (vect_set_loop_condition_unmasked): New function, split out from
22634 slpeel_make_loop_iterate_ntimes.
22635 (slpeel_make_loop_iterate_ntimes): Rename to..
22636 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
22637 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
22638 (vect_do_peeling): Update call accordingly.
22639 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
22641 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22642 mask_compare_type, can_fully_mask_p and fully_masked_p.
22643 (release_vec_loop_masks): New function.
22644 (_loop_vec_info): Use it to free the loop masks.
22645 (can_produce_all_loop_masks_p): New function.
22646 (vect_get_max_nscalars_per_iter): Likewise.
22647 (vect_verify_full_masking): Likewise.
22648 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
22649 retries, and free the mask rgroups before retrying. Check loop-wide
22650 reasons for disallowing fully-masked loops. Make the final decision
22651 about whether use a fully-masked loop or not.
22652 (vect_estimate_min_profitable_iters): Do not assume that peeling
22653 for the number of iterations will be needed for fully-masked loops.
22654 (vectorizable_reduction): Disable fully-masked loops.
22655 (vectorizable_live_operation): Likewise.
22656 (vect_halve_mask_nunits): New function.
22657 (vect_double_mask_nunits): Likewise.
22658 (vect_record_loop_mask): Likewise.
22659 (vect_get_loop_mask): Likewise.
22660 (vect_transform_loop): Handle the case in which the final loop
22661 iteration might handle a partial vector. Call vect_set_loop_condition
22662 instead of slpeel_make_loop_iterate_ntimes.
22663 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
22664 (check_load_store_masking): New function.
22665 (prepare_load_store_mask): Likewise.
22666 (vectorizable_store): Handle fully-masked loops.
22667 (vectorizable_load): Likewise.
22668 (supportable_widening_operation): Use vect_halve_mask_nunits for
22670 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
22671 (vect_gen_while): New function.
22672 * config/aarch64/aarch64.md (umax<mode>3): New expander.
22673 (aarch64_uqdec<mode>): New insn.
22675 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22676 Alan Hayward <alan.hayward@arm.com>
22677 David Sherwood <david.sherwood@arm.com>
22679 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
22680 (reduc_xor_scal_optab): New optabs.
22681 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
22682 (reduc_xor_scal_@var{m}): Document.
22683 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
22684 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
22685 internal functions.
22686 * fold-const-call.c (fold_const_call): Handle them.
22687 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
22688 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
22689 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
22690 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
22691 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
22692 (UNSPEC_XORV): New unspecs.
22693 (optab): Add entries for them.
22694 (BITWISEV): New int iterator.
22695 (bit_reduc_op): New int attributes.
22697 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22698 Alan Hayward <alan.hayward@arm.com>
22699 David Sherwood <david.sherwood@arm.com>
22701 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
22702 * internal-fn.def (VEC_SHL_INSERT): New internal function.
22703 * optabs.def (vec_shl_insert_optab): New optab.
22704 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
22705 (duplicate_and_interleave): Likewise.
22706 * tree-vect-loop.c: Include internal-fn.h.
22707 (neutral_op_for_slp_reduction): New function, split out from
22708 get_initial_defs_for_reduction.
22709 (get_initial_def_for_reduction): Handle option 2 for variable-length
22710 vectors by loading the neutral value into a vector and then shifting
22711 the initial value into element 0.
22712 (get_initial_defs_for_reduction): Replace the code argument with
22713 the neutral value calculated by neutral_op_for_slp_reduction.
22714 Use gimple_build_vector for constant-length vectors.
22715 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
22716 but the first group_size elements have a neutral value.
22717 Use duplicate_and_interleave otherwise.
22718 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
22719 Update call to get_initial_defs_for_reduction. Handle SLP
22720 reductions for variable-length vectors by creating one vector
22721 result for each scalar result, with the elements associated
22722 with other scalar results stubbed out with the neutral value.
22723 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
22724 Require IFN_VEC_SHL_INSERT for double reductions on
22725 variable-length vectors, or SLP reductions that have
22726 a neutral value. Require can_duplicate_and_interleave_p
22727 support for variable-length unchained SLP reductions if there
22728 is no neutral value, such as for MIN/MAX reductions. Also require
22729 the number of vector elements to be a multiple of the number of
22730 SLP statements when doing variable-length unchained SLP reductions.
22731 Update call to vect_create_epilog_for_reduction.
22732 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
22733 and remove initial values.
22734 (duplicate_and_interleave): Make public.
22735 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
22736 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
22738 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22739 Alan Hayward <alan.hayward@arm.com>
22740 David Sherwood <david.sherwood@arm.com>
22742 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
22743 (can_duplicate_and_interleave_p): New function.
22744 (vect_get_and_check_slp_defs): Take the vector of statements
22745 rather than just the current one. Remove excess parentheses.
22746 Restriction rejectinon of vect_constant_def and vect_external_def
22747 for variable-length vectors to boolean types, or types for which
22748 can_duplicate_and_interleave_p is false.
22749 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
22750 (duplicate_and_interleave): New function.
22751 (vect_get_constant_vectors): Use gimple_build_vector for
22752 constant-length vectors and suitable variable-length constant
22753 vectors. Use duplicate_and_interleave for other variable-length
22754 vectors. Don't defer the update when inserting new statements.
22756 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22757 Alan Hayward <alan.hayward@arm.com>
22758 David Sherwood <david.sherwood@arm.com>
22760 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
22761 min_profitable_iters doesn't go negative.
22763 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22764 Alan Hayward <alan.hayward@arm.com>
22765 David Sherwood <david.sherwood@arm.com>
22767 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
22768 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
22769 * optabs.def (vec_mask_load_lanes_optab): New optab.
22770 (vec_mask_store_lanes_optab): Likewise.
22771 * internal-fn.def (MASK_LOAD_LANES): New internal function.
22772 (MASK_STORE_LANES): Likewise.
22773 * internal-fn.c (mask_load_lanes_direct): New macro.
22774 (mask_store_lanes_direct): Likewise.
22775 (expand_mask_load_optab_fn): Handle masked operations.
22776 (expand_mask_load_lanes_optab_fn): New macro.
22777 (expand_mask_store_optab_fn): Handle masked operations.
22778 (expand_mask_store_lanes_optab_fn): New macro.
22779 (direct_mask_load_lanes_optab_supported_p): Likewise.
22780 (direct_mask_store_lanes_optab_supported_p): Likewise.
22781 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
22783 (vect_load_lanes_supported): Likewise.
22784 * tree-vect-data-refs.c (strip_conversion): New function.
22785 (can_group_stmts_p): Likewise.
22786 (vect_analyze_data_ref_accesses): Use it instead of checking
22787 for a pair of assignments.
22788 (vect_store_lanes_supported): Take a masked_p parameter.
22789 (vect_load_lanes_supported): Likewise.
22790 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
22791 vect_store_lanes_supported and vect_load_lanes_supported.
22792 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
22793 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
22794 parameter. Don't allow gaps for masked accesses.
22795 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
22796 and vect_load_lanes_supported.
22797 (get_load_store_type): Take a masked_p parameter and update
22798 call to get_group_load_store_type.
22799 (vectorizable_store): Update call to get_load_store_type.
22800 Handle IFN_MASK_STORE_LANES.
22801 (vectorizable_load): Update call to get_load_store_type.
22802 Handle IFN_MASK_LOAD_LANES.
22804 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22805 Alan Hayward <alan.hayward@arm.com>
22806 David Sherwood <david.sherwood@arm.com>
22808 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
22810 * config/aarch64/aarch64-protos.h
22811 (aarch64_sve_struct_memory_operand_p): Declare.
22812 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
22813 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
22814 (VPRED, vpred): Handle SVE structure modes.
22815 * config/aarch64/constraints.md (Utx): New constraint.
22816 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
22817 (aarch64_sve_struct_nonimmediate_operand): New predicates.
22818 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
22819 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
22820 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
22821 structure modes. Split into pieces after RA.
22822 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
22823 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
22825 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
22826 SVE structure modes.
22827 (aarch64_classify_address): Likewise.
22828 (sizetochar): Move earlier in file.
22829 (aarch64_print_operand): Handle SVE register lists.
22830 (aarch64_array_mode): New function.
22831 (aarch64_sve_struct_memory_operand_p): Likewise.
22832 (TARGET_ARRAY_MODE): Redefine.
22834 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22835 Alan Hayward <alan.hayward@arm.com>
22836 David Sherwood <david.sherwood@arm.com>
22838 * target.def (array_mode): New target hook.
22839 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
22840 * doc/tm.texi: Regenerate.
22841 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
22842 * hooks.c (hook_optmode_mode_uhwi_none): New function.
22843 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
22844 targetm.array_mode.
22845 * stor-layout.c (mode_for_array): Likewise. Support polynomial
22848 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22849 Alan Hayward <alan.hayward@arm.com>
22850 David Sherwood <david.sherwood@arm.com>
22852 * fold-const.c (fold_binary_loc): Check the argument types
22853 rather than the result type when testing for a vector operation.
22855 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22857 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22858 * doc/tm.texi: Regenerate.
22860 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22861 Alan Hayward <alan.hayward@arm.com>
22862 David Sherwood <david.sherwood@arm.com>
22864 * doc/invoke.texi (-msve-vector-bits=): Document new option.
22865 (sve): Document new AArch64 extension.
22866 * doc/md.texi (w): Extend the description of the AArch64
22867 constraint to include SVE vectors.
22868 (Upl, Upa): Document new AArch64 predicate constraints.
22869 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22871 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22872 (msve-vector-bits=): New option.
22873 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22874 SVE when these are disabled.
22875 (sve): New extension.
22876 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22877 modes. Adjust their number of units based on aarch64_sve_vg.
22878 (MAX_BITSIZE_MODE_ANY_MODE): Define.
22879 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22880 aarch64_addr_query_type.
22881 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22882 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22883 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22884 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22885 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22886 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22887 (aarch64_simd_imm_zero_p): Delete.
22888 (aarch64_check_zero_based_sve_index_immediate): Declare.
22889 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22890 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22891 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22892 (aarch64_sve_float_mul_immediate_p): Likewise.
22893 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22894 rather than an rtx.
22895 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22896 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22897 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22898 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22899 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22900 (aarch64_regmode_natural_size): Likewise.
22901 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22902 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22904 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22905 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22906 for VG and the SVE predicate registers.
22907 (V_ALIASES): Add a "z"-prefixed alias.
22908 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22909 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22910 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22911 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22912 (REG_CLASS_NAMES): Add entries for them.
22913 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
22914 and the predicate registers.
22915 (aarch64_sve_vg): Declare.
22916 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22917 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22918 (REGMODE_NATURAL_SIZE): Define.
22919 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22921 * config/aarch64/aarch64.c: Include cfgrtl.h.
22922 (simd_immediate_info): Add a constructor for series vectors,
22923 and an associated step field.
22924 (aarch64_sve_vg): New variable.
22925 (aarch64_dbx_register_number): Handle VG and the predicate registers.
22926 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22927 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22928 (VEC_ANY_DATA, VEC_STRUCT): New constants.
22929 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22930 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22931 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22932 (aarch64_get_mask_mode): New functions.
22933 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22934 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22935 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
22936 predicate modes and predicate registers. Explicitly restrict
22937 GPRs to modes of 16 bytes or smaller. Only allow FP registers
22938 to store a vector mode if it is recognized by
22939 aarch64_classify_vector_mode.
22940 (aarch64_regmode_natural_size): New function.
22941 (aarch64_hard_regno_caller_save_mode): Return the original mode
22943 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22944 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22945 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22946 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22948 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
22949 does not overlap dest if the function is frame-related. Handle
22951 (aarch64_split_add_offset): New function.
22952 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22953 them aarch64_add_offset.
22954 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22955 and update call to aarch64_sub_sp.
22956 (aarch64_add_cfa_expression): New function.
22957 (aarch64_expand_prologue): Pass extra temporary registers to the
22958 functions above. Handle the case in which we need to emit new
22959 DW_CFA_expressions for registers that were originally saved
22960 relative to the stack pointer, but now have to be expressed
22961 relative to the frame pointer.
22962 (aarch64_output_mi_thunk): Pass extra temporary registers to the
22964 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
22965 IP0 and IP1 values for SVE frames.
22966 (aarch64_expand_vec_series): New function.
22967 (aarch64_expand_sve_widened_duplicate): Likewise.
22968 (aarch64_expand_sve_const_vector): Likewise.
22969 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22970 Handle SVE constants. Use emit_move_insn to move a force_const_mem
22971 into the register, rather than emitting a SET directly.
22972 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22973 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22974 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22975 (offset_9bit_signed_scaled_p): New functions.
22976 (aarch64_replicate_bitmask_imm): New function.
22977 (aarch64_bitmask_imm): Use it.
22978 (aarch64_cannot_force_const_mem): Reject expressions involving
22979 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
22980 (aarch64_classify_index): Handle SVE indices, by requiring
22981 a plain register index with a scale that matches the element size.
22982 (aarch64_classify_address): Handle SVE addresses. Assert that
22983 the mode of the address is VOIDmode or an integer mode.
22984 Update call to aarch64_classify_symbol.
22985 (aarch64_classify_symbolic_expression): Update call to
22986 aarch64_classify_symbol.
22987 (aarch64_const_vec_all_in_range_p): New function.
22988 (aarch64_print_vector_float_operand): Likewise.
22989 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
22990 "vN" for FP registers with SVE modes. Handle (const ...) vectors
22991 and the FP immediates 1.0 and 0.5.
22992 (aarch64_print_address_internal): Handle SVE addresses.
22993 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22994 (aarch64_regno_regclass): Handle predicate registers.
22995 (aarch64_secondary_reload): Handle big-endian reloads of SVE
22997 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22998 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22999 (aarch64_convert_sve_vector_bits): New function.
23000 (aarch64_override_options): Use it to handle -msve-vector-bits=.
23001 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
23002 rather than an rtx.
23003 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
23004 Handle SVE vector and predicate modes. Accept VL-based constants
23005 that need only one temporary register, and VL offsets that require
23006 no temporary registers.
23007 (aarch64_conditional_register_usage): Mark the predicate registers
23008 as fixed if SVE isn't available.
23009 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
23010 Return true for SVE vector and predicate modes.
23011 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
23012 rather than an unsigned int. Handle SVE modes.
23013 (aarch64_preferred_simd_mode): Update call accordingly. Handle
23015 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
23017 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
23018 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
23019 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
23020 (aarch64_sve_float_mul_immediate_p): New functions.
23021 (aarch64_sve_valid_immediate): New function.
23022 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
23023 Explicitly reject structure modes. Check for INDEX constants.
23024 Handle PTRUE and PFALSE constants.
23025 (aarch64_check_zero_based_sve_index_immediate): New function.
23026 (aarch64_simd_imm_zero_p): Delete.
23027 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
23028 vector modes. Accept constants in the range of CNT[BHWD].
23029 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
23030 ask for an Advanced SIMD mode.
23031 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
23032 (aarch64_simd_vector_alignment): Handle SVE predicates.
23033 (aarch64_vectorize_preferred_vector_alignment): New function.
23034 (aarch64_simd_vector_alignment_reachable): Use it instead of
23036 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
23037 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
23039 (MAX_VECT_LEN): Delete.
23040 (expand_vec_perm_d): Add a vec_flags field.
23041 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
23042 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
23043 (aarch64_evpc_ext): Don't apply a big-endian lane correction
23045 (aarch64_evpc_rev): Rename to...
23046 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
23047 (aarch64_evpc_rev_global): New function.
23048 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
23049 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
23051 (aarch64_evpc_sve_tbl): New function.
23052 (aarch64_expand_vec_perm_const_1): Update after rename of
23053 aarch64_evpc_rev. Handle SVE permutes too, trying
23054 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
23055 than aarch64_evpc_tbl.
23056 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
23057 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
23058 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
23059 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
23060 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
23061 (aarch64_expand_sve_vcond): New functions.
23062 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
23063 of aarch64_vector_mode_p.
23064 (aarch64_dwarf_poly_indeterminate_value): New function.
23065 (aarch64_compute_pressure_classes): Likewise.
23066 (aarch64_can_change_mode_class): Likewise.
23067 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
23068 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
23069 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
23070 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
23071 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
23072 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
23073 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
23074 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
23076 (Dn, Dl, Dr): Accept const as well as const_vector.
23077 (Dz): Likewise. Compare against CONST0_RTX.
23078 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
23079 of "vector" where appropriate.
23080 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
23081 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
23082 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
23083 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
23084 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
23085 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
23086 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
23087 (v_int_equiv): Extend to SVE modes.
23088 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
23090 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
23091 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
23092 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
23093 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
23094 (SVE_COND_FP_CMP): New int iterators.
23095 (perm_hilo): Handle the new unpack unspecs.
23096 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
23098 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
23099 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
23100 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
23101 (aarch64_equality_operator, aarch64_constant_vector_operand)
23102 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
23103 (aarch64_sve_nonimmediate_operand): Likewise.
23104 (aarch64_sve_general_operand): Likewise.
23105 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
23106 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
23107 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
23108 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
23109 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
23110 (aarch64_sve_float_arith_immediate): Likewise.
23111 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
23112 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
23113 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
23114 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
23115 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
23116 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
23117 (aarch64_sve_float_arith_operand): Likewise.
23118 (aarch64_sve_float_arith_with_sub_operand): Likewise.
23119 (aarch64_sve_float_mul_operand): Likewise.
23120 (aarch64_sve_vec_perm_operand): Likewise.
23121 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
23122 (aarch64_mov_operand): Accept const_poly_int and const_vector.
23123 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
23124 as well as const_vector.
23125 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
23126 in file. Use CONST0_RTX and CONSTM1_RTX.
23127 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
23128 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
23129 Use aarch64_simd_imm_zero.
23130 * config/aarch64/aarch64-sve.md: New file.
23131 * config/aarch64/aarch64.md: Include it.
23132 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
23133 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
23134 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
23135 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
23136 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
23137 (sve): New attribute.
23138 (enabled): Disable instructions with the sve attribute unless
23140 (movqi, movhi): Pass CONST_POLY_INT operaneds through
23141 aarch64_expand_mov_immediate.
23142 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
23143 CNT[BHSD] immediates.
23144 (movti): Split CONST_POLY_INT moves into two halves.
23145 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
23146 Split additions that need a temporary here if the destination
23147 is the stack pointer.
23148 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
23149 (*add<mode>3_poly_1): New instruction.
23150 (set_clobber_cc): New expander.
23152 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23154 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
23155 parameter and use it instead of GET_MODE_SIZE (innermode). Use
23156 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
23157 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
23158 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
23159 Change innermode from fixed_mode_size to machine_mode.
23160 (simplify_subreg): Update call accordingly. Handle a constant-sized
23161 subreg of a variable-length CONST_VECTOR.
23163 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23164 Alan Hayward <alan.hayward@arm.com>
23165 David Sherwood <david.sherwood@arm.com>
23167 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
23168 (add_offset_to_base): New function, split out from...
23169 (create_mem_ref): ...here. When handling a scale other than 1,
23170 check first whether the address is valid without the offset.
23171 Add it into the base if so, leaving the index and scale as-is.
23173 2018-01-12 Jakub Jelinek <jakub@redhat.com>
23176 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
23177 fold_for_warn before checking if arg2 is INTEGER_CST.
23179 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
23181 * config/rs6000/predicates.md (load_multiple_operation): Delete.
23182 (store_multiple_operation): Delete.
23183 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
23184 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
23185 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
23186 guarded by TARGET_STRING.
23187 (rs6000_output_load_multiple): Delete.
23188 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
23189 OPTION_MASK_STRING / TARGET_STRING handling.
23190 (print_operand) <'N', 'O'>: Add comment that these are unused now.
23191 (const rs6000_opt_masks) <"string">: Change mask to 0.
23192 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
23193 (MASK_STRING): Delete.
23194 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
23196 (load_multiple): Delete.
23203 (store_multiple): Delete.
23210 (movmemsi_8reg): Delete.
23211 (corresponding unnamed define_insn): Delete.
23212 (movmemsi_6reg): Delete.
23213 (corresponding unnamed define_insn): Delete.
23214 (movmemsi_4reg): Delete.
23215 (corresponding unnamed define_insn): Delete.
23216 (movmemsi_2reg): Delete.
23217 (corresponding unnamed define_insn): Delete.
23218 (movmemsi_1reg): Delete.
23219 (corresponding unnamed define_insn): Delete.
23220 * config/rs6000/rs6000.opt (mno-string): New.
23221 (mstring): Replace by deprecation warning stub.
23222 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
23224 2018-01-12 Jakub Jelinek <jakub@redhat.com>
23226 * regrename.c (regrename_do_replace): If replacing the same
23227 reg multiple times, try to reuse last created gen_raw_REG.
23230 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
23231 main to workaround a bug in GDB.
23233 2018-01-12 Tom de Vries <tom@codesourcery.com>
23236 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
23238 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
23240 PR rtl-optimization/80481
23241 * ira-color.c (get_cap_member): New function.
23242 (allocnos_conflict_by_live_ranges_p): Use it.
23243 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
23244 (setup_slot_coalesced_allocno_live_ranges): Ditto.
23246 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
23249 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
23250 (*saddl_se_1): Ditto.
23251 (*ssubsi_1): Ditto.
23252 (*ssubl_se_1): Ditto.
23254 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23256 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
23257 rather than wi::to_widest for DR_INITs.
23258 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
23259 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
23260 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
23262 (vect_analyze_group_access_1): Note that here.
23264 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23266 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
23267 polynomial type sizes.
23269 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23271 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
23272 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
23273 (gimple_add_tmp_var): Likewise.
23275 2018-01-12 Martin Liska <mliska@suse.cz>
23277 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
23278 (gimple_alloc_sizes): Likewise.
23279 (dump_gimple_statistics): Use PRIu64 in printf format.
23280 * gimple.h: Change uint64_t to int.
23282 2018-01-12 Martin Liska <mliska@suse.cz>
23284 * tree-core.h: Use uint64_t instead of int.
23285 * tree.c (tree_node_counts): Likewise.
23286 (tree_node_sizes): Likewise.
23287 (dump_tree_statistics): Use PRIu64 in printf format.
23289 2018-01-12 Martin Liska <mliska@suse.cz>
23291 * Makefile.in: As qsort_chk is implemented in vec.c, add
23292 vec.o to linkage of gencfn-macros.
23293 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
23294 passing the info to record_node_allocation_statistics.
23295 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
23297 * ggc-common.c (struct ggc_usage): Add operator== and use
23298 it in operator< and compare function.
23299 * mem-stats.h (struct mem_usage): Likewise.
23300 * vec.c (struct vec_usage): Remove operator< and compare
23301 function. Can be simply inherited.
23303 2018-01-12 Martin Jambor <mjambor@suse.cz>
23306 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
23307 * tree-ssa-math-opts.c: Include domwalk.h.
23308 (convert_mult_to_fma_1): New function.
23309 (fma_transformation_info): New type.
23310 (fma_deferring_state): Likewise.
23311 (cancel_fma_deferring): New function.
23312 (result_of_phi): Likewise.
23313 (last_fma_candidate_feeds_initial_phi): Likewise.
23314 (convert_mult_to_fma): Added deferring logic, split actual
23315 transformation to convert_mult_to_fma_1.
23316 (math_opts_dom_walker): New type.
23317 (math_opts_dom_walker::after_dom_children): New method, body moved
23318 here from pass_optimize_widening_mul::execute, added deferring logic
23320 (pass_optimize_widening_mul::execute): Moved most of code to
23321 math_opts_dom_walker::after_dom_children.
23322 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
23323 * config/i386/i386.c (ix86_option_override_internal): Added
23324 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
23326 2018-01-12 Richard Biener <rguenther@suse.de>
23329 * dwarf2out.c (gen_variable_die): Do not reset old_die for
23330 inline instance vars.
23332 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
23335 * config/rx/rx.c (rx_is_restricted_memory_address):
23336 Handle SUBREG case.
23338 2018-01-12 Richard Biener <rguenther@suse.de>
23340 PR tree-optimization/80846
23341 * target.def (split_reduction): New target hook.
23342 * targhooks.c (default_split_reduction): New function.
23343 * targhooks.h (default_split_reduction): Declare.
23344 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
23345 target requests first reduce vectors by combining low and high
23347 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
23348 (get_vectype_for_scalar_type_and_size): Export.
23349 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
23350 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
23351 * doc/tm.texi: Regenerate.
23352 * config/i386/i386.c (ix86_split_reduction): Implement
23353 TARGET_VECTORIZE_SPLIT_REDUCTION.
23355 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
23358 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
23359 in PIC mode except for TARGET_VXWORKS_RTP.
23360 * config/sparc/sparc.c: Include cfgrtl.h.
23361 (TARGET_INIT_PIC_REG): Define.
23362 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
23363 (sparc_pic_register_p): New predicate.
23364 (sparc_legitimate_address_p): Use it.
23365 (sparc_legitimize_pic_address): Likewise.
23366 (sparc_delegitimize_address): Likewise.
23367 (sparc_mode_dependent_address_p): Likewise.
23368 (gen_load_pcrel_sym): Remove 4th parameter.
23369 (load_got_register): Adjust call to above. Remove obsolete stuff.
23370 (sparc_expand_prologue): Do not call load_got_register here.
23371 (sparc_flat_expand_prologue): Likewise.
23372 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
23373 (sparc_use_pseudo_pic_reg): New function.
23374 (sparc_init_pic_reg): Likewise.
23375 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23376 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
23378 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
23380 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
23381 Add item for branch_cost.
23383 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
23385 PR rtl-optimization/83565
23386 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
23387 not extend the result to a larger mode for rotate operations.
23388 (num_sign_bit_copies1): Likewise.
23390 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23393 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
23395 Use values-Xc.o for -pedantic.
23396 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
23398 2018-01-12 Martin Liska <mliska@suse.cz>
23401 * ipa-devirt.c (final_warning_record::grow_type_warnings):
23403 (possible_polymorphic_call_targets): Use it.
23404 (ipa_devirt): Likewise.
23406 2018-01-12 Martin Liska <mliska@suse.cz>
23408 * profile-count.h (enum profile_quality): Use 0 as invalid
23409 enum value of profile_quality.
23411 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
23413 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
23414 -mext-string options.
23416 2018-01-12 Richard Biener <rguenther@suse.de>
23418 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
23419 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
23420 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
23422 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
23424 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
23426 * configure.ac (--with-long-double-format): Add support for the
23427 configuration option to change the default long double format on
23429 * config.gcc (powerpc*-linux*-*): Likewise.
23430 * configure: Regenerate.
23431 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
23432 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
23433 used without modification.
23435 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23437 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
23438 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
23439 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
23440 MISC_BUILTIN_SPEC_BARRIER.
23441 (rs6000_init_builtins): Likewise.
23442 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
23444 (speculation_barrier): New define_insn.
23445 * doc/extend.texi: Document __builtin_speculation_barrier.
23447 2018-01-11 Jakub Jelinek <jakub@redhat.com>
23450 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
23451 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
23452 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
23454 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
23455 integral modes instead of "ss" and "sd".
23456 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
23457 vectors with 32-bit and 64-bit elements.
23458 (vecdupssescalarmodesuffix): New mode attribute.
23459 (vec_dup<mode>): Use it.
23461 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
23464 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
23465 frame if argument is passed on stack.
23467 2018-01-11 Jakub Jelinek <jakub@redhat.com>
23470 * ree.c (combine_reaching_defs): Optimize also
23471 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
23472 reg2=any_extend(exp); reg1=reg2;, formatting fix.
23474 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
23476 PR middle-end/83189
23477 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
23479 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
23481 PR middle-end/83718
23482 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
23483 after they are computed.
23485 2018-01-11 Bin Cheng <bin.cheng@arm.com>
23487 PR tree-optimization/83695
23488 * gimple-loop-linterchange.cc
23489 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
23490 reset cached scev information after interchange.
23491 (pass_linterchange::execute): Remove call to scev_reset_htab.
23493 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23495 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
23496 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
23497 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
23498 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
23499 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
23500 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
23501 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
23502 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
23503 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
23504 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
23505 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
23506 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
23507 (V_lane_reg): Likewise.
23508 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
23510 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
23511 (vfmal_lane_low<mode>_intrinsic,
23512 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
23513 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
23514 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
23515 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
23516 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
23517 vfmsl_lane_high<mode>_intrinsic): New define_insns.
23519 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23521 * config/arm/arm-cpus.in (fp16fml): New feature.
23522 (ALL_SIMD): Add fp16fml.
23523 (armv8.2-a): Add fp16fml as an option.
23524 (armv8.3-a): Likewise.
23525 (armv8.4-a): Add fp16fml as part of fp16.
23526 * config/arm/arm.h (TARGET_FP16FML): Define.
23527 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
23529 * config/arm/arm-modes.def (V2HF): Define.
23530 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
23531 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
23532 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
23533 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
23534 vfmsl_low, vfmsl_high): New set of builtins.
23535 * config/arm/iterators.md (PLUSMINUS): New code iterator.
23536 (vfml_op): New code attribute.
23537 (VFMLHALVES): New int iterator.
23538 (VFML, VFMLSEL): New mode attributes.
23539 (V_reg): Define mapping for V2HF.
23540 (V_hi, V_lo): New mode attributes.
23541 (VF_constraint): Likewise.
23542 (vfml_half, vfml_half_selector): New int attributes.
23543 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
23545 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
23546 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
23548 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
23549 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
23550 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
23551 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
23553 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
23554 Document new effective target and option set.
23556 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23558 * config/arm/arm-cpus.in (armv8_4): New feature.
23559 (ARMv8_4a): New fgroup.
23560 (armv8.4-a): New arch.
23561 * config/arm/arm-tables.opt: Regenerate.
23562 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
23563 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
23564 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
23565 Add matching rules for -march=armv8.4-a and extensions.
23566 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
23568 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
23571 * config/rx/rx.md (BW): New mode attribute.
23572 (sync_lock_test_and_setsi): Add mode suffix to insn output.
23574 2018-01-11 Richard Biener <rguenther@suse.de>
23576 PR tree-optimization/83435
23577 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
23578 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
23579 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
23581 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23582 Alan Hayward <alan.hayward@arm.com>
23583 David Sherwood <david.sherwood@arm.com>
23585 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
23587 (aarch64_classify_address): Initialize it. Track polynomial offsets.
23588 (aarch64_print_address_internal): Use it to check for a zero offset.
23590 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23591 Alan Hayward <alan.hayward@arm.com>
23592 David Sherwood <david.sherwood@arm.com>
23594 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
23595 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
23596 Return a poly_int64 rather than a HOST_WIDE_INT.
23597 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
23598 rather than a HOST_WIDE_INT.
23599 * config/aarch64/aarch64.h (aarch64_frame): Protect with
23600 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
23601 hard_fp_offset, frame_size, initial_adjust, callee_offset and
23602 final_offset from HOST_WIDE_INT to poly_int64.
23603 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
23604 to_constant when getting the number of units in an Advanced SIMD
23606 (aarch64_builtin_vectorized_function): Check for a constant number
23608 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
23610 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
23611 attribute instead of GET_MODE_NUNITS.
23612 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
23613 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
23614 GET_MODE_SIZE for fixed-size registers.
23615 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
23616 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
23617 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
23618 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
23619 (aarch64_print_operand, aarch64_print_address_internal)
23620 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
23621 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
23622 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
23623 Handle polynomial GET_MODE_SIZE.
23624 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
23625 wider than SImode without modification.
23626 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
23627 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
23628 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
23629 passing and returning SVE modes.
23630 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
23631 rather than GEN_INT.
23632 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
23633 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
23634 (aarch64_allocate_and_probe_stack_space): Likewise.
23635 (aarch64_layout_frame): Cope with polynomial offsets.
23636 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
23637 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
23638 polynomial offsets.
23639 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
23640 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
23641 poly_int64 rather than a HOST_WIDE_INT.
23642 (aarch64_get_separate_components, aarch64_process_components)
23643 (aarch64_expand_prologue, aarch64_expand_epilogue)
23644 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
23645 (aarch64_anchor_offset): New function, split out from...
23646 (aarch64_legitimize_address): ...here.
23647 (aarch64_builtin_vectorization_cost): Handle polynomial
23648 TYPE_VECTOR_SUBPARTS.
23649 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
23651 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
23652 number of elements from the PARALLEL rather than the mode.
23653 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
23654 rather than GET_MODE_BITSIZE.
23655 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
23656 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
23657 (aarch64_expand_vec_perm_const_1): Handle polynomial
23658 d->perm.length () and d->perm elements.
23659 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
23660 Apply to_constant to d->perm elements.
23661 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
23662 polynomial CONST_VECTOR_NUNITS.
23663 (aarch64_move_pointer): Take amount as a poly_int64 rather
23665 (aarch64_progress_pointer): Avoid temporary variable.
23666 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
23667 the mode attribute instead of GET_MODE.
23669 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23670 Alan Hayward <alan.hayward@arm.com>
23671 David Sherwood <david.sherwood@arm.com>
23673 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
23674 x exists before using it.
23675 (aarch64_add_constant_internal): Rename to...
23676 (aarch64_add_offset_1): ...this. Replace regnum with separate
23677 src and dest rtxes. Handle the case in which they're different,
23678 including when the offset is zero. Replace scratchreg with an rtx.
23679 Use 2 additions if there is no spare register into which we can
23680 move a 16-bit constant.
23681 (aarch64_add_constant): Delete.
23682 (aarch64_add_offset): Replace reg with separate src and dest
23683 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
23684 Use aarch64_add_offset_1.
23685 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
23686 an rtx rather than an int. Take the delta as a poly_int64
23687 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
23688 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
23689 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
23690 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
23691 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
23692 and aarch64_add_sp.
23693 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
23694 aarch64_add_constant.
23696 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23698 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
23699 Use scalar_float_mode.
23701 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23703 * config/aarch64/aarch64-simd.md
23704 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
23705 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
23706 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
23707 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
23708 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
23709 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
23710 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
23711 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
23712 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
23713 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
23715 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23718 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
23719 targ_options->x_arm_arch_string is non NULL.
23721 2018-01-11 Tamar Christina <tamar.christina@arm.com>
23723 * config/aarch64/aarch64.h
23724 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
23726 2018-01-11 Sudakshina Das <sudi.das@arm.com>
23729 * expmed.c (emit_store_flag_force): Swap if const op0
23730 and change VOIDmode to mode of op0.
23732 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23734 PR rtl-optimization/83761
23735 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
23736 than bytes to mode_for_size.
23738 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23740 PR middle-end/83189
23741 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
23742 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
23745 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23747 PR middle-end/83575
23748 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
23749 when in layout mode.
23750 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
23751 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
23754 2018-01-10 Michael Collison <michael.collison@arm.com>
23756 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
23757 * config/aarch64/aarch64-option-extension.def: Add
23758 AARCH64_OPT_EXTENSION of 'fp16fml'.
23759 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23760 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
23761 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
23762 * config/aarch64/constraints.md (Ui7): New constraint.
23763 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
23764 (VFMLA_SEL_W): Ditto.
23767 (VFMLA16_LOW): New int iterator.
23768 (VFMLA16_HIGH): Ditto.
23769 (UNSPEC_FMLAL): New unspec.
23770 (UNSPEC_FMLSL): Ditto.
23771 (UNSPEC_FMLAL2): Ditto.
23772 (UNSPEC_FMLSL2): Ditto.
23773 (f16mac): New code attribute.
23774 * config/aarch64/aarch64-simd-builtins.def
23775 (aarch64_fmlal_lowv2sf): Ditto.
23776 (aarch64_fmlsl_lowv2sf): Ditto.
23777 (aarch64_fmlalq_lowv4sf): Ditto.
23778 (aarch64_fmlslq_lowv4sf): Ditto.
23779 (aarch64_fmlal_highv2sf): Ditto.
23780 (aarch64_fmlsl_highv2sf): Ditto.
23781 (aarch64_fmlalq_highv4sf): Ditto.
23782 (aarch64_fmlslq_highv4sf): Ditto.
23783 (aarch64_fmlal_lane_lowv2sf): Ditto.
23784 (aarch64_fmlsl_lane_lowv2sf): Ditto.
23785 (aarch64_fmlal_laneq_lowv2sf): Ditto.
23786 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
23787 (aarch64_fmlalq_lane_lowv4sf): Ditto.
23788 (aarch64_fmlsl_lane_lowv4sf): Ditto.
23789 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
23790 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
23791 (aarch64_fmlal_lane_highv2sf): Ditto.
23792 (aarch64_fmlsl_lane_highv2sf): Ditto.
23793 (aarch64_fmlal_laneq_highv2sf): Ditto.
23794 (aarch64_fmlsl_laneq_highv2sf): Ditto.
23795 (aarch64_fmlalq_lane_highv4sf): Ditto.
23796 (aarch64_fmlsl_lane_highv4sf): Ditto.
23797 (aarch64_fmlalq_laneq_highv4sf): Ditto.
23798 (aarch64_fmlsl_laneq_highv4sf): Ditto.
23799 * config/aarch64/aarch64-simd.md:
23800 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
23801 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23802 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
23803 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23804 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
23805 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
23806 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
23807 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
23808 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
23809 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
23810 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
23811 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
23812 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
23813 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
23814 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
23815 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
23816 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
23817 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
23818 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
23819 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
23820 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
23821 (vfmlsl_low_u32): Ditto.
23822 (vfmlalq_low_u32): Ditto.
23823 (vfmlslq_low_u32): Ditto.
23824 (vfmlal_high_u32): Ditto.
23825 (vfmlsl_high_u32): Ditto.
23826 (vfmlalq_high_u32): Ditto.
23827 (vfmlslq_high_u32): Ditto.
23828 (vfmlal_lane_low_u32): Ditto.
23829 (vfmlsl_lane_low_u32): Ditto.
23830 (vfmlal_laneq_low_u32): Ditto.
23831 (vfmlsl_laneq_low_u32): Ditto.
23832 (vfmlalq_lane_low_u32): Ditto.
23833 (vfmlslq_lane_low_u32): Ditto.
23834 (vfmlalq_laneq_low_u32): Ditto.
23835 (vfmlslq_laneq_low_u32): Ditto.
23836 (vfmlal_lane_high_u32): Ditto.
23837 (vfmlsl_lane_high_u32): Ditto.
23838 (vfmlal_laneq_high_u32): Ditto.
23839 (vfmlsl_laneq_high_u32): Ditto.
23840 (vfmlalq_lane_high_u32): Ditto.
23841 (vfmlslq_lane_high_u32): Ditto.
23842 (vfmlalq_laneq_high_u32): Ditto.
23843 (vfmlslq_laneq_high_u32): Ditto.
23844 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
23845 (AARCH64_FL_FOR_ARCH8_4): New.
23846 (AARCH64_ISA_F16FML): New ISA flag.
23847 (TARGET_F16FML): New feature flag for fp16fml.
23848 (doc/invoke.texi): Document new fp16fml option.
23850 2018-01-10 Michael Collison <michael.collison@arm.com>
23852 * config/aarch64/aarch64-builtins.c:
23853 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23854 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23855 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23856 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23857 (AARCH64_ISA_SHA3): New ISA flag.
23858 (TARGET_SHA3): New feature flag for sha3.
23859 * config/aarch64/iterators.md (sha512_op): New int attribute.
23860 (CRYPTO_SHA512): New int iterator.
23861 (UNSPEC_SHA512H): New unspec.
23862 (UNSPEC_SHA512H2): Ditto.
23863 (UNSPEC_SHA512SU0): Ditto.
23864 (UNSPEC_SHA512SU1): Ditto.
23865 * config/aarch64/aarch64-simd-builtins.def
23866 (aarch64_crypto_sha512hqv2di): New builtin.
23867 (aarch64_crypto_sha512h2qv2di): Ditto.
23868 (aarch64_crypto_sha512su0qv2di): Ditto.
23869 (aarch64_crypto_sha512su1qv2di): Ditto.
23870 (aarch64_eor3qv8hi): Ditto.
23871 (aarch64_rax1qv2di): Ditto.
23872 (aarch64_xarqv2di): Ditto.
23873 (aarch64_bcaxqv8hi): Ditto.
23874 * config/aarch64/aarch64-simd.md:
23875 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23876 (aarch64_crypto_sha512su0qv2di): Ditto.
23877 (aarch64_crypto_sha512su1qv2di): Ditto.
23878 (aarch64_eor3qv8hi): Ditto.
23879 (aarch64_rax1qv2di): Ditto.
23880 (aarch64_xarqv2di): Ditto.
23881 (aarch64_bcaxqv8hi): Ditto.
23882 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23883 (vsha512h2q_u64): Ditto.
23884 (vsha512su0q_u64): Ditto.
23885 (vsha512su1q_u64): Ditto.
23886 (veor3q_u16): Ditto.
23887 (vrax1q_u64): Ditto.
23888 (vxarq_u64): Ditto.
23889 (vbcaxq_u16): Ditto.
23890 * config/arm/types.md (crypto_sha512): New type attribute.
23891 (crypto_sha3): Ditto.
23892 (doc/invoke.texi): Document new sha3 option.
23894 2018-01-10 Michael Collison <michael.collison@arm.com>
23896 * config/aarch64/aarch64-builtins.c:
23897 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23898 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23899 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23900 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23901 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23902 (AARCH64_ISA_SM4): New ISA flag.
23903 (TARGET_SM4): New feature flag for sm4.
23904 * config/aarch64/aarch64-simd-builtins.def
23905 (aarch64_sm3ss1qv4si): Ditto.
23906 (aarch64_sm3tt1aq4si): Ditto.
23907 (aarch64_sm3tt1bq4si): Ditto.
23908 (aarch64_sm3tt2aq4si): Ditto.
23909 (aarch64_sm3tt2bq4si): Ditto.
23910 (aarch64_sm3partw1qv4si): Ditto.
23911 (aarch64_sm3partw2qv4si): Ditto.
23912 (aarch64_sm4eqv4si): Ditto.
23913 (aarch64_sm4ekeyqv4si): Ditto.
23914 * config/aarch64/aarch64-simd.md:
23915 (aarch64_sm3ss1qv4si): Ditto.
23916 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23917 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23918 (aarch64_sm4eqv4si): Ditto.
23919 (aarch64_sm4ekeyqv4si): Ditto.
23920 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23921 (sm3part_op): Ditto.
23922 (CRYPTO_SM3TT): Ditto.
23923 (CRYPTO_SM3PART): Ditto.
23924 (UNSPEC_SM3SS1): New unspec.
23925 (UNSPEC_SM3TT1A): Ditto.
23926 (UNSPEC_SM3TT1B): Ditto.
23927 (UNSPEC_SM3TT2A): Ditto.
23928 (UNSPEC_SM3TT2B): Ditto.
23929 (UNSPEC_SM3PARTW1): Ditto.
23930 (UNSPEC_SM3PARTW2): Ditto.
23931 (UNSPEC_SM4E): Ditto.
23932 (UNSPEC_SM4EKEY): Ditto.
23933 * config/aarch64/constraints.md (Ui2): New constraint.
23934 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23935 * config/arm/types.md (crypto_sm3): New type attribute.
23936 (crypto_sm4): Ditto.
23937 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23938 (vsm3tt1aq_u32): Ditto.
23939 (vsm3tt1bq_u32): Ditto.
23940 (vsm3tt2aq_u32): Ditto.
23941 (vsm3tt2bq_u32): Ditto.
23942 (vsm3partw1q_u32): Ditto.
23943 (vsm3partw2q_u32): Ditto.
23944 (vsm4eq_u32): Ditto.
23945 (vsm4ekeyq_u32): Ditto.
23946 (doc/invoke.texi): Document new sm4 option.
23948 2018-01-10 Michael Collison <michael.collison@arm.com>
23950 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23951 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23952 (AARCH64_FL_FOR_ARCH8_4): New.
23953 (AARCH64_FL_V8_4): New flag.
23954 (doc/invoke.texi): Document new armv8.4-a option.
23956 2018-01-10 Michael Collison <michael.collison@arm.com>
23958 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23959 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23960 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23961 * config/aarch64/aarch64-option-extension.def: Add
23962 AARCH64_OPT_EXTENSION of 'sha2'.
23963 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23964 (crypto): Disable sha2 and aes if crypto disabled.
23965 (crypto): Enable aes and sha2 if enabled.
23966 (simd): Disable sha2 and aes if simd disabled.
23967 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23969 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23970 (TARGET_SHA2): New feature flag for sha2.
23971 (TARGET_AES): New feature flag for aes.
23972 * config/aarch64/aarch64-simd.md:
23973 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23974 conditional on TARGET_AES.
23975 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23976 (aarch64_crypto_sha1hsi): Make pattern conditional
23978 (aarch64_crypto_sha1hv4si): Ditto.
23979 (aarch64_be_crypto_sha1hv4si): Ditto.
23980 (aarch64_crypto_sha1su1v4si): Ditto.
23981 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23982 (aarch64_crypto_sha1su0v4si): Ditto.
23983 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23984 (aarch64_crypto_sha256su0v4si): Ditto.
23985 (aarch64_crypto_sha256su1v4si): Ditto.
23986 (doc/invoke.texi): Document new aes and sha2 options.
23988 2018-01-10 Martin Sebor <msebor@redhat.com>
23990 PR tree-optimization/83781
23991 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23994 2018-01-11 Martin Sebor <msebor@gmail.com>
23995 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23997 PR tree-optimization/83501
23998 PR tree-optimization/81703
24000 * tree-ssa-strlen.c (get_string_cst): Rename...
24001 (get_string_len): ...to this. Handle global constants.
24002 (handle_char_store): Adjust.
24004 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
24005 Jim Wilson <jimw@sifive.com>
24007 * config/riscv/riscv-protos.h (riscv_output_return): New.
24008 * config/riscv/riscv.c (struct machine_function): New naked_p field.
24009 (riscv_attribute_table, riscv_output_return),
24010 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
24011 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
24012 (riscv_compute_frame_info): Only compute frame->mask if not a naked
24014 (riscv_expand_prologue): Add early return for naked function.
24015 (riscv_expand_epilogue): Likewise.
24016 (riscv_function_ok_for_sibcall): Return false for naked function.
24017 (riscv_set_current_function): New.
24018 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
24019 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
24020 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
24021 * doc/extend.texi (RISC-V Function Attributes): New.
24023 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
24025 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
24026 check for 128-bit long double before checking TCmode.
24027 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
24028 128-bit long doubles before checking TFmode or TCmode.
24029 (FLOAT128_IBM_P): Likewise.
24031 2018-01-10 Martin Sebor <msebor@redhat.com>
24033 PR tree-optimization/83671
24034 * builtins.c (c_strlen): Unconditionally return zero for the empty
24036 Use -Warray-bounds for warnings.
24037 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
24038 for non-constant array indices with COMPONENT_REF, arrays of
24039 arrays, and pointers to arrays.
24040 (gimple_fold_builtin_strlen): Determine and set length range for
24041 non-constant character arrays.
24043 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
24045 PR middle-end/81897
24046 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
24049 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
24051 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
24053 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
24056 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
24057 VECTOR_MEM_ALTIVEC_OR_VSX_P.
24058 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
24059 indexed_or_indirect_operand predicate.
24060 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
24061 (*vsx_le_perm_load_v8hi): Likewise.
24062 (*vsx_le_perm_load_v16qi): Likewise.
24063 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
24064 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
24065 (*vsx_le_perm_store_v8hi): Likewise.
24066 (*vsx_le_perm_store_v16qi): Likewise.
24067 (eight unnamed splitters): Likewise.
24069 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
24071 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
24072 * config/rs6000/emmintrin.h: Likewise.
24073 * config/rs6000/mmintrin.h: Likewise.
24074 * config/rs6000/xmmintrin.h: Likewise.
24076 2018-01-10 David Malcolm <dmalcolm@redhat.com>
24079 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
24081 * tree.c (tree_nop_conversion): Return true for location wrapper
24083 (maybe_wrap_with_location): New function.
24084 (selftest::check_strip_nops): New function.
24085 (selftest::test_location_wrappers): New function.
24086 (selftest::tree_c_tests): Call it.
24087 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
24088 (maybe_wrap_with_location): New decl.
24089 (EXPR_LOCATION_WRAPPER_P): New macro.
24090 (location_wrapper_p): New inline function.
24091 (tree_strip_any_location_wrapper): New inline function.
24093 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
24096 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
24097 stack_realign_offset for the largest alignment of stack slot
24099 (ix86_find_max_used_stack_alignment): New function.
24100 (ix86_finalize_stack_frame_flags): Use it. Set
24101 max_used_stack_alignment if we don't realign stack.
24102 * config/i386/i386.h (machine_function): Add
24103 max_used_stack_alignment.
24105 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
24107 * config/arm/arm.opt (-mbranch-cost): New option.
24108 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
24111 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
24114 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
24115 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
24117 2018-01-10 Richard Biener <rguenther@suse.de>
24120 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
24121 early out so it also covers the case where we have a non-NULL
24124 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
24126 PR tree-optimization/83753
24127 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
24128 for non-strided grouped accesses if the number of elements is 1.
24130 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
24133 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
24134 * i386.h (TARGET_USE_GATHER): Define.
24135 * x86-tune.def (X86_TUNE_USE_GATHER): New.
24137 2018-01-10 Martin Liska <mliska@suse.cz>
24140 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
24141 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
24143 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
24144 CLEANUP_NO_PARTITIONING is not set.
24146 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
24148 * doc/rtl.texi: Remove documentation of (const ...) wrappers
24149 for vectors, as a partial revert of r254296.
24150 * rtl.h (const_vec_p): Delete.
24151 (const_vec_duplicate_p): Don't test for vector CONSTs.
24152 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
24153 * expmed.c (make_tree): Likewise.
24156 * common.md (E, F): Use CONSTANT_P instead of checking for
24158 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
24159 checking for CONST_VECTOR.
24161 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
24163 PR middle-end/83575
24164 * predict.c (force_edge_cold): Handle in more sane way edges
24165 with no prediction.
24167 2018-01-09 Carl Love <cel@us.ibm.com>
24169 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
24171 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
24172 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
24173 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
24174 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
24175 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
24176 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
24177 * config/rs6000/rs6000-protos.h: Add extern defition for
24178 rs6000_generate_float2_double_code.
24179 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
24181 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
24182 (float2_v2df): Add define_expand.
24184 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
24187 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
24188 op_mode in the force_to_mode call.
24190 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
24192 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
24193 instead of checking each element individually.
24194 (aarch64_evpc_uzp): Likewise.
24195 (aarch64_evpc_zip): Likewise.
24196 (aarch64_evpc_ext): Likewise.
24197 (aarch64_evpc_rev): Likewise.
24198 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
24199 instead of checking each element individually. Return true without
24201 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
24202 whether all selected elements come from the same input, instead of
24203 checking each element individually. Remove calls to gen_rtx_REG,
24204 start_sequence and end_sequence and instead assert that no rtl is
24207 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
24209 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
24210 order of HIGH and CONST checks.
24212 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
24214 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
24215 if the destination isn't an SSA_NAME.
24217 2018-01-09 Richard Biener <rguenther@suse.de>
24219 PR tree-optimization/83668
24220 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
24222 (canonicalize_loop_form): ... here, renamed from ...
24223 (canonicalize_loop_closed_ssa_form): ... this and amended to
24224 swap successor edges for loop exit blocks to make us use
24225 the RPO order we need for initial schedule generation.
24227 2018-01-09 Joseph Myers <joseph@codesourcery.com>
24229 PR tree-optimization/64811
24230 * match.pd: When optimizing comparisons with Inf, avoid
24231 introducing or losing exceptions from comparisons with NaN.
24233 2018-01-09 Martin Liska <mliska@suse.cz>
24236 * asan.c (shadow_mem_size): Add gcc_assert.
24238 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
24240 Don't save registers in main().
24243 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
24244 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
24245 * config/avr/avr.c (avr_set_current_function): Don't error if
24246 naked, OS_task or OS_main are specified at the same time.
24247 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
24249 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
24251 * common/config/avr/avr-common.c (avr_option_optimization_table):
24252 Switch on -mmain-is-OS_task for optimizing compilations.
24254 2018-01-09 Richard Biener <rguenther@suse.de>
24256 PR tree-optimization/83572
24257 * graphite.c: Include cfganal.h.
24258 (graphite_transform_loops): Connect infinite loops to exit
24259 and remove fake edges at the end.
24261 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
24263 * ipa-inline.c (edge_badness): Revert accidental checkin.
24265 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
24268 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
24269 symbols; not inline clones.
24271 2018-01-09 Jakub Jelinek <jakub@redhat.com>
24274 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
24275 hard registers. Formatting fixes.
24277 PR preprocessor/83722
24278 * gcc.c (try_generate_repro): Pass
24279 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
24280 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
24283 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
24284 Kito Cheng <kito.cheng@gmail.com>
24286 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
24287 (riscv_leaf_function_p): Delete.
24288 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
24290 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24292 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
24294 (do_ifelse): New function.
24295 (do_isel): New function.
24296 (do_sub3): New function.
24297 (do_add3): New function.
24298 (do_load_mask_compare): New function.
24299 (do_overlap_load_compare): New function.
24300 (expand_compare_loop): New function.
24301 (expand_block_compare): Call expand_compare_loop() when appropriate.
24302 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
24303 option description.
24304 (-mblock-compare-inline-loop-limit): New option.
24306 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24309 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
24310 Reverse order of second and third operands in first alternative.
24311 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
24312 of first and second elements in UNSPEC_VPERMR vector.
24313 (altivec_expand_vec_perm_le): Likewise.
24315 2018-01-08 Jeff Law <law@redhat.com>
24317 PR rtl-optimizatin/81308
24318 * tree-switch-conversion.c (cfg_altered): New file scoped static.
24319 (process_switch): If group_case_labels makes a change, then set
24321 (pass_convert_switch::execute): If a switch is converted, then
24322 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
24324 PR rtl-optimization/81308
24325 * recog.c (split_all_insns): Conditionally cleanup the CFG after
24328 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
24330 PR target/83663 - Revert r255946
24331 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
24332 generation for cases where splatting a value is not useful.
24333 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
24334 across a vec_duplicate and a paradoxical subreg forming a vector
24335 mode to a vec_concat.
24337 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24339 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
24340 -march=armv8.3-a variants.
24341 * config/arm/t-multilib: Likewise.
24342 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
24344 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24346 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
24348 (cceq_ior_compare_complement): Give it a name so I can use it, and
24349 change boolean_or_operator predicate to boolean_operator so it can
24350 be used to generate a crand.
24351 (eqne): New code iterator.
24352 (bd/bd_neg): New code_attrs.
24353 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
24354 a single define_insn.
24355 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
24356 decrement (bdnzt/bdnzf/bdzt/bdzf).
24357 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
24358 with the new names of the branch decrement patterns, and added the
24359 names of the branch decrement conditional patterns.
24361 2018-01-08 Richard Biener <rguenther@suse.de>
24363 PR tree-optimization/83563
24364 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
24367 2018-01-08 Richard Biener <rguenther@suse.de>
24369 PR middle-end/83713
24370 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
24372 2018-01-08 Richard Biener <rguenther@suse.de>
24374 PR tree-optimization/83685
24375 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
24376 references to abnormals.
24378 2018-01-08 Richard Biener <rguenther@suse.de>
24381 * dwarf2out.c (output_indirect_strings): Handle empty
24382 skeleton_debug_str_hash.
24383 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
24385 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
24387 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
24388 (emit_store_direct): Likewise.
24389 (arc_trampoline_adjust_address): Likewise.
24390 (arc_asm_trampoline_template): New function.
24391 (arc_initialize_trampoline): Use asm_trampoline_template.
24392 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
24393 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
24394 * config/arc/arc.md (flush_icache): Delete pattern.
24396 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
24398 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
24399 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
24402 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
24405 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
24406 by not USED_FOR_TARGET.
24407 (make_pass_resolve_sw_modes): Likewise.
24409 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
24411 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
24414 2018-01-08 Richard Biener <rguenther@suse.de>
24416 PR middle-end/83580
24417 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
24419 2018-01-08 Richard Biener <rguenther@suse.de>
24421 PR middle-end/83517
24422 * match.pd ((t * 2) / 2) -> t): Add missing :c.
24424 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
24426 PR middle-end/81897
24427 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
24428 basic blocks with a small number of successors.
24429 (convert_control_dep_chain_into_preds): Improve handling of
24431 (dump_predicates): Split apart into...
24432 (dump_pred_chain): ...here...
24433 (dump_pred_info): ...and here.
24434 (can_one_predicate_be_invalidated_p): Add debugging printfs.
24435 (can_chain_union_be_invalidated_p): Improve check for invalidation
24437 (uninit_uses_cannot_happen): Avoid unnecessary if
24438 convert_control_dep_chain_into_preds yielded nothing.
24440 2018-01-06 Martin Sebor <msebor@redhat.com>
24442 PR tree-optimization/83640
24443 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
24444 subtracting negative offset from size.
24445 (builtin_access::overlap): Adjust offset bounds of the access to fall
24446 within the size of the object if possible.
24448 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
24450 PR rtl-optimization/83699
24451 * expmed.c (extract_bit_field_1): Restrict the vector usage of
24452 extract_bit_field_as_subreg to cases in which the extracted
24453 value is also a vector.
24455 * lra-constraints.c (process_alt_operands): Test for the equivalence
24456 substitutions when detecting a possible reload cycle.
24458 2018-01-06 Jakub Jelinek <jakub@redhat.com>
24461 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
24462 by default if flag_selective_schedling{,2}. Formatting fixes.
24464 PR rtl-optimization/83682
24465 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
24466 if it has non-VECTOR_MODE element mode.
24467 (vec_duplicate_p): Likewise.
24469 PR middle-end/83694
24470 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
24471 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
24473 2018-01-05 Jakub Jelinek <jakub@redhat.com>
24476 * config/i386/i386-builtin.def
24477 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
24478 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
24479 Require also OPTION_MASK_ISA_AVX512F in addition to
24480 OPTION_MASK_ISA_GFNI.
24481 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
24482 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
24483 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
24484 to OPTION_MASK_ISA_GFNI.
24485 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
24486 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
24487 OPTION_MASK_ISA_AVX512BW.
24488 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
24489 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
24490 addition to OPTION_MASK_ISA_GFNI.
24491 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
24492 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
24493 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
24494 to OPTION_MASK_ISA_GFNI.
24495 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
24496 a requirement for all ISAs rather than any of them with a few
24498 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
24500 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
24501 bitmasks to be enabled with 3 exceptions, instead of requiring any
24502 enabled ISA with lots of exceptions.
24503 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
24504 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
24505 Change avx512bw in isa attribute to avx512f.
24506 * config/i386/sgxintrin.h: Add license boilerplate.
24507 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
24508 to __AVX512F__ and __AVX512VL to __AVX512VL__.
24509 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
24510 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
24512 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
24513 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
24514 temporarily sse2 rather than sse if not enabled already.
24517 * config/i386/sse.md (VI248_VLBW): Rename to ...
24518 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
24519 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
24520 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
24521 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
24522 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
24523 mode iterator instead of VI248_VLBW.
24525 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
24527 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
24528 (record_modified): Skip clobbers; add debug output.
24529 (param_change_prob): Use sreal frequencies.
24531 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
24533 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
24534 punt for user-aligned variables.
24536 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
24538 * tree-chrec.c (chrec_contains_symbols): Return true for
24541 2018-01-05 Sudakshina Das <sudi.das@arm.com>
24544 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
24545 of (x|y) == x for BICS pattern.
24547 2018-01-05 Jakub Jelinek <jakub@redhat.com>
24549 PR tree-optimization/83605
24550 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
24551 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
24554 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
24556 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
24557 * config/epiphany/rtems.h: New file.
24559 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24560 Uros Bizjak <ubizjak@gmail.com>
24563 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
24564 QIreg_operand instead of register_operand predicate.
24565 * config/i386/i386.c (ix86_rop_should_change_byte_p,
24566 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
24567 comments instead of -fmitigate[-_]rop.
24569 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24572 * cgraphunit.c (symbol_table::compile): Switch to text_section
24573 before calling assembly_start debug hook.
24574 * run-rtl-passes.c (run_rtl_passes): Likewise.
24577 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24579 * tree-vrp.c (extract_range_from_binary_expr_1): Check
24580 range_int_cst_p rather than !symbolic_range_p before calling
24581 extract_range_from_multiplicative_op_1.
24583 2018-01-04 Jeff Law <law@redhat.com>
24585 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
24586 redundant test in assertion.
24588 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24590 * doc/rtl.texi: Document machine_mode wrapper classes.
24592 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24594 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
24595 using tree_to_uhwi.
24597 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24599 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
24600 the VEC_PERM_EXPR fold to fail.
24602 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24605 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
24606 to switched_sections.
24608 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24611 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
24612 test for d.testing.
24614 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
24617 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
24618 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
24620 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24623 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
24624 is BLKmode and bitpos not zero or mode change is needed.
24626 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24629 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
24632 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
24635 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
24636 instead of MULT rtx. Update all corresponding splitters.
24637 (*saddl_se): Ditto.
24638 (*ssub<modesuffix>): Ditto.
24639 (*ssubl_se): Ditto.
24640 (*cmp_sadd_di): Update split patterns.
24641 (*cmp_sadd_si): Ditto.
24642 (*cmp_sadd_sidi): Ditto.
24643 (*cmp_ssub_di): Ditto.
24644 (*cmp_ssub_si): Ditto.
24645 (*cmp_ssub_sidi): Ditto.
24646 * config/alpha/predicates.md (const23_operand): New predicate.
24647 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
24648 Look for ASHIFT, not MULT inner operand.
24649 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
24651 2018-01-04 Martin Liska <mliska@suse.cz>
24653 PR gcov-profile/83669
24654 * gcov.c (output_intermediate_file): Add version to intermediate
24656 * doc/gcov.texi: Document new field 'version' in intermediate
24657 file format. Fix location of '-k' option of gcov command.
24659 2018-01-04 Martin Liska <mliska@suse.cz>
24662 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
24664 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24666 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
24668 2018-01-03 Martin Sebor <msebor@redhat.com>
24670 PR tree-optimization/83655
24671 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
24672 checking calls with invalid arguments.
24674 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24676 * tree-vect-stmts.c (vect_get_store_rhs): New function.
24677 (vectorizable_mask_load_store): Delete.
24678 (vectorizable_call): Return false for masked loads and stores.
24679 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
24680 instead of gimple_assign_rhs1.
24681 (vectorizable_load): Handle IFN_MASK_LOAD.
24682 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
24684 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24686 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
24688 (vectorizable_mask_load_store): ...here.
24689 (vectorizable_load): ...and here.
24691 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24693 * tree-vect-stmts.c (vect_build_all_ones_mask)
24694 (vect_build_zero_merge_argument): New functions, split out from...
24695 (vectorizable_load): ...here.
24697 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24699 * tree-vect-stmts.c (vect_check_store_rhs): New function,
24701 (vectorizable_mask_load_store): ...here.
24702 (vectorizable_store): ...and here.
24704 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24706 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
24708 (vectorizable_mask_load_store): ...here.
24710 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24712 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
24713 (vect_model_store_cost): Take a vec_load_store_type instead of a
24715 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
24716 (vect_model_store_cost): Take a vec_load_store_type instead of a
24718 (vectorizable_mask_load_store): Update accordingly.
24719 (vectorizable_store): Likewise.
24720 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
24722 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24724 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
24725 IFN_MASK_LOAD calls here rather than...
24726 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
24728 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24729 Alan Hayward <alan.hayward@arm.com>
24730 David Sherwood <david.sherwood@arm.com>
24732 * expmed.c (extract_bit_field_1): For vector extracts,
24733 fall back to extract_bit_field_as_subreg if vec_extract
24736 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24737 Alan Hayward <alan.hayward@arm.com>
24738 David Sherwood <david.sherwood@arm.com>
24740 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
24741 they are variable or constant sized.
24742 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
24743 slots for constant-sized data.
24745 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24746 Alan Hayward <alan.hayward@arm.com>
24747 David Sherwood <david.sherwood@arm.com>
24749 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
24750 handling COND_EXPRs with boolean comparisons, try to find a better
24751 basis for the mask type than the boolean itself.
24753 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24755 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
24756 is calculated and how it can be overridden.
24757 * genmodes.c (max_bitsize_mode_any_mode): New variable.
24758 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
24760 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
24763 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24764 Alan Hayward <alan.hayward@arm.com>
24765 David Sherwood <david.sherwood@arm.com>
24767 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
24768 Remove the mode argument.
24769 (aarch64_simd_valid_immediate): Remove the mode and inverse
24771 * config/aarch64/iterators.md (bitsize): New iterator.
24772 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
24773 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
24774 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
24775 aarch64_simd_valid_immediate.
24776 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
24777 (aarch64_reg_or_bic_imm): Likewise.
24778 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
24779 with an insn_type enum and msl with a modifier_type enum.
24780 Replace element_width with a scalar_mode. Change the shift
24781 to unsigned int. Add constructors for scalar_float_mode and
24782 scalar_int_mode elements.
24783 (aarch64_vect_float_const_representable_p): Delete.
24784 (aarch64_can_const_movi_rtx_p)
24785 (aarch64_simd_scalar_immediate_valid_for_move)
24786 (aarch64_simd_make_constant): Update call to
24787 aarch64_simd_valid_immediate.
24788 (aarch64_advsimd_valid_immediate_hs): New function.
24789 (aarch64_advsimd_valid_immediate): Likewise.
24790 (aarch64_simd_valid_immediate): Remove mode and inverse
24791 arguments. Rewrite to use the above. Use const_vec_duplicate_p
24792 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
24793 and aarch64_float_const_representable_p on the result.
24794 (aarch64_output_simd_mov_immediate): Remove mode argument.
24795 Update call to aarch64_simd_valid_immediate and use of
24796 simd_immediate_info.
24797 (aarch64_output_scalar_simd_mov_immediate): Update call
24800 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24801 Alan Hayward <alan.hayward@arm.com>
24802 David Sherwood <david.sherwood@arm.com>
24804 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
24805 (mode_nunits): Likewise CONST_MODE_NUNITS.
24806 * machmode.def (ADJUST_NUNITS): Document.
24807 * genmodes.c (mode_data::need_nunits_adj): New field.
24808 (blank_mode): Update accordingly.
24809 (adj_nunits): New variable.
24810 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
24812 (emit_mode_size_inline): Set need_bytesize_adj for all modes
24813 listed in adj_nunits.
24814 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
24815 listed in adj_nunits. Don't emit case statements for such modes.
24816 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
24817 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
24818 nothing if adj_nunits is nonnull.
24819 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
24820 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
24821 (emit_mode_fbit): Update use of print_maybe_const_decl.
24822 (emit_move_size): Likewise. Treat the array as non-const
24824 (emit_mode_adjustments): Handle adj_nunits.
24826 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24828 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
24829 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
24830 (VECTOR_MODES): Use it.
24831 (make_vector_modes): Take the prefix as an argument.
24833 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24834 Alan Hayward <alan.hayward@arm.com>
24835 David Sherwood <david.sherwood@arm.com>
24837 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
24838 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
24839 for MODE_VECTOR_BOOL.
24840 * machmode.def (VECTOR_BOOL_MODE): Document.
24841 * genmodes.c (VECTOR_BOOL_MODE): New macro.
24842 (make_vector_bool_mode): New function.
24843 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
24845 * lto-streamer-in.c (lto_input_mode_table): Likewise.
24846 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
24848 * stor-layout.c (int_mode_for_mode): Likewise.
24849 * tree.c (build_vector_type_for_mode): Likewise.
24850 * varasm.c (output_constant_pool_2): Likewise.
24851 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
24852 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
24853 for MODE_VECTOR_BOOL.
24854 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24855 of mode class checks.
24856 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24857 instead of a list of mode class checks.
24858 (expand_vector_scalar_condition): Likewise.
24859 (type_for_widest_vector_mode): Handle BImode as an inner mode.
24861 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24862 Alan Hayward <alan.hayward@arm.com>
24863 David Sherwood <david.sherwood@arm.com>
24865 * machmode.h (mode_size): Change from unsigned short to
24867 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24868 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24869 or if measurement_type is not polynomial.
24870 (fixed_size_mode::includes_p): Check for constant-sized modes.
24871 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24872 return a poly_uint16 rather than an unsigned short.
24873 (emit_mode_size): Change the type of mode_size from unsigned short
24874 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
24875 (emit_mode_adjustments): Cope with polynomial vector sizes.
24876 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24878 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24880 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24881 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24882 * caller-save.c (setup_save_areas): Likewise.
24883 (replace_reg_with_saved_mem): Likewise.
24884 * calls.c (emit_library_call_value_1): Likewise.
24885 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24886 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24887 (gen_lowpart_for_combine): Likewise.
24888 * convert.c (convert_to_integer_1): Likewise.
24889 * cse.c (equiv_constant, cse_insn): Likewise.
24890 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24891 (cselib_subst_to_values): Likewise.
24892 * dce.c (word_dce_process_block): Likewise.
24893 * df-problems.c (df_word_lr_mark_ref): Likewise.
24894 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24895 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24896 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24897 (rtl_for_decl_location): Likewise.
24898 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24899 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24900 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24901 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24902 (expand_expr_real_1): Likewise.
24903 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24904 (pad_below): Likewise.
24905 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24906 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24907 * ira.c (get_subreg_tracking_sizes): Likewise.
24908 * ira-build.c (ira_create_allocno_objects): Likewise.
24909 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24910 (ira_sort_regnos_for_alter_reg): Likewise.
24911 * ira-costs.c (record_operand_costs): Likewise.
24912 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24913 (resolve_simple_move): Likewise.
24914 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24915 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24916 (lra_constraints): Likewise.
24917 (CONST_POOL_OK_P): Reject variable-sized modes.
24918 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24919 (add_pseudo_to_slot, lra_spill): Likewise.
24920 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24921 * optabs-query.c (get_best_extraction_insn): Likewise.
24922 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24923 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24924 (expand_mult_highpart, valid_multiword_target_p): Likewise.
24925 * recog.c (offsettable_address_addr_space_p): Likewise.
24926 * regcprop.c (maybe_mode_change): Likewise.
24927 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24928 * regrename.c (build_def_use): Likewise.
24929 * regstat.c (dump_reg_info): Likewise.
24930 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24931 (find_reloads, find_reloads_subreg_address): Likewise.
24932 * reload1.c (eliminate_regs_1): Likewise.
24933 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24934 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24935 (simplify_binary_operation_1, simplify_subreg): Likewise.
24936 * targhooks.c (default_function_arg_padding): Likewise.
24937 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24938 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24939 (verify_gimple_assign_ternary): Likewise.
24940 * tree-inline.c (estimate_move_cost): Likewise.
24941 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24942 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24943 (get_address_cost_ainc): Likewise.
24944 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24945 (vect_supportable_dr_alignment): Likewise.
24946 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24947 (vectorizable_reduction): Likewise.
24948 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24949 (vectorizable_operation, vectorizable_load): Likewise.
24950 * tree.c (build_same_sized_truth_vector_type): Likewise.
24951 * valtrack.c (cleanup_auto_inc_dec): Likewise.
24952 * var-tracking.c (emit_note_insn_var_location): Likewise.
24953 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24954 (ADDR_VEC_ALIGN): Likewise.
24956 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24957 Alan Hayward <alan.hayward@arm.com>
24958 David Sherwood <david.sherwood@arm.com>
24960 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24962 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24963 or if measurement_type is polynomial.
24964 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24965 * combine.c (make_extraction): Likewise.
24966 * dse.c (find_shift_sequence): Likewise.
24967 * dwarf2out.c (mem_loc_descriptor): Likewise.
24968 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24969 (extract_bit_field, extract_low_bits): Likewise.
24970 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24971 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24972 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24973 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24974 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24975 * reload.c (find_reloads): Likewise.
24976 * reload1.c (alter_reg): Likewise.
24977 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24978 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24979 * tree-if-conv.c (predicate_mem_writes): Likewise.
24980 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24981 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24982 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24983 * valtrack.c (dead_debug_insert_temp): Likewise.
24984 * varasm.c (mergeable_constant_section): Likewise.
24985 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24987 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24988 Alan Hayward <alan.hayward@arm.com>
24989 David Sherwood <david.sherwood@arm.com>
24991 * expr.c (expand_assignment): Cope with polynomial mode sizes
24992 when assigning to a CONCAT.
24994 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24995 Alan Hayward <alan.hayward@arm.com>
24996 David Sherwood <david.sherwood@arm.com>
24998 * machmode.h (mode_precision): Change from unsigned short to
25000 (mode_to_precision): Return a poly_uint16 rather than an unsigned
25002 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
25003 or if measurement_type is not polynomial.
25004 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
25005 in which the mode is already known to be a scalar_int_mode.
25006 * genmodes.c (emit_mode_precision): Change the type of mode_precision
25007 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
25009 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
25010 for GET_MODE_PRECISION.
25011 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
25012 for GET_MODE_PRECISION.
25013 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
25015 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
25016 (expand_field_assignment, make_extraction): Likewise.
25017 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
25018 (get_last_value): Likewise.
25019 * convert.c (convert_to_integer_1): Likewise.
25020 * cse.c (cse_insn): Likewise.
25021 * expr.c (expand_expr_real_1): Likewise.
25022 * lra-constraints.c (simplify_operand_subreg): Likewise.
25023 * optabs-query.c (can_atomic_load_p): Likewise.
25024 * optabs.c (expand_atomic_load): Likewise.
25025 (expand_atomic_store): Likewise.
25026 * ree.c (combine_reaching_defs): Likewise.
25027 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
25028 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
25029 * tree.h (type_has_mode_precision_p): Likewise.
25030 * ubsan.c (instrument_si_overflow): Likewise.
25032 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25033 Alan Hayward <alan.hayward@arm.com>
25034 David Sherwood <david.sherwood@arm.com>
25036 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
25037 polynomial numbers of units.
25038 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
25039 (valid_vector_subparts_p): New function.
25040 (build_vector_type): Remove temporary shim and take the number
25041 of units as a poly_uint64 rather than an int.
25042 (build_opaque_vector_type): Take the number of units as a
25043 poly_uint64 rather than an int.
25044 * tree.c (build_vector_from_ctor): Handle polynomial
25045 TYPE_VECTOR_SUBPARTS.
25046 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
25047 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
25048 (build_vector_from_val): If the number of units is variable,
25049 use build_vec_duplicate_cst for constant operands and
25050 VEC_DUPLICATE_EXPR otherwise.
25051 (make_vector_type): Remove temporary is_constant ().
25052 (build_vector_type, build_opaque_vector_type): Take the number of
25053 units as a poly_uint64 rather than an int.
25054 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
25056 * cfgexpand.c (expand_debug_expr): Likewise.
25057 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
25058 (store_constructor, expand_expr_real_1): Likewise.
25059 (const_scalar_mask_from_tree): Likewise.
25060 * fold-const-call.c (fold_const_reduction): Likewise.
25061 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
25062 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
25063 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
25064 (fold_relational_const): Likewise.
25065 (native_interpret_vector): Likewise. Change the size from an
25066 int to an unsigned int.
25067 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
25068 TYPE_VECTOR_SUBPARTS.
25069 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
25070 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
25071 duplicating a non-constant operand into a variable-length vector.
25072 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
25073 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
25074 * ipa-icf.c (sem_variable::equals): Likewise.
25075 * match.pd: Likewise.
25076 * omp-simd-clone.c (simd_clone_subparts): Likewise.
25077 * print-tree.c (print_node): Likewise.
25078 * stor-layout.c (layout_type): Likewise.
25079 * targhooks.c (default_builtin_vectorization_cost): Likewise.
25080 * tree-cfg.c (verify_gimple_comparison): Likewise.
25081 (verify_gimple_assign_binary): Likewise.
25082 (verify_gimple_assign_ternary): Likewise.
25083 (verify_gimple_assign_single): Likewise.
25084 * tree-pretty-print.c (dump_generic_node): Likewise.
25085 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25086 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
25087 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
25088 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
25089 (vect_shift_permute_load_chain): Likewise.
25090 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
25091 (expand_vector_condition, optimize_vector_constructor): Likewise.
25092 (lower_vec_perm, get_compute_type): Likewise.
25093 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
25094 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
25095 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
25096 (vect_recog_mask_conversion_pattern): Likewise.
25097 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
25098 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
25099 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25100 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
25101 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
25102 (vectorizable_shift, vectorizable_operation, vectorizable_store)
25103 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
25104 (supportable_widening_operation): Likewise.
25105 (supportable_narrowing_operation): Likewise.
25106 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
25108 * varasm.c (output_constant): Likewise.
25110 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25111 Alan Hayward <alan.hayward@arm.com>
25112 David Sherwood <david.sherwood@arm.com>
25114 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
25115 so that both the length == 3 and length != 3 cases set up their
25116 own permute vectors. Add comments explaining why we know the
25117 number of elements is constant.
25118 (vect_permute_load_chain): Likewise.
25120 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25121 Alan Hayward <alan.hayward@arm.com>
25122 David Sherwood <david.sherwood@arm.com>
25124 * machmode.h (mode_nunits): Change from unsigned char to
25126 (ONLY_FIXED_SIZE_MODES): New macro.
25127 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
25128 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
25129 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
25131 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
25132 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
25133 or if measurement_type is not polynomial.
25134 * genmodes.c (ZERO_COEFFS): New macro.
25135 (emit_mode_nunits_inline): Make mode_nunits_inline return a
25137 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
25138 Use ZERO_COEFFS when emitting initializers.
25139 * data-streamer.h (bp_pack_poly_value): New function.
25140 (bp_unpack_poly_value): Likewise.
25141 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
25142 for GET_MODE_NUNITS.
25143 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
25144 for GET_MODE_NUNITS.
25145 * tree.c (make_vector_type): Remove temporary shim and make
25146 the real function take the number of units as a poly_uint64
25147 rather than an int.
25148 (build_vector_type_for_mode): Handle polynomial nunits.
25149 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
25150 * emit-rtl.c (const_vec_series_p_1): Likewise.
25151 (gen_rtx_CONST_VECTOR): Likewise.
25152 * fold-const.c (test_vec_duplicate_folding): Likewise.
25153 * genrecog.c (validate_pattern): Likewise.
25154 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
25155 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
25156 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
25157 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
25158 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
25159 * rtlanal.c (subreg_get_info): Likewise.
25160 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25161 (vect_grouped_load_supported): Likewise.
25162 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
25163 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
25164 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
25165 (simplify_const_unary_operation, simplify_binary_operation_1)
25166 (simplify_const_binary_operation, simplify_ternary_operation)
25167 (test_vector_ops_duplicate, test_vector_ops): Likewise.
25168 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
25169 instead of CONST_VECTOR_NUNITS.
25170 * varasm.c (output_constant_pool_2): Likewise.
25171 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
25172 explicit-encoded elements in the XVEC for variable-length vectors.
25174 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25176 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
25178 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25179 Alan Hayward <alan.hayward@arm.com>
25180 David Sherwood <david.sherwood@arm.com>
25182 * coretypes.h (fixed_size_mode): Declare.
25183 (fixed_size_mode_pod): New typedef.
25184 * builtins.h (target_builtins::x_apply_args_mode)
25185 (target_builtins::x_apply_result_mode): Change type to
25186 fixed_size_mode_pod.
25187 * builtins.c (apply_args_size, apply_result_size, result_vector)
25188 (expand_builtin_apply_args_1, expand_builtin_apply)
25189 (expand_builtin_return): Update accordingly.
25191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25193 * cse.c (hash_rtx_cb): Hash only the encoded elements.
25194 * cselib.c (cselib_hash_rtx): Likewise.
25195 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
25196 CONST_VECTOR encoding.
25198 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25199 Jeff Law <law@redhat.com>
25202 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
25203 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
25204 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
25205 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
25208 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
25209 explicitly probe *sp in a noreturn function if there were any callee
25210 register saves or frame pointer is needed.
25212 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25215 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
25216 BLKmode for ternary, binary or unary expressions.
25219 * var-tracking.c (delete_vta_debug_insn): New inline function.
25220 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
25221 insns from get_insns () to NULL instead of each bb separately.
25222 Use delete_vta_debug_insn. No longer static.
25223 (vt_debug_insns_local, variable_tracking_main_1): Adjust
25224 delete_vta_debug_insns callers.
25225 * rtl.h (delete_vta_debug_insns): Declare.
25226 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
25227 instead of variable_tracking_main.
25229 2018-01-03 Martin Sebor <msebor@redhat.com>
25231 PR tree-optimization/83603
25232 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
25233 arguments past the endof the argument list in functions declared
25234 without a prototype.
25235 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
25236 Avoid checking when arguments are null.
25238 2018-01-03 Martin Sebor <msebor@redhat.com>
25241 * doc/extend.texi (attribute const): Fix a typo.
25242 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
25243 issuing -Wsuggest-attribute for void functions.
25245 2018-01-03 Martin Sebor <msebor@redhat.com>
25247 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
25248 offset_int::from instead of wide_int::to_shwi.
25249 (maybe_diag_overlap): Remove assertion.
25250 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
25251 * gimple-ssa-sprintf.c (format_directive): Same.
25252 (parse_directive): Same.
25253 (sprintf_dom_walker::compute_format_length): Same.
25254 (try_substitute_return_value): Same.
25256 2018-01-03 Jeff Law <law@redhat.com>
25258 PR middle-end/83654
25259 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
25260 non-constant residual for zero at runtime and avoid probing in
25261 that case. Reorganize code for trailing problem to mirror handling
25264 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25266 PR tree-optimization/83501
25267 * tree-ssa-strlen.c (get_string_cst): New.
25268 (handle_char_store): Call get_string_cst.
25270 2018-01-03 Martin Liska <mliska@suse.cz>
25272 PR tree-optimization/83593
25273 * tree-ssa-strlen.c: Include tree-cfg.h.
25274 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
25275 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
25276 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
25278 (strlen_dom_walker::before_dom_children): Call
25279 gimple_purge_dead_eh_edges. Dump tranformation with details
25281 (strlen_dom_walker::before_dom_children): Update call by adding
25282 new argument cleanup_eh.
25283 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
25285 2018-01-03 Martin Liska <mliska@suse.cz>
25288 * cif-code.def (VARIADIC_THUNK): New enum value.
25289 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
25292 2018-01-03 Jan Beulich <jbeulich@suse.com>
25294 * sse.md (mov<mode>_internal): Tighten condition for when to use
25295 vmovdqu<ssescalarsize> for TI and OI modes.
25297 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25299 Update copyright years.
25301 2018-01-03 Martin Liska <mliska@suse.cz>
25304 * ipa-visibility.c (function_and_variable_visibility): Skip
25305 functions with noipa attribure.
25307 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25309 * gcc.c (process_command): Update copyright notice dates.
25310 * gcov-dump.c (print_version): Ditto.
25311 * gcov.c (print_version): Ditto.
25312 * gcov-tool.c (print_version): Ditto.
25313 * gengtype.c (create_file): Ditto.
25314 * doc/cpp.texi: Bump @copying's copyright year.
25315 * doc/cppinternals.texi: Ditto.
25316 * doc/gcc.texi: Ditto.
25317 * doc/gccint.texi: Ditto.
25318 * doc/gcov.texi: Ditto.
25319 * doc/install.texi: Ditto.
25320 * doc/invoke.texi: Ditto.
25322 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25324 * vector-builder.h (vector_builder::m_full_nelts): Change from
25325 unsigned int to poly_uint64.
25326 (vector_builder::full_nelts): Update prototype accordingly.
25327 (vector_builder::new_vector): Likewise.
25328 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
25329 (vector_builder::operator ==): Likewise.
25330 (vector_builder::finalize): Likewise.
25331 * int-vector-builder.h (int_vector_builder::int_vector_builder):
25332 Take the number of elements as a poly_uint64 rather than an
25334 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
25335 from unsigned int to poly_uint64.
25336 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
25337 (vec_perm_indices::new_vector): Likewise.
25338 (vec_perm_indices::length): Likewise.
25339 (vec_perm_indices::nelts_per_input): Likewise.
25340 (vec_perm_indices::input_nelts): Likewise.
25341 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
25342 number of elements per input as a poly_uint64 rather than an
25343 unsigned int. Use the original encoding for variable-length
25344 vectors, rather than clamping each individual element.
25345 For the second and subsequent elements in each pattern,
25346 clamp the step and base before clamping their sum.
25347 (vec_perm_indices::series_p): Handle polynomial element counts.
25348 (vec_perm_indices::all_in_range_p): Likewise.
25349 (vec_perm_indices_to_tree): Likewise.
25350 (vec_perm_indices_to_rtx): Likewise.
25351 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
25352 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
25353 (tree_vector_builder::new_binary_operation): Handle polynomial
25354 element counts. Return false if we need to know the number
25355 of elements at compile time.
25356 * fold-const.c (fold_vec_perm): Punt if the number of elements
25357 isn't known at compile time.
25359 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25361 * vec-perm-indices.h (vec_perm_builder): Change element type
25362 from HOST_WIDE_INT to poly_int64.
25363 (vec_perm_indices::element_type): Update accordingly.
25364 (vec_perm_indices::clamp): Handle polynomial element_types.
25365 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25366 (vec_perm_indices::all_in_range_p): Likewise.
25367 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
25369 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
25370 polynomial vec_perm_indices element types.
25371 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
25372 * fold-const.c (fold_vec_perm): Likewise.
25373 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
25374 * tree-vect-generic.c (lower_vec_perm): Likewise.
25375 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25376 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
25377 element type to HOST_WIDE_INT.
25379 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25380 Alan Hayward <alan.hayward@arm.com>
25381 David Sherwood <david.sherwood@arm.com>
25383 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
25384 rather than an int. Use plus_constant.
25385 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
25386 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
25388 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25389 Alan Hayward <alan.hayward@arm.com>
25390 David Sherwood <david.sherwood@arm.com>
25392 * calls.c (emit_call_1, expand_call): Change struct_value_size from
25393 a HOST_WIDE_INT to a poly_int64.
25395 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25396 Alan Hayward <alan.hayward@arm.com>
25397 David Sherwood <david.sherwood@arm.com>
25399 * calls.c (load_register_parameters): Cope with polynomial
25400 mode sizes. Require a constant size for BLKmode parameters
25401 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
25402 forces a parameter to be padded at the lsb end in order to
25403 fill a complete number of words, require the parameter size
25404 to be ordered wrt UNITS_PER_WORD.
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 * reload1.c (spill_stack_slot_width): Change element type
25411 from unsigned int to poly_uint64_pod.
25412 (alter_reg): Treat mode sizes as polynomial.
25414 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25415 Alan Hayward <alan.hayward@arm.com>
25416 David Sherwood <david.sherwood@arm.com>
25418 * reload.c (complex_word_subreg_p): New function.
25419 (reload_inner_reg_of_subreg, push_reload): Use it.
25421 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25422 Alan Hayward <alan.hayward@arm.com>
25423 David Sherwood <david.sherwood@arm.com>
25425 * lra-constraints.c (process_alt_operands): Reject matched
25426 operands whose sizes aren't ordered.
25427 (match_reload): Refer to this check here.
25429 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25430 Alan Hayward <alan.hayward@arm.com>
25431 David Sherwood <david.sherwood@arm.com>
25433 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
25434 that the mode size is in the set {1, 2, 4, 8, 16}.
25436 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25437 Alan Hayward <alan.hayward@arm.com>
25438 David Sherwood <david.sherwood@arm.com>
25440 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
25441 Use plus_constant instead of gen_rtx_PLUS.
25443 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25444 Alan Hayward <alan.hayward@arm.com>
25445 David Sherwood <david.sherwood@arm.com>
25447 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
25448 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
25449 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
25450 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
25451 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
25452 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
25453 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
25454 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
25455 * config/i386/i386.c (ix86_push_rounding): ...this new function.
25456 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
25458 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
25459 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
25460 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
25461 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
25462 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
25463 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
25464 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
25465 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
25466 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
25467 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
25469 * expr.c (emit_move_resolve_push): Treat the input and result
25470 of PUSH_ROUNDING as a poly_int64.
25471 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
25472 (emit_push_insn): Likewise.
25473 * lra-eliminations.c (mark_not_eliminable): Likewise.
25474 * recog.c (push_operand): Likewise.
25475 * reload1.c (elimination_effects): Likewise.
25476 * rtlanal.c (nonzero_bits1): Likewise.
25477 * calls.c (store_one_arg): Likewise. Require the padding to be
25478 known at compile time.
25480 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25481 Alan Hayward <alan.hayward@arm.com>
25482 David Sherwood <david.sherwood@arm.com>
25484 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
25485 Use plus_constant instead of gen_rtx_PLUS.
25487 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25488 Alan Hayward <alan.hayward@arm.com>
25489 David Sherwood <david.sherwood@arm.com>
25491 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
25492 rather than an int.
25494 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25495 Alan Hayward <alan.hayward@arm.com>
25496 David Sherwood <david.sherwood@arm.com>
25498 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
25499 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
25500 via stack temporaries. Treat the mode size as polynomial too.
25502 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25503 Alan Hayward <alan.hayward@arm.com>
25504 David Sherwood <david.sherwood@arm.com>
25506 * expr.c (expand_expr_real_2): When handling conversions involving
25507 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
25508 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
25509 as a poly_uint64 too.
25511 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25512 Alan Hayward <alan.hayward@arm.com>
25513 David Sherwood <david.sherwood@arm.com>
25515 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
25517 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25518 Alan Hayward <alan.hayward@arm.com>
25519 David Sherwood <david.sherwood@arm.com>
25521 * combine.c (can_change_dest_mode): Handle polynomial
25522 REGMODE_NATURAL_SIZE.
25523 * expmed.c (store_bit_field_1): Likewise.
25524 * expr.c (store_constructor): Likewise.
25525 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
25526 and polynomial REGMODE_NATURAL_SIZE.
25527 (gen_lowpart_common): Likewise.
25528 * reginfo.c (record_subregs_of_mode): Likewise.
25529 * rtlanal.c (read_modify_subreg_p): Likewise.
25531 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25532 Alan Hayward <alan.hayward@arm.com>
25533 David Sherwood <david.sherwood@arm.com>
25535 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
25536 numbers of elements.
25538 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25539 Alan Hayward <alan.hayward@arm.com>
25540 David Sherwood <david.sherwood@arm.com>
25542 * match.pd: Cope with polynomial numbers of vector elements.
25544 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25545 Alan Hayward <alan.hayward@arm.com>
25546 David Sherwood <david.sherwood@arm.com>
25548 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
25549 in a POINTER_PLUS_EXPR.
25551 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25552 Alan Hayward <alan.hayward@arm.com>
25553 David Sherwood <david.sherwood@arm.com>
25555 * omp-simd-clone.c (simd_clone_subparts): New function.
25556 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
25557 (ipa_simd_modify_function_body): Likewise.
25559 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25560 Alan Hayward <alan.hayward@arm.com>
25561 David Sherwood <david.sherwood@arm.com>
25563 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
25564 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
25565 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
25566 (expand_vector_condition, vector_element): Likewise.
25567 (subparts_gt): New function.
25568 (get_compute_type): Use subparts_gt.
25569 (count_type_subparts): Delete.
25570 (expand_vector_operations_1): Use subparts_gt instead of
25571 count_type_subparts.
25573 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25574 Alan Hayward <alan.hayward@arm.com>
25575 David Sherwood <david.sherwood@arm.com>
25577 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
25578 (vect_compile_time_alias): ...this new function. Do the calculation
25579 on poly_ints rather than trees.
25580 (vect_prune_runtime_alias_test_list): Update call accordingly.
25582 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25583 Alan Hayward <alan.hayward@arm.com>
25584 David Sherwood <david.sherwood@arm.com>
25586 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
25588 (vect_schedule_slp_instance): Likewise.
25590 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25591 Alan Hayward <alan.hayward@arm.com>
25592 David Sherwood <david.sherwood@arm.com>
25594 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
25595 constant and extern definitions for variable-length vectors.
25596 (vect_get_constant_vectors): Note that the number of units
25597 is known to be constant.
25599 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25600 Alan Hayward <alan.hayward@arm.com>
25601 David Sherwood <david.sherwood@arm.com>
25603 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
25604 of units as polynomial. Choose between WIDE and NARROW based
25607 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25608 Alan Hayward <alan.hayward@arm.com>
25609 David Sherwood <david.sherwood@arm.com>
25611 * tree-vect-stmts.c (simd_clone_subparts): New function.
25612 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
25614 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25615 Alan Hayward <alan.hayward@arm.com>
25616 David Sherwood <david.sherwood@arm.com>
25618 * tree-vect-stmts.c (vectorizable_call): Treat the number of
25619 vectors as polynomial. Use build_index_vector for
25620 IFN_GOMP_SIMD_LANE.
25622 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25623 Alan Hayward <alan.hayward@arm.com>
25624 David Sherwood <david.sherwood@arm.com>
25626 * tree-vect-stmts.c (get_load_store_type): Treat the number of
25627 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
25628 for variable-length vectors.
25629 (vectorizable_mask_load_store): Treat the number of units as
25630 polynomial, asserting that it is constant if the condition has
25631 already been enforced.
25632 (vectorizable_store, vectorizable_load): Likewise.
25634 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25635 Alan Hayward <alan.hayward@arm.com>
25636 David Sherwood <david.sherwood@arm.com>
25638 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
25639 of units as polynomial. Punt if we can't tell at compile time
25640 which vector contains the final result.
25642 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25643 Alan Hayward <alan.hayward@arm.com>
25644 David Sherwood <david.sherwood@arm.com>
25646 * tree-vect-loop.c (vectorizable_induction): Treat the number
25647 of units as polynomial. Punt on SLP inductions. Use an integer
25648 VEC_SERIES_EXPR for variable-length integer reductions. Use a
25649 cast of such a series for variable-length floating-point
25652 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25653 Alan Hayward <alan.hayward@arm.com>
25654 David Sherwood <david.sherwood@arm.com>
25656 * tree.h (build_index_vector): Declare.
25657 * tree.c (build_index_vector): New function.
25658 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
25659 of units as polynomial, forcibly converting it to a constant if
25660 vectorizable_reduction has already enforced the condition.
25661 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
25662 to create a {1,2,3,...} vector.
25663 (vectorizable_reduction): Treat the number of units as polynomial.
25664 Choose vectype_in based on the largest scalar element size rather
25665 than the smallest number of units. Enforce the restrictions
25668 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25669 Alan Hayward <alan.hayward@arm.com>
25670 David Sherwood <david.sherwood@arm.com>
25672 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
25673 number of units as polynomial.
25675 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25676 Alan Hayward <alan.hayward@arm.com>
25677 David Sherwood <david.sherwood@arm.com>
25679 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
25680 * target.def (autovectorize_vector_sizes): Return the vector sizes
25681 by pointer, using vector_sizes rather than a bitmask.
25682 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
25683 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
25684 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
25686 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
25687 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
25688 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
25689 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
25690 * omp-general.c (omp_max_vf): Likewise.
25691 * omp-low.c (omp_clause_aligned_alignment): Likewise.
25692 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
25693 * tree-vect-loop.c (vect_analyze_loop): Likewise.
25694 * tree-vect-slp.c (vect_slp_bb): Likewise.
25695 * doc/tm.texi: Regenerate.
25696 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
25698 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
25699 the vector size as a poly_uint64 rather than an unsigned int.
25700 (current_vector_size): Change from an unsigned int to a poly_uint64.
25701 (get_vectype_for_scalar_type): Update accordingly.
25702 * tree.h (build_truth_vector_type): Take the size and number of
25703 units as a poly_uint64 rather than an unsigned int.
25704 (build_vector_type): Add a temporary overload that takes
25705 the number of units as a poly_uint64 rather than an unsigned int.
25706 * tree.c (make_vector_type): Likewise.
25707 (build_truth_vector_type): Take the number of units as a poly_uint64
25708 rather than an unsigned int.
25710 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25711 Alan Hayward <alan.hayward@arm.com>
25712 David Sherwood <david.sherwood@arm.com>
25714 * target.def (get_mask_mode): Take the number of units and length
25715 as poly_uint64s rather than unsigned ints.
25716 * targhooks.h (default_get_mask_mode): Update accordingly.
25717 * targhooks.c (default_get_mask_mode): Likewise.
25718 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
25719 * doc/tm.texi: Regenerate.
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 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
25726 * omp-general.c (omp_max_vf): Likewise.
25727 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
25728 (expand_omp_simd): Handle polynomial safelen.
25729 * omp-low.c (omplow_simd_context): Add a default constructor.
25730 (omplow_simd_context::max_vf): Change from int to poly_uint64.
25731 (lower_rec_simd_input_clauses): Update accordingly.
25732 (lower_rec_input_clauses): Likewise.
25734 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25735 Alan Hayward <alan.hayward@arm.com>
25736 David Sherwood <david.sherwood@arm.com>
25738 * tree-vectorizer.h (vect_nunits_for_cost): New function.
25739 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
25740 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
25741 (vect_analyze_slp_cost): Likewise.
25742 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
25743 (vect_model_load_cost): 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-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
25750 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
25751 from an unsigned int * to a poly_uint64_pod *.
25752 (calculate_unrolling_factor): New function.
25753 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
25755 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25756 Alan Hayward <alan.hayward@arm.com>
25757 David Sherwood <david.sherwood@arm.com>
25759 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
25760 from an unsigned int to a poly_uint64.
25761 (_loop_vec_info::slp_unrolling_factor): Likewise.
25762 (_loop_vec_info::vectorization_factor): Change from an int
25764 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
25765 (vect_get_num_vectors): New function.
25766 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
25767 (vect_get_num_copies): Use vect_get_num_vectors.
25768 (vect_analyze_data_ref_dependences): Change max_vf from an int *
25769 to an unsigned int *.
25770 (vect_analyze_data_refs): Change min_vf from an int * to a
25772 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25773 than an unsigned HOST_WIDE_INT.
25774 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
25775 (vect_analyze_data_ref_dependence): Change max_vf from an int *
25776 to an unsigned int *.
25777 (vect_analyze_data_ref_dependences): Likewise.
25778 (vect_compute_data_ref_alignment): Handle polynomial vf.
25779 (vect_enhance_data_refs_alignment): Likewise.
25780 (vect_prune_runtime_alias_test_list): Likewise.
25781 (vect_shift_permute_load_chain): Likewise.
25782 (vect_supportable_dr_alignment): Likewise.
25783 (dependence_distance_ge_vf): Take the vectorization factor as a
25784 poly_uint64 rather than an unsigned HOST_WIDE_INT.
25785 (vect_analyze_data_refs): Change min_vf from an int * to a
25787 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
25788 vfm1 as a poly_uint64 rather than an int. Make the same change
25789 for the returned bound_scalar.
25790 (vect_gen_vector_loop_niters): Handle polynomial vf.
25791 (vect_do_peeling): Likewise. Update call to
25792 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
25793 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
25795 * tree-vect-loop.c (vect_determine_vectorization_factor)
25796 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
25797 (vect_get_known_peeling_cost): Likewise.
25798 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
25799 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
25800 (vect_transform_loop): Likewise. Use the lowest possible VF when
25801 updating the upper bounds of the loop.
25802 (vect_min_worthwhile_factor): Make static. Return an unsigned int
25803 rather than an int.
25804 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
25805 polynomial unroll factors.
25806 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
25807 (vect_make_slp_decision): Likewise.
25808 (vect_supported_load_permutation_p): Likewise, and polynomial
25810 (vect_analyze_slp_cost): Handle polynomial vf.
25811 (vect_slp_analyze_node_operations): Likewise.
25812 (vect_slp_analyze_bb_1): Likewise.
25813 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25814 than an unsigned HOST_WIDE_INT.
25815 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
25816 (vectorizable_load): Handle polynomial vf.
25817 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
25819 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
25821 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25822 Alan Hayward <alan.hayward@arm.com>
25823 David Sherwood <david.sherwood@arm.com>
25825 * match.pd: Handle bit operations involving three constants
25826 and try to fold one pair.
25828 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25830 * tree-vect-loop-manip.c: Include gimple-fold.h.
25831 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
25832 niters_maybe_zero parameters. Handle other cases besides a step of 1.
25833 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
25834 Add a path that uses a step of VF instead of 1, but disable it
25836 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
25837 and niters_no_overflow parameters. Update calls to
25838 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
25839 Create a new SSA name if the latter choses to use a ste other
25840 than zero, and return it via niters_vector_mult_vf_var.
25841 * tree-vect-loop.c (vect_transform_loop): Update calls to
25842 vect_do_peeling, vect_gen_vector_loop_niters and
25843 slpeel_make_loop_iterate_ntimes.
25844 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
25845 (vect_gen_vector_loop_niters): Update declarations after above changes.
25847 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
25849 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
25850 128-bit round to integer instructions.
25851 (ceil<mode>2): Likewise.
25852 (btrunc<mode>2): Likewise.
25853 (round<mode>2): Likewise.
25855 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25857 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25858 unaligned VSX load/store on P8/P9.
25859 (expand_block_clear): Allow the use of unaligned VSX
25860 load/store on P8/P9.
25862 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25864 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25866 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25867 swap associated with both a load and a store.
25869 2018-01-02 Andrew Waterman <andrew@sifive.com>
25871 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25872 * config/riscv/riscv.md (clear_cache): Use it.
25874 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
25876 * web.c: Remove out-of-date comment.
25878 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25880 * expr.c (fixup_args_size_notes): Check that any existing
25881 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25882 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25883 (emit_single_push_insn): ...here.
25885 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25887 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25888 (const_vector_encoded_nelts): New function.
25889 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25890 (const_vector_int_elt, const_vector_elt): Declare.
25891 * emit-rtl.c (const_vector_int_elt_1): New function.
25892 (const_vector_elt): Likewise.
25893 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25894 of CONST_VECTOR_ELT.
25896 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25898 * expr.c: Include rtx-vector-builder.h.
25899 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25900 directly on the tree encoding.
25901 (const_vector_from_tree): Likewise.
25902 * optabs.c: Include rtx-vector-builder.h.
25903 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25904 sequence of "u" values.
25905 * vec-perm-indices.c: Include rtx-vector-builder.h.
25906 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25907 directly on the vec_perm_indices encoding.
25909 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25911 * doc/rtl.texi (const_vector): Describe new encoding scheme.
25912 * Makefile.in (OBJS): Add rtx-vector-builder.o.
25913 * rtx-vector-builder.h: New file.
25914 * rtx-vector-builder.c: Likewise.
25915 * rtl.h (rtx_def::u2): Add a const_vector field.
25916 (CONST_VECTOR_NPATTERNS): New macro.
25917 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25918 (CONST_VECTOR_DUPLICATE_P): Likewise.
25919 (CONST_VECTOR_STEPPED_P): Likewise.
25920 (CONST_VECTOR_ENCODED_ELT): Likewise.
25921 (const_vec_duplicate_p): Check for a duplicated vector encoding.
25922 (unwrap_const_vec_duplicate): Likewise.
25923 (const_vec_series_p): Check for a non-duplicated vector encoding.
25924 Say that the function only returns true for integer vectors.
25925 * emit-rtl.c: Include rtx-vector-builder.h.
25926 (gen_const_vec_duplicate_1): Delete.
25927 (gen_const_vector): Call gen_const_vec_duplicate instead of
25928 gen_const_vec_duplicate_1.
25929 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25930 (gen_const_vec_duplicate): Use rtx_vector_builder.
25931 (gen_const_vec_series): Likewise.
25932 (gen_rtx_CONST_VECTOR): Likewise.
25933 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25934 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25935 Build a new vector rather than modifying a CONST_VECTOR in-place.
25936 (handle_special_swappables): Update call accordingly.
25937 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25938 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25939 Build a new vector rather than modifying a CONST_VECTOR in-place.
25940 (handle_special_swappables): Update call accordingly.
25942 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25944 * simplify-rtx.c (simplify_const_binary_operation): Use
25945 CONST_VECTOR_ELT instead of XVECEXP.
25947 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25949 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25950 the selector elements to be different from the data elements
25951 if the selector is a VECTOR_CST.
25952 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25953 ssizetype for the selector.
25955 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25957 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25958 before testing each element individually.
25959 * tree-vect-generic.c (lower_vec_perm): Likewise.
25961 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25963 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25964 * selftest-run-tests.c (selftest::run_tests): Call it.
25965 * vector-builder.h (vector_builder::operator ==): New function.
25966 (vector_builder::operator !=): Likewise.
25967 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25968 (vec_perm_indices::all_from_input_p): New function.
25969 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25970 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25971 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25972 instead of reading the VECTOR_CST directly. Detect whether both
25973 vector inputs are the same before constructing the vec_perm_indices,
25974 and update the number of inputs argument accordingly. Use the
25975 utility functions added above. Only construct sel2 if we need to.
25977 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25979 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25980 the broadcast of the low byte.
25981 (expand_mult_highpart): Use an explicit encoding for the permutes.
25982 * optabs-query.c (can_mult_highpart_p): Likewise.
25983 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25984 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25985 (vectorizable_bswap): Likewise.
25986 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25987 explicit encoding for the power-of-2 permutes.
25988 (vect_permute_store_chain): Likewise.
25989 (vect_grouped_load_supported): Likewise.
25990 (vect_permute_load_chain): Likewise.
25992 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25994 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25995 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25996 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25997 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25998 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25999 (vect_gen_perm_mask_any): Likewise.
26001 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26003 * int-vector-builder.h: New file.
26004 * vec-perm-indices.h: Include int-vector-builder.h.
26005 (vec_perm_indices): Redefine as an int_vector_builder.
26006 (auto_vec_perm_indices): Delete.
26007 (vec_perm_builder): Redefine as a stand-alone class.
26008 (vec_perm_indices::vec_perm_indices): New function.
26009 (vec_perm_indices::clamp): Likewise.
26010 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
26011 (vec_perm_indices::new_vector): New function.
26012 (vec_perm_indices::new_expanded_vector): Update for new
26013 vec_perm_indices class.
26014 (vec_perm_indices::rotate_inputs): New function.
26015 (vec_perm_indices::all_in_range_p): Operate directly on the
26016 encoded form, without computing elided elements.
26017 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
26018 encoding. Update for new vec_perm_indices class.
26019 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
26020 the given vec_perm_builder.
26021 (expand_vec_perm_var): Update vec_perm_builder constructor.
26022 (expand_mult_highpart): Use vec_perm_builder instead of
26023 auto_vec_perm_indices.
26024 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
26025 vec_perm_indices instead of auto_vec_perm_indices. Use a single
26026 or double series encoding as appropriate.
26027 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
26028 vec_perm_indices instead of auto_vec_perm_indices.
26029 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26030 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26031 (vect_permute_store_chain): Likewise.
26032 (vect_grouped_load_supported): Likewise.
26033 (vect_permute_load_chain): Likewise.
26034 (vect_shift_permute_load_chain): Likewise.
26035 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
26036 (vect_transform_slp_perm_load): Likewise.
26037 (vect_schedule_slp_instance): Likewise.
26038 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26039 (vectorizable_mask_load_store): Likewise.
26040 (vectorizable_bswap): Likewise.
26041 (vectorizable_store): Likewise.
26042 (vectorizable_load): Likewise.
26043 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
26044 vec_perm_indices instead of auto_vec_perm_indices. Use
26045 tree_to_vec_perm_builder to read the vector from a tree.
26046 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
26047 vec_perm_builder instead of a vec_perm_indices.
26048 (have_whole_vector_shift): Use vec_perm_builder and
26049 vec_perm_indices instead of auto_vec_perm_indices. Leave the
26050 truncation to calc_vec_perm_mask_for_shift.
26051 (vect_create_epilog_for_reduction): Likewise.
26052 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
26053 from auto_vec_perm_indices to vec_perm_indices.
26054 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
26055 instead of changing individual elements.
26056 (aarch64_vectorize_vec_perm_const): Use new_vector to install
26057 the vector in d.perm.
26058 * config/arm/arm.c (expand_vec_perm_d::perm): Change
26059 from auto_vec_perm_indices to vec_perm_indices.
26060 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
26061 instead of changing individual elements.
26062 (arm_vectorize_vec_perm_const): Use new_vector to install
26063 the vector in d.perm.
26064 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
26065 Update vec_perm_builder constructor.
26066 (rs6000_expand_interleave): Likewise.
26067 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
26068 (rs6000_expand_interleave): Likewise.
26070 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26072 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
26073 to qimode could truncate the indices.
26074 * optabs.c (expand_vec_perm_var): Likewise.
26076 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26078 * Makefile.in (OBJS): Add vec-perm-indices.o.
26079 * vec-perm-indices.h: New file.
26080 * vec-perm-indices.c: Likewise.
26081 * target.h (vec_perm_indices): Replace with a forward class
26083 (auto_vec_perm_indices): Move to vec-perm-indices.h.
26084 * optabs.h: Include vec-perm-indices.h.
26085 (expand_vec_perm): Delete.
26086 (selector_fits_mode_p, expand_vec_perm_var): Declare.
26087 (expand_vec_perm_const): Declare.
26088 * target.def (vec_perm_const_ok): Replace with...
26089 (vec_perm_const): ...this new hook.
26090 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
26091 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
26092 * doc/tm.texi: Regenerate.
26093 * optabs.def (vec_perm_const): Delete.
26094 * doc/md.texi (vec_perm_const): Likewise.
26095 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
26096 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
26097 expand_vec_perm for constant permutation vectors. Assert that
26098 the mode of variable permutation vectors is the integer equivalent
26099 of the mode that is being permuted.
26100 * optabs-query.h (selector_fits_mode_p): Declare.
26101 * optabs-query.c: Include vec-perm-indices.h.
26102 (selector_fits_mode_p): New function.
26103 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
26104 is defined, instead of checking whether the vec_perm_const_optab
26105 exists. Use targetm.vectorize.vec_perm_const instead of
26106 targetm.vectorize.vec_perm_const_ok. Check whether the indices
26107 fit in the vector mode before using a variable permute.
26108 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
26109 vec_perm_indices instead of an rtx.
26110 (expand_vec_perm): Replace with...
26111 (expand_vec_perm_const): ...this new function. Take the selector
26112 as a vec_perm_indices rather than an rtx. Also take the mode of
26113 the selector. Update call to shift_amt_for_vec_perm_mask.
26114 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
26115 Use vec_perm_indices::new_expanded_vector to expand the original
26116 selector into bytes. Check whether the indices fit in the vector
26117 mode before using a variable permute.
26118 (expand_vec_perm_var): Make global.
26119 (expand_mult_highpart): Use expand_vec_perm_const.
26120 * fold-const.c: Includes vec-perm-indices.h.
26121 * tree-ssa-forwprop.c: Likewise.
26122 * tree-vect-data-refs.c: Likewise.
26123 * tree-vect-generic.c: Likewise.
26124 * tree-vect-loop.c: Likewise.
26125 * tree-vect-slp.c: Likewise.
26126 * tree-vect-stmts.c: Likewise.
26127 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
26129 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
26130 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
26131 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
26132 (aarch64_vectorize_vec_perm_const): ...this new function.
26133 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
26134 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26135 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
26136 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
26137 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
26138 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26139 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
26141 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
26142 check for NEON modes.
26143 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
26144 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
26145 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
26146 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
26148 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
26149 the old VEC_PERM_CONST conditions.
26150 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
26151 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
26152 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
26153 (ia64_vectorize_vec_perm_const_ok): Merge into...
26154 (ia64_vectorize_vec_perm_const): ...this new function.
26155 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
26156 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
26157 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
26158 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
26159 * config/mips/mips.c (mips_expand_vec_perm_const)
26160 (mips_vectorize_vec_perm_const_ok): Merge into...
26161 (mips_vectorize_vec_perm_const): ...this new function.
26162 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
26163 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
26164 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
26165 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
26166 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
26167 (rs6000_expand_vec_perm_const): Delete.
26168 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
26170 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26171 (altivec_expand_vec_perm_const_le): Take each operand individually.
26172 Operate on constant selectors rather than rtxes.
26173 (altivec_expand_vec_perm_const): Likewise. Update call to
26174 altivec_expand_vec_perm_const_le.
26175 (rs6000_expand_vec_perm_const): Delete.
26176 (rs6000_vectorize_vec_perm_const_ok): Delete.
26177 (rs6000_vectorize_vec_perm_const): New function.
26178 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
26179 an element count and rtx array.
26180 (rs6000_expand_extract_even): Update call accordingly.
26181 (rs6000_expand_interleave): Likewise.
26182 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
26183 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
26184 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
26185 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
26186 (rs6000_expand_vec_perm_const): Delete.
26187 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
26188 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26189 (altivec_expand_vec_perm_const_le): Take each operand individually.
26190 Operate on constant selectors rather than rtxes.
26191 (altivec_expand_vec_perm_const): Likewise. Update call to
26192 altivec_expand_vec_perm_const_le.
26193 (rs6000_expand_vec_perm_const): Delete.
26194 (rs6000_vectorize_vec_perm_const_ok): Delete.
26195 (rs6000_vectorize_vec_perm_const): New function. Remove stray
26196 reference to the SPE evmerge intructions.
26197 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
26198 an element count and rtx array.
26199 (rs6000_expand_extract_even): Update call accordingly.
26200 (rs6000_expand_interleave): Likewise.
26201 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
26202 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
26204 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26206 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26208 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
26209 vector mode and that that mode matches the mode of the data
26211 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
26212 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
26213 directly using expand_vec_perm_1 when forcing selectors into
26215 (expand_vec_perm_var): New function, split out from expand_vec_perm.
26217 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26219 * optabs-query.h (can_vec_perm_p): Delete.
26220 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
26221 * optabs-query.c (can_vec_perm_p): Split into...
26222 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
26223 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
26224 particular selector is valid.
26225 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26226 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26227 (vect_grouped_load_supported): Likewise.
26228 (vect_shift_permute_load_chain): Likewise.
26229 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
26230 (vect_transform_slp_perm_load): Likewise.
26231 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26232 (vectorizable_bswap): Likewise.
26233 (vect_gen_perm_mask_checked): Likewise.
26234 * fold-const.c (fold_ternary_loc): Likewise. Don't take
26235 implementations of variable permutation vectors into account
26236 when deciding which selector to use.
26237 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
26238 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
26239 with a false third argument.
26240 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
26241 to test whether the constant selector is valid and can_vec_perm_var_p
26242 to test whether a variable selector is valid.
26244 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26246 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
26247 * optabs-query.c (can_vec_perm_p): Likewise.
26248 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
26249 instead of vec_perm_indices.
26250 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
26251 (vect_gen_perm_mask_checked): Likewise,
26252 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
26253 (vect_gen_perm_mask_checked): Likewise,
26255 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26257 * optabs-query.h (qimode_for_vec_perm): Declare.
26258 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
26259 (qimode_for_vec_perm): ...this new function.
26260 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
26262 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26264 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
26265 does not have a conditional at the top.
26267 2018-01-02 Richard Biener <rguenther@suse.de>
26269 * ipa-inline.c (big_speedup_p): Fix expression.
26271 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
26274 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
26277 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
26281 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
26282 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
26283 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
26284 cond_taken_branch_cost 3->4.
26286 2018-01-01 Jakub Jelinek <jakub@redhat.com>
26288 PR tree-optimization/83581
26289 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
26290 TODO_cleanup_cfg if any changes have been made.
26292 PR middle-end/83608
26293 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
26294 convert_modes if target mode has the right side, but different mode
26297 PR middle-end/83609
26298 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
26299 last argument when extracting from CONCAT. If either from_real or
26300 from_imag is NULL, use expansion through memory. If result is not
26301 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
26302 the parts directly to inner mode, if even that fails, use expansion
26305 PR middle-end/83623
26306 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
26307 check for bswap in mode rather than HImode and use that in expand_unop
26310 Copyright (C) 2018 Free Software Foundation, Inc.
26312 Copying and distribution of this file, with or without modification,
26313 are permitted in any medium without royalty provided the copyright
26314 notice and this notice are preserved.