1 2018-12-28 Martin Sebor <msebor@redhat.com>
3 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Avoid
6 2018-12-28 Thomas Schwinge <thomas@codesourcery.com>
8 * omp-expand.c (expand_omp_target): Restructure OpenACC vs. OpenMP
9 code paths. Update for libgomp OpenACC entry points change.
11 2018-12-28 Thomas Schwinge <thomas@codesourcery.com>
12 Julian Brown <julian@codesourcery.com>
14 * gimplify.c (gimplify_scan_omp_clauses): Fix known_eq typo/bug.
16 2018-12-27 Jan Hubicka <hubicka@ucw.cz>
18 * ipa-devirt.c (polymorphic_call_target_d): Add n_odr_types.
19 (polymorphic_call_target_hasher::hash): Hash it.
20 (polymorphic_call_target_hasher::equal): Compare it.
21 (possible_polymorphic_call_targets): Set it.
22 * tree.c (free_lang_data): Rebuild type inheritance graph even on
25 2018-12-27 Martin Liska <mliska@suse.cz>
28 * gcov.c(source_info::get_functions_at_location):
29 Use newly added line_to_function_map.
30 (source_info::add_function): New.
31 (output_json_intermediate_file): Use a pointer return
32 type for get_functions_at_location.
33 (process_all_functions): Use add_function instead
34 of direct push to a s->functions container.
35 (release_structures): Release ident_to_fn.
36 (read_graph_file): Register function into ident_to_fn.
37 (read_count_file): Use the map.
38 (output_lines): Handle pointer return type of
39 get_functions_at_location.
41 2018-12-27 Martin Liska <mliska@suse.cz>
43 * builtins.c (expand_movstr): Compare with RETURN_BEGIN.
44 * expr.c (move_by_pieces): Likewise.
45 (store_by_pieces): Likewise.
46 (store_expr): Fix GNU coding style.
48 2018-12-26 Andrew Pinski <apinski@marvell.com>
50 * config/aarch64/aarch64-cores.def (octeontx): New.
51 (octeontx81): Likewise.
52 (octeontx83): Likewise.
53 * config/aarch64/aarch64-tune.md: Regenerate.
54 * doc/invoke.texi (AArch64 Options) [mtune]: Add octeontx, octeontx81
57 2018-12-24 Martin Sebor <msebor@redhat.com>
59 * gimple-fold.c (get_range_strlen_tree): Factored out of
60 get_range_strlen. Minor comment updates/additions. Assert
61 argument is not a simple SSA_NAME.
62 (get_range_strlen): Call get_range_strlen_tree as appropriate.
63 Minor comment updates/additions.
65 2018-12-24 Jan Hubicka <hubicka@ucw.cz>
67 * ipa-devirt.c (dump_targets): Cap number of targets printed.
68 (dump_possible_polymorphic_call_targets): Add verbose parameter.
70 * ipa-utils.h (dump_possible_polymorphic_call_targets): Add verbose
73 2018-12-24 Jan Hubicka <hubicka@ucw.cz>
76 * tree.c (fld_simplified_type): Temporarily disable array
79 2018-12-24 Jan Hubicka <hubicka@ucw.cz>
81 * lto-symtab.c (lto_symtab_merge_decls_2): Do not report ODR violations
82 for method whose basetype was already reported.
83 * ipa-devirt.c (odr_type_violation_reported_p): New.
84 * ipa-utils.h (odr_type_violation_reported_p): Declare.
86 2018-12-24 Iain Sandoe <iain@sandoe.co.uk>
88 * configure.ac (dwarf2_debug_line): Check for the debug_line
89 section using otool when there’s no objdump available.
90 * configure: Regenerate.
92 2018-12-24 Jan Hubicka <hubicka@ucw.cz>
94 * ipa-utils.c (ipa_merge_profiles): Fix updating of fnsummary;
95 also handle rescaling of mismatched profiles.
96 * ipa-fnsummary.c (analyze_function): Handle speculative edges.
98 2018-12-23 Martin Sebor <msebor@redhat.com>
99 Jeff Law <law@redhat.com>
101 * builtins.h (c_strlen_data): Add new fields and comments.
102 * builtins.c (unterminated_array): Change field reference from
103 "len" to "minlen" in c_strlen_data instance.
104 * gimple-fold.c (get_range_strlen): Likewise.
105 * gimple-ssa-sprintf.c (get_string_length): Likewise.
107 * builtins.c (unterminated_array): Rename "data" to "lendata". Fix
109 (expand_builtin_strnlen, expand_builtin_stpcpy_1): Likewise.
110 (fold_builtin_strlen): Likewise.
111 * gimple-fold.c (get_range_strlen): Likewise. Also rename a couple
112 instances of "type" to "optype" and "arg" to "fld".
114 * builtins.c (unterminated_array): Use empty brace initialization
116 (c_strlen, expand_builtin_strnlen): Likewise.
117 (expand_builtin_stpcpy_1, fold_builtin_strlen): Likewise.
118 * gimple-fold.c (get_range_strlen): Likewise.
119 (gimple_fold_builtin_stpcpy): Likewise.
120 * gimple-ssa-sprintf.c (get_string_length): Likewise.
122 2018-12-23 Alan Modra <amodra@gmail.com>
125 * config/rs6000/rs6000.h (ASM_CPU_SPEC): Correct %e message. Handle
126 -mcpu=rs64, not -mcpu=rs64a. Handle -mcpu=powerpc64 and -mcpu=titan.
127 * config/rs6000/driver-rs6000.c (asm_names): Similarly.
128 * config/rs6000/aix71.h (ASM_CPU_SPEC): Delete %e message. Handle
129 -mcpu=rs64, not -mcpu=rs64a.
130 * config/rs6000/aix72.h (ASM_CPU_SPEC): Likewise.
132 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
134 * lto-wrapper.c (tool_cleanup): Don’t report ficticious temp files.
135 (debug_objcopy): Improve temp filenames. Append the early
136 debug objects to the outfiles. Remove the phase prelinking the
137 early debug. Emit the early debug filenames for ld.
139 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
141 * config/i386/darwin.h (TARGET_ASM_OUTPUT_IDENT): New.
143 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
145 * collect2.c (maybe_run_lto_and_relink): Don’t say we have a temp file
146 unless we actually did some LTO.
147 (has_lto_section, is_lto_object_file): New.
148 (maybe_lto_object_file): Remove.
149 (scan_prog_file): Use is_lto_object_file() instead of scanning the
152 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
154 * collect2.c (main): Parse the output file early so we can make nicer
155 temp names. Respond to “-save-temps” in the GCC OPTIONS.
156 (maybe_unlink): Don’t print “[Leaving…”] for files we never created
159 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
161 * collect2.c (main): Combine flags from both the command line and
162 COLLECT_GCC_OPTIONS to determine the set in force
164 2018-12-21 Jan Hubicka <hubicka@ucw.cz>
166 * ipa-utils.c (ipa_merge_profiles): Recompute summaries.
168 2018-12-21 Jakub Jelinek <jakub@redhat.com>
172 * omp-expand.c (extract_omp_for_update_vars): Regimplify the condition
174 (expand_omp_for_generic): Don't clobber t temporary for ordered loops.
176 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
179 * ipa-polymorphic-call.c
180 (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Handle
181 arguments of thunks correctly.
182 (ipa_polymorphic_call_context::get_dynamic_context): Be ready for
183 NULL instance pinter.
184 * lto-cgraph.c (lto_output_node): Always stream thunk info.
186 2018-12-21 Andreas Krebbel <krebbel@linux.ibm.com>
188 * config/s390/vector.md ("floatv2div2df2", "floatunsv2div2df2")
189 ("fix_truncv2dfv2di2", "fixuns_truncv2dfv2di2"): New pattern
192 2018-12-21 Eric Botcazou <ebotcazou@adacore.com>
194 PR rtl-optimization/87727
195 * combine.c (cant_combine_insn_p): On a LEAF_REGISTERS target, combine
196 again moves from leaf hard registers.
198 * final.c (final_scan_insn_1) <NOTE_INSN_INLINE_ENTRY>: Minor tweak.
200 2018-12-21 Jakub Jelinek <jakub@redhat.com>
203 * config/i386/sse.md (*avx512pf_gatherpf<mode>sf_mask,
204 *avx512pf_gatherpf<mode>df_mask, *avx512pf_scatterpf<mode>sf_mask,
205 *avx512pf_scatterpf<mode>df_mask): Use %X5 instead of %5 for
207 (gatherq_mode): Remove mode iterator.
208 (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2): Use X instead
210 (*avx512f_gatherdi<mode>): Use X instead of <gatherq_mode>.
211 (*avx512f_gatherdi<mode>_2, *avx512f_scattersi<mode>,
212 *avx512f_scatterdi<mode>): Use %X5 for -masm=intel.
214 PR rtl-optimization/88563
215 * expr.c (expand_expr_real_2) <case WIDEN_MULT_EXPR>: Swap innermode
216 and mode arguments to convert_modes. Likewise swap mode and word_mode
217 arguments. Handle both arguments with VOIDmode before convert_modes
218 of one of them. Formatting fixes.
220 2018-12-21 Uros Bizjak <ubizjak@gmail.com>
223 * internal-fn.def (COSH): New.
226 * optabs.def (cosh_optab): New.
229 * config/i386/i386-protos.h (ix86_emit_i387_sinh): New prototype.
230 (ix86_emit_i387_cosh): Ditto.
231 (ix86_emit_i387_tanh): Ditto.
232 * config/i386/i386.c (ix86_emit_i387_sinh): New function.
233 (ix86_emit_i387_cosh): Ditto.
234 (ix86_emit_i387_tanh): Ditto.
235 * config/i386/i386.md (sinhxf2): New expander.
236 (sinh<mode>2): Ditto.
238 (cosh<mode>2): Ditto.
240 (tanh<mode>2): Ditto.
242 2018-12-21 Jakub Jelinek <jakub@redhat.com>
245 * config/i386/i386.c (ix86_expand_int_sse_cmp): Optimize
246 x > y ? 0 : -1 into min (x, y) == x ? -1 : 0.
248 2018-12-21 Jan Beulich <jbeulich@suse.com>
250 * config/i386/sse.md (vaesdec_<mode>, vaesdeclast_<mode>): Allow
253 2018-12-21 Alexandre Oliva <oliva@adacore.com>
255 * config.gcc (tmake_file): Add name to tmake_file for
256 each @name in --with-multilib-list on arm-*-* targets.
257 * doc/install.texi (with-multilib-list): Document it.
259 2018-12-21 Jakub Jelinek <jakub@redhat.com>
261 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Use
262 DR_TARGET_ALIGNMENT on dr_info rather than dr. Spelling fixes.
264 2018-12-20 Joern Rennecke <joern.rennecke@riscy-ip.com>
266 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Don't do
267 versioning for data accesses with misaligned step.
269 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
272 * doc/invoke.texi: Document -Wno-address-of-packed-member.
274 2018-12-20 Vladimir Makarov <vmakarov@redhat.com>
277 * ira-color.c (fast_allocation): Choose the best cost hard reg.
279 2018-12-20 Richard Sandiford <richard.sandiford@arm.com>
281 * config/aarch64/iterators.md (SVE_INT_UNARY, fp_int_op): Add abs.
282 (SVE_FP_UNARY): Sort.
284 2018-12-20 Richard Sandiford <richard.sandiford@arm.com>
286 * config/aarch64/aarch64-sve.md (*cond_<optab><mode>_4): Use
287 sve_fmla_op rather than sve_fmad_op for the movprfx alternative.
289 2018-12-20 Martin Jambor <mjambor@suse.cz>
292 * tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Assert that
295 2018-12-20 Richard Biener <rguenther@suse.de>
297 PR tree-optimization/84362
298 * tree-ssa-loop-im.c: Include alias.h, builtins.h and tree-dfa.h.
299 (struct im_mem_ref): add ref_canonical flag.
300 (struct mem_ref_hasher): Use ao_ref as compare_type.
301 (mem_ref_hasher::equal): Adjust and add variant comparing ao_ref
303 (mem_ref_alloc): Take ao_ref parameter, initialize ref_canonical
305 (gather_mem_refs_stmt): Set up ao_ref early and do the lookup
306 using it. If we have non-equal refs canonicalize the one
307 in the hashtable used for insertion.
308 (tree_ssa_lim_initialize): Adjust.
310 2018-12-20 Jakub Jelinek <jakub@redhat.com>
313 * config/i386/i386.c (ix86_expand_sse_movcc): For maskcmp, try to
314 emit vpmovm2? instruction perhaps after knot?. Reorganize code
315 so that it doesn't have to test !maskcmp in almost every conditional.
317 2018-12-20 Alan Modra <amodra@gmail.com>
319 * config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Define.
321 2018-12-19 Andreas Tobler <andreast@gcc.gnu.org>
323 * config.gcc: Enable TARGET_DEFAULT_ASYNC_UNWIND_TABLES on
326 2018-12-19 Uros Bizjak <ubizjak@gmail.com>
328 * config/i386/i386.md (SWI1248_AVX512BWDQ_64): Rename from
329 SWI1248_AVX512BWDQ2_64. Unconditionally enable HImode.
330 (*cmp<mode>_ccz_1): Emit kortest instead of ktest insn.
331 Use SWI1248_AVX512BWDQ_64 mode iterator and enable only for
334 2018-12-19 Thomas Preud'homme <thomas.preudhomme@linaro.org>
336 * config/arm/elf.h: Update comment about condition that need to
337 match with libgcc/config/arm/lib1funcs.S to also include
338 libgcc/config/arm/t-arm.
339 * doc/sourcebuild.texi (output-exists, output-exists-not): Rename
340 subsubsection these directives are in to "Check for output files".
341 Move scan-symbol to that section and add to it new scan-symbol-not
344 2018-12-19 Tom de Vries <tdevries@suse.de>
346 * config/nvptx/nvptx.c (PTX_CTA_SIZE): Define.
348 2018-12-19 Tom de Vries <tdevries@suse.de>
350 * omp-offload.c (oacc_fn_attrib_level): Remove static.
351 * omp-offload.h (oacc_fn_attrib_level): Declare.
353 2018-12-19 Tom de Vries <tdevries@suse.de>
355 * omp-offload.c (oacc_get_default_dim): New function.
356 * omp-offload.h (oacc_get_default_dim): Declare.
358 2018-12-19 David Malcolm <dmalcolm@redhat.com>
361 * gcc-rich-location.c
362 (maybe_range_label_for_tree_type_mismatch::get_text): Move here from
364 (binary_op_rich_location::binary_op_rich_location): New ctor.
365 (binary_op_rich_location::use_operator_loc_p): New function.
366 * gcc-rich-location.h
367 (class maybe_range_label_for_tree_type_mismatch)): Move here from
369 (struct op_location_t): New forward decl.
370 (class binary_op_rich_location): New class.
371 * tree.h (struct op_location_t): New struct.
373 2018-12-19 David Malcolm <dmalcolm@redhat.com>
377 * convert.c: Include "selftest.h".
378 (preserve_any_location_wrapper): New function.
379 (convert_to_pointer_maybe_fold): Update to handle location
381 (convert_to_real_maybe_fold): Likewise.
382 (convert_to_integer_1): Strip expr when using TREE_OVERFLOW.
383 Handle location wrappers when checking for INTEGER_CST.
384 (convert_to_integer_maybe_fold): Update to handle location
386 (convert_to_complex_maybe_fold): Likewise.
387 (selftest::test_convert_to_integer_maybe_fold): New functions.
388 (selftest::convert_c_tests): New function.
389 * convert.h (preserve_any_location_wrapper): New decl.
390 * fold-const.c (size_binop_loc): Strip location wrappers when
392 (operand_equal_p): Strip any location wrappers.
393 (integer_valued_real_p): Strip any location wrapper.
394 * selftest-run-tests.c (selftest::run_tests): Call
395 selftest::convert_c_tests.
396 * selftest.h (selftest::convert_c_tests): New decl.
397 * tree.c (build_complex): Assert that REAL and IMAG are constants.
398 (integer_zerop): Look through location wrappers.
399 (integer_onep): Likewise.
400 (integer_each_onep): Likewise.
401 (integer_all_onesp): Likewise.
402 (integer_minus_onep): Likewise.
403 (integer_pow2p): Likewise.
404 (integer_nonzerop): Likewise.
405 (integer_truep): Likewise.
406 (fixed_zerop): Likewise.
407 (real_zerop): Likewise.
408 (real_onep): Likewise.
409 (real_minus_onep): Likewise.
410 (tree_int_cst_equal): Likewise.
411 (simple_cst_equal): Treat location wrappers with non-equal source
412 locations as being unequal.
413 (uniform_integer_cst_p): Look through location wrappers.
414 (maybe_wrap_with_location): Don't create wrappers if any
415 auto_suppress_location_wrappers are active.
416 (suppress_location_wrappers): New variable.
417 (selftest::test_predicates): New test.
418 (selftest::tree_c_tests): Call it.
419 * tree.h (CONSTANT_CLASS_OR_WRAPPER_P): New macro.
420 (suppress_location_wrappers): New decl.
421 (class auto_suppress_location_wrappers): New class.
423 2018-12-19 Paul A. Clarke <pc@us.ibm.com>
425 * config/rs6000/tmmintrin.h (_mm_hadds_epi16): Vector lanes swapped.
426 (_mm_hsub_epi32): Likewise.
427 (_mm_shuffle_epi8): Fix reversed interpretation of parameters.
428 (_mm_shuffle_pi8): Likewise.
429 (_mm_addubs_pi16): Likewise.
431 2018-12-19 Thomas Preud'homme <thomas.preudhomme@linaro.org>
433 * config/arm/arm.h (TARGET_HARD_FLOAT): Restrict to TARGET_32BIT
435 * config/arm/arm.c (output_return_instruction): Only check
436 TARGET_HARD_FLOAT to decide whether FP instructions are available.
438 2018-12-19 Tom de Vries <tom@codesourcery.com>
440 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
441 dump files): Add offload-rtl.
443 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
446 * config/rs6000/vsx.md (*vsx_extract_<P:mode>_<VSX_D:mode>_load):
447 Require TARGET_POWERPC64.
449 2018-12-19 Richard Biener <rguenther@suse.de>
451 PR tree-optimization/88533
453 2018-04-30 Richard Biener <rguenther@suse.de>
455 PR tree-optimization/28364
456 PR tree-optimization/85275
457 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
458 copying first exit test.
460 * tree-ssa-loop-ch.c: Include tree-phinodes.h and
462 (should_duplicate_loop_header_p): Track whether stmt compute
463 loop invariants or values based on IVs. Apart from the
464 original loop header only duplicate blocks with exit tests
465 that are based on IVs or invariants.
467 2018-12-19 Tom de Vries <tdevries@suse.de>
469 * config/nvptx/nvptx.c (nvptx_gen_shared_bcast, shared_prop_gen)
470 (nvptx_goacc_expand_accel_var): Use MAX and ROUND_UP.
471 (nvptx_assemble_value, nvptx_output_skip): Use MIN.
472 (nvptx_shared_propagate, nvptx_single, nvptx_expand_shared_addr): Use
475 2018-12-19 Tom de Vries <tdevries@suse.de>
477 * config/nvptx/nvptx.c (nvptx_gen_wcast): Rename as
478 nvptx_gen_warp_bcast.
479 (nvptx_gen_wcast): Rename to nvptx_gen_shared_bcast, add bool
480 vector argument, and update call to nvptx_gen_shared_bcast.
481 (propagator_fn): Add bool argument.
482 (nvptx_propagate): New bool argument, pass bool argument to fn.
483 (vprop_gen): Rename to warp_prop_gen, update call to
484 nvptx_gen_warp_bcast.
485 (nvptx_vpropagate): Rename to nvptx_warp_propagate, update call to
487 (wprop_gen): Rename to shared_prop_gen, update call to
488 nvptx_gen_shared_bcast.
489 (nvptx_wpropagate): Rename to nvptx_shared_propagate, update call
491 (nvptx_wsync): Rename to nvptx_cta_sync.
492 (nvptx_single): Update calls to nvptx_gen_warp_bcast,
493 nvptx_gen_shared_bcast and nvptx_cta_sync.
494 (nvptx_process_pars): Likewise.
495 (write_worker_buffer): Rename as write_shared_buffer.
496 (nvptx_file_end): Update calls to write_shared_buffer.
497 (nvptx_expand_worker_addr): Rename as nvptx_expand_shared_addr.
498 (nvptx_expand_builtin): Update call to nvptx_expand_shared_addr.
499 (nvptx_get_worker_red_addr): Rename as nvptx_get_shared_red_addr.
500 (nvptx_goacc_reduction_setup): Update call to
501 nvptx_get_shared_red_addr.
502 (nvptx_goacc_reduction_fini): Likewise.
503 (nvptx_goacc_reduction_teardown): Likewise.
505 2018-12-19 Tom de Vries <tdevries@suse.de>
507 * config/nvptx/nvptx.c (worker_bcast_size): Rename as
509 (worker_bcast_align): Rename as oacc_bcast_align.
510 (worker_bcast_sym): Rename as oacc_bcast_sym.
511 (nvptx_option_override): Update usage of oacc_bcast_*.
512 (struct wcast_data_t): Rename as broadcast_data_t.
513 (nvptx_gen_wcast): Update type of data argument and usage of
515 (wprop_gen): Update type of data_ and usage of oacc_bcast_align.
516 (nvptx_wpropagate): Update type of data and usage of
517 oacc_bcast_{sym,size}.
518 (nvptx_single): Update type of data and usage of oacc_bcast_size.
519 (nvptx_file_end): Update usage of oacc_bcast_{sym,align,size}.
521 2018-12-19 Tom de Vries <tdevries@suse.de>
523 * config/nvptx/nvptx.md (nvptx_barsync): Add and handle operand.
524 * config/nvptx/nvptx.c (nvptx_wsync): Update call to gen_nvptx_barsync.
526 2018-12-19 Tom de Vries <tdevries@suse.de>
528 * config/nvptx/nvptx.c (nvptx_single): Always pass false to
530 (nvptx_process_pars): Likewise.
532 2018-12-19 Tom de Vries <tdevries@suse.de>
534 * config/nvptx/nvptx.c (nvptx_previous_fndecl): Declare.
535 (nvptx_set_current_function): New function.
536 (TARGET_SET_CURRENT_FUNCTION): Define.
538 2018-12-19 Shaokun Zhang <zhangshaokun@hisilicon.com>
540 * config/aarch64/aarch64-cores.def (tsv110): Fix architecture. This
541 part is really Armv8.2 with some permitted Armv8.4 extensions.
543 2018-12-19 Jakub Jelinek <jakub@redhat.com>
546 * config/i386/vpclmulqdqintrin.h (_mm256_clmulepi64_epi128): Enable
547 for -mavx -mvpclmulqdq rather than just for -mavx512vl -mvpclmulqdq.
549 2018-12-19 Alexandre Oliva <aoliva@redhat.com>
554 (vr_values::vrp_evaluate_conditional_warnv_with_ops): Extend
555 simplification of overflow tests to cover cases in which we
556 can determine the result of the comparison.
558 2018-12-19 Bin Cheng <bin.cheng@linux.alibaba.com>
560 * auto-profile.c (afdo_indirect_call): Skip generating histogram
561 value if we can't find cgraph_node for then indirected callee. Save
562 profile_id of the cgraph_node in histogram value's first counter.
563 * value-prof.c (gimple_value_profile_transformations): Don't skip
564 for flag_auto_profile.
566 2018-12-18 Vladimir Makarov <vmakarov@redhat.com>
568 PR rtl-optimization/87759
569 * lra-assigns.c (lra_split_hard_reg_for): Recalculate
572 2018-12-18 Jakub Jelinek <jakub@redhat.com>
575 * config/i386/i386-builtin-types.def
576 (VOID_FTYPE_PDOUBLE_QI_V8SI_V4DF_INT,
577 VOID_FTYPE_PFLOAT_QI_V4DI_V8SF_INT,
578 VOID_FTYPE_PLONGLONG_QI_V8SI_V4DI_INT,
579 VOID_FTYPE_PINT_QI_V4DI_V8SI_INT,
580 VOID_FTYPE_PDOUBLE_QI_V4SI_V2DF_INT,
581 VOID_FTYPE_PFLOAT_QI_V2DI_V4SF_INT,
582 VOID_FTYPE_PLONGLONG_QI_V4SI_V2DI_INT,
583 VOID_FTYPE_PINT_QI_V2DI_V4SI_INT): New builtin types.
584 * config/i386/i386.c (enum ix86_builtins): Add
585 IX86_BUILTIN_SCATTERALTSIV4DF, IX86_BUILTIN_SCATTERALTDIV8SF,
586 IX86_BUILTIN_SCATTERALTSIV4DI, IX86_BUILTIN_SCATTERALTDIV8SI,
587 IX86_BUILTIN_SCATTERALTSIV2DF, IX86_BUILTIN_SCATTERALTDIV4SF,
588 IX86_BUILTIN_SCATTERALTSIV2DI and IX86_BUILTIN_SCATTERALTDIV4SI.
589 (ix86_init_mmx_sse_builtins): Fix up names of IX86_BUILTIN_GATHERALT*,
590 IX86_BUILTIN_GATHER3ALT* and IX86_BUILTIN_SCATTERALT* builtins to
591 match the IX86_BUILTIN codes. Build IX86_BUILTIN_SCATTERALTSIV4DF,
592 IX86_BUILTIN_SCATTERALTDIV8SF, IX86_BUILTIN_SCATTERALTSIV4DI,
593 IX86_BUILTIN_SCATTERALTDIV8SI, IX86_BUILTIN_SCATTERALTSIV2DF,
594 IX86_BUILTIN_SCATTERALTDIV4SF, IX86_BUILTIN_SCATTERALTSIV2DI and
595 IX86_BUILTIN_SCATTERALTDIV4SI decls.
596 (ix86_vectorize_builtin_scatter): Expand those new builtins.
598 2018-12-18 Bill Schmidt <wschmidt@linux.ibm.com>
600 * doc/extend.texi (PowerPC Altivec/VSX Built-in Functions):
601 Describe when a typedef name can be used as the type specifier for
602 a vector type, and when it cannot.
604 2018-12-18 Jozef Lawrynowicz <jozef.l@mittosystems.com>
606 * config/msp430/msp430.h: Define TARGET_VTABLE_ENTRY_ALIGN.
608 2018-12-18 Jakub Jelinek <jakub@redhat.com>
612 * optabs.def (vec_pack_sbool_trunc_optab, vec_unpacks_sbool_hi_optab,
613 vec_unpacks_sbool_lo_optab): New optabs.
614 * optabs.c (expand_widen_pattern_expr): Use vec_unpacks_sbool_*_optab
615 and pass additional argument if both input and target have the same
616 scalar mode of VECTOR_BOOLEAN_TYPE_P vectors.
617 * expr.c (expand_expr_real_2) <case VEC_PACK_TRUNC_EXPR>: Handle
618 VECTOR_BOOLEAN_TYPE_P pack where result has the same scalar mode
619 as the operands using vec_pack_sbool_trunc_optab.
620 * tree-vect-stmts.c (supportable_widening_operation): Use
621 vec_unpacks_sbool_{lo,hi}_optab for VECTOR_BOOLEAN_TYPE_P conversions
622 where both wider_vectype and vectype have the same scalar mode.
623 (supportable_narrowing_operation): Similarly use
624 vec_pack_sbool_trunc_optab if narrow_vectype and vectype have the same
626 * config/i386/i386.c (ix86_get_builtin)
627 <case IX86_BUILTIN_GATHER3ALTDIV8SF>: Check for VECTOR_MODE_P
628 rather than non-VOIDmode.
629 * config/i386/sse.md (vec_pack_trunc_qi, vec_pack_trunc_<mode>):
630 Remove useless ()s around "register_operand", formatting fixes.
631 (vec_pack_sbool_trunc_qi, vec_unpacks_sbool_lo_qi,
632 vec_unpacks_sbool_hi_qi): New expanders.
633 * doc/md.texi (vec_pack_sbool_trunc_M, vec_unpacks_sbool_hi_M,
634 vec_unpacks_sbool_lo_M): Document.
636 2018-12-18 Jozef Lawrynowicz <jozef.l@mittosystems.com>
638 * combine.c (update_rsp_from_reg_equal): Only look for the nonzero bits
639 of src in nonzero_bits_mode if the mode of src is MODE_INT and
641 (reg_nonzero_bits_for_combine): Add clarification to comment.
643 2018-12-18 Wei Xiao <wei3.xiao@intel.com>
645 * config/i386/driver-i386.c (host_detect_local_cpu): Detect cascadelake.
646 * config/i386/i386.c (fold_builtin_cpu): Handle cascadelake.
647 * doc/extend.texi: Add cascadelake.
648 2018-12-17 Peter Bergner <bergner@linux.ibm.com>
651 * config/rs6000/vsx.md (nW): New mode iterator.
652 (vsx_mov<mode>_64bit): Use it. Remove redundant GPR 0/-1 alternative.
653 Update length attribute for (<??r>, <nW>) alternative.
654 (vsx_mov<mode>_32bit): Likewise.
656 2018-12-17 Tom de Vries <tdevries@suse.de>
658 * config/nvptx/nvptx.c (PTX_VECTOR_LENGTH, PTX_WORKER_LENGTH,
659 PTX_DEFAULT_RUNTIME_DIM): Move to the top of the file.
661 2018-12-17 Tom de Vries <tdevries@suse.de>
663 * config/nvptx/nvptx.c (PTX_WARP_SIZE): Define.
664 (nvptx_simt_vf): Return PTX_WARP_SIZE instead of PTX_VECTOR_LENGTH.
666 2018-12-17 Tom de Vries <tdevries@suse.de>
668 * config/nvptx/nvptx.c (nvptx_single): Fix whitespace.
669 (nvptx_neuter_pars): Likewise.
671 2018-12-17 Tom de Vries <tdevries@suse.de>
673 * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Work around Fortran
674 bug PR72741 by overriding dims parameter for routines.
676 2018-12-17 Tom de Vries <tdevries@suse.de>
678 * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Rewrite using
681 2018-12-17 Steve Ellcey <sellcey@cavium.com>
683 * config/aarch64/aarch64-protos.h (aarch64_use_simple_return_insn_p):
685 (aarch64_epilogue_uses): Ditto.
686 * config/aarch64/aarch64.c (aarch64_attribute_table): New array.
687 (aarch64_simd_decl_p): New function.
688 (aarch64_reg_save_mode): New function.
689 (aarch64_function_ok_for_sibcall): Check for simd calls.
690 (aarch64_layout_frame): Check for simd function.
691 (aarch64_gen_storewb_pair): Handle E_TFmode.
692 (aarch64_push_regs): Use aarch64_reg_save_mode to get mode.
693 (aarch64_gen_loadwb_pair): Handle E_TFmode.
694 (aarch64_pop_regs): Use aarch64_reg_save_mode to get mode.
695 (aarch64_gen_store_pair): Handle E_TFmode.
696 (aarch64_gen_load_pair): Ditto.
697 (aarch64_save_callee_saves): Handle different mode sizes.
698 (aarch64_restore_callee_saves): Ditto.
699 (aarch64_components_for_bb): Check for simd function.
700 (aarch64_epilogue_uses): New function.
701 (aarch64_process_components): Check for simd function.
702 (aarch64_expand_prologue): Ditto.
703 (aarch64_expand_epilogue): Ditto.
704 (aarch64_expand_call): Ditto.
705 (aarch64_use_simple_return_insn_p): New function.
706 (TARGET_ATTRIBUTE_TABLE): New define.
707 * config/aarch64/aarch64.h (EPILOGUE_USES): Redefine.
708 (FP_SIMD_SAVED_REGNUM_P): New macro.
709 * config/aarch64/aarch64.md (simple_return): New define_expand.
710 (load_pair_dw_tftf): New instruction.
711 (store_pair_dw_tftf): Ditto.
712 (loadwb_pair<TX:mode>_<P:mode>): Ditto.
713 (storewb_pair<TX:mode>_<P:mode>): Ditto.
715 2018-12-17 Uros Bizjak <ubizjak@gmail.com>
718 * internal-fn.def (ACOSH): New.
721 * optabs.def (acosh_optab): New.
722 (asinh_optab): Ditto.
723 (atanh_optab): Ditto.
724 * config/i386/i386-protos.h (ix86_emit_i387_asinh): New prototype.
725 (ix86_emit_i387_acosh): Ditto.
726 (ix86_emit_i387_atanh): Ditto.
727 * config/i386/i386.c (ix86_emit_i387_asinh): New function.
728 (ix86_emit_i387_acosh): Ditto.
729 (ix86_emit_i387_atanh): Ditto.
730 * config/i386/i386.md (asinhxf2): New expander.
731 (asinh<mode>2): Ditto.
733 (acosh<mode>2): Ditto.
735 (atanh<mode>2): Ditto.
737 2018-12-17 David Edelsohn <dje.gcc@gmail.com>
739 * config.gcc (powerpc-ibm-aix6.*): Delete extra_headers.
740 (powerpc-ibm-aix7.1.*): Same.
741 (powerpc-ibm-aix[789].*): Same.
743 2018-12-17 H.J. Lu <hongjiu.lu@intel.com>
746 * dwarf2out.c (find_AT_string_in_table): Add insert argument
747 defaulting to INSERT and replace INSERT.
748 (find_AT_string): Likewise.
749 (output_macinfo_op): Pass NO_INSERT to find_AT_string.
751 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
753 * coverage.c (struct conts_entry): Add n_counts.
754 (remap_counts_file): Record number of ocunts.
755 (get_coverage_counts): Verify that counts match.
756 * coverage.h (get_coverage_counts): Update prototype.
757 * profile.c (get_exec_counts. compute_value_histograms): Add
760 2018-12-17 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
762 PR rtl-optimization/88253
763 * combine.c (combine_simplify_rtx): Test for side-effects before
764 substituting by zero.
766 2018-12-17 Richard Sandiford <richard.sandiford@arm.com>
768 * doc/invoke.texi (-fversion-loops-for-strides): Document
769 (loop-versioning-group-size, loop-versioning-max-inner-insns)
770 (loop-versioning-max-outer-insns): Document new --params.
771 * Makefile.in (OBJS): Add gimple-loop-versioning.o.
772 * common.opt (fversion-loops-for-strides): New option.
773 * opts.c (default_options_table): Enable fversion-loops-for-strides
775 * params.def (PARAM_LOOP_VERSIONING_GROUP_SIZE)
776 (PARAM_LOOP_VERSIONING_MAX_INNER_INSNS)
777 (PARAM_LOOP_VERSIONING_MAX_OUTER_INSNS): New parameters.
778 * passes.def: Add pass_loop_versioning.
779 * timevar.def (TV_LOOP_VERSIONING): New time variable.
780 * tree-ssa-propagate.h
781 (substitute_and_fold_engine::substitute_and_fold): Add an optional
783 * tree-ssa-propagate.c
784 (substitute_and_fold_engine::substitute_and_fold): Likewise.
785 When passed, only walk blocks dominated by that block.
786 * tree-vrp.h (range_includes_p): Declare.
787 (range_includes_zero_p): Turn into an inline wrapper around
789 * tree-vrp.c (range_includes_p): New function, generalizing...
790 (range_includes_zero_p): ...this.
791 * tree-pass.h (make_pass_loop_versioning): Declare.
792 * gimple-loop-versioning.cc: New file.
794 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
796 * ipa-fnsummary.c (remap_edge_change_prob): Do not ICE when changes
799 2018-12-15 H.J. Lu <hongjiu.lu@intel.com>
802 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Revert
805 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
807 * ipa-fnsummary.c (analyze_function_body): Do not loeak conds and
809 (ipa_fn_summary_generate): Add prevails parameter; do not allocate
810 data when symbol is not prevailing.
811 (inline_read_section): Likewise.
813 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
815 * cgraph.h (cgraph_node): Add predicate prevailing_p.
816 (cgraph_edge): Add predicate possible_call_in_translation_unit_p.
817 * ipa-prop.c (ipa_write_jump_function): Optimize streaming of ADDR_EXPR.
818 (ipa_read_jump_function): Add prevails parameter; optimize streaming.
819 (ipa_read_edge_info): Break out from ...
820 (ipa_read_node_info): ... here; optimize streaming.
821 * cgraph.c (cgraph_edge::possibly_call_in_translation_unit_p): New
824 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
826 * ipa-utils.c (ipa_merge_profiles): Do no merging when source function
829 2018-12-15 Jakub Jelinek <jakub@redhat.com>
831 PR tree-optimization/88464
833 * tree-vect-stmts.c (vect_build_gather_load_calls): For NARROWING
834 and mask with integral masktype, don't try to permute mask vectors,
835 instead emit VEC_UNPACK_{LO,HI}_EXPR. Fix up NOP_EXPR operand.
836 (vectorizable_store): Handle masked scatters with decl and integral
838 (permute_vec_elements): Allow scalar_dest to be NULL.
839 * config/i386/i386.c (ix86_get_builtin)
840 <case IX86_BUILTIN_GATHER3ALTDIV16SF>: Use lowpart_subreg for masks.
841 <case IX86_BUILTIN_GATHER3ALTDIV8SF>: Don't assume mask and src have
844 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
846 * ipa.c (cgraph_build_static_cdtor_1): Add OPTIMIZATION and TARGET
848 (cgraph_build_static_cdtor): Update.
849 (build_cdtor): Use OPTIMIZATION and TARGET of the first real cdtor
852 2018-12-15 Alan Modra <amodra@gmail.com>
854 * config/rs6000/rs6000.c (generate_set_vrsave, rs6000_emit_savres_rtx),
855 (rs6000_emit_prologue, rs6000_call_aix, rs6000_call_sysv),
856 (rs6000_call_darwin_1): Use gen_hard_reg_clobber.
858 2018-12-15 Jakub Jelinek <jakub@redhat.com>
861 * config/i386/sse.md (UNSPEC_SFIXUPIMM): New unspec enumerator.
862 (avx512f_sfixupimm<mode><mask_name><round_saeonly_name>): Use it
863 instead of UNSPEC_FIXUPIMM.
865 PR rtl-optimization/88478
866 * cselib.c (cselib_record_sets): Move sets[i].src_elt tests
867 after REG_P (dest) test.
869 2018-12-14 Martin Sebor <msebor@redhat.com>
871 PR tree-optimization/88372
872 * calls.c (maybe_warn_alloc_args_overflow): Handle function pointers.
873 * tree-object-size.c (alloc_object_size): Same. Simplify.
874 * doc/extend.texi (Object Size Checking): Update.
875 (Other Builtins): Add __builtin_object_size.
876 (Common Type Attributes): Add alloc_size.
877 (Common Variable Attributes): Ditto.
879 2018-12-14 Martin Sebor <msebor@redhat.com>
881 PR rtl-optimization/87096
882 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Avoid
883 folding calls whose bound may exceed INT_MAX. Diagnose bound ranges
884 that exceed the limit.
886 2018-12-14 Martin Sebor <msebor@redhat.com>
889 * doc/extend.texi (attribute const, pure): Clarify.
891 2018-12-14 H.J. Lu <hongjiu.lu@intel.com>
893 * config/i386/i386.c (rest_of_insert_endbranch): Insert ENDBR
894 at the function entry only when -mmanual-endbr isn't used or
895 there is cf_check function attribute.
896 (ix86_attribute_table): Add cf_check.
897 * config/i386/i386.opt: Add -mmanual-endbr.
898 * doc/extend.texi: Document cf_check attribute.
899 * doc/invoke.texi: Document -mmanual-endbr.
901 2018-12-14 Thomas Schwinge <thomas@codesourcery.com>
902 Cesar Philippidis <cesar@codesourcery.com>
904 * omp-offload.c (inform_oacc_loop): New function.
905 (execute_oacc_device_lower): Use it to display loop parallelism.
907 2018-12-14 Jakub Jelinek <jakub@redhat.com>
911 * expr.h (categorize_ctor_elements): Add p_unique_nz_elts argument.
912 * expr.c (categorize_ctor_elements_1): Likewise. Compute it like
913 p_nz_elts, except don't multiply it by mult. Adjust recursive call.
914 Fix up COMPLEX_CST handling.
915 (categorize_ctor_elements): Add p_unique_nz_elts argument, initialize
916 it and pass it through to categorize_ctor_elements_1.
917 (mostly_zeros_p, all_zeros_p): Adjust categorize_ctor_elements callers.
918 * gimplify.c (gimplify_init_constructor): Likewise. Don't force
919 ctor into readonly data section if num_unique_nonzero_elements is
920 smaller or equal to 1/8 of num_nonzero_elements and size is >= 64
923 2018-12-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
925 * config/arm/arm.md (arm_movdi): Split if -mslow-flash-data and
926 source is a constant that would be loaded by literal pool.
927 (movsf expander): Generate a no_literal_pool_sf_immediate insn if
928 -mslow-flash-data is present, targeting hardfloat ABI and source is a
929 float constant that cannot be loaded via vmov.
930 (movdf expander): Likewise but generate a no_literal_pool_df_immediate
932 (arm_movsf_soft_insn): Split if -mslow-flash-data and source is a
933 float constant that would be loaded by literal pool.
934 (softfloat constant movsf splitter): Splitter for the above case.
935 (movdf_soft_insn): Split if -mslow-flash-data and source is a float
936 constant that would be loaded by literal pool.
937 (softfloat constant movdf splitter): Splitter for the above case.
938 * config/arm/constraints.md (Pz): Document existing constraint.
939 (Ha): Define constraint.
941 * config/arm/predicates.md (hard_sf_operand): New predicate.
942 (hard_df_operand): Likewise.
943 * config/arm/thumb2.md (thumb2_movsi_insn): Split if
944 -mslow-flash-data and constant would be loaded by literal pool.
945 * constant/arm/vfp.md (thumb2_movsi_vfp): Likewise and disable constant
946 load in VFP register.
947 (movdi_vfp): Likewise.
948 (thumb2_movsf_vfp): Use hard_sf_operand as predicate for source to
949 prevent match for a constant load if -mslow-flash-data and constant
950 cannot be loaded via vmov. Adapt constraint accordingly by
951 using Ha instead of E for generic floating-point constant load.
952 (thumb2_movdf_vfp): Likewise using hard_df_operand predicate instead.
953 (no_literal_pool_df_immediate): Add a clobber to use as the
954 intermediate general purpose register and also enable it after reload
955 but disable it constant is a valid FP constant. Add constraints and
956 generate a DI intermediate load rather than 2 SI loads.
957 (no_literal_pool_sf_immediate): Add a clobber to use as the
958 intermediate general purpose register and also enable it after
961 2018-12-14 Uros Bizjak <ubizjak@gmail.com>
964 * internal-fn.def (HYPOT): New.
965 * optabs.def (hypot_optab): New.
966 * config/i386/i386.md (hypot<mode>3): New expander.
968 2018-12-14 Jeff Law <law@redhat.com>
970 * target.def (post_cfi_startproc): Fix text.
972 2018-12-14 Sam Tebbs <sam.tebbs@arm.com>
974 * doc/tm.texi (TARGET_ASM_POST_CFI_STARTPROC): Define.
975 * doc/tm.texi.in (TARGET_ASM_POST_CFI_STARTPROC): Define.
976 * dwarf2out.c (dwarf2out_do_cfi_startproc): Trigger the hook.
977 * hooks.c (hook_void_FILEptr_tree): Define.
978 * hooks.h (hook_void_FILEptr_tree): Define.
979 * target.def (post_cfi_startproc): Define.
981 2018-12-14 Tom de Vries <tdevries@suse.de>
983 * lto-cgraph.c (verify_node_partition): New function.
984 (input_overwrite_node, input_varpool_node): Use verify_node_partition.
986 2018-12-14 H.J. Lu <hongjiu.lu@intel.com>
989 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
990 use get_frame_size ().
992 2018-12-14 Andrew Stubbs <ams@codesourcery.com>
994 * gcc/lra-int.h (lra_register_new_scratch_op): Add third parameter.
995 * gcc/lra-remat.c (update_scratch_ops): Pass icode to
996 lra_register_new_scratch_op.
997 * gcc/lra.c (struct sloc): Add icode field.
998 (lra_register_new_scratch_op): Add icode parameter.
999 Use icode to skip insns that have changed beyond recognition.
1001 2018-12-14 Eric Botcazou <ebotcazou@adacore.com>
1003 * dwarf2out.c (analyze_discr_in_predicate): Simplify.
1004 (analyze_variants_discr): Deal with naked boolean discriminants.
1006 2018-12-14 Claudiu Zissulescu <claziss@synopsys.com>
1008 * config/arc/arc.c (arc_restore_callee_milli) Don't clobber off
1011 2018-12-14 Claudiu Zissulescu <claziss@synopsys.com>
1013 * config/arc/arc.h (reg_class): Add SIBCALL_REGS.
1015 2018-12-14 Richard Biener <rguenther@suse.de>
1017 * gimple-ssa-split-paths.c (is_feasible_trace): Remove
1018 duplicated code block.
1020 2018-12-14 Alan Modra <amodra@gmail.com>
1022 PR rtl-optimization/88311
1023 * config/rs6000/rs6000.c (rs6000_call_sysv): Do not mask cookie.
1024 (rs6000_sibcall_sysv): Likewise.
1026 2018-12-14 Segher Boessenkool <segher@kernel.crashing.org>
1028 PR rtl-optimization/88001
1029 * function.c (match_asm_constraints_1): Don't invalidly share RTL.
1031 2018-12-14 Bin Cheng <bin.cheng@linux.alibaba.com>
1033 * auto-profile.c (afdo_annotate_cfg): Call update_max_bb_count even
1034 if autofdo counts are all zeros.
1036 2018-12-14 Bin Cheng <bin.cheng@linux.alibaba.com>
1038 * auto-profile.c (afdo_indirect_call): Skip generating histogram
1039 value for internal call.
1041 2018-12-14 Bin Cheng <bin.cheng@linux.alibaba.com>
1043 * auto-profile.c (AFDO_EINFO): New macro.
1044 (class edge_info): New class.
1045 (is_edge_annotated, set_edge_annotated): Delete.
1046 (afdo_propagate_edge, afdo_propagate_circuit, afdo_propagate): Remove
1047 parameter. Adjust edge count computation and annotation using class
1049 (afdo_calculate_branch_prob, afdo_annotate_cfg): Likewise.
1051 2018-12-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
1053 * ipa-cp.c (print_all_lattices): Skip cp clones.
1055 * ipa-cp.c: Fix various comment typos.
1057 2018-12-13 Jakub Jelinek <jakub@redhat.com>
1059 PR tree-optimization/88444
1060 * tree-inline.c (fold_marked_statements): Iterate up to
1061 last_basic_block_for_fn rather than n_basic_blocks_for_fn.
1063 PR rtl-optimization/88470
1064 * cfgcleanup.c (outgoing_edges_match): If the function is
1065 shrink-wrapped and bb1 ends with a JUMP_INSN with a single fake
1066 edge to EXIT, return false.
1068 2018-12-13 Martin Sebor <msebor@redhat.com>
1070 * doc/extend.texi: Consistently use @code for const and volatile
1071 qualifiers, the true and false constants, and asm statements.
1073 2018-12-13 Vladimir Makarov <vmakarov@redhat.com>
1075 PR rtl-optimization/88414
1076 * lra-int.h (lra_asm_error_p): New.
1077 * lra-assigns.c (lra_assign): Check lra_asm_error_p for checking
1078 call crossed pseudo assignment correctness.
1079 (lra_split_hard_reg_for): Set up lra_asm_error_p.
1080 * lra-constraints.c (curr_insn_transform): Ditto.
1081 * lra.c (lra_asm_error_p): New.
1082 (lra): Reset lra_asm_error_p.
1084 2018-12-13 Jakub Jelinek <jakub@redhat.com>
1086 PR rtl-optimization/88416
1087 * valtrack.c (cleanup_auto_inc_dec): Handle pre/post-inc/dec/modify
1088 even if !AUTO_INC_DEC.
1090 2018-12-13 David Edelsohn <dje.gcc@gmail.com>
1092 * config/rs6000/rs6000.c (rs6000_function_arg): Ensure type is
1094 (rs6000_arg_partial_bytes): Same.
1096 2018-12-13 Jason Merrill <jason@redhat.com>
1098 * gdbinit.in (pp): New macro.
1101 2018-12-13 Jakub Jelinek <jakub@redhat.com>
1103 PR tree-optimization/88464
1104 * tree-vect-stmts.c (vect_build_gather_load_calls): Handle INTEGER_TYPE
1105 masktype if mask is non-NULL.
1106 (vectorizable_load): Don't reject masked gather loads if masktype
1107 in the decl is INTEGER_TYPE.
1109 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
1111 * config/s390/s390-builtins.def (s390_vec_double_s64): Map to
1112 s390_vec_double_s64 instead of s390_vcdgb.
1113 (s390_vec_double_u64): Map to s390_vec_double_u64 instead of
1116 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
1118 * config/s390/vx-builtins.md ("vec_ctd_s64", "vec_ctd_u64")
1119 ("vec_ctsl", "vec_ctul"): Replace 0 with VEC_NOINEXACT.
1120 ("vec_double_s64", "vec_double_u64"): Replace 4 with VEC_INEXACT.
1122 2018-12-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1124 * doc/invoke.texi (-msve-vector-bits): Clarify -msve-vector-bits=128
1127 2018-12-13 Wei Xiao <wei3.xiao@intel.com>
1129 * common/config/i386/i386-common.c (processor_names): Add cascadelake.
1130 (processor_alias_table): Add cascadelake.
1131 * config.gcc: Add -march=cascadelake.
1132 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1134 * config/i386/i386.c (Add m_CASCADELAKE): New.
1135 (processor_cost_table): Add cascadelake.
1136 (get_builtin_code_for_version): Handle cascadelake.
1137 * config/i386/i386.h (TARGET_CASCADELAKE, PROCESSOR_CASCADELAKE): New.
1138 (PTA_CASCADELAKE): Ditto.
1139 * doc/invoke.texi: Add -march=cascadelake.
1141 2018-12-13 Jakub Jelinek <jakub@redhat.com>
1144 * config/i386/i386.md (*movdi_internal, *movsi_internal,
1145 *movhi_internal, *movqi_internal): Add alternative(s) to load
1146 0 or -1 into k registers using kxor or kxnoq instructions.
1149 * config/i386/sse.md (VI1248_AVX512VLBW, AVX512ZEXTMASK): New
1151 (<avx512>_testm<mode>3<mask_scalar_merge_name>,
1152 <avx512>_testnm<mode>3<mask_scalar_merge_name>): Merge patterns
1153 with VI12_AVX512VL and VI48_AVX512VL iterators into ones with
1154 VI1248_AVX512VLBW iterator.
1155 (*<avx512>_testm<VI1248_AVX512VLBW:mode>3_zext,
1156 *<avx512>_testm<VI1248_AVX512VLBW:mode>3_zext_mask,
1157 *<avx512>_testnm<VI1248_AVX512VLBW:mode>3_zext,
1158 *<avx512>_testnm<VI1248_AVX512VLBW:mode>3_zext_mask): New
1162 * config/i386/i386.md (*zero_extendsidi2, zero_extend<mode>di2,
1163 *zero_extend<mode>si2, *zero_extendqihi2): Add =*k, *km alternatives.
1165 2018-12-12 Tom de Vries <tdevries@suse.de>
1166 Jakub Jelinek <jakub@redhat.com>
1168 * omp-builtins.def (BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
1169 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
1170 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
1171 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
1172 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
1173 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME): Fix up
1174 function types - remove one argument.
1176 2018-12-12 Martin Sebor <msebor@redhat.com>
1178 * doc/extend.texi (attribute copy): Fix typos.
1180 2018-12-12 Martin Sebor <msebor@redhat.com>
1182 * doc/extend.texi (Function Attributes): Clarify C++ aspects.
1183 (Variable Attributes): Same.
1184 (Type Attributes): Same.
1186 2018-12-12 Olivier Hainque <hainque@adacore.com>
1188 * config/aarch64/aarch64.c (aarch64_override_options): Once arch,
1189 cpu and tune were validated, insert SUBTARGET_OVERRIDE_OPTIONS if
1192 2018-12-12 Olivier Hainque <hainque@adacore.com>
1194 * config/aarch64/aarch64.c (PROBE_STACK_FIRST_REG) : Redefine as
1195 R9_REGNUM instead of 9.
1196 (PROBE_STACK_SECOND_REG): Redefine as R10_REGNUM instead of 10.
1198 2018-12-12 Eric Botcazou <ebotcazou@adacore.com>
1201 * config/sparc/sparc.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1202 (speculation_barrier): New instruction for V9.
1204 2018-12-12 Segher Boessenkool <segher@kernel.crashing.org>
1205 Iain Sandoe <iain@sandoe.co.uk>
1208 * config/rs6000/rs6000.c (save_reg_p): Do not save the picbase reg
1209 unless it has been used.
1210 (first_reg_to_save): Remove dead code.
1212 2018-12-12 Iain Sandoe <iain@sandoe.co.uk>
1214 * config/rs6000/rs6000-protos.h (rs6000_call_darwin): New.
1215 (rs6000_sibcall_darwin): New. (macho_call_template): Remove.
1216 * config/rs6000/rs6000.c (get_prev_label): Forward declaration.
1217 (rs6000_call_template_1): Handle Darwin.
1218 (macho_call_template): Remove.
1219 (rs6000_call_sysv): Remove handling for Darwin.
1220 (rs6000_call_darwin_1, rs6000_call_darwin): New
1221 (rs6000_sibcall_darwin): New.
1222 * config/rs6000/rs6000.md (define_expand “call”): Handle Darwin
1223 with its own expander. (define_expand “call_value”): Likewise.
1224 (define_expand “sibcall”): Likewise.
1225 (define_expand “sibcall_value”): Likewise.
1226 (call_nonlocal_sysv): Remove Darwin special-casing.
1227 (call_value_nonlocal_sysv): Likewise.
1229 2018-12-12 Iain Sandoe <iain@sandoe.co.uk>
1231 * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64): Remove.
1232 (call_nonlocal_darwin64): Remove.
1233 (call_value_indirect_nonlocal_darwin64): Remove.
1234 (call_value_nonlocal_darwin64): Remove.
1235 * config/rs6000/rs6000.c (rs6000_call_template_1): Handle Darwin with
1236 the same asm output as AIX/ELFv2. (rs6000_call_sysv): Preserve the
1237 CALL_LONG flag when needed for Darwin.
1238 * config/rs6000/rs6000.md (define expand “call”): Expand Darwin as
1240 (define_expand “call_value”): Likewise.
1241 (define_expand “sibcall”): Likewise.
1242 (define_expand “sibcall_value”): Likewise.
1243 (call_indirect_nonlocal_sysv): Mark the clobber mode P.
1244 (call_nonlocal_sysv): Likewise.
1245 (call_nonlocal_sysv_secure): Likewise.
1246 (call_value_indirect_nonlocal_sysv): Likewise.
1247 (call_value_nonlocal_sysv): Likewise.
1248 (call_value_nonlocal_sysv_secure): Likewise.
1249 (call_local64): Mark the clobber DI.
1250 (call_value_local64): Likewise.
1252 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1254 PR tree-optimization/88444
1255 * tree-vrp.c (register_edge_assert_for_2): Only register assertions
1256 for conversions if rhs1 is a SSA_NAME.
1258 2018-12-11 Dimitar Dimitrov <dimitar@dinux.eu>
1260 * cfgexpand.c (asm_clobber_reg_is_valid): Also produce
1261 error when stack pointer is clobbered.
1262 (expand_asm_stmt): Refactor clobber check in separate function.
1264 2018-12-11 Eric Botcazou <ebotcazou@adacore.com>
1266 * config/rs6000/vxworks.h (RS6000_STARTING_FRAME_OFFSET): Define,
1267 accounting for STACK_BOUNDARY 128.
1268 (STACK_DYNAMIC_OFFSET): Likewise.
1270 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1273 * config/i386/i386.md (*x86_mov<SWI48:mode>cc_0_m1_neg_leu<SWI:mode>):
1274 New define_insn_and_split.
1276 2018-12-11 Richard Biener <rguenther@suse.de>
1280 * gimple.c (gimple_assign_set_rhs_with_ops): Revert previous
1282 * tree-complex.c (update_complex_assignment): Properly transfer
1283 or clean EH info around gimple_assign_set_rhs_with_ops.
1285 2018-12-11 Richard Earnshaw <rearnsha@arm.com>
1288 * config/aarch64/iterators.md (sizem1): Add sizes for SFmode and DFmode.
1289 (Vbtype): Add SFmode mapping.
1290 * config/aarch64/aarch64.md (copysigndf3, copysignsf3): Delete.
1291 (copysign<GPF:mode>3): New expand pattern.
1292 (copysign<GPF:mode>3_insn): New insn pattern.
1294 2018-12-11 Richard Biener <rguenther@suse.de>
1296 * ccmp.c (ccmp_candidate_p): Use GIMPLE API properly.
1298 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1301 * doc/sourcebuild.texi (lto_incremental): Document new effective
1304 2018-12-11 Segher Boessenkool <segher@kernel.crashing.org>
1307 * config/rs6000/rs6000.c (rs6000_expand_zeroop_builtin): Use
1308 rs6000_isa_flags instead of rs6000_isa_flags_explicit to decide
1309 whether soft float is enabled.
1310 (rs6000_expand_mtfsb_builtin): Ditto.
1311 (rs6000_expand_set_fpscr_rn_builtin): Ditto.
1312 (rs6000_expand_set_fpscr_drn_builtin): Ditto.
1314 2018-12-10 Jeff Law <law@redhat.com>
1316 PR tree-optimization/80520
1317 * gimple-ssa-split-paths.c (is_feasible_trace): Recognize half
1318 diamonds that are likely if convertable.
1320 2018-12-10 Martin Sebor <msebor@redhat.com>
1322 PR tree-optimization/86196
1323 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
1324 base size only of arrays.
1326 2018-12-10 Segher Boessenkool <segher@kernel.crashing.org>
1328 * config.gcc (Obsolete configurations): Delete powerpc*-*-*spe*.
1329 (Unsupported targets): Add powerpc*-*-*spe*.
1330 (powerpc*-*-*spe*): Delete.
1331 (powerpc-*-eabispe*): Delete.
1332 (powerpc-*-rtems*spe*): Delete.
1333 (powerpc*-*-linux*spe*): Delete.
1334 (powerpc*-*-linux*): Do not handle the linux*spe* targets.
1335 (powerpc-wrs-vxworks*spe): Delete.
1336 (with_cpu setting code): Delete powerpc*-*-*spe* handling.
1337 * config.host (target powerpc*-*-*spe*): Delete.
1338 * doc/invoke.texi (PowerPC SPE Options): Delete.
1339 (PowerPC SPE Options): Delete.
1340 * config/powerpcspe: Delete.
1342 2018-12-10 Uros Bizjak <ubizjak@gmail.com>
1345 * config/i386/i386.c (ix86_expand_sse_cmp): For vector modes,
1346 check operand 1 with vector_operand predicate.
1347 (ix86_expand_sse_movcc): For vector modes, check op_true with
1348 vector_operand, not nonimmediate_operand.
1350 2018-12-10 Richard Biener <rguenther@suse.de>
1352 * tree-affine.c (tree_to_aff_combination): Remove unreachable
1354 (aff_combination_expand): Cache on SSA names, not possibly
1355 on conversion trees. Avoid expanding cases we do not handle.
1357 2018-12-10 Richard Biener <rguenther@suse.de>
1359 PR tree-optimization/88427
1360 * vr-values.c (vr_values::extract_range_from_phi_node):
1361 Handle symbolic ranges conservatively when trying to drop
1364 2018-12-10 Martin Jambor <mjambor@suse.cz>
1367 * ipa-prop.c (determine_locally_known_aggregate_parts): Make sure
1368 we check pointers against pointers.
1370 2018-12-10 Richard Biener <rguenther@suse.de>
1373 * gimple.c (gimple_assign_set_rhs_with_ops): Transfer EH
1374 info to a newly allocated stmt.
1376 2018-12-10 Jerome Lambourg <lambourg@adacore.com>
1378 * config/vxworksae.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): Define.
1380 2018-12-10 Fredrik Nyström <fredrik@lysator.liu.se>
1383 * config/sol2.h: Only use libgcc-unwind.map if
1384 ENABLE_SHARED_LIBGCC.
1386 2018-12-10 Bin Cheng <bin.cheng@linux.alibaba.com>
1388 * auto-profile.c (afdo_calculate_branch_prob): Convert profile_count
1389 to afdo precision quality.
1390 (afdo_callsite_hot_enough_for_early_inline): Likewise.
1391 (afdo_annotate_cfg): Set profile_count for exit basic block.
1393 2018-12-10 Bin Cheng <bin.cheng@linux.alibaba.com>
1395 * auto-profile.c (string_table::get_index_by_decl)
1396 (function_instance::get_function_instance_by_decl): Avoid infinite
1397 recursion by using DECL_FROM_INLINE.
1399 2018-12-09 John David Anglin <danglin@gcc.gnu.org>
1401 * config.gcc (hppa*-*-linux*): Add pa/t-pa to tmake_file. Define
1403 * config/pa/pa-protos.h (pa_d_target_versions): New prototype.
1404 * config/pa/pa.h (TARGET_D_CPU_VERSIONS): Define.
1405 * config/pa/pa-d.c: New file.
1406 * config/pa/t-pa: New file.
1408 2018-12-08 Bin Cheng <bin.cheng@linux.alibaba.com>
1410 * ipa-cp.c (update_profiling_info): Call adjust_for_ipa_scaling for
1413 2018-12-08 Jakub Jelinek <jakub@redhat.com>
1416 * tree-nested.c (convert_local_reference_stmt): Handle clobbers where
1417 lhs is not a decl normally, don't call use_pointer_in_frame on that
1420 2018-12-08 Eric Botcazou <ebotcazou@adacore.com>
1422 PR rtl-optimization/88390
1423 * dwarf2cfi.c (struct dw_cfi_row): Add window_save field.
1424 (cfi_row_equal_p): Compare it.
1425 (dwarf2out_frame_debug_cfa_window_save): Add FAKE parameter.
1426 If FAKE is false, set window_save of the current row.
1427 (dwarf2out_frame_debug) <REG_CFA_TOGGLE_RA_MANGLE>: Call above
1428 function with FAKE parameter set to true.
1429 <REG_CFA_WINDOW_SAVE>: Likewise but with FAKE parameter set to false.
1430 (change_cfi_row): Emit a DW_CFA_GNU_window_save if necessary.
1432 2018-12-07 Peter Bergner <bergner@linux.ibm.com>
1435 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
1436 -mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
1437 Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
1438 * doc/invoke.texi: Document -mabi=ibmlongdouble and -mabi=ieeelongdouble
1439 require -mlong-double-128.
1441 2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1443 * config/aarch64/aarch64.c (aarch64_tuning_override_functions): Add
1445 (aarch64_parse_sve_width_string): Define.
1447 2018-12-07 Jeff Law <law@redhat.com>
1450 * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Add
1451 m_update_global_ranges member. Add corresponding argument to ctor.
1452 * gimple-ssa-evrp-analyze.c
1453 (evrp_range_analyzer::evrp_range_analyzer): Add new argument and
1454 initialize m_update_global_ranges.
1455 (evrp_range_analyzer::set_ssa_range_info): Assert that we are
1456 updating global ranges.
1457 (evrp_range_analyzer::record_ranges_from_incoming_edge): Only
1458 update global ranges if explicitly requested.
1459 (evrp_range_analyzer::record_ranges_from_phis): Similarly.
1460 (evrp_range_analyzer::record_ranges_from_stmt): Similarly.
1461 * gimple-ssa-evrp.c (evrp_dom_walker): Pass new argument to
1462 evrp_range_analyzer ctor.
1463 * gimple-ssa-sprintf.c (sprintf_dom_walker): Similarly.
1464 * tree-ssa-dom.c (dom_opt_dom_walker): Similarly.
1466 2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1468 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum):
1469 Add SVE_NOT_IMPLEMENTED value.
1470 * config/aarch64/aarch64-protos.h (struct tune_params): Add sve_width
1472 * config/aarch64/aarch64.c (generic_tunings,cortexa35_tunings,
1473 cortexa53_tunings, cortexa57_tunings, cortexa72_tunings,
1474 cortexa73_tunings, exynosm1_tunings, thunderx_tunings,
1475 thunderx_tunings, tsv110_tunings, xgene1_tunings, qdf24xx_tunings,
1476 saphira_tunings, thunderx2t99_tunings, emag_tunings):
1478 (aarch64_estimated_poly_value): Define.
1479 (TARGET_ESTIMATED_POLY_VALUE): Define.
1481 2018-12-07 Paul A. Clarke <pc@us.ibm.com>
1484 * config/rs6000/mmintrin.h (_mm_packs_pu16): Correctly use "__vector".
1486 2018-12-07 Vladimir Makarov <vmakarov@redhat.com>
1488 PR rtl-optimization/88349
1489 * ira-costs.c (record_operand_costs): Check bigger reg class on
1492 2018-12-07 Richard Sandiford <richard.sandiford@arm.com>
1494 * config/aarch64/aarch64-sve.md (*mul<mode>3, *v<optab><mode>3):
1495 Split the patterns after reload if we don't need the predicate
1497 (*post_ra_mul<mode>3, *post_ra_v<optab><mode>3): New patterns.
1499 2018-12-07 Richard Sandiford <richard.sandiford@arm.com>
1501 * config/aarch64/iterators.md (SVE_UNPRED_FP_BINARY): New code
1503 (sve_fp_op): Handle minus and mult.
1504 * config/aarch64/aarch64-sve.md (*add<mode>3, *sub<mode>3)
1505 (*mul<mode>3): Split the patterns after reload if we don't
1506 need the predicate operand.
1507 (*post_ra_<sve_fp_op><mode>3): New pattern.
1509 2018-12-07 Bin Cheng <bin.cheng@linux.alibaba.com>
1511 * profile-count.h (profile_count::oeprator>=): Fix typo by inverting
1512 return condition when *this is precise zero.
1514 2018-12-07 Jakub Jelinek <jakub@redhat.com>
1517 * final.c (rest_of_handle_final): Don't call collect_fn_hard_reg_usage
1518 for functions with naked attribute.
1521 * tree-vrp.c (extract_range_from_binary_expr): For POINTER_PLUS_EXPR
1522 with -fno-delete-null-pointer-checks, set_nonnull only if the pointer
1523 is non-NULL and offset is known to have most significant bit clear.
1524 * vr-values.c (vr_values::vrp_stmt_computes_nonzero): For ADDR_EXPR
1525 of MEM_EXPR, return true if the MEM_EXPR has non-zero offset with
1526 most significant bit clear. If offset does have most significant bit
1527 set and -fno-delete-null-pointer-checks, don't return true even if
1528 the base pointer is non-NULL.
1530 2018-12-06 Alexandre Oliva <aoliva@redhat.com>
1532 * cselib.c (cselib_record_sets): Skip strict low part sets
1535 2018-12-06 Paul A. Clarke <pc@us.ibm.com>
1538 * config/rs6000/smmintrin.h: New file.
1539 * config.gcc: Add smmintrin.h to extra_headers for powerpc*-*-*.
1541 2018-12-06 Paul A. Clarke <pc@us.ibm.com>
1544 * config/rs6000/mmintrin.h (_mm_unpackhi_pi8): Fix for big-endian.
1545 (_mm_unpacklo_pi8): Likewise.
1546 (_mm_mulhi_pi16): Likewise.
1547 (_mm_packs_pi16): Fix for big-endian. Use preferred API.
1548 (_mm_packs_pi32): Likewise.
1549 (_mm_packs_pu16): Likewise.
1550 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix for big-endian.
1551 (_mm_cvtss_si64): Likewise.
1552 (_mm_cvtpi32x2_ps): Likewise.
1553 (_mm_shuffle_ps): Likewise.
1554 (_mm_movemask_pi8): Likewise.
1555 (_mm_mulhi_pu16): Likewise.
1556 (_mm_sad_pu8): Likewise.
1557 (_mm_sad_pu8): Likewise.
1558 (_mm_cvtpu16_ps): Fix for big-endian. Use preferred API.
1559 (_mm_cvtpu8_ps): Likewise.
1560 (_mm_movemask_ps): Better #else case for big-endian (no functional
1562 (_mm_shuffle_pi16): Likewise.
1563 * config/rs6000/emmintrin.h (_mm_movemask_pd): Fix for big-endian.
1564 Better #else case for big-endian (no functional change).
1565 (_mm_movemask_epi8): Likewise.
1566 (_mm_shufflehi_epi16): Likewise.
1567 (_mm_shufflelo_epi16): Likewise.
1568 (_mm_shuffle_epi32): Likewise.
1569 (_mm_mul_epu32): Fix for big-endian.
1570 (_mm_bsrli_si128): Likewise.
1571 (_mm_cvtps_pd): Better #else case for big endian.
1572 (_mm_mulhi_epi16): Likewise.
1573 (_mm_mul_epu32): Likewise.
1574 (_mm_slli_si128): Likewise.
1575 (_mm_sll_epi16): Likewise.
1576 (_mm_sll_epi32): Likewise.
1577 (_mm_sra_epi16): Likewise.
1578 (_mm_sra_epi32): Likewise.
1579 (_mm_srl_epi16): Likewise.
1580 (_mm_srl_epi32): Likewise.
1581 (_mm_mulhi_epu16): Likewise.
1582 (_mm_sad_epu8): Likewise.
1583 * config/rs6000/pmmintrin.h (_mm_hadd_ps): Fix for big-endian.
1584 (_mm_sub_ps): Likewise.
1585 * config/rs6000/mmintrin.h (_mm_cmpeq_pi8): Fix for 32-bit mode.
1586 * gcc/config/rs6000/tmmintrin.h (_mm_alignr_epi8): Use ENDIAN
1587 macros consistently (no functional changes).
1588 (_mm_alignr_pi8): Likewise.
1590 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
1593 * config/darwin.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC) Remove, use the
1595 * config/rs6000/darwin7.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): New.
1597 2018-12-06 Vladimir Makarov <vmakarov@redhat.com>
1600 * ira.c (ira_init_register_move_cost): Use info from
1601 hard_regno_mode_ok instead of contains_reg_of_mode.
1602 * ira-costs.c (contains_reg_of_mode): Don't use cost from bigger
1603 hard register class for some fixed hard registers.
1605 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1607 * doc/extend.texi (Using Assembly Language with C): Document asm inline.
1608 (Size of an asm): Fix typo. Document asm inline.
1609 * gimple-pretty-print.c (dump_gimple_asm): Handle asm inline.
1610 * gimple.h (enum gf_mask): Add GF_ASM_INLINE.
1611 (gimple_asm_set_volatile): Fix typo.
1612 (gimple_asm_inline_p): New.
1613 (gimple_asm_set_inline): New.
1614 * gimplify.c (gimplify_asm_expr): Propagate the asm inline flag from
1616 * ipa-icf-gimple.c (func_checker::compare_gimple_asm): Compare the
1617 gimple_asm_inline_p flag, too.
1618 * tree-core.h (tree_base): Document that protected_flag is ASM_INLINE_P
1620 * tree-inline.c (estimate_num_insns): If gimple_asm_inline_p return
1621 a minimum size for an asm.
1622 * tree.h (ASM_INLINE_P): New.
1624 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1627 * doc/extend.texi (Basic Asm): Update grammar.
1628 (Extended Asm): Update grammar.
1630 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
1633 * config/i386/darwin.h (STACK_BOUNDARY): Remove macro.
1634 * config/i386/i386.c (ix86_compute_frame_layout): Ensure at least 128b
1635 stack alignment in non-leaf functions.
1637 2018-12-06 Jakub Jelinek <jakub@redhat.com>
1640 * config/aarch64/aarch64.c (aarch64_print_address_internal): Don't
1641 call output_operand_lossage on VOIDmode CONST_INTs. After
1642 output_operand_lossage do return false.
1644 2018-12-06 Richard Biener <rguenther@suse.de>
1646 * df-problems.c (df_rd_local_compute): Use bitmap_release.
1647 (df_live_free): Likewise.
1648 (df_md_local_compute): Likewise.
1649 (df_md_free): Release df_md_scratch bitmap.
1650 * loop-invariant.c (calculate_loop_reg_pressure): Use
1652 * sched-deps.c (true_dependency_cache, output_dependency_cache,
1653 anti_dependency_cache, control_dependency_cache,
1654 spec_dependency_cache): Use bitmap instead of bitmap_head *.
1655 * sched-ebb.c (schedule_ebbs_init): Initialize non-GTY
1656 dont_calc_deps as bitmap allocated from obstack not GC.
1657 (schedule_ebbs_finish): Use bitmap_release.
1658 * sched-rgn.c (schedule_insns): Initialize non-GTY
1659 not_in_df as bitmap allocated from obstack not GC.
1661 * sel-sched.c (_forced_ebb_heads): Remove premature optimization.
1662 (sel_region_init): Allocate forced_ebb_heads.
1663 (sel_region_finish): Free forced_ebb_heads.
1665 2018-12-06 Richard Biener <rguenther@suse.de>
1667 * bitmap.c (bitmap_head::crashme): Define.
1668 * bitmap.h (bitmap_head): Add constexpr default constructor
1669 poisoning the obstack member.
1670 (bitmap_head::crashme): Declare.
1671 (bitmap_release): New function clearing a bitmap and poisoning
1673 * gengtype.c (main): Make it recognize CONSTEXPR.
1674 * lra-constraints.c (lra_inheritance): Use bitmap_release
1675 instead of bitmap_clear.
1676 * ira.c (ira): Work around class-memaccess warning.
1677 * regrename.c (create_new_chain): Likewise.
1679 2018-12-06 Jakub Jelinek <jakub@redhat.com>
1681 PR tree-optimization/85726
1682 * generic-match-head.c (optimize_successive_divisions_p): New function.
1683 * gimple-match-head.c (optimize_successive_divisions_p): Likewise.
1684 * match.pd: Don't combine successive divisions if they aren't exact
1685 and optimize_successive_divisions_p is false.
1688 * tree-nested.c (convert_nonlocal_reference_stmt): Remove clobbers
1689 for non-local automatic decls.
1691 2018-12-05 David Edelsohn <dje.gcc@gmail.com>
1693 * config/rs6000/aix72.h (ASM_DEFAULT_SPEC): Match Power7 processor
1696 2018-12-05 Uros Bizjak <ubizjak@gmail.com>
1698 * dwarf2out.c (field_byte_offset): Remove
1699 #ifdef PCC_BITFIELD_TYPE_MATTERS check.
1701 2018-12-05 Richard Biener <rguenther@suse.de>
1702 Martin Sebor <msebor@redhat.com>
1705 * calls.c (get_attr_nonstring_decl): Avoid setting *REF to
1707 * gcc/gimple-low.c (lower_stmt): Fold builtin calls here.
1708 * gimplify (maybe_fold_stmt): Avoid folding builtin calls.
1710 2018-12-05 Iain Sandoe <iain@sandoe.co.uk>
1712 * configure.ac (gcc_cv_otool): Set.
1713 * configure: Regenerate.
1715 2018-12-05 Uros Bizjak <ubizjak@gmail.com>
1717 * config/i386/cygming.h (PCC_BITFIELD_TYPE_MATTERS): Remove.
1718 (GROUP_BITFIELDS_BY_ALIGN): Ditto.
1720 2018-12-05 Richard Sandiford <richard.sandiford@arm.com>
1722 PR tree-optimization/88064
1723 * tree-vect-patterns.c (vect_convert_input): Convert the result of
1724 an existing cast if it has the right width but the wrong sign.
1725 Do not test the signedness of the required result when
1726 considering whether to split an existing cast; instead split to
1727 a type with the same signedness as the source of the cast, then
1728 convert it to the opposite signedness where necessary.
1729 (vect_recog_over_widening_pattern): Handle sign changes between
1730 the final PLUS_EXPR and the RSHIFT_EXPR.
1731 (vect_recog_average_pattern): Use an unsigned operation when
1732 truncating an addition, subtraction or multiplication. Cast the
1733 result back to the "real" signedness before promoting.
1735 2018-12-05 Richard Biener <rguenther@suse.de>
1737 PR tree-optimization/86637
1738 * tree-vectorizer.c (pass_slp_vectorize::execute): Reset
1739 vect_location at the end.
1741 2018-12-05 Jakub Jelinek <jakub@redhat.com>
1743 PR tree-optimization/87360
1744 * gimple-loop-jam.c (tree_loop_unroll_and_jam): On failure to analyze
1745 data dependencies, don't return false, just continue. Formatting
1747 (merge_loop_tree, bb_prevents_fusion_p, unroll_jam_possible_p,
1748 fuse_loops): Formatting fixes.
1751 * cfgexpand.c (expand_stack_vars): If asan_vec is empty, start with
1752 aligning frame offset to ASAN_RED_ZONE_SIZE bytes.
1754 2018-12-05 Xianmiao Qu <xianmiao_qu@c-sky.com>
1756 * config.gcc (csky-*-linux-gnu*): Force .init_array support.
1758 2018-12-05 Segher Boessenkool <segher@kernel.crashing.org>
1760 * config/rs6000/rs6000.c (rs6000_function_arg): Only do the special
1761 aggregate handling on actual AIX, not on somewhat similar systems.
1762 (rs6000_arg_partial_bytes): Ditto.
1764 2018-12-04 Vladimir Makarov <vmakarov@redhat.com>
1766 PR rtl-optimization/88317
1767 * lra-constraints.c (split_reg): Don't set up check_only_regs if
1768 we are outside the inheritance pass.
1770 2018-12-04 Jan Hubicka <hubicka@ucw.cz>
1772 * ipa-prop.c (jump_function_useful_p): New.
1773 (ipa_read_node_info): Do not allocated useless jump functions.
1775 2018-12-04 David Malcolm <dmalcolm@redhat.com>
1778 * spellcheck.c (selftest::test_suggestions): Add another assertion.
1780 2018-12-04 Martin Sebor <msebor@redhat.com>
1782 * doc/extend.texi (__builtin_has_attribute): Fix typo.
1784 2018-12-04 Jakub Jelinek <jakub@redhat.com>
1787 * config/rs6000/rs6000.c (ccr_bit): Return -1 instead of assertion
1789 (print_operand): Use REG_P instead of GET_CODE == REG.
1790 <case 'D'>: Also check CR_REGNO_P (REGNO (x)).
1791 <case 't'>: Likewise. Remove GET_MODE check.
1792 * config/rs6000/rs6000.md (scc patterns): Assert ccr_bit didn't
1795 2018-12-04 Martin Sebor <msebor@redhat.com>
1797 * doc/extend.texi (attribute aligned): Expand.
1799 2018-12-04 David Edelsohn <dje.gcc@gmail.com>
1802 * config/rs6000/rs6000.c (rs6000_function_arg): Don't pass aggregates
1804 (rs6000_arg_partial_bytes): Same.
1806 2018-12-04 Vladimir Makarov <vmakarov@redhat.com>
1809 * ira-costs.c (exec): Try bigger class to use smaller register
1812 2018-12-04 Michael Ploujnikov <michael.ploujnikov@oracle.com>
1815 * ipa-cp.c (create_specialized_node): Track clone counters by
1816 node assembler names.
1817 (ipcp_driver): Change type of clone_num_suffixes key to const char*.
1819 2018-12-04 Richard Biener <rguenther@suse.de>
1821 * tree-vect-loop.c (vect_transform_loop): Fix epilogue iterations
1822 for epilogue vectorization.
1824 2018-12-04 Richard Biener <rguenther@suse.de>
1826 PR tree-optimization/88301
1827 * tree-vrp.c (register_edge_assert_for_2): Fix sign-conversion
1828 issues in last commit.
1830 2018-12-04 Richard Biener <rguenther@suse.de>
1832 PR tree-optimization/88315
1833 * tree-vect-loop.c (get_initial_defs_for_reduction): Simplify
1834 and fix initialization vector for SAD and DOT_PROD SLP reductions.
1836 2018-12-03 Sandra Loosemore <sandra@codesourcery.com>
1839 * doc/extend.texi (Nonlocal gotos): New section.
1841 2018-12-03 Uros Bizjak <ubizjak@gmail.com>
1843 * config/i386/sse.md (vec_concatv2df): Change (v,xm,C)
1844 alternative to (v,vm,c).
1846 2018-12-03 Segher Boessenkool <segher@kernel.crashing.org>
1848 * gcc/config.gcc (Unsupported targets): Add powerpc*-*-linux*paired*.
1849 (powerpc*-*-linux*): Don't handle it here.
1851 2018-12-03 Jeff Law <law@redhat.com>
1853 * config/h8300/h8300.md (<code>qi3_1): Add gcc_unreachable to keep
1856 * config/h8300/h8300.md (low byte masking peepholes): Only accept
1857 nonimmediate_operand for the to-be-masked operand.
1859 2018-12-03 Richard Biener <rguenther@suse.de>
1861 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1862 allow expected function-pointer cast re-instantiation.
1864 2018-12-03 Ilya Leoshkevich <iii@linux.ibm.com>
1866 * common/config/s390/s390-common.c (s390_option_init_struct):
1867 Use section anchors by default.
1868 * config/s390/s390.c (s390_check_symref_alignment): Handle
1870 (TARGET_MAX_ANCHOR_OFFSET): Use short displacement.
1871 * output.h (assemble_align): Pass `align' as unsigned int, so
1872 that the value 0x80000000, which corresponds to `aligned(1 <<
1873 28)', would pass the `align > BITS_PER_UNIT' check.
1874 * varasm.c (assemble_align): Likewise.
1876 2018-12-03 Julian Brown <julian@codesourcery.com>
1878 * tree-pretty-print.c (dump_omp_clause): Make default case
1881 2018-12-03 Richard Biener <rguenther@suse.de>
1883 PR tree-optimization/88301
1884 * tree-vrp.c (register_edge_assert_for_2): Handle conversions
1885 that do not change the value by registering the same assert
1888 2018-12-03 Richard Biener <rguenther@suse.de>
1890 * tree-vect-loop.c (vect_transform_loop): Properly compute
1891 upper bound for the epilogue when doing epilogue vectorization.
1893 2018-12-03 Ilya Leoshkevich <iii@linux.ibm.com>
1896 * cfgcleanup.c (class pass_postreload_jump): New pass.
1897 (pass_postreload_jump::execute): Likewise.
1898 (make_pass_postreload_jump): Likewise.
1899 * passes.def: Add pass_postreload_jump before
1900 pass_postreload_cse.
1901 * tree-pass.h (make_pass_postreload_jump): New pass.
1903 2018-12-02 Uros Bizjak <ubizjak@gmail.com>
1905 * config/i386/i386.c (inline_memory_move_cost): Correctly
1906 compute number of TFmode GPR moves.
1908 2018-12-02 Jakub Jelinek <jakub@redhat.com>
1911 * config/i386/sse.md (*vec_concatv4sf_0, *vec_concatv4si_0): New insns.
1913 2018-12-02 Jeff Law <law@redhat.com>
1915 * config/h8300/h8300.md (call, call_value): Drop mode from
1916 operand containing number of bytes pushed.
1917 (call_insn, call_value_insn): Use mode iterator for number
1918 of bytes pushed operand. Make pattern name vary appropriately.
1920 2018-12-02 Jan Hubicka <jh@suse.cz>
1922 * bb-reorer.c (find_rarely_executed_basic_blocks_and_crossin_edges):
1923 trust precise profiles.
1925 2018-12-02 Jakub Jelinek <jakub@redhat.com>
1927 * tree-nested.c (convert_nonlocal_omp_clauses,
1928 convert_local_omp_clauses): Handle OMP_CLAUSE_IN_REDUCTION,
1929 OMP_CLAUSE_TASK_REDUCTION and OMP_CLAUSE__SIMT_ clauses.
1930 (convert_nonlocal_reference_stmt, convert_local_reference_stmt):
1931 Convert clauses for GIMPLE_OMP_TASKGROUP.
1933 * omp-low.c (check_omp_nesting_restrictions): Allow cancel or
1934 cancellation point with taskgroup clause inside of taskloop. Consider
1935 a taskloop construct without nogroup clause as implicit taskgroup for
1936 diagnostics if cancel/cancellation point with taskgroup clause is
1937 closely nested inside of taskgroup region.
1940 * asan.c (asan_clear_shadow): Move assert that len is multiple of 4
1941 to the start of the function.
1942 (asan_emit_stack_protection): When emitting clearing sequence for
1943 epilogue, align offset down to ASAN_RED_ZONE_SIZE granularity,
1944 add last_size_aligned which is last_size padded to multiples of
1945 ASAN_RED_ZONE_SIZE and emit asan_clear_shadow always on 4 byte
1948 2018-12-01 Jakub Jelinek <jakub@redhat.com>
1951 * asan.c (asan_redzone_buffer::flush_redzone_payload): Fix up
1952 an off-by-one for BYTES_BIG_ENDIAN.
1955 * combine.c (find_split_point): For invalid memory address
1956 nonobj + obj + const, if reg + obj + const is valid addressing
1957 mode, split at nonobj. Use if rather than else if for the
1958 fallback. Comment fixes.
1960 2018-11-30 Indu Bhagat <indu.bhagat@oracle.com>
1962 * coverage.c (get_coverage_counts): Use from_function_decl for precise
1964 * profile-count.c (profile_count::dump): Add handling for precise
1966 * profile.c (compute_branch_probabilities): Rely on exec_counts instead
1967 of profile_info to set profile_status of function.
1968 (branch_prob): Do not set profile_status of function based on
1969 profile_info. Done above based on exec_counts.
1971 2018-11-30 Jakub Jelinek <jakub@redhat.com>
1973 PR tree-optimization/88274
1974 * tree-ssa-reassoc.c (optimize_range_tests_xor,
1975 optimize_range_tests_diff): If type has smaller precision than
1976 corresponding mode or if it has non-standard min/max, compute
1977 everything in a standard type for the precision.
1980 * params.def (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT): New param.
1981 * tree-ssa-ifcombine.c (ifcombine_ifandif): If
1982 --param logical-op-non-short-circuit is present, override
1983 LOGICAL_OP_NON_SHORT_CIRCUIT value from the param.
1984 * fold-const.c (fold_range_test, fold_truth_andor): Likewise.
1986 2018-11-30 Jeff Law <law@redhat.com>
1988 * optabs.c (expand_binop): Use "machine_mode" rather than
1989 "enum machine mode" in most recent change.
1991 2018-11-30 Wilco Dijkstra <wdijkstr@arm.com>
1994 * builtins.c (expand_builtin_longjmp): Use a temporary when restoring
1996 (expand_builtin_nonlocal_goto): Likewise.
1998 2018-11-30 David Malcolm <dmalcolm@redhat.com>
2000 * diagnostic-core.h (emit_diagnostic): New decl.
2001 * diagnostic.c (emit_diagnostic): New overload, taking a
2004 2018-11-30 David Malcolm <dmalcolm@redhat.com>
2006 * pretty-print.c (class selftest::test_pretty_printer): New
2007 subclass of pretty_printer.
2008 (selftest::test_prefixes_and_wrapping): New test.
2009 (selftest::pretty_print_c_tests): Call it.
2011 2018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2013 Minimize clone counter memory usage in create_virtual_clone.
2014 * cgraph.h (clone_function_name): Add a variant that takes a
2016 * cgraph.h (cgraph_node::create_virtual_clone): Add a new
2017 argument: num_suffix.
2018 * cgraphclones.c (cgraph_node::create_virtual_clone): Pass
2019 num_suffix to clone_function_name.
2020 (clone_function_name): Add a variant that takes a tree decl.
2021 * ipa-cp.c (create_specialized_node): Keep track of clone
2022 counters in clone_num_suffixes hash map.
2023 (ipcp_driver): Free the counter hash map.
2024 * ipa-hsa.c (process_hsa_functions): Creates at most one hsa
2027 2018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2028 Make function assembly more independent.
2030 This is achieved by having clone_function_name assign unique clone
2031 numbers for each function independently.
2033 * cgraphclones.c: Replaced clone_fn_id_num with clone_fn_ids;
2035 (clone_function_name_numbered): Use clone_fn_ids.
2037 2018-11-30 Vladimir Makarov <vmakarov@redhat.com>
2039 PR rtl-optimization/88179
2040 * lra-constraints.c (address_eliminator::address_eliminator):
2041 Don't eleminate regs in illegitimate address.
2043 2018-11-30 David Malcolm <dmalcolm@redhat.com>
2045 PR preprocessor/88257
2046 * input.c (get_substring_ranges_for_loc): Fix indentation.
2047 Bulletproof against getting a different files back from
2048 linemap_resolve_location and expand_location_to_spelling_point.
2050 2018-11-30 Alexander Monakov <amonakov@ispras.ru>
2052 PR gcov-profile/88279
2053 * tree-profile.c (init_ic_make_global_vars): Call
2054 decl_default_tls_model for variable and not it's type.
2056 2018-11-30 Sam Tebbs <sam.tebbs@arm.com>
2058 * config/arm/arm.h (TARGET_DOTPROD): Add TARGET_VFP5 constraint.
2060 2018-11-30 Martin Liska <mliska@suse.cz>
2063 * asan.c (asan_shadow_cst): Remove, partially transform
2064 into flush_redzone_payload.
2065 (RZ_BUFFER_SIZE): New.
2066 (struct asan_redzone_buffer): New.
2067 (asan_redzone_buffer::emit_redzone_byte): Likewise.
2068 (asan_redzone_buffer::flush_redzone_payload): Likewise.
2069 (asan_redzone_buffer::flush_if_full): Likewise.
2070 (asan_emit_stack_protection): Use asan_redzone_buffer class
2071 that is responsible for proper aligned stores and flushing
2072 of shadow memory payload.
2073 * asan.h (ASAN_MIN_RED_ZONE_SIZE): New.
2074 (asan_var_and_redzone_size): Likewise.
2075 * cfgexpand.c (expand_stack_vars): Use smaller alignment
2076 (ASAN_MIN_RED_ZONE_SIZE) in order to make shadow memory
2077 for automatic variables more compact.
2079 2018-11-30 Alan Modra <amodra@gmail.com>
2081 * config/rs6000/predicates.md (easy_fp_constant): Avoid long
2082 dependent insn sequences.
2083 * config/rs6000/rs6000.c (num_insns_constant): Support long
2085 * config/rs6000/rs6000.md (mov<mode>_softfloat <FMOVE128>): Adjust
2088 2018-11-30 Alan Modra <amodra@gmail.com>
2090 * config/rs6000/rs6000.c (num_insns_constant_gpr): Renamed from
2091 num_insns_constant_wide. Make static. Revise comment.
2092 (num_insns_constant_multi): New function.
2093 (num_insns_constant): Formatting. Correct CONST_WIDE_INT
2094 calculation. Simplify and extract code common to both
2095 CONST_INT and CONST_DOUBLE. Add gcc_unreachable for unhandled
2097 * config/rs6000/rs6000-protos.h (num_insns_const_wide): Delete.
2099 2018-11-30 Richard Biener <rguenther@suse.de>
2101 PR tree-optimization/88274
2102 * tree-vrp.c (ranges_from_anti_range): Fix handling of
2105 2018-11-29 Andi Kleen <ak@linux.intel.com>
2107 * config/i386/i386.c (current_fentry_section): Add.
2108 (x86_function_profiler): Handle fentry section.
2109 (ix86_attribute_table): Add fentry section.
2110 * config/i386/i386.opt: Add -mfentry-section.
2111 * doc/extend.texi: Document fentry_section attribute.
2112 * doc/invoke.texi: Document -mfentry-section.
2114 2018-11-29 Andi Kleen <ak@linux.intel.com>
2116 * config/i386/i386.c (x86_print_call_or_nop): Handle nop name.
2117 (current_fentry_name): Add.
2118 (x86_function_profiler): Handle fentry_name attribute.
2119 (ix86_handle_fentry_name): Add.
2120 (ix86_attribute_table): Add fentry_name.
2121 * config/i386/i386.opt: Add -mfentry-name
2122 * doc/extend.texi: Document fentry_name.
2123 * doc/invoke.texi: Document minstrument-return.
2125 2018-11-29 Andi Kleen <ak@linux.intel.com>
2127 * config/i386/i386-opts.h (enum instrument_return): Add.
2128 * config/i386/i386.c (output_return_instrumentation): Add.
2129 (ix86_output_function_return): Call output_return_instrumentation.
2130 (ix86_output_call_insn): Call output_return_instrumentation.
2131 * config/i386/i386.opt: Add -minstrument-return=.
2132 * doc/invoke.texi (-minstrument-return): Document.
2134 2018-11-29 Eric Botcazou <ebotcazou@adacore.com>
2137 * config/sparc/sparc-modes.def: Minor tweak.
2138 * config/sparc/sparc.c: Minor reordering.
2139 (sparc_pass_by_reference): Move around.
2140 (traverse_record_type): Change offset from HOST_WIDE_INT to int.
2141 (classify_registers): Likewise for bitpos.
2142 (function_arg_slotno): Remove dead test and tweak comments.
2143 <MODE_RANDOM>: Remove useless assertion and test whether the
2144 parameter is named in order to pass it in FP registers. Return
2145 the regno for floating-point vector types.
2146 (compute_int_layout): Change bitpos from HOST_WIDE_INT to int.
2147 (compute_fp_layout): Likewise.
2148 (count_registers): Likewise.
2149 (assign_int_registers): Likewise.
2150 (assign_fp_registers): Likewise.
2151 (assign_registers): Likewise.
2152 (function_arg_record_value): Change size from HOST_WIDE_INT to int
2153 and use CEIL_NWORDS to compute the number of registers.
2154 (function_arg_union_value): Minor tweaks.
2155 (function_arg_vector_value): Add slotno and named parameters, use
2156 CEIL_NWORDS to compute the number of registers.
2157 (sparc_function_arg_1): Rework handling of vector types. Change
2158 size from HOST_WIDE_INT to int.
2159 (sparc_arg_partial_bytes): Rework handling of 32-bit ABI and deal
2160 with vector types for the 64-bt ABI.
2161 (sparc_function_arg_advance): Likewise.
2162 (sparc_return_in_memory): Add reference to -fpcc-struct-return.
2163 (sparc_struct_value_rtx): Return NULL_RTX instead of 0.
2164 (sparc_function_value_1): Rework handling of vector types. Change
2165 size from HOST_WIDE_INT to int.
2167 2018-11-29 Jakub Jelinek <jakub@redhat.com>
2170 * config/i386/sse.md (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_lt,
2171 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_lt,
2172 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_shift,
2173 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_shift,
2174 *<sse2_avx2>_pmovmskb_lt, *<sse2_avx2>_pmovmskb_zext_lt): New
2175 define_insn_and_split patterns.
2178 * config/i386/sse.md
2179 (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
2180 *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
2181 *<sse4_1_avx2>_pblendvb_lt): Change define_insn into
2182 define_insn_and_split.
2184 2018-11-29 Peter Bergner <bergner@linux.ibm.com>
2187 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
2188 -mabi=ieeelongdouble without both -mpopcntd and -mvsx.
2190 2018-11-29 Uros Bizjak <ubizjak@gmail.com>
2192 * config/i386/i386.c (inline_memory_move_cost):
2193 Check "in" for 2 in MMX_CLASS_P case.
2194 * config/i386/mmx.md (*mov<mode>_internal): Correct
2195 TARGET_INTER_UNIT_MOVES_FROM_VEC and TARGET_INTER_UNIT_MOVES_TO_VEC
2196 alternatives in preferred_for_speed attribute calculation.
2198 2018-11-29 Martin Sebor <msebor@redhat.com>
2202 * doc/extend.texi (attribute constructor): Clarify.
2204 2018-11-29 Martin Liska <mliska@suse.cz>
2207 * builtins.c (expand_movstr): Fix thinko introduced
2208 when switching to the new enum.
2210 2018-11-29 qing zhao <qing.zhao@oracle.com>
2212 * cif-code.def (EXTERN_LIVE_ONLY_STATIC): New CIF code.
2213 * common.opt: Add -flive-patching flag.
2214 * doc/invoke.texi: Document -flive-patching.
2215 * flag-types.h (enum live_patching_level): New enum.
2216 * ipa-inline.c (can_inline_edge_p): Disable external functions from
2217 inlining when flag_live_patching is LIVE_PATCHING_INLINE_ONLY_STATIC.
2218 * opts.c (control_options_for_live_patching): New function.
2219 (finish_options): Make flag_live_patching incompatible with flag_lto.
2220 Control IPA optimizations based on different levels of
2223 2018-11-29 Giuliano Belinassi <giuliano.belinassi@usp.br>
2225 * match.pd (sinh (atanh (x))): New simplification rules.
2226 (cosh (atanh (x))): Likewise.
2228 2018-11-29 Jakub Jelinek <jakub@redhat.com>
2231 * config/i386/sse.md (ssebytemode): Add V16SI, V8SI and V4SI entries.
2232 (ssefltmodesuffix, ssefltvecmode): New define_mode_attrs.
2233 (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
2234 *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
2235 *<sse4_1_avx2>_pblendvb_lt): New define_insns.
2238 * tree.h (build_uniform_cst, uniform_integer_cst_p): Declare.
2239 * tree.c (build_uniform_cst, uniform_integer_cst_p): New functions.
2240 * match.pd (define_predicates): Add uniform_integer_cst_p.
2241 (cmp @0 INTEGER_CST@1, cmp (convert?@2 @0) INTEGER_CST@1): Adjust
2242 so that it works also for vector comparisons with uniform constants
2243 with INTEGER_CST element.
2246 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): For
2247 vec_add and vec_sub builtins, perform PLUS_EXPR or MINUS_EXPR
2248 in unsigned_type_for instead of vector integral type where overflow
2251 2018-11-29 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2253 There can be at most one .resolver clone per function
2254 * config/rs6000/rs6000.c (make_resolver_func): Generate
2255 resolver symbol with clone_function_name instead of
2256 clone_function_name_numbered.
2258 2018-11-29 Richard Biener <rguenther@suse.de>
2260 PR tree-optimization/88243
2261 * tree-vect-patterns.c (vect_mark_pattern_stmts): Set the def
2262 type of all pattern-sequence stmts to vect_internal_def.
2264 2018-11-29 Andre Vieira <andre.simoesdiasvieira@arm.com>
2267 * config/arm/arm-cpus.in (armv7-r): Add FP16conv configurations.
2268 (cortex-r7, cortex-r8): Update default and add new configuration.
2269 * doc/invoke.texi (armv7-r): Add two new vfp options.
2270 (nofp.dp): Add cortex-r7 and cortex-r8 to the list of targets that
2271 support this option.
2273 2018-11-29 Alan Modra <amodra@gmail.com>
2275 * config/rs6000/rs6000.c (rs6000_emit_move): Disable long
2276 double split for targets other than Darwin.
2278 2018-11-29 Alan Modra <amodra@gmail.com>
2280 * config/rs6000/rs6000.md (movdi_internal64): Correct lengths.
2282 2018-11-29 Alan Modra <amodra@gmail.com>
2284 * config/rs6000/predicates.md (easy_fp_constant): Remove code
2285 dealing with integers in const_double. Assert on unexpected
2286 modes. Delete superfluous ABI_V4 test.
2287 * config/rs6000/rs6000.c (rs6000_emit_move): Comment fixes.
2288 Don't call easy_fp_constant for Pmode.
2289 (rs6000_hash_constant): Remove code dealing with integers in
2291 (rs6000_legitimate_constant_p): Likewise.
2292 (output_toc): Formatting, use CONST_DOUBLE_P.
2294 2018-11-29 Alan Modra <amodra@gmail.com>
2296 * config/rs6000/constraints.md (G, H): Comment on purpose of
2297 constraint. Correct mode comments and "G" mode test.
2298 * config/rs6000/rs6000.md (movdi_internal32): Remove "GH" from
2299 alternative handling "F". Add length attr. Formatting.
2300 (mov<mode>_softfloat <FMOVE128>): Delete "GH" from
2301 alternative, and move "F" to separate alternative. Correct
2304 2018-11-29 Alan Modra <amodra@gmail.com>
2306 * config/rs6000/predicates.md (easy_vector_constant): Don't call
2309 2018-11-29 Alan Modra <amodra@gmail.com>
2311 * config.in (HAVE_AS_PLTSEQ): Add.
2312 * config/rs6000/predicates.md (indirect_call_operand): New.
2313 * config/rs6000/rs6000-protos.h (rs6000_pltseq_template),
2314 (rs6000_sibcall_sysv): Declare.
2315 * config/rs6000/rs6000.c (init_cumulative_args): Set cookie
2316 CALL_LONG for -fno-plt.
2317 (print_operand <T, z, 0>): Handle UNSPEC_PLTSEQ.
2318 (rs6000_indirect_call_template_1): Emit .reloc directives for
2319 UNSPEC_PLTSEQ calls.
2320 (rs6000_pltseq_template): New function.
2321 (rs6000_longcall_ref): Add arg parameter. Use PLT16 insns if
2322 relocs supported by assembler. Move SYMBOL_REF test to callers.
2323 (rs6000_call_aix): Adjust rs6000_longcall_ref call. Package
2324 insns in UNSPEC_PLTSEQ, preserving original func_desc.
2325 (rs6000_call_sysv): Likewise.
2326 (rs6000_sibcall_sysv): New function.
2327 * config/rs6000/rs6000.h (HAVE_AS_PLTSEQ): Provide default.
2328 * config/rs6000/rs6000.md (UNSPEC_PLTSEQ, UNSPEC_PLT16_HA,
2329 UNSPEC_PLT16_LO): New.
2330 (pltseq_tocsave, pltseq_plt16_ha, pltseq_plt16_lo, pltseq_mtctr): New.
2331 (call_indirect_nonlocal_sysv): Don't differentiate zero from non-zero
2332 cookie in constraints. Test explicitly for flags in length attr.
2333 Handle unspec operand 1.
2334 (call_value_indirect_nonlocal_sysv): Likewise.
2335 (call_indirect_aix, call_value_indirect_aix): Handle unspec operand 1.
2336 (call_indirect_elfv2, call_value_indirect_elfv2): Likewise.
2337 (sibcall, sibcall_value): Use rs6000_sibcall_sysv.
2338 (sibcall_indirect_nonlocal_sysv): New pattern.
2339 (sibcall_value_indirect_nonlocal_sysv): Likewise.
2340 (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Remove indirect
2342 * configure.ac: Check for gas plt sequence marker support.
2343 * configure: Regenerate.
2345 2018-11-29 Alan Modra <amodra@gmail.com>
2347 * config/rs6000/predicates.md (unspec_tls): New.
2348 * config/rs6000/rs6000-protos.h (rs6000_call_template),
2349 (rs6000_sibcall_template): Update prototype.
2350 (rs6000_longcall_ref): Delete.
2351 (rs6000_call_sysv): Declare.
2352 * config/rs6000/rs6000.c (edit_tls_call_insn): New function.
2353 (global_tlsarg): New variable.
2354 (rs6000_legitimize_tls_address): Rewrite __tls_get_addr call
2356 (print_operand): Extract UNSPEC_TLSGD address operand.
2357 (rs6000_call_template, rs6000_sibcall_template): Remove arg
2358 parameter, extract from second call operand instead.
2359 (rs6000_longcall_ref): Make static, localize vars.
2360 (rs6000_call_aix): Rename parameter to reflect new usage. Take
2361 tlsarg from global_tlsarg. Don't create unused rtl or nop insns.
2362 (rs6000_sibcall_aix): Rename parameter to reflect new usage. Take
2363 tlsarg from global_tlsarg.
2364 (rs6000_call_sysv): New function.
2365 * config/rs6000/rs6000.md: Adjust rs6000_call_template and
2366 rs6000_sibcall_template throughout.
2367 (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix, tls_gd_call_sysv): Delete.
2368 (tls_ld_aix, tls_ld_sysv, tls_ld_call_aix, tls_ld_call_sysv): Delete.
2369 (tls_gdld_nomark): New insn.
2370 (tls_gd): Swap operand order. Simplify mode selection.
2371 (tls_gd_high, tls_gd_low): Swap operand order.
2372 (tls_ld): Remove const_int 0 vector element from UNSPEC_TLSLD.
2373 Simplify mode selection.
2374 (tls_ld_high, tls_ld_low): Similarly adjust UNSPEC_TLSLD.
2375 (call, call_value): Don't assert for second call operand.
2376 Use rs6000_call_sysv.
2378 2018-11-29 Alan Modra <amodra@gmail.com>
2380 * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64),
2381 (call_nonlocal_darwin64, call_value_indirect_nonlocal_darwin64),
2382 (call_value_nonlocal_darwin64): Remove constraints from second call
2383 arg, the rounded_stack_size_rtx arg.
2384 * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix),
2385 (tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv, tls_ld_call_aix),
2386 (tls_ld_call_sysv, call_local32, call_local64, call_value_local32),
2387 (call_value_local64, call_indirect_nonlocal_sysv),
2388 (call_nonlocal_sysv, call_nonlocal_sysv_secure),
2389 (call_value_indirect_nonlocal_sysv, call_value_nonlocal_sysv),
2390 (call_value_nonlocal_sysv_secure, call_local_aix),
2391 (call_value_local_aix, call_nonlocal_aix, call_value_nonlocal_aix),
2392 (call_indirect_aix, call_value_indirect_aix, call_indirect_elfv2),
2393 (call_value_indirect_elfv2, sibcall_local32, sibcall_local64),
2394 (sibcall_value_local32, sibcall_value_local64, sibcall_aix),
2395 (sibcall_value_aix): Likewise.
2397 2018-11-29 Alan Modra <amodra@gmail.com>
2399 * config/rs6000/rs6000.md (TLSmode): Delete mode iterator. Replace
2400 with P throughout except for call mems which should use SI.
2401 (tls_abi_suffix, tls_sysv_suffix, tls_insn_suffix): Delete mode
2402 attributes. Replace with bits, mode and ptrload respectively.
2404 2018-11-29 Alan Modra <amodra@gmail.com>
2406 * config/rs6000/rs6000-protos.h (rs6000_indirect_call_template),
2407 (rs6000_indirect_sibcall_template): Declare.
2408 * config/rs6000/rs6000.c (rs6000_indirect_call_template_1),
2409 (rs6000_indirect_call_template, rs6000_indirect_sibcall_template):
2411 * config/rs6000/rs6000.md (call_indirect_nonlocal_sysv),
2412 (call_value_indirect_nonlocal_sysv, sibcall_nonlocal_sysv),
2413 (call_indirect_aix, call_value_indirect_aix): Use
2414 rs6000_indirect_call_template and rs6000_indirect_sibcall_template.
2415 call_indirect_elfv2, call_value_indirect_elfv2): Likewise, and
2416 handle both speculation and non-speculation cases.
2417 (call_indirect_aix_nospec, call_value_indirect_aix_nospec): Delete.
2418 (call_indirect_elfv2_nospec, call_value_indirect_elfv2_nospec): Delete.
2420 2018-11-29 Alan Modra <amodra@gmail.com>
2422 * config/rs6000/rs6000-protos.h (rs6000_call_template): Declare.
2423 (rs6000_sibcall_template): Declare.
2424 (macho_call_template): Rename from output_call.
2425 * config/rs6000/rs6000.c (rs6000_call_template_1): New function.
2426 (rs6000_call_template, rs6000_sibcall_template): Likewise.
2427 (macho_call_template): Rename from output_call.
2428 * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv),
2429 (tls_gd_call_aix, tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv),
2430 (tls_ld_call_aix, tls_ld_call_sysv, call_nonlocal_sysv),
2431 (call_nonlocal_sysv_secure, call_value_nonlocal_sysv),
2432 (call_value_nonlocal_sysv_secure, call_nonlocal_aix),
2433 (call_value_nonlocal_aix): Use rs6000_call_template and update
2434 occurrences of output_call to macho_call_template.
2435 (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv, sibcall_aix),
2436 (sibcall_value_aix): Use rs6000_sibcall_template.
2438 2018-11-28 Aaron Sawdey <acsawdey@linux.ibm.com>
2440 * config/rs6000/rs6000-string.c (expand_block_clear): Change how
2441 we determine if unaligned vsx is ok.
2443 2018-11-28 Jan Hubicka <jh@suse.cz>
2445 * predict.c (determine_unlikely_bbs): Forward declare; also determine
2446 edges that are always known to be taken because it is only likely
2447 edge out of given BB.
2448 (tree_estimate_probability): Call before profile guessing to get bit
2451 2018-11-28 Jan Hubicka <jh@suse.cz>
2453 * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Handle
2454 profile_probability::always better.
2456 2018-11-28 Jan Hubicka <jh@suse.cz>
2458 * profile-count.h (profile_count::split): Give better result when
2459 splitting profile_probability::always.
2461 2018-11-28 Vladimir Makarov <vmakarov@redhat.com>
2464 * ira-costs.c (scan_one_insn): Process subregs when updating costs
2465 for pseudos and allocnos from insn.
2467 2018-11-28 David Edelsohn <dje.gcc@gmail.com>
2469 * config/rs6000/aix72.h: Update to match aix71.h changes.
2471 2018-11-28 Jeff Law <law@redhat.com>
2473 * config/h8300/constraints.md: Add "C" constraint for call insns.
2474 * config/h8300/h8300.md (call, call_value): Turn into a define_expand
2475 and define_insn pair. Move invalid call targets into a register in
2476 the expander and fix constraints in the matching pattern.
2477 * config/h8300/predicates.md (call_expander_operand): Renamed from
2478 call_insn_operand. Reject things we shouldn't be trying to handle.
2479 (call_insn_operand): New predicate for use by the call/call_value
2481 (small_call_insn_operand): Update appropriately.
2483 2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
2485 * config/aarch64/aarch64.c (aarch64_process_target_attr): Replace
2486 calls to strtok with strtok_r.
2488 2018-11-28 Richard Biener <rguenther@suse.de>
2490 PR tree-optimization/88223
2491 * tree-ssa-sccvn.c (vn_reference_lookup_3): When skipping
2492 over a stored-same value may-alias store make sure to consider
2493 partial overlaps which are valid when TBAA reasonings do not
2494 apply and byte-granular overlaps are possible at all.
2496 2018-11-28 Richard Biener <rguenther@suse.de>
2498 PR tree-optimization/88217
2499 * vr-values.c (vr_values::extract_range_from_phi_node): Make
2500 sure to handle results > +INF and < -INF correctly when
2501 trying to drop down to +INF - 1 or -INF + 1.
2503 2018-11-28 Alan Modra <amodra@gmail.com>
2505 * xcoffout.c (do_block): Signed/unsigned warning fix.
2507 2018-11-28 Richard Biener <rguenther@suse.de>
2509 PR tree-optimization/79351
2510 * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
2511 empty CONSTRUCTORs ensure the store is at a constant position.
2513 2018-11-28 Richard Biener <rguenther@suse.de>
2515 PR tree-optimization/88229
2516 * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
2517 is an INTEGER_CST before accessing it so.
2519 2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
2521 * doc/invoke.texi (-mtune=): Remove obsolete CPU names.
2523 2018-11-28 Jakub Jelinek <jakub@redhat.com>
2526 * config/i386/i386.c (ix86_expand_sse_movcc): Handle DFmode and
2527 SFmode using sse4_1_blendvs[sd] with TARGET_SSE4_1. Formatting fixes.
2528 * config/i386/sse.md (sse4_1_blendv<ssemodesuffix>): New pattern.
2530 2018-11-27 Martin Liska <mliska@suse.cz>
2532 * gcov.c (generate_results): Append current_working_directory
2535 2018-11-27 Mike Gulick <mgulick@mathworks.com>
2537 PR preprocessor/83173
2538 * input.c (dump_location_info): Dump reason and included_from
2539 fields from line_map_ordinary struct. Fix indentation when
2540 location > 5 digits.
2541 * diagnostic-show-locus.c (num_digits, num_digits): Move to
2542 diagnostic.c to allow it to be utilized by input.c.
2543 * diagnostic.c (num_digits, selftest::test_num_digits): Moved
2545 (selftest::diagnostic_c_tests): Run selftest::test_num_digits.
2546 * diagnostic.h (num_digits): Add extern definition.
2548 2018-11-27 Fredrik Noring <noring@nocrew.org>
2550 * config/mips/mips.c (mips_reorg_process_insns)
2551 (mips_option_override): Handle `-mfix-r5900'.
2552 * config/mips/mips.h (ASM_SPEC): Add `mfix-r5900' and
2554 * config/mips/mips.opt (mfix-r5900): New option.
2555 * doc/invoke.texi: Document the `r5900' processor name, and
2556 `-mfix-r5900' and `-mno-fix-r5900' options.
2558 2018-11-27 Jakub Jelinek <jakub@redhat.com>
2561 * config/rs6000/rs6000.c (print_operand) <case 'D'>: Use
2562 output_operand_lossage instead of gcc_assert.
2563 <case 't'>: Likewise.
2564 <case 'z'>: Likewise.
2565 <case 'V'>: Use output_operand_lossage instead of gcc_unreachable.
2567 2018-11-27 Jeff Law <law@redhat.com>
2569 * config/riscv/riscv (riscv_block_mvoe_straight): Use RETURN_BEGIN
2570 in call to move_by_pieces.
2572 * config/sh/sh-mem.c (expand_block_move): Use RETURN_BEGIN in call
2575 * config/lm32/lm32.c (lm32_block_move_inline): Use RETURN_BEGIN in
2576 call to move_by_pieces.
2578 * config/mips/mips.c (mips_block_move_straight): Use RETURN_BEGIN
2579 in call to move_by_pieces.
2581 * config/microblaze/microblaze.c (microblaze_block_move_straight): Use
2582 RETURN_BEGIN in call to move_by_pieces.
2583 (microblaze_expand_block_move): Likewise.
2585 2018-11-27 Tamar Christina <tamar.christina@arm.com>
2587 * doc/md.texi (xorsign): Document it.
2589 2018-11-27 Martin Liska <mliska@suse.cz>
2591 * config/gnu-user.h (TARGET_F951_OPTIONS): New.
2592 * gcc.c (find_fortran_preinclude_file): New function
2593 to handle Fortran pre-include.
2595 2018-11-27 Martin Liska <mliska@suse.cz>
2597 * asan.c (asan_emit_stack_protection): Use new enum values
2598 instead of int constants.
2599 * builtins.c (expand_builtin_memory_copy_args): Replace int
2600 type with memop_ret enum type.
2601 (expand_builtin_mempcpy_args): Likewise.
2602 (expand_builtin_memcpy): Use new enum values
2603 instead of int constants. Likewise.
2604 (expand_builtin_mempcpy): Likewise.
2605 (expand_movstr): Likewise.
2606 (expand_builtin_strcpy_args): Likewise.
2607 (expand_builtin_stpcpy_1): Likewise.
2608 (expand_builtin_strncpy): Likewise.
2609 (expand_builtin_memset_args): Likewise.
2610 * expr.c (move_by_pieces_d::finish_endp): Rename to ...
2611 (move_by_pieces_d::finish_retmode): ... this.
2612 (move_by_pieces): Change last argument type to memop_ret.
2613 (store_by_pieces): Use new enum values
2614 instead of int constants.
2615 (emit_block_move_hints): Likewise.
2616 (emit_push_insn): Likewise.
2617 (store_expr): Likewise.
2618 * expr.h (store_by_pieces): Change int to newly added enum
2620 * rtl.h (enum memop_ret): Define.
2621 (move_by_pieces): Use the enum type.
2623 2018-11-27 Alan Modra <amodra@gmail.com>
2625 * config/rs6000/aix71.h (ASM_SPEC): Don't select default -maix64
2627 (ASM_CPU_SPEC): Do so here. Rewrite using if .. else if .. specs
2628 form. Error on missing -mcpu case.
2629 * config/rs6000/driver-rs6000.c (asm_names <_AIX>): Update NULL case.
2630 (asm_names <!_AIX>): Add missing cpus. Update NULL case. Apply
2631 PR63177 fix for -mcpu=power8 and -mcpu=powerpc64le.
2632 * config/rs6000/rs6000.h (ASM_CPU_SPEC): Rewrite using if ..
2633 else if .. specs form. Error on missing -mcpu case. Don't output
2634 duplicate -maltivec. Apply PR63177 fix for -mcpu=powerpc64le.
2636 2018-11-26 David Malcolm <dmalcolm@redhat.com>
2638 * dump-context.h (dump_context::dump_loc): Convert 1st param from
2639 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
2640 const dump_location_t & to const dump_user_location_t &.
2641 (dump_context::dump_loc_immediate): Convert 2nd param from
2642 const dump_location_t & to const dump_user_location_t &.
2643 (dump_context::dump_gimple_stmt): Convert 1st param from
2644 dump_flags_t to const dump_metadata_t &.
2645 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
2646 2nd param from const dump_location_t & to
2647 const dump_user_location_t &.
2648 (dump_context::dump_gimple_expr): Convert 1st param from
2649 dump_flags_t to const dump_metadata_t &.
2650 (dump_context::dump_gimple_expr_loc): Likewise; convert
2651 2nd param from const dump_location_t & to
2652 const dump_user_location_t &.
2653 (dump_context::dump_generic_expr): Convert 1st param from
2654 dump_flags_t to const dump_metadata_t &.
2655 (dump_context::dump_generic_expr_loc): Likewise; convert
2656 2nd param from const dump_location_t & to
2657 const dump_user_location_t &.
2658 (dump_context::dump_printf_va): Convert 1st param from
2659 dump_flags_t to const dump_metadata_t &.
2660 (dump_context::dump_printf_loc_va): Likewise; convert
2661 2nd param from const dump_location_t & to
2662 const dump_user_location_t &.
2663 (dump_context::dump_dec): Convert 1st param from
2664 dump_flags_t to const dump_metadata_t &.
2665 (dump_context::dump_symtab_node): Likewise.
2666 (dump_context::begin_scope): Split out 2nd param into
2667 user and impl locations.
2668 (dump_context::ensure_pending_optinfo): Add metadata param.
2669 (dump_context::begin_next_optinfo): Replace dump_location_t param
2670 with metadata and user location.
2671 * dumpfile.c (dump_context::dump_loc): Convert 1st param from
2672 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
2673 const dump_location_t & to const dump_user_location_t &.
2674 (dump_context::dump_loc_immediate): Convert 2nd param from
2675 const dump_location_t & to const dump_user_location_t &.
2676 (dump_context::dump_gimple_stmt): Convert 1st param from
2677 dump_flags_t to const dump_metadata_t &.
2678 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
2679 2nd param from const dump_location_t & to
2680 const dump_user_location_t &.
2681 (dump_context::dump_gimple_expr): Convert 1st param from
2682 dump_flags_t to const dump_metadata_t &.
2683 (dump_context::dump_gimple_expr_loc): Likewise; convert
2684 2nd param from const dump_location_t & to
2685 const dump_user_location_t &.
2686 (dump_context::dump_generic_expr): Convert 1st param from
2687 dump_flags_t to const dump_metadata_t &.
2688 (dump_context::dump_generic_expr_loc): Likewise; convert
2689 2nd param from const dump_location_t & to
2690 const dump_user_location_t &.
2691 (dump_context::dump_printf_va): Convert 1st param from
2692 dump_flags_t to const dump_metadata_t &.
2693 (dump_context::dump_printf_loc_va): Likewise; convert
2694 2nd param from const dump_location_t & to
2695 const dump_user_location_t &.
2696 (dump_context::dump_dec): Convert 1st param from
2697 dump_flags_t to const dump_metadata_t &.
2698 (dump_context::dump_symtab_node): Likewise.
2699 (dump_context::begin_scope): Split out 2nd param into
2700 user and impl locations.
2701 (dump_context::ensure_pending_optinfo): Add metadata param.
2702 (dump_context::begin_next_optinfo): Replace dump_location_t param
2703 with metadata and user location.
2704 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
2705 const dump_metadata_t &.
2706 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
2707 const dump_location_t & to const dump_user_location_t &.
2708 (dump_gimple_expr): Convert 1st param from dump_flags_t to
2709 const dump_metadata_t &.
2710 (dump_gimple_expr_loc): Likewise; convert 2nd param from
2711 const dump_location_t & to const dump_user_location_t &.
2712 (dump_generic_expr): Convert 1st param from dump_flags_t to
2713 const dump_metadata_t &.
2714 (dump_generic_expr_loc): Likewise; convert 2nd param from
2715 const dump_location_t & to const dump_user_location_t &.
2716 (dump_printf): Convert 1st param from dump_flags_t to
2717 const dump_metadata_t &.
2718 (dump_printf_loc): Likewise; convert 2nd param from
2719 const dump_location_t & to const dump_user_location_t &.
2720 (dump_dec): Convert 1st param from dump_flags_t to
2721 const dump_metadata_t &.
2722 (dump_symtab_node): Likewise.
2723 (dump_begin_scope): Split out 2nd param into user and impl
2725 (selftest::assert_impl_location_eq): New function.
2726 (ASSERT_IMPL_LOCATION_EQ): New macro.
2727 (selftest::test_impl_location): Update to use
2728 ASSERT_IMPL_LOCATION_EQ.
2729 (selftest::test_capture_of_dump_calls): Convert "loc" to
2730 dump_user_location_t. Add ASSERT_IMPL_LOCATION_EQ throughout,
2731 verifying line numbers of dump emissions.
2732 * dumpfile.h (class dump_metadata_t): New class.
2733 (dump_printf): Convert 1st param from dump_flags_t to
2734 const dump_metadata_t &.
2735 (dump_printf_loc): Likewise; convert 2nd param from
2736 const dump_location_t & to const dump_user_location_t &.
2737 (dump_generic_expr_loc): Likewise.
2738 (dump_generic_expr): Convert 1st param from dump_flags_t to
2739 const dump_metadata_t &.
2740 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
2741 const dump_location_t & to const dump_user_location_t &.
2742 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
2743 const dump_metadata_t &.
2744 (dump_gimple_expr_loc): Likewise; convert 2nd param from
2745 const dump_location_t & to const dump_user_location_t &.
2746 (dump_gimple_expr): Convert 1st param from dump_flags_t to
2747 const dump_metadata_t &.
2748 (dump_symtab_node): Likewise.
2749 (dump_dec): Likewise.
2750 (dump_begin_scope): Split out 2nd param into user and impl
2752 (auto_dump_scope::auto_dump_scope): Split "loc" param into a user
2753 location and impl_location, and capture the impl_location.
2754 (AUTO_DUMP_SCOPE): Rename param from LOC to USER_LOC.
2755 * loop-unroll.c (report_unroll): Update for changes to
2756 dump_printf_loc and dump_printf.
2757 * opt-problem.cc (opt_problem::opt_problem): Update for change to
2759 * optinfo-emit-json.cc
2760 (selftest::test_building_json_from_dump_calls): Convert "loc" from
2761 dump_location_t to dump_user_location_t.
2762 * optinfo.cc (optinfo::emit_for_opt_problem): Update for change in
2764 * profile.c (compute_branch_probabilities): Update for change to
2766 * selftest.h (ASSERT_STR_CONTAINS_AT): New macro.
2767 * tree-vect-slp.c (vect_print_slp_tree): Update for change to
2770 2018-11-27 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2772 * doc/sourcebuild.texi: Document check_effective_target_int_eq_float
2773 and check_effective_target_ptr_eq_long.
2775 2018-11-27 Alan Modra <amodra@gmail.com>
2777 * config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*),
2778 (powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*),
2779 (powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*),
2780 (powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*),
2781 (powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file.
2782 * config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC),
2783 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
2784 (ASM_APP_ON, ASM_APP_OFF): Don't define.
2785 * config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
2786 * config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
2787 * config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
2788 * config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC),
2789 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
2790 * config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
2791 * config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine.
2792 (GNU_USER_TARGET_CRTN): Redefine.
2793 (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
2794 (LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
2795 (CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define.
2796 (STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC.
2797 (ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC.
2798 (UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define.
2799 (LINK_EH_SPEC): Don't define.
2801 2018-11-26 Martin Sebor <msebor@redhat.com>
2804 * expr.c (string_constant): Handle top-level decls of all character
2805 types and subobjects of narrow character type.
2807 2018-11-27 Alan Modra <amodra@gmail.com>
2809 * config.gcc (powerpc*-*-linux*): Add linux.h to tm_file.
2810 * config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use
2811 GNU_USER_TARGET_OS_CPP_BUILTINS.
2812 (RS6000_ABI_NAME): Define.
2813 * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use
2814 GNU_USER_TARGET_OS_CPP_BUILTINS.
2815 (MUSL_DYNAMIC_LINKER32): Undef before defining.
2816 (UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define.
2817 (CHOOSE_DYNAMIC_LINKER): Don't define.
2818 (GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define.
2819 * config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining.
2820 (CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when
2821 not already defined.
2822 (CPP_OS_LINUX_SPEC): Remove defines and asserts handled by
2823 TARGET_OS_CPP_BUILTINS.
2825 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2827 * doc/sourcebuild.texi: Document check_effective_target_newlib_nano_io.
2829 2018-11-26 Jakub Jelinek <jakub@redhat.com>
2832 * config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64
2833 and !TARGET_64BIT, return NULL_TREE.
2836 * dwarf2out.c (secname_for_decl): For functions with
2837 DECL_SECTION_NAME if in_cold_section_p, try to return
2838 current_function_section's name if it is a named section.
2840 2018-11-26 Maya Rashish <coypu@sdf.org>
2843 * config.host (*-*-netbsd*): Use x-netbsd and host-netbsd.o.
2844 * config/x-netbsd: New file.
2845 * config/host-netbsd: New file.
2847 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2849 * doc/sourcebuild.texi: Document check_effective_target_size20plus.
2850 Clarify documentation for check_effective_target_size32plus.
2852 2018-11-26 Aaron Sawdey <acsawdey@linux.ibm.com>
2854 * config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
2855 and modify expand_strncmp_vec_sequence.
2856 (emit_final_compare_vec): Rename and modify emit_final_str_compare_vec.
2857 (generate_6432_conversion): New function.
2858 (expand_block_compare): Add support for vsx.
2859 (expand_block_compare_gpr): New function.
2860 * config/rs6000/rs6000.opt (rs6000_block_compare_inline_limit): Increase
2861 default limit to 63 because of more compact vsx code.
2863 2018-11-26 Uros Bizjak <ubizjak@gmail.com>
2866 * config/i386/i386.c (dbx_register_map): Use IGNORED_DWARF_REGNUM
2867 for registers for which no debug information can be generated.
2868 Use INVALID_REGNUM for non-existent registers.
2869 (dbx64_register_map): Ditto.
2870 (svr4_dbx_register_map): Ditto.
2872 2018-11-26 Sandra Loosemore <sandra@codesourcery.com>
2875 * doc/invoke.texi (Optimize Options): Document that
2876 -freorder-functions also uses "hot" and "cold" attributes.
2878 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2880 * config/aarch64/aarch64.c (aarch64_mangle_type): Fix typo in comment.
2882 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2884 * config/arm/types.md (mul64): Rename to...
2885 (widen_mul64): ... This.
2886 * config/arm/arm-generic.md: Rename mul64 to widen_mul64.
2887 * config/arm/cortex-a15.md: Likewise.
2888 * config/arm/cortex-a5.md: Likewise.
2889 * config/arm/cortex-a53.md: Likewise.
2890 * config/arm/cortex-a57.md: Likewise.
2891 * config/arm/cortex-a7.md: Likewise.
2892 * config/arm/cortex-m4.md: Likewise.
2893 * config/arm/exynos-m1.md: Likewise.
2894 * config/arm/marvell-pj4.md: Likewise.
2895 * config/arm/xgene1.md: Likewise.
2897 2018-11-26 Richard Biener <rguenther@suse.de>
2899 PR tree-optimization/88182
2900 * tree-vect-loop.c (vectorizable_reduction): Pick up single
2901 correct reduc_def_info.
2902 * tree-vect-slp.c (vect_analyze_slp_instance): Set
2903 STMT_VINFO_REDUC_DEF of the first stmt.
2905 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
2907 * doc/invoke.texi: Document z14/arch12 -march option.
2909 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
2912 * doc/invoke.texi (Option Summary): Add -Wmissing-noreturn.
2913 (Warning Options): Likewise.
2915 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
2918 * doc/extend.texi (Common Function Attributes): Clarify that
2919 functions with "const" attribute can read const global variables.
2921 2018-11-26 Alan Modra <amodra@gmail.com>
2923 * config/rs6000/rs6000.h (OBJECT_PEF, TARGET_MACOS): Delete.
2925 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
2928 * doc/extend.texi (Common Variable Attributes): Use preferred
2929 placement of type attributes in examples, plus whitespace fixes.
2930 (Type Attributes): Clarify why placement of attributes
2931 immediately after struct/union/enum keyword is preferred.
2932 (Common Type Attributes): Use preferred placement of type
2933 attributes in examples, plus more whitespace fixes.
2935 2018-11-25 Paul Koning <ni1d@arrl.net>
2937 * config/pdp11/pdp11.h (TARGET_HAS_NO_HW_DIVIDE): Define.
2939 2018-11-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2941 * doc/sourcebuild.texi (Effective-Target Keywords, Environment
2942 attributes): Document d_runtime.
2944 2018-11-25 Vladimir Makarov <vmakarov@redhat.com>
2947 * ira-costs.c (record_operand_costs): Initiate register move cost
2950 2018-11-23 Jeff Law <law@redhat.com>
2952 PR rtl-optimization/87468
2953 * tree-ssa-threadupdate.c (create_block_for_threading): Clear
2954 EDGE_IGNORE on all outgoing edges of the duplicate block.
2956 2018-11-23 Vladimir Makarov <vmakarov@redhat.com>
2959 * ira-costs.c (record_operand_costs): Use bigger hard reg class if
2960 its mode does not fit to the original class.
2962 2018-11-23 Martin Sebor <msebor@redhat.com>
2964 PR tree-optimization/87756
2965 * expr.c (string_constant): Synthesize a string literal from
2966 the address of a constant character.
2967 * tree.c (build_string_literal): Add an argument.
2968 * tree.h (build_string_literal): Same.
2970 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
2972 * config/aarch64/aarch64-cores.def: Define emag.
2973 * config/aarch64/aarch64-tune.md: Regenerated with emag.
2974 * config/aarch64/aarch64.c (emag_tunings): New struct.
2975 * doc/invoke.texi: Document mtune value.
2977 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
2978 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2980 * config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings
2982 * config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific
2984 * config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post-modify
2986 * config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
2989 2018-11-23 Richard Biener <rguenther@suse.de>
2991 PR tree-optimization/88149
2992 * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
2993 the case where there are two different def types for the
2994 same operand at different operand position in the same stmt.
2996 2018-23-11 Mihail Ionescu <mihail.ionescu@arm.com>
2998 * config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
2999 gen_atomic_compare_swap_1.
3000 (arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
3001 (arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
3002 (arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
3003 (arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
3004 (arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
3006 * config/arm/arm.md (neon_vext<mode>),
3007 (neon_vrev64<mode>, neon_vrev32<mode>),
3008 (neon_vrev16<mode>, neon_vtrn<mode>_internal),
3009 (neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
3010 before the pattern name.
3011 * config/arm/sync.md:
3012 (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
3013 (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
3015 2018-11-23 Jakub Jelinek <jakub@redhat.com>
3017 PR tree-optimization/86614
3018 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
3019 if TREE_NO_WARNING is set on ref.ref.
3021 2018-11-22 Sandra Loosemore <sandra@codesourcery.com>
3022 Alan Coopersmith <alan.coopersmith@oracle.com>
3025 * doc/extend.texi (Designated Inits): Clarify handling of multiple
3026 initializers for unions.
3028 2018-11-22 Jan Hubicka <jh@suse.cz>
3031 * ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
3032 parameters; do not warn here.
3033 (odr_subtypes_equivalent_p): Likewise.
3034 (warn_odr): Fix typo.
3035 (warn_types_mismatch): Do not output confused warnings on integer types.
3036 (odr_types_equivalent_p): Update.
3038 2018-11-22 Jakub Jelinek <jakub@redhat.com>
3040 * config/i386/i386.c (ix86_option_override_internal,
3041 ix86_can_inline_p, classify_argument, construct_container,
3042 ix86_expand_prologue, ix86_expand_split_stack_prologue,
3043 ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
3044 expand_setmem_epilogue_via_loop, promote_duplicated_reg,
3045 ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
3048 * config/i386/i386.c (ix86_option_override_internal): For
3049 stack_protector_guard related options, use opts_set->x_ instead
3050 of global_options_set. and prefix options with opts->x_ . Move
3051 defaults for offset and reg into else block.
3053 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
3055 * config/i386/i386.c (ix86_check_avx_upper_register):
3056 Return true for all SSE registers with mode bitsize > 128.
3058 2018-11-22 Vladimir Makarov <vmakarov@redhat.com>
3060 PR rtl-optimization/87718
3061 * ira-costs.c: Remove trailing white-spaces.
3062 (record_operand_costs): Add a special treatment for moves
3063 involving a hard register.
3065 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
3067 * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
3068 (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
3070 2018-11-22 Martin Liska <mliska@suse.cz>
3072 * common/config/i386/i386-common.c (processor_names): Add
3073 static assert and add missing "znver2".
3074 (ix86_get_valid_option_values): Add checking assert for null
3075 values and add "native" value if feasible.
3076 * config/i386/i386.h: Do not declare size of processor_names.
3077 * common/config/i386/i386-common.c:
3078 * config/i386/i386.c: Add static assert for size
3079 of processor_cost_table.
3081 2018-11-22 Thomas Preud'homme <thomas.preudhomme@linaro.org>
3083 * target-insns.def (stack_protect_combined_set): Define new standard
3085 (stack_protect_combined_test): Likewise.
3086 * cfgexpand.c (stack_protect_prologue): Try new
3087 stack_protect_combined_set pattern first.
3088 * function.c (stack_protect_epilogue): Try new
3089 stack_protect_combined_test pattern first.
3090 * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
3091 parameters to control which register to use as PIC register and force
3092 reloading PIC register respectively. Insert in the stream of insns if
3094 (legitimize_pic_address): Expose above new parameters in prototype and
3095 adapt recursive calls accordingly. Use pic_reg if non null instead of
3097 (arm_load_pic_register): Add pic_reg parameter and use it if non null.
3098 (arm_legitimize_address): Adapt to new legitimize_pic_address
3100 (thumb_legitimize_address): Likewise.
3101 (arm_emit_call_insn): Adapt to require_pic_register prototype change.
3102 (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
3103 (thumb1_expand_prologue): Likewise.
3104 * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
3106 (arm_load_pic_register): Likewise.
3107 * config/arm/predicated.md (guard_addr_operand): New predicate.
3108 (guard_operand): New predicate.
3109 * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
3111 (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
3113 (stack_protect_combined_set): New expander..
3114 (stack_protect_combined_set_insn): New insn_and_split pattern.
3115 (stack_protect_set_insn): New insn pattern.
3116 (stack_protect_combined_test): New expander.
3117 (stack_protect_combined_test_insn): New insn_and_split pattern.
3118 (arm_stack_protect_test_insn): New insn pattern.
3119 * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
3120 * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
3121 (UNSPEC_SP_TEST): Likewise.
3122 * doc/md.texi (stack_protect_combined_set): Document new standard
3124 (stack_protect_set): Clarify that the operand for guard's address is
3126 (stack_protect_combined_test): Document new standard pattern name.
3127 (stack_protect_test): Clarify that the operand for guard's address is
3130 2018-11-22 Richard Biener <rguenther@suse.de>
3132 PR tree-optimization/88148
3133 * tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
3134 valueization callback parameter and handle it.
3135 * tree-ssa-loop-niter.h (simplify_replace_tree): Export.
3136 * tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
3138 2018-11-22 Richard Biener <rguenther@suse.de>
3142 * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
3143 which can appear in size expressions.
3144 * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
3145 CALL_EXPR_BY_DESCRIPTOR.
3146 (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
3147 * tree-streamer-out.c (pack_ts_base_value_fields): Stream
3148 CALL_EXPR_BY_DESCRIPTOR.
3149 (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
3153 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
3156 2018-11-22 Richard Biener <rguenther@suse.de>
3158 PR tree-optimization/88069
3159 * tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
3160 apply to default defs.
3162 2018-11-22 Jakub Jelinek <jakub@redhat.com>
3166 * config/i386/i386.c (ix86_option_override_internal): Default
3167 ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
3169 * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
3170 stack_protect_test, stack_protect_test_<mode>): Use empty condition
3171 instead of TARGET_SSP_TLS_GUARD.
3173 2018-11-22 Martin Liska <mliska@suse.cz>
3176 * config/i386/i386.c (ix86_option_override_internal): Error
3177 about usage -mabi=ms and -fsanitize=thread.
3179 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
3182 2013-10-26 Vladimir Makarov <vmakarov@redhat.com>
3185 2013-10-25 Vladimir Makarov <vmakarov@redhat.com>
3187 * lra-spills.c (lra_final_code_change): Remove useless move insns.
3189 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
3192 * function.c (expand_function_end): Do not emit extra blockage insn.
3194 2018-11-21 Lokesh Janghel <lokeshjanghel91@gmail.com>
3197 * config/i386/i386.c (function_value_ms_64): Return AX_REG instead
3198 of FIRST_SSE_REG for 4 or 8 byte modes.
3200 2018-11-21 Jan Hubicka <jh@suse.cz>
3203 * tree.c (fld_decl_context): Break out from ...
3204 (free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
3205 DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
3206 (fld_incomplete_type_of): Build copy of TYP_DECL.
3207 * ipa-devirt.c (free_enum_values): Rename to ...
3208 (free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
3209 and TREE_TYPEs of TYPE_DECLs.
3210 (get_odr_type): Initialize odr_vtable_hash if needed.
3212 2018-11-21 Alexandre Oliva <oliva@adacore.com>
3214 * final.c (compute_discriminator): Declare. Renamed from...
3215 (maybe_set_discriminator): ... this. Set and return a local.
3216 (override_discriminator): New.
3217 (final_scan_insn_1): Set it.
3218 (notice_source_line): Adjust. Always set discriminator.
3220 2018-11-21 Jakub Jelinek <jakub@redhat.com>
3223 * config/aarch64/atomics.md (@aarch64_compare_and_swap<mode>): Use
3224 rIJ constraint for aarch64_plus_operand rather than rn.
3226 2018-11-21 Renlin Li <renlin.li@arm.com>
3229 * explow.h (get_dynamic_stack_size): Declare it as external.
3230 * explow.c (record_new_stack_level): Remove function static attribute.
3231 * function.c (assign_stack_local_1): Dynamically align the stack slot
3232 addr for parameter copy on the stack.
3234 2018-11-21 Richard Biener <rguenther@suse.de>
3237 * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
3238 * Makefile.in (bitmap.o-warn): Remove again.
3240 2018-11-20 Jeff Law <law@redhat.com>
3242 PR tree-optimization/88069
3243 * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
3244 degenerate virtual PHIs.
3246 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
3249 * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
3250 nonimmediate_operand with register_operand.
3251 (avx2_<code>v8qiv8si2<mask_name>): Likewise.
3252 (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
3253 (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
3254 (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
3255 (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
3256 (avx2_<code>v4qiv4di2<mask_name>): Likewise.
3257 (avx2_<code>v4hiv4di2<mask_name>): Likewise.
3258 (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
3259 (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
3260 (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
3261 (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
3262 (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
3263 (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
3264 (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
3265 (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
3266 (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
3267 (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
3268 (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
3269 (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
3270 (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
3271 (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
3272 (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
3273 (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
3274 (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
3275 (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
3276 (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
3277 (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
3279 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
3281 * read-rtl.c (apply_subst_iterator): Handle define_split and
3282 define_insn_and_split.
3284 2018-11-21 Jakub Jelinek <jakub@redhat.com>
3286 PR rtl-optimization/87817
3287 * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
3288 *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
3289 in the pattern to avoid triggering UB when operands[2] is zero.
3290 (tbm_bextri_<mode>): New expander. Renamed the old define_insn to ...
3291 (*tbm_bextri_<mode>): ... this.
3293 2018-11-21 Tom de Vries <tdevries@suse.de>
3296 * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
3299 2018-11-21 Andreas Krebbel <krebbel@linux.ibm.com>
3301 * configure.ac: Add check for Binutils to determine whether vector
3302 load/store alignments hints are being supported.
3303 * config.in: Regenerate.
3304 * configure: Regenerate.
3305 * config/s390/s390.c (print_operand): Support new output
3307 * config/s390/s390.md ("movti"): Append alignment hint output
3308 using the new output modifier 'A'.
3309 * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
3310 ("*vec_ti_to_v1ti"): Likewise.
3312 2018-11-20 Martin Sebor <msebor@redhat.com>
3314 * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
3316 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3319 * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
3320 compare ENUM values.
3322 2018-11-20 Jakub Jelinek <jakub@redhat.com>
3324 PR tree-optimization/87895
3325 * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
3326 or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
3327 (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
3328 redirects edges to EXIT to edges to incr_bb, iterate while EXIT
3329 has any preds and always use EDGE_PRED (, 0).
3331 2018-11-20 Uros Bizjak <ubizjak@gmail.com>
3334 * mode-switching.c (create_pre_exit): After reload, always split the
3335 fallthrough edge to the exit block.
3337 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3339 * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
3340 * tree.c (build_array_type_1): Forward declare.
3341 (fld_type_variant_equal_p): Add INNER_TYPE parameter.
3342 (fld_type_variant): Likewise.
3343 (fld_simplified_types): New hash.
3344 (fld_process_array_type): New function.
3345 (fld_incomplete_type_of): Handle array and enumeration types.
3346 (fld_simplified_type): Handle simplification of arrays.
3347 (free_lang_data): Allocate and free simplified types hash.
3349 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3352 * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
3353 when sybtype already violates ODR.
3354 (get_odr_type): Do not ICE when insert is false and type duplicate
3355 is not registered yet.
3356 (register_odr_type): Be sure to register subtypes first.
3358 2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
3360 * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
3361 DImode parts of the target operand.
3363 2018-11-20 Nathan Sidwell <nathan@acm.org>
3366 * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
3368 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3371 * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
3373 (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
3375 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3378 * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
3379 * ipa.c (possible_inline_candidate_p): Break out from ..
3380 (process_references): ... here ; drop before_inlining_p;
3381 cleanup handling of alises.
3382 (walk_polymorphic_call_targets): Likewise.
3383 (symbol_table::remove_unreachable_nodes): Likewise.
3384 * passes.c (pass_data_ipa_remove_symbols): New structure.
3385 (pass_ipa_remove_symbols): New pass.
3386 (make_pass_ipa_remove_symbols): New function.
3387 * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
3388 * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
3390 2018-11-20 Richard Biener <rguenther@suse.de>
3392 * tree-vect-stmts.c (vectorizable_condition): Do not get
3393 at else_clause vect def for EXTRACT_LAST_REDUCTION. Remove
3394 pointless vect_is_simple_use calls.
3396 2018-11-20 Richard Biener <rguenther@suse.de>
3398 PR tree-optimization/88074
3399 * tree-ssa-dom.c (pass_dominator::execute): Do not walk
3402 2018-11-20 Richard Biener <rguenther@suse.de>
3404 PR tree-optimization/88069
3405 * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
3406 virtual PHI arguments.
3408 2018-11-20 Ilya Leoshkevich <iii@linux.ibm.com>
3411 * config/s390/s390.md: Skip LT(G) peephole when literal pool is
3413 * rtl.h (contains_constant_pool_address_p): New function.
3414 * rtlanal.c (contains_constant_pool_address_p): Likewise.
3416 2018-11-20 Richard Biener <rguenther@suse.de>
3419 * alias.c (component_uses_parent_alias_set_from): Remove
3420 alias-set zero and TYPE_TYPELESS_STORAGE case both already
3421 handled in other ways.
3423 2018-11-20 Richard Biener <rguenther@suse.de>
3425 PR tree-optimization/88087
3426 * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
3428 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
3431 2018-11-20 Richard Biener <rguenther@suse.de>
3434 * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
3436 2018-11-19 Jan Hubicka <hubicka@ucw.cz>
3439 * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
3441 2018-11-19 Sandra Loosemore <sandra@codesourcery.com>
3444 * doc/invoke.texi (Link Options): Mention shared libraries
3445 in documentation for the -l option. Simplify discussion and
3446 point to the system linker documentation for details.
3448 2018-11-19 Peter Bergner <bergner@linux.ibm.com>
3450 PR rtl-optimization/88033
3451 * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
3452 to itself. Use HARD_REGISTER_NUM_P.
3454 2018-11-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3456 * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
3457 of the loop if vf is non-constant.
3459 2018-11-19 David Malcolm <dmalcolm@redhat.com>
3461 PR tree-optimization/87025
3462 * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
3463 immediately after creating the scope optinfo.
3464 (selftest::test_pr87025): New function.
3465 (selftest::dumpfile_c_tests): Call it.
3466 * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
3467 that we're not popping the top-level records array.
3468 * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
3469 not changing the kind of a "scope" optinfo.
3471 2018-11-19 David Malcolm <dmalcolm@redhat.com>
3473 PR tree-optimization/87025
3474 * dump-context.h: Include "optinfo.h".
3475 (class optrecord_json_writer): New forward decl.
3476 (dump_context::forcibly_enable_optinfo_p): Delete.
3477 (dump_context::optinfo_enabled_p): New member function.
3478 (dump_context::optimization_records_enabled_p): New member
3480 (dump_context::set_json_writer): New member function.
3481 (dump_context::emit_optinfo): New member function.
3482 (dump_context::m_forcibly_enable_optinfo): Delete.
3483 (dump_context::m_json_writer): New member data.
3484 * dumpfile.c (dump_context::set_json_writer): New member function.
3485 (dump_context::finish_any_json_writer): New member function.
3486 (dump_context::end_scope): Replace call to
3487 optimization_records_maybe_pop_dump_scope with call to
3488 m_json_writer->pop_scope.
3489 (dump_context::optinfo_enabled_p): New member function.
3490 (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
3491 to dump_context::emit_optinfo.
3492 (dump_context::emit_optinfo): New member function.
3493 (temp_dump_context::temp_dump_context): Replace
3494 m_forcibly_enable_optinfo with call to set_json_writer.
3495 (temp_dump_context::~temp_dump_context): Clean up any json writer.
3496 * optinfo-emit-json.cc (class optrecord_json_writer): Move to
3498 (the_json_writer): Delete.
3499 (optimization_records_start): Delete.
3500 (optimization_records_finish): Delete.
3501 (optimization_records_enabled_p): Delete, in favor of
3502 dump_context::optimization_records_enabled_p.
3503 (optimization_records_maybe_record_optinfo): Delete.
3504 (optimization_records_maybe_pop_dump_scope): Delete.
3505 * optinfo-emit-json.h: Include "json.h". Delete forward
3507 (optimization_records_start): Delete.
3508 (optimization_records_finish): Delete.
3509 (optimization_records_enabled_p): Delete.
3510 (optimization_records_maybe_record_optinfo): Delete.
3511 (optimization_records_maybe_pop_dump_scope): Delete.
3512 (class optrecord_json_writer): Move here from
3513 optinfo-emit-json.cc.
3514 * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
3515 to optinfo::emit with call to dump_context::emit_optinfo.
3516 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
3517 (optinfo_enabled_p): Delete, in favor of
3518 dump_context::optinfo_enabled_p.
3519 (optinfo_wants_inlining_info_p): Update for conversion o
3520 optimization_records_enabled_p to a member function of
3522 * optinfo.h (optinfo_enabled_p): Delete, in favor of
3523 dump_context::optinfo_enabled_p.
3524 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
3525 * toplev.c: Include "dump-context.h".
3526 (compile_file): Replace call to optimization_records_finish with
3527 dump_context::finish_any_json_writer.
3528 (do_compile): Replace call to optimization_records_start with
3529 conditionally creating a optrecord_json_writer for the
3532 2018-11-19 Jakub Jelinek <jakub@redhat.com>
3534 PR tree-optimization/88071
3535 * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
3536 of false as last argument to gsi_remove.
3537 * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
3538 false as last argument to gsi_replace.
3541 * omp-expand.c: Don't include debug.h.
3542 (adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT
3543 from innermost outer parallel, task, teams or target that has a
3544 child_fn set, or, if there is no such outer region, use
3545 current_function_decl. Do the DECL_CONTEXT adjustment regardless of
3546 whether a suitable BLOCK is found or not.
3547 (expand_parallel_call, expand_teams_call): Don't call
3548 adjust_context_and_scope here.
3549 (grid_expand_target_grid_body): Revert 2017-01-25 changes.
3550 (expand_omp_taskreg, expand_omp_target): Likewise. Call
3551 adjust_context_and_scope.
3552 * dwarf2out.c (dwarf2out_early_global_decl): For
3553 decl_function_context recurse instead of calling dwarf2out_decl.
3555 2018-11-20 Eric Botcazou <ebotcazou@adacore.com>
3557 PR rtl-optimization/85925
3558 * rtl.h (word_register_operation_p): New predicate.
3559 * combine.c (record_dead_and_set_regs_1): Only apply specific handling
3560 for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
3561 * rtlanal.c (nonzero_bits1): Likewise. Adjust couple of comments.
3562 (num_sign_bit_copies1): Likewise.
3564 2018-11-19 Richard Biener <rguenther@suse.de>
3567 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
3570 2018-11-19 Eric Botcazou <ebotcazou@adacore.com>
3572 * compare-elim.c (struct comparison): Add not_in_a field.
3573 (is_not): New static function.
3574 (strip_not): Likewise.
3575 (conforming_compare): Handle a NOT in the first operand.
3576 (can_eliminate_compare): Likewise.
3577 (find_comparison_dom_walker::before_dom_children): Likewise.
3578 (try_eliminate_compare): Likewise.
3579 * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
3580 (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
3582 2018-11-19 Jonathan Wakely <jwakely@redhat.com>
3584 * doc/extend.texi (Common Type Attributes): Fix typos.
3586 2018-11-19 Martin Liska <mliska@suse.cz>
3588 PR gcov-profile/88045
3589 * coverage.c (coverage_begin_function): Add assert.
3591 2018-11-18 Sandra Loosemore <sandra@codesourcery.com>
3594 * doc/extend.texi (Common Function Attributes): Document that
3595 no_instrument_function applies to -p and -pg, too.
3596 * doc/invoke.texi (Instrumentation Options): Add cross-references
3597 to docs for -p, -pg, and -finstrument-functions.
3599 2018-11-18 Alan Modra <amodra@gmail.com>
3601 * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
3602 (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
3603 (GNU_USER_TARGET_CRTN): Define.
3604 (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
3605 (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
3607 2018-11-18 Alan Modra <amodra@gmail.com>
3609 * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
3610 !HAVE_LD_PIE variant.
3611 (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
3613 2018-11-17 Nick Clifton <nickc@redhat.com>
3614 Sandra Loosemore <sandra@codesourcery.com>
3617 * doc/invoke.texi (Overall Options): Document that --help and
3618 --help=<value> options cannot be combined.
3620 2018-11-17 Jim Wilson <jimw@sifive.com>
3622 * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
3623 (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
3624 epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
3625 (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset. Set it
3626 to step2 if frame_pointer_needed and step1 is 0.
3628 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
3631 * doc/cpp.texi (System Headers): Add note about implicit
3632 extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
3634 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
3637 * doc/invoke.texi (C++ Dialect Options): Clarify usage of
3638 -fno-implicit-templates.
3640 2018-11-17 Jakub Jelinek <jakub@redhat.com>
3642 PR tree-optimization/87546
3643 * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
3644 min_precision variable, initially set it to orig_precision, only does
3645 something if op_type's precision is <= min_precision and update
3646 min_precision whenever calling set_op.
3648 2018-11-16 Jan Hubicka <hubicka@ucw.cz>
3651 * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
3653 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
3655 * doc/invoke.texi (Option Summary): Fix whitespace and line
3656 breaks in @gccoptlist environments.
3657 (Warning Options): Likewise.
3658 (Optimize Options): Likewise.
3659 (PowerPC SPE Options): Likewise.
3660 (RS/6000 and PowerPC Options): Likewise.
3662 2018-11-16 Jeff Law <law@redhat.com>
3664 * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
3667 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
3670 * doc/invoke.texi (Optimize Options): Update options enabled by
3671 fprofile-generate, -fprofile-use, and -fauto-profile.
3673 2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3676 * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
3677 Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
3678 * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
3680 * target.h: Add psi, pdi, pti to struct asm_int_op definition.
3681 * targhooks.c (default_print_patchable_function_entry): Assert
3682 asm_int_op does not return a NULL string.
3683 * varasm.c (integer_asm_op): Return the op for a partial int type
3684 when the requested size does not correspond to an integer type.
3685 * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
3686 * doc/tm.texi: Regenerate.
3688 2018-11-12 Jason Merrill <jason@redhat.com>
3690 * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
3692 2018-11-16 Michael Meissner <meissner@linux.ibm.com>
3694 * config/rs6000/constraints.md (wF constraint): Remove power9
3695 fusion documentation. Just document wF's use for power8 fusion.
3696 * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
3697 (fusion_gpr_addis): Delete power9 fusion support. Change power8
3698 fusion support to require the upper 12 bits to be all 0's or all
3700 (fusion_gpr_mem_load): Add comment.
3701 (fusion_addis_mem_combo_load): Remove power9 fusion support.
3702 (fusion_addis_mem_combo_store): Delete.
3703 (fusion_offsettable_mem_operand): Delete.
3704 * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
3706 (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
3707 (POWERPC_MASKS): Delete power9 fusion.
3708 * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
3709 (fusion_p9_p): Delete.
3710 (expand_fusion_p9_load): Delete.
3711 (expand_fusion_p9_store): Delete.
3712 (emit_fusion_p9_load): Delete.
3713 (emit_fusion_p9_store): Delete.
3714 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
3716 (rs6000_option_override_internal): Set power8 fusion based on
3717 whether we are tuning for power8. Delete power9 fusion support.
3718 (rs6000_opt_masks): Delete -mpower9-fusion switch.
3719 (emit_fusion_load): Rename emit_fusion_load_store to
3720 emit_fusion_load, and drop fusion store support. Update callers.
3721 (emit_fusion_load_store): Likewise.
3722 (emit_fusion_gpr_load): Likewise.
3723 (fusion_p9_p): Delete.
3724 (expand_fusion_p9_load): Delete.
3725 (expand_fusion_p9_store): Delete.
3726 (emit_fusion_p9_load): Delete.
3727 (emit_fusion_p9_store): Delete.
3728 * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
3729 (GPR_FUSION): Delete.
3730 (FPR_FUSION): Delete.
3731 (power9 fusion peephole2s): Delete.
3732 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
3733 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
3734 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
3735 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
3736 (fusion_p9_<mode>_constant): Delete.
3737 * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
3738 power9 fusion switch.
3739 * doc/md.texi (PowerPC constraints): Update wF constraint
3740 documentation for power8 fusion only.
3742 2018-11-16 Jakub Jelinek <jakub@redhat.com>
3744 PR rtl-optimization/87475
3745 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
3746 CROSSING_JUMP_P insns.
3747 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
3749 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
3752 * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
3753 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
3754 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
3756 2018-11-16 Jakub Jelinek <jakub@redhat.com>
3759 * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
3760 is VOIDmode, in which case use int_mode. Similarly for op1_mode.
3762 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
3764 * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
3765 location_t parameter.
3766 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
3767 (switch_decision_tree::do_jump_if_equal): Likewise.
3768 * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
3769 of switch statement to emit_case_nodes.
3770 (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
3771 set it on the newly built GIMPLE comparison statement.
3772 (switch_decision_tree::do_jump_if_equal): Likewise.
3773 (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
3774 in calls to do_jump_if_equal as well as recursive calls.
3776 2018-11-16 Andi Kleen <ak@linux.intel.com>
3778 * config/i386/i386.md: Allow memory operands to ptwrite.
3780 2018-11-16 Michael Matz <matz@suse.de>
3782 * system.h (PRsa): New macro.
3783 (SIZE_AMOUNT): Cast number to uint64_t.
3784 * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
3785 (pool_usage::dump_footer): Likewise and also use PRIu64.
3786 * bitmap.h (bitmap_usage::dump): Likewise.
3787 * ggc-common.c (ggc_usage::dump): Likewise.
3788 * ggc-page.c (ggc_print_statistics): Likewise.
3789 * input.c (dump_line_table_statistics): Likewise.
3790 * mem-stats.h (mem_usage::dump): Likewise.
3791 (mem_usage::dump_footer): Likewise.
3792 * rtl.c (dump_rtx_statistics): Likewise.
3793 * tree-cfg.c (dump_cfg_stats): Likewise.
3794 * tree-dfa.c (dump_dfa_stats): Likewise.
3795 * tree-phinodes.c (phinodes_print_statistics): Likewise.
3796 * tree-ssanames (ssanames_print_statistics): Likewise.
3797 * vec.c (vec_usage::dump): Likewise.
3798 (vec_usage::dump_footer): Likewise.
3800 2018-11-16 Richard Biener <rguenther@suse.de>
3802 PR tree-optimization/88011
3803 * tree-vrp.c (extract_range_from_binary_expr): Fix error in
3804 replacing set_value_range_to_undefined and
3805 set_value_range_to_varying with method calls.
3807 2018-11-16 Ilya Leoshkevich <iii@linux.ibm.com>
3809 * config/s390/s390.md
3810 (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
3812 (*r<noxa>sbg_<mode>_sll): Likewise.
3813 (*r<noxa>sbg_<mode>_srl): Likewise.
3814 (*r<noxa>sbg_sidi_srl): New pattern.
3816 2018-11-16 Jerome Lambourg <lambourg@adacore.com>
3818 * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
3819 Default to TARGET_VXWORKS_RTP.
3820 (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
3821 of TARGET_VXWORKS_RTP.
3822 * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
3823 of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
3825 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
3828 * doc/extend.texi (Common Type Attributes): Make it explicit
3829 that attribute "packed" can apply to C++ classes.
3831 2018-11-15 Martin Sebor <msebor@redhat.com>
3835 * tree.c (type_argument_type): New function.
3836 * tree.h (type_argument_type): Declare it.
3837 * gcc/doc/extend.texi (alloc_align): Update and clarify.
3838 (alloc_size, nonnull, sentinel): Same.
3840 2018-11-15 Andrew Stubbs <ams@codesourcery.com>
3841 Kwok Cheung Yeung <kcy@codesourcery.com>
3843 * tree-vect-stmts.c (vectorizable_store): Don't ICE when
3844 int_mode_for_size fails.
3845 (vectorizable_load): Likewise.
3847 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3849 * doc/ux.texi (Group logically-related diagnostics): Move
3850 discussion of auto_diagnostic_group into this new subsection.
3851 Give an example of where this grouping is used.
3853 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3856 * Makefile.in (OBJS): Move json.o to...
3857 (OBJS-libcommon): ...here and add diagnostic-format-json.o.
3858 * common.opt (fdiagnostics-format=): New option.
3859 (diagnostics_output_format): New enum.
3860 * diagnostic-format-json.cc: New file.
3861 * diagnostic.c (default_diagnostic_final_cb): New function, taken
3862 from start of diagnostic_finish.
3863 (diagnostic_initialize): Initialize final_cb to
3864 default_diagnostic_final_cb.
3865 (diagnostic_finish): Move "being treated as errors" messages to
3866 default_diagnostic_final_cb. Call any final_cb.
3867 (default_diagnostic_finalizer): Add diagnostic_t param.
3868 (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
3869 diagnostic_finalizer callback.
3870 * diagnostic.h (enum diagnostics_output_format): New enum.
3871 (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
3872 (struct diagnostic_context): Add "final_cb".
3873 (default_diagnostic_finalizer): Add diagnostic_t param.
3874 (diagnostic_output_format_init): New decl.
3875 * doc/invoke.texi (-fdiagnostics-format): New option.
3876 * dwarf2out.c (gen_producer_string): Ignore
3877 OPT_fdiagnostics_format_.
3878 * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
3879 * lto-wrapper.c (append_diag_options): Ignore it.
3880 * opts.c (common_handle_option): Handle it.
3882 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3884 PR tree-optimization/88015
3885 * graphite-isl-ast-to-gimple.c
3886 (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
3888 * graphite-sese-to-poly.c (build_poly_scop): Likewise.
3890 2018-11-15 Richard Biener <rguenther@suse.de>
3893 * gimple.c (gimple_call_flags): Union flags from decl, type
3895 * trans-mem.c (is_tm_pure_call): Simplify.
3897 2018-11-15 Richard Biener <rguenther@suse.de>
3899 PR tree-optimization/88031
3900 * tree-vect-loop.c (vectorizable_reduction): Move check
3901 for multiple types earlier so we get the expected dump.
3902 Simplify calls to vectorizable_condition.
3903 * tree-vect-stmts.h (vectorizable_condition): Update prototype.
3904 * tree-vect-stmts.c (vectorizable_condition): Instead of
3905 reduc_def and reduc_index take just a flag. Simplify
3906 code-generation now that we can rely on the defs being set up.
3907 (vectorizable_comparison): Remove unused argument.
3909 2018-11-15 Richard Biener <rguenther@suse.de>
3911 PR tree-optimization/88030
3912 * tree-complex.c (need_eh_cleanup): New global.
3913 (update_complex_assignment): Mark blocks that need EH update.
3914 (expand_complex_comparison): Likewise.
3915 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
3916 perform EH cleanup and schedule CFG cleanup if that did anything.
3918 2018-11-15 Jakub Jelinek <jakub@redhat.com>
3920 PR rtl-optimization/88018
3921 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
3922 on the presence of fallthru edge, rather than if it is a USE or not.
3924 2018-11-15 Richard Biener <rguenther@suse.de>
3927 * tree-data-ref.c (analyze_miv_subscript): Guard calls to
3928 analyze_subscript_affine_affine properly.
3930 2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
3932 * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
3933 (GLIBC_DYNAMIC_LINKER): Define.
3934 (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
3936 2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
3938 PR tree-optimization/84648
3939 * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
3940 (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
3941 by calling adjust_cond_for_loop_until_wrap.
3943 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
3946 * doc/extend.texi (Common Function Attributes): Clarify linker
3947 restrictions on "aligned" attribute.
3948 (Common Variable Attributes): Likewise. Mention that linker
3949 restrictions don't apply to stack-allocated variables.
3951 2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
3953 * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
3956 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
3960 * doc/invoke.texi (Optimize Options): Remove bad example about
3961 interaction between -flto and -O. Replace it with a note that
3962 you need to compile with -O and not just link. Copy-edit -flto
3963 discussion to reduce verbiage and improve flow.
3965 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
3968 * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
3969 also suppress many optimizations. Alphabetize option lists for
3970 -O1, -O2, and -Os. Add list of options disabled with -Og, and
3971 correct documentation for those options to say that.
3972 * opts.c (default_options_table): Sort table by level and option
3973 name, to make it easier to correlate to the manual.
3975 2018-11-14 Uros Bizjak <ubizjak@gmail.com>
3977 * config/i386/i386.c (ix86_print_operand_address_as): Simplify
3978 printing of the names of segment registers.
3980 2018-11-14 Nathan Sidwell <nathan@acm.org>
3984 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
3987 2018-11-14 David Malcolm <dmalcolm@redhat.com>
3989 * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
3991 2018-11-14 Jakub Jelinek <jakub@redhat.com>
3993 P1236R1 - Signed integers are two's complement
3994 * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
3997 * hash-map.h (hash_map::iterator::reference_pair): New class.
3998 (hash_map::iterator::operator*): Return it rather than std::pair.
4000 2018-11-14 Jeff Law <law@redhat.com>
4002 * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
4003 iff the operand is a constant.
4005 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
4007 * gimple-ssa-evrp-analyze.c
4008 (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
4009 ignore_equivs_equal_p to equal_p.
4010 * ipa-cp.c (meet_with_1): Use equal_p instead of
4011 ignore_equivs_equal_p.
4012 * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
4013 * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
4014 (value_range::operator==): Remove.
4015 (value_range::operator!=): Remove.
4016 (vrp_prop::visit_stmt): Use equal_p.
4017 * tree-vrp.h (value_range): Remove operator==, operator!=,
4018 ignore_equivs_equal_p.
4019 * vr-values.c (update_value_range): Use equal_p.
4021 2018-11-14 Michael Matz <matz@suse.de>
4024 * gimplify.c (collect_fallthrough_labels): Add new argument,
4025 return location via that, don't modify statements.
4026 (warn_implicit_fallthrough_r): Adjust call, don't use
4027 statement location directly.
4029 2018-11-14 Richard Biener <rguenther@suse.de>
4032 * tree-data-ref.c (split_constant_offset): Add wrapper
4033 allocating a cache hash-map.
4034 (split_constant_offset_1): Cache results of expanding
4035 expressions from SSA def stmts.
4037 2018-11-14 Richard Biener <rguenther@suse.de>
4040 * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
4042 (lambda_vector_mult_const): Likewise.
4043 (lambda_matrix_right_hermite): Use lambda_int temporaries.
4045 2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
4046 Jackson Woodruff <jackson.woodruff@arm.com>
4048 PR 71026/tree-optimization
4049 * match.pd: Simplify floating point comparisons.
4051 2018-11-14 Jakub Jelinek <jakub@redhat.com>
4053 PR rtl-optimization/87817
4054 * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
4055 last argument has low 8 bits clear, fold to 0.
4057 2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
4059 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
4060 MAX_OFILE_ALIGNMENT as needed.
4062 2018-11-14 Richard Biener <rguenther@suse.de>
4064 PR tree-optimization/88019
4065 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
4066 COND_EXPR arguments to non-trapping overflow.
4068 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
4070 * config/arc/arc.h (reg_class): Reorder registers classes, remove
4071 unused register classes.
4072 (REG_CLASS_NAMES): Likewise.
4073 (REG_CLASS_CONTENTS): Likewise.
4074 (FIXED_REGISTERS): Make lp_count fixed.
4075 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
4076 (PROGRAM_COUNTER_REGNO): Remove.
4077 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
4078 register classes, use constants for register numbers, remove
4079 reg_class_contents references.
4080 (arc_process_double_reg_moves): Add asserts.
4081 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
4082 lra_in_progress predicate.
4083 (arc_init_reg_tables): Remove unused register classes.
4084 (arc_register_move_cost): Likewise.
4085 (arc_preferred_reload_class): Likewise.
4086 (hwloop_optimize): Update rtx patterns involving lp_count register.
4087 (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
4088 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
4089 CHEAP_CORE_REGS. Former one will be used for LRA.
4090 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
4091 one will be used for LRA.
4092 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
4093 one will be used for LRA.
4094 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
4095 Former one will be used for LRA.
4096 ("f"): Delete constraint.
4099 ("l"): Change it from register constraint to constraint.
4100 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
4101 (movhi_insn): Likewise.
4102 (movsi_insn): Update pattern.
4105 (stack_tie): Remove 'b' constraint letter.
4107 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
4108 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
4109 (R57_REG, R59_REG, PCL_REG): Likewise.
4110 (ILINK1_REGNUM): Renamed to ILINK1_REG.
4111 (ILINK2_REGNUM): Renamed to ILINK2_REG.
4113 (SP_REGS): Likewise.
4114 (Rcw): Remove unused reg classes.
4115 * config/arc/predicates.md (dest_reg_operand): Just default on
4116 register_operand predicate.
4117 (mpy_dest_reg_operand): Likewise.
4118 (move_dest_operand): Use macros instead of constants.
4119 * config/arc/arc.opt (mlra): Switch to lra as default.
4121 2018-11-14 Richard Biener <rguenther@suse.de>
4123 PR tree-optimization/87974
4124 * tree-vect-loop.c (vectorizable_reduction): When computing
4125 the vectorized reduction PHI vector type ignore constant
4128 2018-11-14 Jakub Jelinek <jakub@redhat.com>
4130 PR tree-optimization/87977
4131 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
4132 stmt, build a new one and replace the old one with it. Formatting fix.
4133 Call release_ssa_name (x) if !has_other_use and !delete_div.
4134 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
4135 verify lhs of stmt is still def.
4137 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
4139 PR rtl-optimization/87507
4140 * lower-subreg.c (operand_for_swap_move_operator): New function.
4141 (simple_move): Strip simple operators.
4142 (find_pseudo_copy): Likewise.
4143 (resolve_operand_for_swap_move_operator): New function.
4144 (resolve_simple_move): Strip simple operators and swap operands.
4146 2018-11-13 Jakub Jelinek <jakub@redhat.com>
4148 PR tree-optimization/87898
4149 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
4150 (ipa_simd_modify_function_body): Remove debug stmts where the first
4151 argument was changed into a non-decl.
4153 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
4155 PR rtl-optimization/87899
4156 * lra-lives.c (start_living): Update white space in comment.
4157 (enum point_type): New.
4158 (sparseset_contains_pseudos_p): New function.
4159 (update_pseudo_point): Likewise.
4160 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
4161 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
4162 handling. Move early exit after adding conflicts.
4163 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
4164 if regno is already live. Remove all handling of program points.
4165 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
4166 after adding conflicts. Remove all handling of program points and
4167 ignore_reg_for_conflicts.
4168 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
4169 and do not guard call to mark_pseudo_live.
4170 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
4171 and do not guard call to mark_pseudo_dead.
4172 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
4173 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
4174 Use new function update_pseudo_point. Handle register copies by
4175 removing the source register from the live set. Handle INOUT operands.
4176 Update to the next program point using the unused_set, dead_set and
4178 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
4180 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4182 * builtins.c: Replace "source_location" with "location_t".
4183 * diagnostic-show-locus.c: Likewise.
4184 * diagnostic.c: Likewise.
4185 * dumpfile.c: Likewise.
4186 * gcc-rich-location.h: Likewise.
4187 * genmatch.c: Likewise.
4188 * gimple.h: Likewise.
4189 * gimplify.c: Likewise.
4190 * input.c: Likewise.
4191 * input.h: Likewise. Eliminate the typedef.
4192 * omp-expand.c: Likewise.
4193 * selftest.h: Likewise.
4194 * substring-locations.h (get_source_location_for_substring):
4196 (get_location_within_string): ...this.
4197 * tree-cfg.c: Replace "source_location" with "location_t".
4198 * tree-cfgcleanup.c: Likewise.
4199 * tree-diagnostic.c: Likewise.
4200 * tree-into-ssa.c: Likewise.
4201 * tree-outof-ssa.c: Likewise.
4202 * tree-parloops.c: Likewise.
4203 * tree-phinodes.c: Likewise.
4204 * tree-phinodes.h: Likewise.
4205 * tree-ssa-loop-ivopts.c: Likewise.
4206 * tree-ssa-loop-manip.c: Likewise.
4207 * tree-ssa-phiopt.c: Likewise.
4208 * tree-ssa-phiprop.c: Likewise.
4209 * tree-ssa-threadupdate.c: Likewise.
4210 * tree-ssa.c: Likewise.
4211 * tree-ssa.h: Likewise.
4212 * tree-vect-loop-manip.c: Likewise.
4214 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
4216 * doc/extend.texi: Fix typo in the weakref description.
4218 2018-11-13 Richard Biener <rguenther@suse.de>
4220 PR tree-optimization/86991
4221 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
4222 group building until we have successfully detected the SLP
4224 (vect_is_simple_reduction): Remove fixup code here.
4226 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4228 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
4229 (dump_gimple_stmt): Use it.
4230 (dump_gimple_stmt_loc): Likewise.
4231 (dump_gimple_expr): Likewise.
4232 (dump_gimple_expr_loc): Likewise.
4233 (dump_generic_expr): Likewise.
4234 (dump_generic_expr_loc): Likewise.
4235 (dump_printf): Likewise.
4236 (dump_printf_loc): Likewise.
4237 (dump_dec): Likewise.
4238 (dump_dec): Likewise.
4239 (dump_hex): Likewise.
4240 (dump_symtab_node): Likewise.
4241 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
4242 Guard dump call with dump_enabled_p.
4243 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
4244 * graphite-optimize-isl.c (optimize_isl): Likewise.
4245 * graphite.c (graphite_transform_loops): Likewise.
4246 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
4247 * tree-parloops.c (parallelize_loops): Likewise.
4248 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
4249 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
4250 (vect_prune_runtime_alias_test_list): Likewise.
4251 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
4252 (vect_estimate_min_profitable_iters): Likewise.
4253 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
4254 (vect_build_slp_tree_2): Likewise.
4255 (vect_supported_load_permutation_p): Likewise.
4256 (vect_slp_analyze_operations): Likewise.
4257 (vect_slp_analyze_bb_1): Likewise.
4258 (vect_slp_bb): Likewise.
4259 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
4260 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
4261 (pass_slp_vectorize::execute): Likewise.
4262 (increase_alignment): Likewise.
4264 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4267 * ipa-inline.c (report_inline_failed_reason): Guard calls to
4268 cl_target_option_print_diff and cl_optimization_print_diff with
4271 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4273 * doc/invoke.texi (-fsave-optimization-record): Note that the
4274 output is compressed.
4275 * optinfo-emit-json.cc: Include <zlib.h>.
4276 (optrecord_json_writer::write): Compress the output.
4278 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
4280 * tree-vrp.c (value_range_base::dump): Dump type.
4281 Do not use INF nomenclature for 1-bit types.
4282 (dump_value_range): Group all variants to common dumping code.
4283 (debug): New overloaded functions for value_ranges.
4284 (value_range_base::dump): Remove no argument version.
4285 (value_range::dump): Same.
4287 2018-11-13 Richard Biener <rguenther@suse.de>
4289 PR tree-optimization/87931
4290 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
4291 nested cycles we support to latch computations vectorizable_reduction
4294 2018-11-13 Martin Liska <mliska@suse.cz>
4296 PR tree-optimization/87885
4297 * cfghooks.c (account_profile_record): Rename
4299 (profile_record_check_consistency): ... this.
4300 Calculate missing num_mismatched_freq_in.
4301 (profile_record_account_profile): New function
4302 that calculates time and size of a function.
4303 * cfghooks.h (struct profile_record): Remove
4305 (struct cfg_hooks): Remove after_pass flag.
4306 (account_profile_record): Rename to ...
4307 (profile_record_check_consistency): ... this.
4308 (profile_record_account_profile): New.
4309 * cfgrtl.c (rtl_account_profile_record): Remove
4311 * passes.c (check_profile_consistency): Do only
4313 (account_profile): Calculate size and time of
4315 (pass_manager::dump_profile_report): Reformat
4317 (execute_one_ipa_transform_pass): Call
4318 consistency check before clean upand call account_profile
4319 after a clean up is done.
4320 (execute_one_pass): Call check_profile_consistency and
4321 account_profile instead of using after_pass flag..
4322 * tree-cfg.c (gimple_account_profile_record): Likewise.
4324 2018-11-13 Martin Liska <mliska@suse.cz>
4327 * config/i386/i386.c (ix86_option_override_internal): Error
4328 about usage -mabi=ms and -fsanitize={,kernel-}address.
4330 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
4332 * config/aarch64/aarch64.c
4333 (aarch64_vectorize_preferred_vector_alignment): Change return type to
4335 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
4336 alignment being a poly int.
4337 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
4338 return type to poly_uint64.
4339 * target.def (default_preferred_vector_alignment): Likewise.
4340 * targhooks.c (default_preferred_vector_alignment): Likewise.
4341 * targhooks.h (default_preferred_vector_alignment): Likewise.
4342 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
4343 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
4345 (vect_update_misalignment_for_peel): Likewise.
4346 (vect_enhance_data_refs_alignment): Likewise.
4347 (vect_find_same_alignment_drs): Likewise.
4348 (vect_duplicate_ssa_name_ptr_info): Likewise.
4349 (vect_setup_realignment): Likewise.
4350 (vect_can_force_dr_alignment_p): Change alignment parameter type to
4352 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
4353 mask with a compile time variable vector alignment.
4354 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
4356 (vect_do_peeling): Exit early if vector alignment is not constant.
4357 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
4359 (vectorizable_store): Likewise.
4360 (vectorizable_load): Likweise.
4361 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
4363 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
4365 (vect_can_force_dr_alignment_p): Change alignment parameter type to
4368 2018-11-13 Richard Biener <rguenther@suse.de>
4370 PR tree-optimization/87962
4371 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
4372 detect outer reduction for disqualifying in-loop uses.
4374 2018-11-13 Richard Biener <rguenther@suse.de>
4376 PR tree-optimization/87967
4377 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
4378 for constants for the scalar loop.
4380 2018-11-13 Alan Modra <amodra@gmail.com>
4382 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
4383 integer constants when -mcmodel=medium.
4385 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4387 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
4388 * config/arc/elf.h (PROFILE_HOOK): Define.
4389 * config/arc/linux.h (PROFILE_HOOK): Likewise.
4391 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4393 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
4394 jump table data in the text section.
4396 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4398 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
4399 to fit the eh_return pattern.
4400 * config/arc/arc.md (eh_return): Define.
4401 (VUNSPEC_ARC_EH_RETURN): Likewise.
4402 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
4404 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
4407 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4409 * common/config/arc/arc-common.c (arc_option_optimization_table):
4410 Millicode optimization is default on for size optimizations.
4411 * config/arc/arc-protos.h (arc_check_multi): New function.
4412 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
4413 (ENTER_LEAVE_START_REG): Define.
4414 (ENTER_LEAVE_END_REG): Likewise.
4415 (arc_override_options): Disable millicode when long calls option
4417 (arc_frame_info): Change it from int to bool.
4418 (arc_compute_frame_size): Clean up.
4419 (arc_save_restore): Remove.
4420 (frame_save_reg): New function.
4421 (frame_restore_reg): Likewise.
4422 (arc_enter_leave_p): Likewise.
4423 (arc_save_callee_saves): Likewise.
4424 (arc_restore_callee_saves): Likewise.
4425 (arc_save_callee_enter): Likewise.
4426 (arc_restore_callee_leave): Likewise.
4427 (arc_save_callee_milli): Likewise.
4428 (arc_restore_callee_milli): Likewise.
4429 (arc_expand_prologue): Reimplement to emit enter/leave
4431 (arc_expand_epilogue): Likewise.
4432 (arc_check_multi): New function.
4433 * config/arc/arc.md (push_multi_fp): New pattern.
4434 (push_multi_fp_blink): Likewise.
4435 (pop_multi_fp): Likewise.
4436 (pop_multi_fp_blink): Likewise.
4437 (pop_multi_fp_ret): Likewise.
4438 (pop_multi_fp_blink_ret): Likewise.
4439 * config/arc/arc.opt (mmillicode): Update option.
4440 (mcode-density-frame): New option.
4441 * config/arc/predicates.md (push_multi_operand): New predicate.
4442 (pop_multi_operand): Likewise.
4443 * doc/invoke.texi (ARC): Update ARC options information.
4446 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4448 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
4449 * config/arc/arc.c (operands_ok_ldd_std): New function.
4450 (mem_ok_for_ldd_std): Likewise.
4451 (gen_operands_ldd_std): Likewise.
4452 * config/arc/arc.md: Add peephole2 rules for std/ldd.
4454 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
4456 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
4457 test on stack_usage_file.
4458 (lang_dependent_init): Do not open the .su file if generating LTO.
4460 2018-11-13 Jakub Jelinek <jakub@redhat.com>
4462 PR rtl-optimization/87918
4463 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
4464 simplify_gen_relational rather than simplify_gen_binary.
4466 2018-11-13 Richard Biener <rguenther@suse.de>
4468 * tree-ssanames.h (set_range_info): Use value_range_base.
4469 (get_range_info): Likewise.
4470 * tree-ssanames.c (set_range_info): Likewise.
4471 (get_range_info): Likewise.
4472 * tree-vrp.c (value_range_base::union_helper): Split
4473 out common parts of value_range[_base]::union_.
4474 (value_range_base::union_): Update.
4475 (value_range::union_): Likewise.
4476 (determine_value_range_1): Use value_range_base.
4477 (determine_value_range): Likewise.
4478 * tree-vrp.h (value_range_base::union_helper): Move ...
4479 (value_range::union_helper): ... from here.
4481 2018-11-13 Alan Modra <amodra@gmail.com>
4483 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
4485 (rs6000_secondary_reload_gpr): Don't call find_replacement.
4487 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
4490 * doc/invoke.texi (Optimize Options): Clarify that the
4491 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
4492 apply to data cache size.
4494 2018-11-13 Alan Modra <amodra@gmail.com>
4496 * config/rs6000/predicates.md (logical_const_operand),
4497 (logical_operand): Correct comment.
4498 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
4500 2018-11-13 Alan Modra <amodra@gmail.com>
4502 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
4504 2018-11-13 Alan Modra <amodra@gmail.com>
4506 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
4508 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
4509 covered by alternative.
4510 (movcc_internal1): Ignore h for register preference.
4511 (mov<mode>_hardfloat64): Likewise.
4512 (mov<mode>_softfloat): Ignore c, l, h for register preference.
4514 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
4516 PR preprocessor/47823
4517 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
4520 * doc/extend.texi (Pragmas): Note additional pragmas documented
4523 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
4527 * tree-scalar-evolution.c (expression_expensive_p): Make
4528 BUILTIN POPCOUNT as expensive when backend does not define it.
4530 2018-11-12 Fredrik Noring <noring@nocrew.org>
4532 * config.gcc: Update with-llsc defaults for MIPS r5900.
4534 2018-11-12 Martin Liska <mliska@suse.cz>
4536 PR gcov-profile/87442
4537 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
4539 * doc/invoke.texi: Document them.
4540 * tree-profile.c (parse_profile_filter): New.
4541 (parse_profile_file_filtering): Likewise.
4542 (release_profile_file_filtering): Likewise.
4543 (include_source_file_for_profile): Likewise.
4544 (tree_profiling): Filter source files based on the
4545 newly added options.
4547 2018-11-12 Martin Liska <mliska@suse.cz>
4550 * doc/extend.texi: Add missing values for __builtin_cpu_is and
4551 __builtin_cpu_supports for x86 target.
4553 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
4556 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
4558 (Arithmetic): Likewise for "lo_sum".
4560 2018-11-12 Renlin Li <renlin.li@arm.com>
4563 * dse.c (get_stored_val): Add check for compile-time constantness
4566 2018-11-12 Sudakshina Das <sudi.das@arm.com>
4568 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
4569 (ARMv8_5a): New fgroup.
4570 (armv8.5-a): New arch.
4571 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
4573 * config/arm/arm-tables.opt: Regenerate.
4574 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
4575 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
4576 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
4577 Add matching rules for -march=armv8.5-a and extensions.
4578 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
4579 Add sb and predres to all armv8-a except armv8.5-a.
4581 2018-11-12 Richard Biener <rguenther@suse.de>
4583 * tree-vrp.h (value_range[_base]::set): Make public. Provide
4584 overload for single value.
4585 (value_range[_base]::set_nonnull): New.
4586 (value_range[_base]::set_null): Likewise.
4587 (value_range): Document bitmap copying behavior, mark
4588 copy constructor and assignment operator deleted.
4589 (value_range::move): New.
4590 (value_range::set_and_canonicalize): Default bitmap to zero.
4591 (set_value_range_to_nonnull): Remove.
4592 (set_value_range_to_null): Likewise.
4593 (set_value_range): Likewise.
4594 (set_value_range_to_value): Likewise.
4595 (extract_range_from_unary_expr): Work on value_range_base.
4596 (extract_range_from_binary_expr_1): Likewise. Rename to...
4597 (extract_range_from_binary_expr): ... this.
4598 * tree-vrp.c (value_range::update): Clear equiv bitmap
4600 (value_range::move): New, move equiv bitmap.
4601 (value_range_base::set_undefined): Avoid assignment.
4602 (value_range::set_undefined): Likewise.
4603 (value_range_base::set_varying): Likewise.
4604 (value_range::set_varying): Likewise.
4605 (set_value_range): Remove.
4606 (value_range_base::set): New overload for value.
4607 (value_range::set): Likewise.
4608 (set_value_range_to_nonnull): Remove.
4609 (value_range_base::set_nonnull): New.
4610 (value_range::set_nonnull): Likewise.
4611 (set_value_range_to_null): Remove.
4612 (value_range_base::set_null): New.
4613 (value_range::set_null): Likewise.
4614 (range_is_null): Work on value_range_base.
4615 (range_is_nonnull): Likewise.
4616 (ranges_from_anti_range): Likewise.
4617 (extract_range_into_wide_ints): Likewise.
4618 (extract_range_from_multiplicative_op): Likewise.
4619 (extract_range_from_binary_expr): Likewise. Update for API changes.
4620 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
4622 (value_range::intersect_helper): Avoid copy and assignment.
4623 (value_range::union_helper): Likewise.
4624 (determine_value_range_1): Adjust.
4625 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
4626 Avoid assignment by using move.
4627 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
4628 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4630 * tree-ssanames.c (get_range_info): Likewise.
4631 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
4632 * vr-values.c (vr_values::get_value_range): Adjust.
4633 (vr_values::update_value_range): Likewise.
4634 (symbolic_range_based_on_p): Work on value_range_base.
4635 (vr_values::extract_range_from_binary_expr): Use value_range_base.
4636 (vr_values::extract_range_from_unary_expr): Likewise.
4637 (vr_values::extract_range_from_cond_expr): Avoid assignment.
4638 (vr_values::extract_range_from_comparison): Adjust.
4639 (vr_values::check_for_binary_op_overflow): Use value_range_base.
4640 (vr_values::extract_range_basic): Adjust.
4641 (vr_values::adjust_range_with_scev): Likewise.
4642 (vr_values::vrp_visit_assignment_or_call): Likewise.
4643 (vr_values::get_vr_for_comparison): Change API to avoid
4644 assignment and copy construction.
4645 (vr_values::compare_name_with_value): Adjust accordingly.
4646 (vr_values::compare_names): Likewise.
4647 (vr_values::extract_range_from_phi_node): Avoid assignment and
4648 bogus in-place modify of equiv bitmap.
4649 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
4650 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
4651 for extract_range_from_unary_expr API change.
4652 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
4654 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
4656 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
4658 2018-11-12 Richard Biener <rguenther@suse.de>
4660 * tree-vrp.h (value_range_base::symbolic_p,
4661 value_range_base::constant_p, value_range_base::zero_p,
4662 value_range_base::singleton_p): Move from value_range.
4663 (value_range::dump): Add.
4664 * gimple-ssa-evrp-analyze.c
4665 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
4666 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
4667 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4669 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
4670 (value_range::constant_p): Likewise.
4671 (value_range::singleton_p): Likewise.
4672 (value_range_base::dump): Add.
4673 (set_value_range_to_undefined): Remove.
4674 (set_value_range_to_varying): Likewise.
4675 (range_int_cst_p): Take value_range_base argument.
4676 (range_int_cst_singleton_p): Likewise.
4677 (value_range_constant_singleton): Likewise.
4678 (vrp_set_zero_nonzero_bits): Likewise.
4679 (extract_range_from_multiplicative_op): Use set_varying.
4680 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
4681 (extract_range_from_unary_expr): Likewise.
4682 (dump_value_range_base): Change to overload of dump_value_range.
4683 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
4684 (vrp_prop::visit_stmt): Likewise.
4685 (value_range::intersect_helper): Likewise.
4686 (value_range::union_helper): Likewise.
4687 (determine_value_range_1): Likewise.
4689 2018-11-12 Richard Biener <rguenther@suse.de>
4691 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
4692 (set_value_range_to_null): Likewise.
4693 * vr-values.c (vr_values::extract_range_from_comparison):
4694 Clear equiv for constant singleton ranges.
4696 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
4698 * config/i386/sse.md: Combine VFIXUPIMM* patterns
4699 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4700 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4701 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
4702 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4703 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4704 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
4706 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
4709 * doc/extend.texi (Common Type Attributes): For the align type
4710 attribute, copy language about decreasing alignment from the
4711 corresponding variable attribute.
4713 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
4715 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
4718 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
4721 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
4722 -frtti and -fno-rtti code.
4724 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
4727 * doc/extend.texi (Other Builtins): Document probability associated
4728 with __builtin_expect.
4730 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
4733 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
4734 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
4735 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
4736 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
4738 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
4740 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
4742 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
4744 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
4746 2018-11-11 Richard Biener <rguenther@suse.de>
4748 * tree-vrp.h (class value_range_base): New base class for
4749 value_range containing all but the m_equiv member.
4750 (dump_value_range_base): Add.
4751 (range_includes_zero_p): Work on value_range_base.
4752 * tree-vrp.c (value_range_base::set): Split out base handling
4754 (value_range::set): this.
4755 (value_range::set_equiv): New.
4756 (value_range_base::value_range_base): New constructors.
4757 (value_range_base::check): Split out base handling from...
4758 (value_range::check): this.
4759 (value_range::equal_p): Refactor in terms of
4760 ignore_equivs_equal_p which is now member of the base.
4761 (value_range_base::set_undefined): New.
4762 (value_range_base::set_varying): Likewise.
4763 (value_range_base::dump):Split out base handling from...
4764 (value_range::dump): this.
4765 (value_range_base::set_and_canonicalize): Split out base handling
4767 (value_range::set_and_canonicalize): this.
4768 (value_range_base::union_): New.
4769 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
4771 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
4772 instead of value_range everywhere.
4773 (ipcp_vr_lattice::print): Use dump_value_range_base.
4774 (ipcp_vr_lattice::meet_with): Adjust.
4775 (ipcp_vr_lattice::meet_with_1): Likewise.
4776 (ipa_vr_operation_and_type_effects): Likewise.
4777 (propagate_vr_across_jump_function): Likewise.
4778 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
4779 (ipa_get_value_range): Likewise.
4780 (ipa_set_jfunc_vr): Likewise.
4781 (ipa_compute_jump_functions_for_edge): Likewise.
4783 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
4786 * doc/invoke.texi (Optimize Options): Add @opindex entries
4787 for the positive forms of -fno-xxx and -mno-xxx options
4788 that were lacking them.
4790 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
4792 * combine.c (make_more_copies): Only make an intermediate copy if the
4793 dest of a move is a pseudo.
4795 2018-11-09 Maya Rashish <coypu@sdf.org>
4798 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
4799 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
4801 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
4805 * doc/invoke.texi (Optimize Options): Clarify default behavior
4806 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
4808 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
4810 PR tree-optimization/87940
4811 * expr.c (string_constant): Don't strip NOPS in subexpressions.
4812 Fold PLUS_EXPR correctly.
4814 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
4817 * config/s390/s390.c (s390_safe_relative_long_p): New function.
4818 (annotate_constant_pool_refs): Skip insns which support
4819 relative addressing.
4820 (annotate_constant_pool_refs_1): New helper function.
4821 (find_constant_pool_ref): Skip insns which support relative
4823 (find_constant_pool_ref_1): New helper function.
4824 (replace_constant_pool_ref): Skip insns which support
4825 relative addressing.
4826 (replace_constant_pool_ref_1): New helper function.
4827 (s390_mainpool_start): Adapt to the new signature.
4828 (s390_mainpool_finish): Likewise.
4829 (s390_chunkify_start): Likewise.
4830 (s390_chunkify_finish): Likewise.
4831 (pass_s390_early_mach::execute): Likewise.
4832 (s390_prologue_plus_offset): Likewise.
4833 (s390_emit_prologue): Likewise.
4834 (s390_emit_epilogue): Likewise.
4836 2018-11-09 Jakub Jelinek <jakub@redhat.com>
4838 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
4839 but unsupported lastprivate with conditional modifier.
4841 2018-11-09 Jeff Law <law@redhat.com>
4843 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
4844 unused argument better. Add gcc_unreachable to silence warning.
4846 2018-11-09 Martin Sebor <msebor@redhat.com>
4849 * attribs.c (has_attribute): New helper function.
4850 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
4851 * attribs.h (decls_mismatched_attributes): Declare.
4852 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
4853 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
4854 * common.opt (-Wattribute-alias): Take an argument.
4855 (-Wno-attribute-alias): New option.
4856 * doc/extend.texi (Common Function Attributes): Document copy.
4857 (Common Variable Attributes): Same.
4858 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
4859 (-Wattribute-alias): Document new option argument.
4861 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
4863 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
4864 matching criteria. Remove unused array initializer.
4866 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
4867 Jinsong Ji <jji@us.ibm.com>
4869 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
4870 constraints by introducing a new temporary.
4871 (_mm_cvtss_si64): Likewise.
4873 2018-11-09 Martin Liska <mliska@suse.cz>
4875 * common.opt: Add -fipa-stack-alignment flag.
4876 * doc/invoke.texi: Document it.
4877 * final.c (rest_of_clean_state): Guard stack
4878 shrinking with flag.
4880 2018-11-09 Martin Liska <mliska@suse.cz>
4882 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
4884 (ipa_discover_variable_flags): ... this.
4885 * common.opt: Come up with new flag -fipa-reference-addressable.
4886 * doc/invoke.texi: Document it.
4887 * ipa-reference.c (propagate): Call the renamed fn.
4888 * ipa-visibility.c (whole_program_function_and_variable_visibility):
4890 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
4892 (ipa_discover_variable_flags): ... this. Discover
4893 non-addressable variables only with the newly added flag.
4894 * opts.c: Enable the newly added flag with -O1 and higher
4897 2018-11-09 David Malcolm <dmalcolm@redhat.com>
4899 * json.cc (selftest::test_writing_literals): Fix comment.
4901 2018-11-09 Martin Liska <mliska@suse.cz>
4903 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
4904 string to a stack buffer.
4905 (aarch64_parse_cpu): Likewise.
4906 (aarch64_parse_tune): Likewise.
4908 2018-11-09 Richard Biener <rguenther@suse.de>
4910 PR tree-optimization/87953
4911 * tree-vect-loop.c (vectorizable_reduction): For analysis
4912 always pass ops[0] to vectorizable_condition.
4914 2018-11-09 Stafford Horne <shorne@gmail.com>
4915 Richard Henderson <rth@twiddle.net>
4916 Joel Sherrill <joel@rtems.org>
4918 * common/config/or1k/or1k-common.c: New file.
4919 * config/or1k/*: New.
4920 * config.gcc (or1k*-*-*): New.
4921 * configure.ac (or1k*-*-*): New test for openrisc tls.
4922 * configure: Regenerated.
4923 * doc/install.texi: Document OpenRISC triplets.
4924 * doc/invoke.texi: Document OpenRISC arguments.
4925 * doc/md.texi: Document OpenRISC.
4927 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
4929 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
4930 (arm7tdmi-s): Delete CPU.
4931 (arm710t): Add aliases for arm720t and arm740t.
4932 (arm720t, arm740t): Delete CPUs.
4933 (arm920t): Add aliases for arm920, arm922t and arm940t.
4934 (arm920, arm922t, arm940t): Delete CPUs.
4935 (arm10tdmi): Add alias for arm1020t.
4936 (arm1020t): Delete CPU.
4937 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
4938 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
4939 (arm10e): Add aliases for arm1020e and arm1022e.
4940 (arm1020e, arm1022e): Delete CPU.
4941 * config/arm/arm.md (generic_sched): Remove entries that are now
4943 (generic_vfp): Likewise.
4944 * config/arm/arm1020e.md: Simplify tuning selection based on alias
4946 * config/arm/arm-tune.md: Regenerated.
4947 * config/arm/arm-tables.opt: Regenerated.
4949 2018-11-09 Richard Biener <rguenther@suse.de>
4951 PR tree-optimization/87621
4952 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
4953 op with only phi inputs.
4954 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
4955 (ch_base::copy_headers): Run CSE on copied loop headers.
4956 (pass_ch_vect::process_loop_p): Simplify.
4958 2018-11-09 Alexandre Oliva <oliva@adacore.com>
4960 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
4961 for non-w64 x86_64 biarch.
4963 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
4965 PR rtl-optimization/86438
4966 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
4967 of in_b for the compare if in_b is SET_DEST.
4970 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
4971 non-toplevel UNSPEC.
4973 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
4975 * tree-vrp.c (value_range::check): Do not access internals
4977 (value_range::singleton_p): Same.
4978 (value_range::type): Same.
4979 (vrp_finalize): Use value_range API.
4981 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
4983 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
4985 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
4987 * vr-values.c (vr_values::get_value_range): Use value_range API
4988 instead of piecing together ranges.
4989 (vr_values::update_value_range): Same.
4991 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
4993 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
4994 of performing ad-hoc calculations.
4995 * tree-ssanames.c (set_range_info): New overloaded function
4996 accepting value_range &.
4997 (get_range_info): Same.
4998 * tree-ssanames.h (set_range_info_raw): Remove.
4999 (set_range_info): New prototype.
5000 (get_range_info): Same.
5001 * tree-vrp.h (value_range::null_p): Rename to zero_p.
5002 * tree-vrp.c (value_range::null_p): Same.
5004 2018-11-09 Jan Hubicka <jh@suse.cz>
5006 * tree.c (fld_type_variant_equal_p): Test user align flag.
5007 (flt_type_variant): Copy user align flag.
5008 (fld_incomplete_type_of): Clear it.
5010 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5012 * config/arm/neon.md (div<mode>3): New pattern.
5014 2018-11-08 Andi Kleen <ak@linux.intel.com>
5016 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
5017 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
5018 (ix86_handle_option): Handle OPT_mptwrite.
5019 * config/i386/cpuid.h (bit_PTWRITE): Add.
5020 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
5021 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
5022 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
5023 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
5024 (ix86_option_override_internal): Handle PTA_PTWRITE.
5025 (ix86_valid_target_attribute_inner_p): Define ptwrite.
5026 (def_builtin2): Force UINT64 to be 64bit only.
5027 * config/i386/i386.h (TARGET_PTWRITE): Add.
5028 (TARGET_PTWRITE_P): Add.
5030 * config/i386/i386.md: Define ptwrite.
5031 * config/i386/i386.opt: Add -mptwrite.
5032 * config/i386/immintrin.h (_ptwrite64): Add.
5034 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
5035 * doc/invoke.texi: Document -mptwrite.
5037 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
5039 PR rtl-optimization/87600
5040 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
5041 * lra-constraints.c (process_alt_operands): Skip illegal hard
5042 register usage. Prefer reloading non hard register operands.
5044 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
5047 * doc/invoke.texi (Optimize Options): Clarify default behavior
5048 for -fno-sched-interblock and -fno-sched-spec.
5050 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
5052 * collect2.c (linker_select): Add USE_LLD_LD.
5053 (ld_suffixes): Add ld.lld.
5054 (main): Handle -fuse-ld=lld.
5055 * common.opt (-fuse-ld=lld): New option.
5056 * doc/invoke.texi (-fuse-ld=lld): Document.
5057 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
5059 2018-11-08 Paul Koning <ni1d@arrl.net>
5061 * config/pdp11/constraints.md: Add "Z" series constraints for use
5062 with pre-dec and post-inc addressing.
5063 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
5064 (pdp11_expand_operands): Add int argument (word count).
5065 (pdp11_sp_frame_offset): Delete.
5066 (pdp11_cmp_length): New function.
5067 (pushpop_regeq): New function.
5068 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
5070 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
5072 (pdp11_initial_elimination_offset): Ditto.
5073 (pdp11_expand_operands): Add word count argument. Bugfixes.
5074 (output_move_multiple): Change how pointer adjustment is done.
5075 (pdp11_gen_int_label): Correct format.
5076 (output_ascii): Ditto.
5077 (pdp11_asm_output_var): Add code for DEC assembler case.
5078 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
5080 (legitimate_const_double_p): Ditto.
5081 (pdp11_register_move_cost): Adjust for new register classes.
5082 (pdp11_regno_reg_class): Ditto.
5083 (expand_block_move): Delete.
5084 (pushpop_regeq): New function.
5085 (pdp11_legitimate_address_p): Bugfix in check for constant
5087 (pdp11_sp_frame_offset): Delete.
5088 (pdp11_reg_save_size): New helper function for new frame layout.
5089 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
5090 (pdp11_expand_shift): Bugfix in check for constant shift count.
5091 (pdp11_shift_length): Ditto.
5092 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
5093 (pdp11_cmp_length): New function.
5094 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
5095 some compile options.
5096 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
5097 (CALL_USED_REGISTERS): Ditto.
5098 (ELIMINABLE_REGS): Ditto.
5099 (REGISTER_NAMES): Ditto.
5100 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
5102 (REG_CLASS_NAMES): Ditto.
5103 (REG_CLASS_CONTENTS): Ditto. Also remove
5104 HARD_FRAME_POINTER_REGNUM.
5105 (CPU_REG_CLASS): New macro.
5106 (CLASS_MAX_NREGS): Adjust for new register classes.
5107 (FUNCTION_PROFILER): Make no-op.
5108 (may_call_alloca): Remove unused declaration.
5109 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
5110 (ASM_OUTPUT_SKIP): Fix format.
5111 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
5112 (HARD_FRAME_POINTER_REGNUM): Remove.
5114 (*rts): Rename. Remove epilogue related checks.
5115 (cmpsi, cmpdi): New insn.
5116 (cbranch<mode>4): Change to apply to SI and DI modes as well.
5117 (mov<mode>): Change constraints to enforce that push/pop
5118 destination cannot use the same register as source.
5119 (*mov<mode><cc_cc>): Ditto.
5120 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
5121 at assembly output rather than as RTL expander.
5122 (zero_extendqihi2): Bugfix in check for same registers.
5123 (adddi3_nocc): Bugfix in check for constant operand.
5124 (addsi3_nocc): Ditto.
5125 (subdi3_nocc): Ditto.
5126 (subsi3_nocc): Ditto.
5127 (negdi2_nocc): Copy input to pdp11_expand_operands.
5128 (negsi2_nocc): Ditto.
5129 (bswap2_nocc): Ditto.
5130 * config/pdp11/pdp11.opt (mlra): Fix documentation.
5131 * config/pdp11/t-pdp11: Use -Os.
5133 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
5135 * config/arm/parsecpu.awk (/alias/): New parsing rule.
5136 (/begin cpu/): Check that the cpu name hasn't been previously defined.
5137 (gen_comm_data): Print out CPU alias tables.
5138 (check_cpu): Match aliases when checking the CPU name.
5139 * config/arm/arm-protos.h (cpu_alias): New structure.
5140 (cpu_option): Add entry for aliases.
5141 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
5142 strongarm1100 and strongarm1110.
5143 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
5144 (config/arm/arm-generic.md): Remove redundant references to
5145 strongarm110, strongarm1100 and strongarm1110.
5146 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
5147 Scan aliases for additional hints.
5148 (arm_parse_cpu_option_name): Also match a cpu name against the list
5150 * config/arm/arm-tables.opt: Regenerated.
5151 * config/arm/arm-tune.md: Regenerated.
5153 2018-11-08 Jakub Jelinek <jakub@redhat.com>
5155 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
5156 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
5157 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
5158 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
5159 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
5160 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
5161 * gengtype.c (open_base_files): Add omp-general.h.
5162 * gimple.c (gimple_build_omp_critical):
5163 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
5164 gimple_omp_taskgroup_set_clauses.
5165 (gimple_build_omp_atomic_load): Add mo argument, call
5166 gimple_omp_atomic_set_memory_order.
5167 (gimple_build_omp_atomic_store): Likewise.
5168 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
5169 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
5171 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
5172 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
5173 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
5174 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
5175 different value for GF_OMP_ATOMIC_NEED_VALUE.
5176 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
5178 (struct gimple_statement_omp_single_layout): And remove here.
5179 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
5180 than gimple_statement_omp_single_layout.
5181 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
5183 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
5184 (gimple_omp_subcode): Formatting fix.
5185 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
5186 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
5187 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
5188 gimple_omp_teams_host, gimple_omp_teams_set_host,
5189 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
5190 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
5191 gimple_omp_taskgroup_set_clauses): New inline functions.
5192 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
5193 (gimple_build_omp_atomic_store): Likewise.
5194 (gimple_omp_atomic_seq_cst_p): Remove.
5195 (gimple_omp_atomic_memory_order): New function.
5196 (gimple_omp_atomic_set_seq_cst): Remove.
5197 (gimple_omp_atomic_set_memory_order): New function.
5198 (gimple_build_omp_taskgroup): Add clauses argument.
5199 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
5200 (dump_gimple_omp_task): Print taskwait with depend clauses.
5201 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
5202 dump_omp_atomic_memory_order.
5203 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
5204 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
5205 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
5206 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
5207 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
5208 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
5209 ORT_UNTIED_TASKLOOP enumerators.
5210 (enum gimplify_defaultmap_kind): New.
5211 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
5212 target_map_pointers_as_0len_arrays members, add defaultmap.
5213 (new_omp_context): Initialize defaultmap member.
5214 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
5215 (maybe_fold_stmt): Don't fold even in host teams regions.
5216 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
5217 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
5218 ctx->omp_firstprivatize_variable.
5219 (omp_add_variable): Don't add private/firstprivate for VLAs in
5221 (omp_default_clause): Print "taskloop" rather than "task" if
5223 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
5224 Handle new defaultmap clause kinds.
5225 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
5226 iterator to be lastprivate or private. Fix up diagnostics if linear
5227 is used on collapse>1 simd iterator.
5228 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
5229 (gimplify_omp_depend): New function.
5230 (gimplify_scan_omp_clauses): Add shared clause on parallel for
5231 combined parallel master taskloop{, simd} if taskloop has
5232 firstprivate, lastprivate or reduction clause. Handle
5233 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
5234 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
5235 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
5236 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
5237 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
5239 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
5240 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
5241 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
5242 OMP_CLAUSE_{TASK,IN}_REDUCTION.
5243 (gimplify_omp_task): Handle taskwait with depend clauses.
5244 (gimplify_omp_for): Add shared clause on parallel for combined
5245 parallel master taskloop{, simd} if taskloop has firstprivate,
5246 lastprivate or reduction clause. Use ORT_TASKLOOP or
5247 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
5248 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
5249 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
5250 __for_end and __for_range temporaries on OMP_PARALLEL for
5251 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
5252 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
5253 sandwiched in between two taskloops.
5254 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
5255 instead of ctx->omp_firstprivatize_variable.
5256 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
5257 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
5258 host teams, use gimplify_and_return_first etc. for body like
5259 for target or target data constructs, and at the end call
5260 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
5261 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
5262 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
5263 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
5264 gimple_omp_atomic_set_seq_cst calls.
5265 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
5266 case, handle taskgroup clauses.
5267 * lto-streamer-out.c (hash_tree): Handle
5268 OMP_CLAUSE_{TASK,IN}_REDUCTION.
5269 * Makefile.in (GTFILES): Add omp-general.h.
5270 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
5271 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
5272 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
5273 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
5274 BUILT_IN_GOMP_LOOP_DOACROSS_START,
5275 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
5276 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
5277 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
5278 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
5279 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
5280 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
5281 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
5282 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
5283 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
5284 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
5285 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
5286 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
5287 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
5288 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
5289 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
5290 * omp-expand.c (workshare_safe_to_combine_p): Return false for
5291 non-worksharing loops.
5292 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
5293 (determine_parallel_type): Don't combine parallel with worksharing
5294 which has _reductemp_ clause.
5295 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
5296 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
5297 if there is nonmonotonic modifier or if there is no modifier and no
5298 ordered clause. For dynamic and guided schedule without monotonic
5299 and nonmonotonic modifier, default to nonmonotonic.
5300 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
5301 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
5303 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
5304 there are any reduction clauses.
5305 (expand_taskwait_call): New function.
5306 (expand_teams_call): New function.
5307 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
5308 expand_teams_call for it. Formatting fix. Handle taskwait with
5310 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
5311 of worksharing loops with task reductions.
5312 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
5313 expansion of worksharing loops with task reductions.
5314 (expand_omp_sections): Handle expansion of sections with task
5316 (expand_omp_synch): For host teams call expand_omp_taskreg.
5317 (omp_memory_order_to_memmodel): New function.
5318 (expand_omp_atomic_load, expand_omp_atomic_store,
5319 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
5320 instead of gimple_omp_atomic_seq_cst_p.
5321 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
5322 depend clauses as a standalone directive.
5323 * omp-general.c (enum omp_requires): New variable.
5324 (omp_extract_for_data): Initialize have_reductemp member. Allow
5325 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
5326 GT_EXPR loops depending on incr sign. Formatting fixes.
5327 * omp-general.h (struct omp_for_data): Add have_reductemp member.
5328 (enum omp_requires): New enum.
5329 (omp_requires_mask): Declare.
5330 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
5332 * omp-low.c (struct omp_context): Add task_reductions and
5333 task_reduction_map fields.
5334 (is_host_teams_ctx): New function.
5335 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
5336 (use_pointer_for_field): Use is_global_var instead of
5337 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
5339 (build_outer_var_ref): Ignore taskgroup outer contexts.
5340 (delete_omp_context): Release task_reductions and task_reduction_map.
5341 (scan_sharing_clauses): Don't add any fields for reduction clause on
5342 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
5343 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
5344 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
5345 Handle OMP_CLAUSE_NONTEMPORAL.
5346 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
5348 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
5349 clauses with task modifier.
5350 (scan_omp_task): Handle taskwait with depend clauses.
5351 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
5352 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
5353 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
5354 (scan_omp_for): Fix comment formatting.
5355 (scan_omp_teams): Handle host teams constructs.
5356 (check_omp_nesting_restrictions): Allow teams with no outer
5357 OpenMP context. Adjust diagnostics for teams strictly nested into
5358 some explicit OpenMP construct other than target. Allow OpenMP atomics
5359 inside of simd regions.
5360 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
5361 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
5362 taskreg_nesting_level while scanning host teams construct.
5363 (task_reduction_read): New function.
5364 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
5365 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
5366 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
5367 second argument create_tmp_var if it is NULL. Don't ignore shared
5368 clauses in is_host_teams_ctx contexts. Handle
5369 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
5371 (lower_reduction_clauses): Ignore reduction clauses with task
5372 modifier. Remove second argument create_tmp_var if it is NULL.
5373 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
5374 (lower_send_clauses): Ignore reduction clauses with task modifier.
5375 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
5376 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
5377 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
5378 rely that it is the last stmt in body so far. Ignore outer taskgroup
5380 (omp_task_reductions_find_first, omp_task_reduction_iterate,
5381 lower_omp_task_reductions): New functions.
5382 (lower_omp_sections): Handle reduction clauses with taskgroup
5383 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
5384 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
5385 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
5387 (lower_omp_taskgroup): Handle taskgroup reductions.
5388 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
5389 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
5390 (lower_depend_clauses): If there are any
5391 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
5392 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
5393 seen, assume lowering is done already and return early. Set kind
5394 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
5395 (lower_omp_taskreg): Handle reduction clauses with task modifier on
5396 parallel construct. Handle reduction clause on taskloop construct.
5397 Handle taskwait with depend clauses.
5398 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
5399 for host teams constructs.
5400 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
5401 nontemporal and _reductemp_ clause entries.
5402 (omp_clause_code_name): Likewise.
5403 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
5404 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
5405 * tree-core.h (enum omp_clause_code): Add
5406 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
5407 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
5408 (struct tree_base): Add omp_atomic_memory_order field into union.
5409 Remove OMP_ATOMIC_SEQ_CST comment.
5410 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
5411 and OMP_CLAUSE_DEPEND_DEPOBJ.
5412 (struct tree_omp_clause): Add subcode.defaultmap_kind.
5413 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
5414 OpenMP constructs with body and clauses operands.
5415 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
5416 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
5417 (OMP_TASKGROUP_CLAUSES): Define.
5418 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
5419 OMP_CLAUSE__LOOPTEMP_.
5420 (OMP_ATOMIC_SEQ_CST): Remove.
5421 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
5422 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
5423 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
5424 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
5425 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
5426 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
5427 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
5428 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
5429 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
5430 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
5432 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
5433 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5434 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
5435 (convert_local_omp_clauses): Likewise. Remove useless test.
5436 * tree-parloops.c (create_call_for_reduction_1): Pass
5437 OMP_MEMORY_ORDER_RELAXED as new argument to
5438 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
5439 * tree-pretty-print.c (dump_omp_iterators): New function.
5440 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
5441 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
5442 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
5443 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
5444 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
5445 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
5446 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
5447 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
5448 (dump_omp_atomic_memory_order): New function.
5449 (dump_generic_node): Use it. Print taskgroup clauses. Print
5450 taskwait with depend clauses.
5451 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
5452 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
5453 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
5454 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
5455 write_ts_omp_clause_tree_pointers): Likewise.
5457 2018-11-08 David Malcolm <dmalcolm@redhat.com>
5460 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
5461 "-missed", "-note", and "-all" sub-options.
5462 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
5464 (can_early_inline_edge_p): Likewise.
5465 (want_early_inline_function_p): Likewise.
5466 (want_inline_self_recursive_call_p): Likewise.
5467 (recursive_inlining): Likewise.
5468 (inline_small_functions): Likewise.
5469 (flatten_function): Likewise.
5470 (ipa_inline): Likewise.
5471 (inline_always_inline_functions): Likewise.
5472 (early_inline_small_functions): Likewise.
5473 (early_inliner): Likewise.
5474 * tree-inline.c (expand_call_inline): Likewise.
5476 2018-11-08 David Malcolm <dmalcolm@redhat.com>
5478 * pretty-print.c (pp_format): Handle %f.
5479 (selftest::test_pp_format): Add test of %f.
5480 * pretty-print.h (pp_double): New macro.
5482 2018-11-08 David Malcolm <dmalcolm@redhat.com>
5484 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
5485 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
5486 (dump_pretty_printer::decode_format): Implement "%C" for
5488 (selftest::test_capture_of_dump_calls): Rename "where" to
5489 "stmt_loc". Convert test_decl to a function decl and set its
5490 location. Add a symbol_table_test RAII instance and a
5491 cgraph_node, using it to test "%C" and dump_symtab_node.
5493 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
5496 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
5498 2018-11-08 David Malcolm <dmalcolm@redhat.com>
5500 * cgraph.c: Include "selftest.h".
5501 (saved_symtab): New variable.
5502 (selftest::symbol_table_test::symbol_table_test): New ctor.
5503 (selftest::symbol_table_test::~symbol_table_test): New dtor.
5504 (selftest::test_symbol_table_test): New test.
5505 (selftest::cgraph_c_tests): New.
5506 * cgraph.h (saved_symtab): New decl.
5507 (selftest::symbol_table_test): New class.
5508 * selftest-run-tests.c (selftest::run_tests): Call
5509 selftest::cgraph_c_tests.
5510 * selftest.h (selftest::cgraph_c_tests): New decl.
5512 2018-11-08 Richard Biener <rguenther@suse.de>
5514 * tree-data-ref.h (lambda_int): New typedef.
5515 (lambda_vector_gcd): Adjust.
5516 (lambda_vector_new): Likewise.
5517 (lambda_matrix_new): Likewise.
5518 * tree-data-ref.c (print_lambda_vector): Adjust.
5520 2018-11-08 Richard Biener <rguenther@suse.de>
5522 PR tree-optimization/87929
5523 * tree-complex.c (expand_complex_comparison): Clean EH.
5525 2018-11-08 Martin Liska <mliska@suse.cz>
5527 * doc/extend.texi: Reword.
5528 * predict.c (expr_expected_value_1): Likewise.
5530 2018-11-08 Richard Biener <rguenther@suse.de>
5532 PR tree-optimization/87913
5533 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
5534 of extreme values to ordered comparisons.
5536 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
5539 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
5541 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
5543 * doc/invoke.texi: Remove leading dash from @opindex entries
5544 throughout the file.
5546 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
5549 * doc/invoke.texi (Option Summary): Add -e and --entry.
5550 (Link Options): Likewise.
5552 2018-11-07 Nathan Sidwell <nathan@acm.org>
5555 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
5556 --disable-checking bootstrap.
5558 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
5560 * configure: Regenerated.
5562 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5565 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
5566 to the mode of the widest field iff the widest field has mode class
5567 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
5570 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
5572 * common.opt: Add -Wattribute-warning.
5573 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
5574 * expr.c (expand_expr_real_1): Add new attribute to warning_at
5575 call to allow user configure behavior of "warning" attribute.
5577 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
5579 * target.def: Put @: after every vs., e.g., and i.e. where it is
5580 followed by whitespace.
5581 * doc/extend.texi: Ditto.
5582 * doc/fragments.texi: Ditto.
5583 * doc/gimple.texi: Ditto.
5584 * doc/implement-c.texi: Ditto.
5585 * doc/install.texi: Ditto.
5586 * doc/invoke.texi: Ditto.
5587 * doc/md.texi: Ditto.
5588 * doc/plugins.texi: Ditto.
5589 * doc/rtl.texi: Ditto.
5590 * doc/sourcebuild.texi: Ditto.
5591 * doc/tm.texi.in: Ditto.
5592 * doc/ux.texi: Ditto.
5593 * doc/tm.texi: Regenerate.
5595 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5597 * config/arm/arm-cpus.in (ares): New entry.
5598 * config/arm/arm-tables.opt: Regenerate.
5599 * config/arm/arm-tune.md: Likewise.
5600 * doc/invoke.texi (ARM Options): Document ares.
5602 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5604 * config/aarch64/aarch64-cores.def (ares): Define.
5605 * config/aarch64/aarch64-tune.md: Regenerate.
5606 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
5608 2018-11-07 Jan Hubicka <jh@suse.cz>
5610 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
5611 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
5612 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
5615 2018-11-07 Richard Biener <rguenther@suse.de>
5617 PR tree-optimization/87914
5618 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
5620 (vectorizable_reduction): Handle shifts and rotates by dispatching
5621 to vectorizable_shift.
5622 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
5623 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
5625 (vectorizable_shift): Export and handle being called as
5627 (vect_analyze_stmt): Call vectorizable_shift after
5628 vectorizable_reduction.
5629 * tree-vectorizer.h (vectorizable_shift): Declare.
5631 2018-11-07 Jan Hubicka <jh@suse.cz>
5633 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
5634 than const decls in TREE_VALUE of enum.
5635 (dump_type_inheritance_graph): Improve duplicate dumping.
5636 (free_enum_values): New.
5637 (build_type_inheritance_graph): Use it.
5638 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
5639 which are not main variants or not ODR types.
5640 (verify_type_variant): Expect variants to have no TYPE_VALUES.
5642 2018-11-07 Richard Biener <rguenther@suse.de>
5644 * ipa-inline.c (want_inline_small_function_p): Compute
5645 big_speedup_p lazily and last.
5647 2018-11-07 Jan Hubicka <jh@suse.cz>
5649 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
5650 building incomplete variant of complete type.
5651 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
5652 variant of complete type.
5654 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5656 * config/mips/mips.c: Fix typo in documentation of
5657 mips_loongson_ext2_prefetch_cookie.
5658 (mips_option_override): fix brain twister logical.
5659 * config/mips/mips.h: Fix typo in documentation of
5660 ISA_HAS_CTZ_CTO and define pattern.
5661 * config/mips/mips.md (prefetch): Hoist EXT2 above
5663 (prefetch_indexed): Hoist EXT2 above the EXT block.
5665 2018-11-07 Jan Hubicka <jh@suse.cz>
5667 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
5668 return and parameter types of function and method types.
5669 (free_lang_data_in_cgraph): Update.
5671 2018-11-07 Martin Liska <mliska@suse.cz>
5673 PR rtl-optimization/87868
5674 * postreload-gcse.c (eliminate_partially_redundant_load): Set
5675 threshold to max_count if we would overflow.
5676 * profile-count.h: Make max_count a public constant.
5678 2018-11-07 Martin Liska <mliska@suse.cz>
5680 * mem-stats.h: Fix GNU coding style.
5682 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5684 * config/mips/gs264e.md: New.
5685 * config/mips/mips-cpus.def: Define gs264e.
5686 * config/mips/mips-tables.opt: Regenerate.
5687 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
5689 (mips_issue_rate): Add support for gs264e.
5690 (mips_multipass_dfa_lookahead): Likewise.
5691 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
5692 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
5693 (MIPS_ASE_MSA_SPEC): New.
5694 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
5695 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
5696 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
5697 * config/mips/mips.md: Include gs264e.md.
5698 (processor): Add gs264e.
5699 * config/mips/mips.opt (MSA): Use Mask instead of Var.
5700 * doc/invoke.texi: Add gs264e to supported architectures.
5702 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5704 * config/mips/gs464e.md: New.
5705 * config/mips/mips-cpus.def: Define gs464e.
5706 * config/mips/mips-tables.opt: Regenerate.
5707 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
5709 (mips_issue_rate): Add support for gs464e.
5710 (mips_multipass_dfa_lookahead): Likewise.
5711 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
5712 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
5713 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
5714 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
5715 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
5716 * config/mips/mips.md: Include gs464e.md.
5717 (processor): Add gs464e.
5718 * doc/invoke.texi: Add gs464e to supported architectures.
5720 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5722 * config/mips/loongson3a.md: Rename to ...
5723 * config/mips/gs464.md: ... here.
5724 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
5725 as an alias of gs464 processor.
5726 * config/mips/mips-tables.opt: Regenerate.
5727 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
5728 instead of PROCESSOR_LOONGSON_3A.
5729 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
5731 (mips_option_override): Enable MMI and EXT for gs464.
5732 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
5733 Rename TUNE_LOONGSON_3A to TUNE_GS464.
5734 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
5735 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
5736 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
5738 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
5739 (processor): Add gs464;
5740 * doc/invoke.texi: Add gs464 to supported architectures.
5742 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5744 * config/mips/mips-protos.h
5745 (mips_loongson_ext2_prefetch_cookie): New prototype.
5746 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
5747 (mips_option_override): Enable TARGET_LOONGSON_EXT when
5748 TARGET_LOONGSON_EXT2 is true.
5749 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
5750 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
5751 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
5752 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
5753 TARGET_LOONGSON_EXT2.
5754 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
5755 (define_insn "ctz<mode>2"): New insn pattern.
5756 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
5757 (define_insn "prefetch_indexed_<mode>"): Include
5758 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
5759 * config/mips/mips.opt (-mloongson-ext2): Add option.
5760 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
5762 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5764 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
5765 __mips_loongson_ext.
5766 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
5767 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
5769 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
5770 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
5771 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
5772 instead of TARGET_LOONGSON_3A.
5773 * config/mips/mips.opt (-mloongson-ext): Add option.
5774 * gcc/doc/invoke.texi (-mloongson-ext): Document.
5776 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5778 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
5779 * config/mips/loongson.md: Move to ...
5780 * config/mips/loongson-mmi.md: here; Adjustment.
5781 * config/mips/loongson.h: Move to ...
5782 State as deprecated. Include loongson-mmiintrin.h for back
5783 compatibility and warning.
5784 * config/mips/loongson-mmiintrin.h: ... here.
5785 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
5786 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
5787 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
5788 (mips_option_override): Make sure MMI use hard float;
5789 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
5790 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
5791 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
5792 TARGET_LOONGSON_VECTORS.
5793 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
5794 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
5795 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
5796 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
5798 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
5799 TARGET_LOONGSON_VECTORS.
5800 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
5801 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
5802 (Loongson MMI patterns): Include loongson-mmi.md instead of
5804 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
5805 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
5807 2018-11-07 Richard Biener <rguenther@suse.de>
5810 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
5811 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
5813 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
5815 PR rtl-optimization/87874
5816 * lra.c (lra_substitute_pseudo): Do not create a subreg for
5819 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
5821 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
5822 if not in indexed or indirect form.
5823 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
5824 (bswap<mode>2_store): Ditto.
5826 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
5828 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
5831 2018-11-06 Richard Biener <rguenther@suse.de>
5833 PR tree-optimization/86850
5834 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
5835 instead of src.m_vec.
5837 2018-11-06 Jan Hubicka <jh@suse.cz>
5839 * tree.c (fld_simplified_type_name): Break out form ...
5840 (free_lang_data_in_type): ... here.
5841 (fld_type_variant_equal_p): Use it.
5843 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5845 * config/default-d.c: Include memmodel.h.
5847 * config/sol2-d.c: New file.
5848 * config/t-sol2 (sol2-d.o): New rule.
5849 * config.gcc <*-*-solaris2*>: Set d_target_objs,
5850 target_has_targetdm.
5852 2018-11-06 Jan Hubicka <jh@suse.cz>
5854 * tree.c (fld_type_variant): Also copy alignment; be sure that
5855 new variant is equal.
5857 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
5860 * config/s390/s390.md: Add relative_long attribute.
5862 2018-11-06 Jan Hubicka <jh@suse.cz>
5864 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
5865 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
5866 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
5867 stream TYPE_NEEDS_CONSTRUCTING.
5868 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
5869 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
5871 2018-11-06 Richard Biener <rguenther@suse.de>
5873 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
5875 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
5877 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5879 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
5880 REG_CLASS_CONTENTS[GEN_REGS].
5881 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
5883 2018-11-06 Jan Hubicka <jh@suse.cz>
5885 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
5887 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5890 * config/sol2.h (ASAN_CC1_SPEC): Define.
5891 (LD_WHOLE_ARCHIVE_OPTION): Define.
5892 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
5893 (ASAN_REJECT_SPEC): Provide default.
5894 (LIBASAN_EARLY_SPEC): Define.
5895 (LIBTSAN_EARLY_SPEC): Define.
5896 (LIBLSAN_EARLY_SPEC): Define.
5897 * config/i386/sol2.h (CC1_SPEC): Redefine.
5898 (ASAN_REJECT_SPEC): Define.
5900 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
5901 (TARGET_ASAN_SHADOW_OFFSET): Define.
5902 (sparc_asan_shadow_offset): New function.
5903 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
5904 (ASAN_REJECT_SPEC): Define.
5906 2018-11-06 Jan Hubicka <jh@suse.cz>
5908 * tree.c (fld_type_variant): Copy canonical type.
5909 (fld_incomplete_type_of): Check that canonical types looks sane;
5910 copy canonical type.
5911 (verify_type): Accept when incomplete type has complete canonical type.
5913 2018-11-06 Jan Hubicka <jh@suse.cz>
5915 * tree.c (free_lang_data): Reset overwite_assembler_name,
5916 print_xnode, print_decl, print_type and print_identifier of
5919 2018-11-06 Richard Biener <rguenther@suse.de>
5921 PR tree-optimization/87889
5922 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
5923 Do nothing if old and new arg are the same
5925 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
5928 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
5929 attributes for operands 3 and 4.
5931 2018-11-06 Richard Biener <rguenther@suse.de>
5934 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
5935 matching bitfield insertion.
5937 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
5939 * auto-inc-dec.c: Include valtrack.h. Improve comments.
5940 (reg_next_debug_use): New.
5941 (attempt_change): Propagate adjusted expression into affected
5943 (merge_in_block): Track uses in debug insns.
5944 (pass_inc_dec::execute): Allocate and release
5947 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
5949 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
5950 (_mm512_fixupimm_round_pd): Update parameters and builtin.
5951 (_mm512_maskz_fixupimm_round_pd): Ditto.
5952 (_mm512_fixupimm_round_ps): Ditto.
5953 (_mm512_maskz_fixupimm_round_ps): Ditto.
5954 (_mm_fixupimm_round_sd): Ditto.
5955 (_mm_maskz_fixupimm_round_sd): Ditto.
5956 (_mm_fixupimm_round_ss): Ditto.
5957 (_mm_maskz_fixupimm_round_ss): Ditto.
5958 (_mm512_fixupimm_pd): Ditto.
5959 (_mm512_maskz_fixupimm_pd): Ditto.
5960 (_mm512_fixupimm_ps): Ditto.
5961 (_mm512_maskz_fixupimm_ps): Ditto.
5962 (_mm_fixupimm_sd): Ditto.
5963 (_mm_maskz_fixupimm_sd): Ditto.
5964 (_mm_fixupimm_ss): Ditto.
5965 (_mm_maskz_fixupimm_ss): Ditto.
5966 (_mm512_mask_fixupimm_round_pd): Update builtin.
5967 (_mm512_mask_fixupimm_round_ps): Ditto.
5968 (_mm_mask_fixupimm_round_sd): Ditto.
5969 (_mm_mask_fixupimm_round_ss): Ditto.
5970 (_mm512_mask_fixupimm_pd): Ditto.
5971 (_mm512_mask_fixupimm_ps): Ditto.
5972 (_mm_mask_fixupimm_sd): Ditto.
5973 (_mm_mask_fixupimm_ss): Ditto.
5974 * config/i386/avx512vlintrin.h:
5975 (_mm256_fixupimm_pd): Update parameters and builtin.
5976 (_mm256_maskz_fixupimm_pd): Ditto.
5977 (_mm256_fixupimm_ps): Ditto.
5978 (_mm256_maskz_fixupimm_ps): Ditto.
5979 (_mm_fixupimm_pd): Ditto.
5980 (_mm_maskz_fixupimm_pd): Ditto.
5981 (_mm_fixupimm_ps): Ditto.
5982 (_mm_maskz_fixupimm_ps): Ditto.
5983 (_mm256_mask_fixupimm_pd): Update builtin.
5984 (_mm256_mask_fixupimm_ps): Ditto.
5985 (_mm_mask_fixupimm_pd): Ditto.
5986 (_mm_mask_fixupimm_ps): Ditto.
5987 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
5988 * config/i386/i386-builtin.def: Update builtin definitions.
5989 * config/i386/i386.c: Handle new builtin types and remove useless ones.
5990 * config/i386/sse.md: Update VFIXUPIMM* patterns.
5991 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
5992 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
5993 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
5994 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
5995 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
5996 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
5997 * config/i386/subst.md:
5998 (round_saeonly_sd_mask_operand4): Add new subst_attr.
5999 (round_saeonly_sd_mask_op4): Ditto.
6000 (round_saeonly_expand_operand5): Ditto.
6001 (round_saeonly_expand): Update.
6003 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
6005 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
6007 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
6009 PR rtl-optimization/87871
6010 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
6012 2018-11-05 Paul Koning <ni1d@arrl.net>
6014 * doc/sourcebuild.texi (target attributes): Document new "inf"
6015 effective target keyword.
6017 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
6019 * config/s390/s390.c (s390_register_move_cost): Increase costs for
6020 moves involving the CC reg.
6022 2018-11-05 Richard Biener <rguenther@suse.de>
6024 PR tree-optimization/87873
6025 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
6027 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
6028 * tree-vect-loop.c (vect_transform_loop): When splitting the
6029 loop exit also create forwarder PHIs for constants.
6030 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
6031 Handle constant to_arg, add extra checking we match up the correct
6034 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
6036 * config/s390/s390.md: QImode and HImode for load on condition.
6038 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
6040 * config/s390/predicates.md: Fix typo.
6041 * config/s390/s390.md: Allow immediates for load on condition.
6043 2018-11-05 Martin Liska <mliska@suse.cz>
6045 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
6046 * bitmap.h (struct bitmap_usage): Likewise.
6047 * ggc-common.c (SCALE): Remove.
6049 (struct ggc_usage): Use SIZE_AMOUNT. And update
6051 * ggc-page.c (SCALE): Remove.
6052 (STAT_LABEL): Remove.
6053 (ggc_print_statistics): Use SIZE_AMOUNT.
6054 * gimple.h (SCALE): Remove.
6056 * input.c (ONE_K): Remove.
6059 (STAT_LABEL): Likewise.
6060 (FORMAT_AMOUNT): Likewise.
6061 (dump_line_table_statistics): Use SIZE_AMOUNT.
6062 * mem-stats.h (struct mem_usage): Likewise.
6063 * rtl.c (dump_rtx_statistics): Likewise.
6064 (rtx_alloc_counts): Change type to size_t.
6065 (rtx_alloc_sizes): Likewise.
6066 (rtx_count_cmp): New.
6067 (dump_rtx_statistics): Sort first based on counts.
6068 * tree.c (tree_nodes_cmp): New.
6069 (tree_codes_cmp): New.
6070 (dump_tree_statistics): Sort first based on counts.
6071 * system.h (ONE_K): New.
6073 (SIZE_SCALE): Likewise.
6074 (SIZE_LABEL): Likewise.
6075 (SIZE_AMOUNT): Likewise.
6076 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
6077 * tree-dfa.c (dump_dfa_stats): Likewise.
6078 * tree-phinodes.c (phinodes_print_statistics): Likewise.
6079 * tree-ssanames.c (ssanames_print_statistics): Likewise.
6080 * tree.c (dump_tree_statistics): Likewise.
6081 * vec.c (struct vec_usage): Likewise.
6082 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
6083 trigger a -Werror=format-overflow with
6084 --enable-gather-detailed-stats.
6086 2018-11-05 Martin Liska <mliska@suse.cz>
6088 * mem-stats.h (mem_alloc_description::release_instance_overhead):
6090 * vec.c (struct vec_usage): Register m_element_size.
6091 (vec_prefix::register_overhead): New arguments: elements and
6093 (vec_prefix::release_overhead): Subtract elements.
6094 * vec.h (struct vec_prefix): Change signature.
6095 (va_heap::reserve): Pass proper arguments.
6096 (va_heap::release): Likewise.
6098 2018-11-05 Martin Liska <mliska@suse.cz>
6100 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
6104 2018-11-05 Richard Biener <rguenther@suse.de>
6106 * tree-scalar-evolution.h (final_value_replacement_loop): Update
6108 * tree-scalar-evolution.c (final_value_replacement_loop): Return
6109 whether anything was done.
6110 (scev_const_prop): Remove constant propagation part, fold
6112 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
6113 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
6116 2018-11-05 Jakub Jelinek <jakub@redhat.com>
6118 PR tree-optimization/87859
6119 * gimple-ssa-store-merging.c (struct merged_store_group): Add
6120 only_constants and first_nonmergeable_order members.
6121 (merged_store_group::merged_store_group): Initialize them.
6122 (merged_store_group::do_merge): Clear only_constants member if
6123 adding something other than INTEGER_CST store.
6124 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
6125 stores with order >= first_nonmergeable_order. Use
6126 merged_store->only_constants instead of always recomputing it.
6127 Set merged_store->first_nonmergeable_order if we've skipped any
6128 stores. Attempt to merge overlapping INTEGER_CST stores that
6129 we would otherwise skip.
6132 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
6134 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
6137 * config/i386/emmintrin.h (__v16qs): New to cope with option
6139 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
6140 (_mm_cmplt_epi8): Likewise.
6141 (_mm_cmpgt_epi8): Likewise.
6143 2018-11-05 Richard Biener <rguenther@suse.de>
6145 PR rtl-optimization/87852
6146 * fwprop.c (use_killed_between): Only consider single-defs of the
6147 use whose definition statement dominates the use.
6149 2018-11-05 Martin Liska <mliska@suse.cz>
6152 * doc/invoke.texi: Remove options that are
6153 not disabled with -Os.
6155 2018-11-05 Martin Liska <mliska@suse.cz>
6158 * doc/extend.texi: Update constrain about the last argument
6159 of __builtin_expect_with_probability.
6161 2018-11-05 Martin Liska <mliska@suse.cz>
6164 * predict.c (expr_expected_value_1): Verify
6165 that last argument is a real constants and emit
6168 2018-11-05 Martin Liska <mliska@suse.cz>
6170 PR gcov-profile/77698
6171 * ipa-profile.c (ipa_profile): Adjust hotness threshold
6174 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
6176 PR tree-optimization/86572
6177 * builtins.c (c_strlen): Handle negative offsets in a safe way.
6179 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
6181 PR tree-optimization/87672
6182 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
6183 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
6185 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
6188 * cfgexpand.c (pass_expand::execute): Move the call to
6189 finish_eh_generation in front of the call to expand_stack_alignment.
6191 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
6193 * common/config/i386/i386-common.c (processor_alias_table): Add
6195 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
6196 (case ${target}): Add znver2.
6197 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
6198 -march=native recognize znver2 processors.
6199 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
6200 * config/i386/i386.c (m_znver2): New definition.
6201 (m_ZNVER): New definition.
6202 (m_AMD_MULTIPLE): Includes m_znver2.
6203 (processor_cost_table): Add znver2 entry.
6204 (processor_target_table): Add znver2 entry.
6205 (get_builtin_code_for_version): Set priority for
6207 (processor_model): Add M_AMDFAM17H_ZNVER2.
6208 (arch_names_table): Ditto.
6209 (ix86_reassociation_width): Include znver2.
6210 * config/i386/i386.h (TARGET_znver2): New definition.
6211 (struct ix86_size_cost): Add TARGET_ZNVER2.
6212 (enum processor_type): Add PROCESSOR_ZNVER2.
6213 * config/i386/i386.md (define_attr "cpu"): Add znver2.
6214 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
6215 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
6216 (ix86_adjust_cost): Add znver2.
6217 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
6218 * gcc/doc/extend.texi: Add details about znver2.
6219 * gcc/doc/invoke.texi: Add details about znver2.
6221 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
6225 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
6228 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
6230 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
6231 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
6233 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
6235 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
6236 shrink-wrapping when -mtrack-speculation.
6238 2018-11-02 Richard Biener <rguenther@suse.de>
6240 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
6241 (pop_cost_one_pair): Do not free pair.
6242 (pop_best_coalesce): Likewise.
6243 (create_coalesce_list): Initialize obstack.
6244 (delete_coalesce_list): Free obstack.
6245 (find_coalesce_pair): Obstack-allocate coalesce pairs.
6246 (add_cost_one_coalesce): Likewise.
6247 (struct live_track): Remove bitmap pointer indirections.
6248 (new_live_track): Adjust.
6249 (delete_live_track): Likewise.
6250 (live_track_remove_partition): Likewise.
6251 (live_track_add_partition): Likewise.
6252 (live_track_live_p): Likewise.
6253 (live_track_process_def): Likewise.
6254 (live_track_clear_base_vars): Likewise.
6256 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6258 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
6259 * configure: Regenerate.
6260 * config.in: Regenerate.
6261 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
6262 HAVE_AS_REGISTER_PSEUDO_OP guard.
6263 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
6264 !HAVE_AS_REGISTER_PSEUDO_OP support.
6265 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
6268 2018-11-02 Richard Biener <rguenther@suse.de>
6270 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
6273 2018-11-02 Richard Biener <rguenther@suse.de>
6275 PR tree-optimization/87776
6276 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
6277 executable when iterating but running into rpo-vn-max-loop-depth
6278 and not eliding the iteration.
6280 2018-11-30 Jan Hubicka <jh@suse.cz>
6282 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
6285 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
6287 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
6289 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
6290 Combine with rs6000_address_for_fpconvert.
6291 (rs6000_address_for_fpconvert): Combine with
6292 rs6000_force_indexed_or_indirect_mem.
6293 (rs6000_expand_vector_init): Change function call from
6294 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
6295 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
6296 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
6297 (floatsi<mode>2_lfiwax_mem): Ditto.
6298 (floatunssi<mode>2_lfiwzx): Ditto.
6299 (floatunssi<mode>2_lfiwzx_mem): Ditto.
6300 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
6301 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
6302 (fix_trunc<mode>si2_stfiwx): Ditto.
6303 (fixuns_trunc<mode>si2_stfiwx): Ditto.
6304 (float_<mode>si2_hw): Ditto.
6305 (floatuns_<mode>si2_hw): Ditto.
6306 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
6307 (vsx_splat_<mode>): Ditto.
6309 2018-11-01 Joseph Myers <joseph@codesourcery.com>
6311 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
6312 at end of assembler input text.
6313 * configure: Regenerate.
6315 2018-11-01 Jakub Jelinek <jakub@redhat.com>
6317 PR tree-optimization/87826
6318 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
6319 negative or larger or equal to type's precision.
6321 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
6323 * opts.c (default_options_table): Do not enable
6324 OPT_fdelayed_branch at -Og.
6325 * doc/invoke.texi (-fdelayed-branch): Document it.
6327 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
6329 * optabs-libfuncs.c (build_libfunc_function_visibility):
6330 New, split out from...
6331 (build_libfunc_function): ... here.
6332 (init_one_libfunc_visibility): New, split out from ...
6333 (init_one_libfunc): ... here.
6335 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
6336 scratch register need not be early-clobber. Document the reason
6337 why we cannot use ST<OP>.
6339 2018-10-31 Joseph Myers <joseph@codesourcery.com>
6342 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
6343 line for second argument of AC_DEFINE_UNQUOTED.
6344 * doc/install.texi (Tools/packages necessary for modifying GCC):
6345 Update to autoconf 2.69 and automake 1.15.1.
6346 * aclocal.m4, config.in, configure: Regenerate.
6348 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
6350 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
6353 2018-10-31 Martin Liska <mliska@suse.cz>
6356 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
6357 Add new argument invalid_extension.
6358 (aarch64_get_all_extension_candidates): New function.
6359 (aarch64_rewrite_selected_cpu): Add NULL to function call.
6360 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
6362 (aarch64_get_all_extension_candidates): New function.
6363 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
6364 argument invalid_extension.
6365 (aarch64_parse_cpu): Likewise.
6366 (aarch64_print_hint_for_extensions): New function.
6367 (aarch64_validate_mcpu): Provide hint about invalid extension.
6368 (aarch64_validate_march): Likewise.
6369 (aarch64_handle_attr_arch): Pass new argument.
6370 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
6371 (aarch64_handle_attr_isa_flags): Likewise.
6373 2018-10-31 Richard Biener <rguenther@suse.de>
6377 * tree-outof-ssa.c (insert_backedge_copies): Restrict
6378 copy generation to useful cases. Place the copy before
6379 the definition of the backedge value when possible.
6381 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
6383 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
6384 * config/arc/arc.c (arc_active_insn): New function.
6385 (check_store_cacheline_hazard): Likewise.
6386 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
6387 (arc_override_options): Disable delay slot scheduler for older
6389 (arc_store_addr_hazard_p): New implementation, old one renamed to
6391 (arc_store_addr_hazard_internal_p): Renamed.
6392 (arc_reorg): Don't combine into brcc instructions which are part
6393 of hardware hazard solution.
6394 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
6395 (tune_arc700): Likewise.
6396 * config/arc/arc.opt (arc7xx): New tune value.
6397 * config/arc/arc700.md: Improve A7 scheduler.
6399 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
6401 * config/arc/arc.c (arc_override_options): Remove
6402 TARGET_COMPACT_CASESI.
6403 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
6404 (CASE_VECTOR_MODE): Likewise.
6405 (CASE_VECTOR_PC_RELATIVE): Likewise.
6406 (CASE_VECTOR_SHORTEN_MODE): Likewise.
6407 (CASE_VECTOR_SHORTEN_MODE1): Delete.
6408 (ADDR_VEC_ALIGN): Update.
6409 (ASM_OUTPUT_CASE_LABEL): Undefine.
6410 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
6411 (TARGET_BI_BIH): Define.
6412 (DEFAULT_BRANCH_INDEX): Likewise.
6413 * config/arc/arc.md (casesi): Rework to accept BI/BIH
6414 instructions, remove compact_casesi use case.
6415 (casesi_compact_jump): Remove.
6416 (casesi_dispatch): New pattern.
6417 * config/arc/arc.opt: Add mbranch-index option. Deprecate
6418 compact_casesi option.
6419 * doc/invoke.texi: Document mbranch-index option.
6421 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
6423 * config/arc/arc.c (arc_get_tp): Remove function.
6424 (arc_emit_call_tls_get_addr): Likewise.
6425 (arc_call_tls_get_addr): New function.
6426 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
6427 * config/arc/arc.md (tls_load_tp_soft): Remove.
6428 (tls_gd_get_addr): Likewise.
6430 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
6432 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
6433 (mulsi3_600_lib): Remove pattern.
6434 (umulsi3_highpart_600_lib_le): Likewise.
6435 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
6436 (umulsidi3): Remove call to umulsidi3_600_lib.
6437 (umulsidi3_600_lib): Remove pattern.
6438 (peephole2): Remove peephole using the above deprecated patterns.
6440 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
6443 * config/arm/arm.c (arm_option_check_internal): Disable the combined
6444 use of -mslow-flash-data and -mword-relocations.
6445 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
6446 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
6448 * doc/invoke.texi (-mword-relocations): Mention conflict with
6450 (-mslow-flash-data): Reciprocally.
6452 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
6454 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
6455 16-byte modes held in GP registers to use an even regno.
6457 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
6458 (aarch64_atomic_ldop_supported_p): Remove.
6459 (aarch64_gen_atomic_ldop): Remove.
6460 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
6461 Fully expand LSE operations here.
6462 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
6463 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
6464 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
6465 and use ATOMIC_LDOP instead; use register_operand for the input;
6466 drop the split and emit insns directly.
6467 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
6468 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
6469 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
6471 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
6472 (aarch64_gen_atomic_ldop): Don't call it.
6473 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
6474 Use aarch64_reg_or_zero.
6475 (aarch64_atomic_exchange<ALLI>): Likewise.
6476 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
6477 operand 0; use aarch64_reg_or_zero for input; merge ...
6478 (@aarch64_atomic_swp<ALLI>): ... this and remove.
6480 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
6481 (aarch64_split_compare_and_swap): Use it.
6482 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
6483 test oldval against the proper predicate.
6484 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
6485 Use nonmemory_operand for expected.
6486 (cas_short_expected_pred): New.
6487 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
6488 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
6489 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
6490 (aarch64_plushi_operand): New.
6492 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
6493 Force oldval into the rval register for TARGET_LSE; emit the compare
6494 during initial expansion so that it may be deleted if unused.
6495 (aarch64_gen_atomic_cas): Remove.
6496 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
6497 Change =&r to +r for operand 0; use match_dup for operand 2;
6498 remove is_weak and mod_f operands as unused. Drop the split
6500 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
6501 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
6502 (@aarch64_atomic_cas<GPI>): Similarly.
6504 2018-10-31 Richard Biener <rguenther@suse.de>
6506 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
6509 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6511 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
6512 * config/aarch64/aarch64.md: Include saphira.md
6513 * config/aarch64/saphira.md: New file for pipeline description.
6515 2018-10-30 Martin Sebor <msebor@redhat.com>
6518 * gimple-ssa-sprintf.c (format_directive): Use %G to include
6520 (sprintf_dom_walker::compute_format_length):
6521 Avoid setting POSUNDER4K here.
6522 (get_destination_size): Handle null argument values.
6523 (get_user_idx_format): New function.
6524 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
6525 functions, including user-defined with attribute format printf.
6526 Use %G to include inlining context.
6527 Set POSUNDER4K here.
6529 2018-10-30 Jan Hubicka <jh@suse.cz>
6531 * params.def (lto-partitions): Bump from 32 to 128.
6533 2018-10-30 Jan Hubicka <jh@suse.cz>
6536 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
6538 (free_lang_data_in_type): Forward declare.
6539 (fld_type_variant_equal_p): New function.
6540 (fld_type_variant): New function
6541 (fld_incomplete_types): New hash.
6542 (fld_incomplete_type_of): New function
6543 (fld_simplfied-type): New function.
6544 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
6545 (free_lang_data): Allocate and free fld_incomplete_type; update call
6546 of free_lang_data_in_decl.
6548 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
6550 * gcov.c (output_lines): Remove duplicate line.
6552 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
6554 * config/rs6000/rs6000.md (bswapdi2): Force address into register
6555 if not in indexed or indirect form.
6556 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
6557 (bswapdi2_store): Ditto.
6558 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
6560 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
6561 Prototype for helper function.
6563 2018-10-30 Martin Sebor <msebor@redhat.com>
6565 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
6566 (target, pragma GCC optimize, pragma GCC target): Ditto.
6568 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
6570 * doc/extend.texi: Fix prototype and description of
6571 __builtin_expect_with_probability.
6573 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
6575 * cgraph.h (clone_function_name_1): Replaced by new
6576 clone_function_name_numbered that takes name as string; for
6577 privatize_symbol_name_1 use only.
6578 (clone_function_name): Renamed to
6579 clone_function_name_numbered to be explicit about numbering.
6580 (clone_function_name): New two-argument function that does
6581 not number its output.
6582 (clone_function_name): New three-argument function that
6583 takes a number to append to its output.
6584 * cgraphclones.c (duplicate_thunk_for_node):
6585 (clone_function_name_1): Renamed.
6586 (clone_function_name_numbered): Two new functions.
6587 (clone_function_name): Improved documentation.
6588 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
6589 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
6590 * final.c (final_scan_insn_1): Use the new clone_function_name
6592 * multiple_target.c (create_dispatcher_calls): Ditto.
6593 (create_target_clone): Ditto.
6594 * omp-expand.c (grid_expand_target_grid_body): Ditto.
6595 * omp-low.c (create_omp_child_function_name): Ditto.
6596 * omp-simd-clone.c (simd_clone_create): Ditto.
6597 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
6598 new clone_function_name without numbering.
6600 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
6602 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
6603 Assert that the allocation size is not zero.
6605 2018-10-30 Richard Biener <rguenther@suse.de>
6607 PR tree-optimization/87800
6608 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
6609 non-induction or reduction PHIs.
6611 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org>
6613 * config/aarch64/falkor-tag-collision-avoidance.c
6614 (execute_tag_collision_avoidance): Call df_note_add_problem.
6616 2018-10-30 Martin Liska <mliska@suse.cz>
6618 * doc/extend.texi: Fix typo in documentation
6619 of __builtin_expect_with_probability.
6621 2018-10-29 David Malcolm <dmalcolm@redhat.com>
6624 * input.c (get_substring_ranges_for_loc): Detect if
6625 linemap_resolve_location gives us a NULL map, and reject
6628 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
6630 * config.gcc (xstormy16-*-elf): Set tm_d_file.
6632 2018-10-29 David Malcolm <dmalcolm@redhat.com>
6633 Martin Sebor <msebor@redhat.com>
6634 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6636 * doc/ux.texi (Quoting): New subsection, adapted from material at
6637 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
6638 MartinSebor and ManuelLopezIbanez.
6639 (Fix-it hints): Note that fix-it hints shouldn't be marked for
6642 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
6645 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
6648 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
6650 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
6652 2018-10-29 Paul Koning <ni1d@arrl.net>
6654 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
6656 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
6658 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
6659 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
6660 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
6661 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
6662 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
6663 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
6664 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
6665 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
6666 Change 'vector' to '__vector'.
6667 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
6668 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
6669 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
6670 _mm_avg_pu16): Likewise. And, whitespace corrections.
6672 2018-10-29 Richard Biener <rguenther@suse.de>
6674 PR tree-optimization/87785
6675 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
6678 2018-10-29 Olivier Hainque <hainque@adacore.com>
6680 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
6682 2018-10-29 Olivier Hainque <hainque@adacore.com>
6684 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
6685 ports configuration macro, defaults to "gnu".
6686 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
6687 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
6689 2018-10-29 Olivier Hainque <hainque@adacore.com>
6691 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
6693 2018-10-29 Richard Biener <rguenther@suse.de>
6695 PR tree-optimization/87790
6696 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
6697 (vect_make_slp_decision): Adjust.
6698 (vect_slp_analyze_bb_1): Likewise.
6699 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
6702 2018-10-29 Richard Biener <rguenther@suse.de>
6704 PR tree-optimization/87785
6705 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
6707 (vect_build_slp_tree): Likewise.
6708 (vect_gather_slp_loads): New function.
6709 (vect_analyze_slp_instance): Gather loads separately from the
6712 2018-10-29 Martin Liska <mliska@suse.cz>
6714 * Makefile.in: Make dependency to json.o.
6715 * doc/gcov.texi: Document new JSON format, remove
6716 old intermediate format documentation.
6717 * gcov.c (struct function_info): Come up with m_name and
6719 (function_info::function_info): Initialize it.
6720 (function_info::~function_info): Release it.
6721 (main): Rename flag_intermediate_format to flag_json_format.
6722 (print_usage): Describe --json-format.
6723 (process_args): Set flag_json_format.
6724 (output_intermediate_line): Remove.
6725 (output_intermediate_json_line): Likewise.
6726 (get_gcov_intermediate_filename): Return new extension
6728 (output_intermediate_file): Implement JSON emission.
6729 (output_json_intermediate_file): Implement JSON emission.
6730 (generate_results): Use ::get_name for function name.
6731 Handle JSON output file.
6732 (read_graph_file): Use ::get_name instead of cplus_demangle.
6733 (read_count_file): Likewise.
6734 (solve_flow_graph): Likewise.
6735 (add_line_counts): Likewise.
6736 (accumulate_line_counts): Use new flag_json_format.
6737 (output_function_details): Use ::get_name instead of cplus_demangle.
6738 (output_lines): Likewise.
6739 * json.cc (test_writing_literals): Add new tests.
6740 * json.h (class literal): Add new boolean constructor.
6742 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
6744 PR rtl-optimization/87701
6745 PR rtl-optimization/87780
6746 * combine.c (make_more_copies): Rewrite.
6748 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
6750 * doc/generic.texi (ABSU_EXPR): Document.
6751 * match.pd (absu(x)*absu(x) -> x*x): Handle.
6752 (absu(absu(X)) -> absu(X)): Likewise.
6753 (absu(-X) -> absu(X)): Likewise.
6754 (absu(X) where X is nonnegative -> X): Likewise.
6756 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
6758 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
6759 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
6760 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
6761 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
6762 (s-tm-texi): Also check timestamp on d-target.def.
6763 (generated_files): Add TM_D_H and d-target-hooks-def.h.
6764 (build/genhooks.o): Also depend on D_TARGET_DEF.
6765 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
6767 * config/aarch64/aarch64-d.c: New file.
6768 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
6770 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
6772 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
6773 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
6774 * config/arm/arm-d.c: New file.
6775 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
6776 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
6777 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
6778 * config/arm/t-arm (arm-d.o): New rule.
6779 * config/default-d.c: New file.
6780 * config/glibc-d.c: New file.
6781 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6782 * config/i386/i386-d.c: New file.
6783 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
6784 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
6785 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
6786 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
6787 * config/i386/t-i386 (i386-d.o): New rule.
6788 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6789 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6790 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
6791 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6792 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
6793 * config/mips/mips-d.c: New file.
6794 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
6795 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
6796 * config/mips/t-mips (mips-d.o): New rule.
6797 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6798 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6799 * config/powerpcspe/powerpcspe-d.c: New file.
6800 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
6802 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
6803 Support GNU D by using 0 as the language type.
6804 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
6805 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
6806 * config/riscv/riscv-d.c: New file.
6807 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
6809 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
6810 * config/riscv/t-riscv (riscv-d.o): New rule.
6811 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6812 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6813 * config/rs6000/rs6000-d.c: New file.
6814 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
6816 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
6817 Support GNU D by using 0 as the language type.
6818 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
6819 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
6820 * config/s390/s390-d.c: New file.
6821 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
6822 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
6823 * config/s390/t-s390 (s390-d.o): New rule.
6824 * config/sparc/sparc-d.c: New file.
6825 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
6827 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
6828 * config/sparc/t-sparc (sparc-d.o): New rule.
6829 * config/t-glibc (glibc-d.o): New rule.
6830 * configure: Regenerated.
6831 * configure.ac (tm_d_file): New variable.
6832 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
6833 * doc/contrib.texi (Contributors): Add self for the D frontend.
6834 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
6835 * doc/install.texi (Configuration): Mention libphobos as an option for
6836 --enable-shared. Mention d as an option for --enable-languages.
6837 (Testing): Mention check-d as a target.
6838 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
6839 name suffixes. Mention d as a -x option.
6840 * doc/sourcebuild.texi (Top Level): Mention libphobos.
6841 * doc/standards.texi (Standards): Add section on D language.
6842 * doc/tm.texi: Regenerated.
6843 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
6844 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
6845 * dwarf2out.c (is_dlang): New function.
6846 (gen_compile_unit_die): Use DW_LANG_D for D.
6847 (declare_in_namespace): Return module die for D, instead of adding
6848 extra declarations into the namespace.
6849 (gen_namespace_die): Generate DW_TAG_module for D.
6850 (gen_decl_die): Handle CONST_DECLSs for D.
6851 (dwarf2out_decl): Likewise.
6852 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
6853 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
6854 kinds of aggregates.
6855 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
6856 * genhooks.c: Include d/d-target.def.
6858 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
6861 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
6862 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
6863 (STACK_DYNAMIC_OFFSET): Likewise.
6865 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
6868 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
6871 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
6873 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
6874 return type and other typos.
6876 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
6878 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
6879 a shorter sequence with fewer branches.
6880 (emit_final_str_compare_gpr): Ditto.
6882 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
6884 * config/rs6000/tmmintrin.h: New file.
6885 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
6887 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
6889 * config/rs6000/mmintrin.h: Enable 32bit compilation.
6890 * config/rs6000/xmmintrin.h: Likewise.
6892 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
6894 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
6896 2018-10-26 Richard Biener <rguenther@suse.de>
6898 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
6900 (vect_mark_slp_stmts_relevant): Likewise.
6901 (vect_detect_hybrid_slp_stmts): Likewise.
6902 (vect_bb_slp_scalar_cost): Likewise.
6903 (vect_remove_slp_scalar_calls): Likewise.
6905 2018-10-26 Jan Hubicka <jh@suse.cz>
6907 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
6908 (warn_types_mismatch): Fix walk of DECL_NAME.
6909 (odr_types_equivalent_p): Fix overactive assert.
6911 2018-10-26 Richard Biener <rguenther@suse.de>
6913 PR tree-optimization/87105
6914 * tree-vectorizer.h (_slp_tree::refcnt): New member.
6915 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
6917 (vect_create_new_slp_node): Initialize refcnt to one.
6919 (scalar_stmts_set_t, bst_fail): Remove.
6920 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
6921 (vect_build_slp_tree): Add bst_map argument and lookup
6922 already created SLP nodes.
6923 (vect_print_slp_tree): Handle a SLP graph, print SLP node
6925 (vect_slp_rearrange_stmts): Handle a SLP graph.
6926 (vect_analyze_slp_instance): Adjust and free SLP nodes from
6927 the CSE map. Fix indenting.
6928 (vect_schedule_slp_instance): Add short-cut.
6930 2018-10-26 Martin Liska <mliska@suse.cz>
6933 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
6934 addr_expr and not with pointers.
6936 2018-10-26 Jan Hubicka <jh@suse.cz>
6938 * tree.c (free_lang_data_in_type): Only check main variants.
6939 * ipa-devirt.c (warn_odr): Make static.
6940 (types_same_for_odr): Drop strict variant.
6941 (types_odr_comparable): Likewise.
6942 (odr_or_derived_type_p): Look for main variants.
6943 (odr_name_hasher::equal): Cleanup comment.
6944 (odr_subtypes_equivalent): Add warn and warned arguments; check main
6946 (type_variants_equivalent_p): break out from ...
6947 (odr_types_equivalent): ... here; go for main variants where needed.
6948 (warn_odr): ... here; turn static.
6949 (warn_types_mismatch): Compare mangled names of main variants.
6950 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
6951 (type_with_linkage_p): Sanity check that we look at main variant.
6952 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
6953 * tree.h (types_same_for_odr): Drop strict argument.
6955 2018-10-26 Richard Biener <rguenther@suse.de>
6957 PR tree-optimization/87746
6958 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
6959 Simplify and fix WRT strided store groups with size not
6960 equal to step in element count.
6961 (vect_analyze_group_access_1): Dump the whole group.
6963 2018-10-25 Carl Love <cel@us.ibm.com>
6965 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
6966 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
6967 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
6968 precicion entry for each overloaded builtin.
6969 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
6970 VSCEDPUO): Rename overloaded name.
6971 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
6972 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
6973 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
6974 define_expand for xscmpexqp instruction.
6975 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
6977 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
6978 Jinsong Ji <jji@us.ibm.com>
6980 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
6981 function with vec_sl.
6982 (_mm_slli_epi32): Likewise.
6983 (_mm_slli_epi64): Likewise.
6984 (_mm_srai_epi16): Replace deprecated function with vec_sra.
6985 (_mm_srai_epi32): Likewise.
6986 (_mm_srli_epi16): Replace deprecated function with vec_sr.
6987 (_mm_srli_epi32): Likewise.
6988 (_mm_srli_epi64): Likewise.
6989 (_mm_sll_epi16): Replace deprecated function with vec_sl.
6990 (_mm_sll_epi32): Likewise.
6991 (_mm_sll_epi64): Likewise.
6992 (_mm_sra_epi16): Replace deprecated function with vec_sra.
6993 (_mm_sra_epi32): Likewise.
6994 (_mm_srl_epi16): Replace deprecated function with vec_sr.
6995 (_mm_srl_epi32): Likewise.
6996 (_mm_srl_epi64): Likewise.
6998 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
6999 Jinsong Ji <jji@us.ibm.com>
7001 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
7002 comparison operators with vec_cmp* for compatibility due to
7003 unfortunate history; clean up formatting and use types more
7005 (_mm_sll_epi32): Likewise.
7006 (_mm_sll_epi64): Likewise.
7007 (_mm_srl_epi16): Likewise.
7008 (_mm_srl_epi32): Likewise.
7009 (_mm_srl_epi64): Likewise.
7011 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
7012 Jinsong Ji <jji@us.ibm.com>
7014 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
7015 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
7016 __vector __bool int. Use vec_cmpgt in preference to deprecated
7017 function vec_vcmpgtfp.
7018 (_mm_max_ps): Likewise.
7020 2018-10-25 Jeff Law <law@redhat.com>
7022 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
7025 2018-10-25 Martin Sebor <msebor@redhat.com>
7027 * doc/extend.texi (aligned): Expand attribute description.
7028 (Alignment): Rename section. Discuss function arguments.
7030 2018-10-25 Jan Hubicka <jh@suse.cz>
7032 * ipa-devirt.c (main_odr_variant): Remove.
7033 (hash_odr_name, types_same_for_odr, types_odr_comparable,
7034 odr_name_hasher::equal, odr_subtypes_equivalent_p):
7035 Drop use of main_odr_variant.
7036 (add_type_duplicate): Silence confused warnings on integer types.
7037 (get_odr_type): Always look for main variant.
7038 (register_odr_type): Simplify.
7040 2018-10-25 Richard Biener <rguenther@suse.de>
7042 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
7043 Initialize ng to silence error with release checking bootstrap.
7045 2018-10-25 Richard Biener <rguenther@suse.de>
7047 * tree-if-conv.c: Include tree-ssa-sccvn.h.
7048 (tree_if_conversion): Run CSE on the if-converted loop body.
7050 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
7052 * config/s390/constraints.md (ZL): New constraint.
7053 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
7055 * config/s390/s390.md (movdi_larl): Remove.
7056 (movdi_64): Add the LARL alternative.
7058 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
7061 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
7062 (RTX_CODE_HWINT_P): New macro.
7063 (rtx_code_size): Use RTX_CODE_HWINT_P ().
7065 2018-10-25 Jan Hubicka <jh@suse.cz>
7067 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
7070 2018-10-25 Richard Biener <rguenther@suse.de>
7072 PR tree-optimization/87665
7073 PR tree-optimization/87745
7074 * tree-vectorizer.h (get_earlier_stmt): Remove.
7075 (get_later_stmt): Pick up UID from the original non-pattern stmt.
7077 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
7079 * options.texi (Deprecated): Move list to Var section.
7081 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
7082 Jinsong Ji <jji@us.ibm.com>
7084 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
7085 __vector long to __vector long long.
7086 (_mm_cvtpd_ps): Likewise.
7087 (_mm_cvttpd_epi32): Likewise.
7088 (_mm_cvtpi32_pd): Likewise.
7089 (_mm_unpackhi_epi64): Likewise.
7090 (_mm_unpacklo_epi64): Likewise.
7092 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
7094 PR rtl-optimization/87720
7095 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
7097 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
7099 * gimple-ssa-isolate-paths.c
7100 (find_implicit_erroneous_behavior): Do not change code if the
7101 pass is running for warnings only.
7102 (find_explicit_erroneous_behavior): Likewise.
7104 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
7106 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
7107 Define as rs6000_mangle_decl_assembler_name.
7108 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
7109 long double to IEEE long double, switch the names of the long
7110 double built-in functions to be <func>f128 instead of <func>l.
7112 2018-10-24 Martin Sebor <msebor@redhat.com>
7114 * doc/extend.texi (nonnull): List no-argument form. Reference
7115 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
7117 2018-10-24 Richard Biener <rguenther@suse.de>
7119 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
7121 2018-10-24 Martin Liska <mliska@suse.cz>
7123 PR tree-optimization/84436
7124 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
7126 (switch_conversion::contains_linear_function_p): New.
7127 (switch_conversion::build_one_array): Support linear
7128 transformation on input.
7129 * tree-switch-conversion.h (struct switch_conversion): Add
7130 contains_linear_function_p declaration.
7132 2018-10-24 Richard Biener <rguenther@suse.de>
7134 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
7135 if its argument is CONSTANT_CLASS_P.
7137 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
7139 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
7140 it is wrong for forward declarations.
7142 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
7144 * config/s390/s390.c (s390_check_qrst_address): Add the missing
7145 SYMBOL_REF_P () check.
7147 2018-10-24 Richard Biener <rguenther@suse.de>
7149 PR tree-optimization/87105
7150 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
7151 dump classification.
7152 (vect_analyze_data_ref_accesses): Handle duplicate loads and
7153 stores by splitting the affected group after the fact.
7154 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
7155 fail the SLP build because of size constraints.
7157 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7159 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
7160 * configure: Regenerate.
7161 * config.in: Regenerate.
7162 * varasm.c (mergeable_string_section): Use readonly_data_section
7163 if linker doesn't support SHF_MERGE with alignment > 8.
7164 (mergeable_constant_section): Likewise.
7166 2018-10-24 Richard Biener <rguenther@suse.de>
7168 PR tree-optimization/84013
7169 * tree-ssa-structalias.c (struct msdi_data): New struct for
7170 marshalling data to walk_stmt_load_store_ops.
7171 (maybe_set_dependence_info): Refactor as callback for
7172 walk_stmt_load_store_ops.
7173 (compute_dependence_clique): Set restrict info on all stmt kinds.
7175 2018-10-24 Martin Liska <mliska@suse.cz>
7177 * cgraph.c (cgraph_node::dump):
7178 Remove reduntant dumps and make tp_first_run dump more compact.
7180 2018-10-24 Richard Biener <rguenther@suse.de>
7182 PR tree-optimization/87665
7183 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
7186 2018-10-12 Jeff Law <law@redhat.com>
7188 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
7191 2018-10-23 Richard Biener <rguenther@suse.de>
7193 * tree-vrp.c (add_assert_info): Guard dump_printf with
7195 * gimple-ssa-evrp-analyze.c
7196 (evrp_range_analyzer::record_ranges_from_incoming_edge):
7197 Use value_range::ignore_equivs_equal_p.
7199 2018-10-23 Richard Biener <rguenther@suse.de>
7201 PR tree-optimization/87105
7202 PR tree-optimization/87608
7203 * passes.def (pass_all_early_optimizations): Add early phi-opt
7205 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
7206 addition to debug stmts.
7207 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
7208 and abs replacement early.
7209 * tree-cfg.c (gimple_empty_block_p): Likewise.
7211 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
7214 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
7215 specified to configure.
7216 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
7218 2018-10-23 Richard Biener <rguenther@suse.de>
7220 PR tree-optimization/87700
7221 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
7223 2018-10-23 Jakub Jelinek <jakub@redhat.com>
7226 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
7227 second argument from __mmask16 to __mmask8.
7228 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
7229 _mm_mask_packs_epi32): Likewise.
7230 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
7232 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
7234 2018-10-23 Richard Biener <rguenther@suse.de>
7236 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
7238 2018-10-23 Richard Biener <rguenther@suse.de>
7240 PR tree-optimization/86144
7241 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
7242 over simd attribute.
7244 2018-10-23 Richard Biener <rguenther@suse.de>
7246 PR tree-optimization/87693
7247 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
7248 the case we do not find the taken edge.
7250 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
7251 Jinsong Ji <jji@us.ibm.com>
7253 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
7254 (_mm_store_pd): Use unaligned vector type for pointer cast.
7255 (_mm_maskmoveu_si128): Likewise.
7256 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
7257 (_mm_store_ps): Use unaligned vector type for pointer cast.
7259 2018-10-22 Paul Koning <ni1d@arrl.net>
7261 * symtab.c (symtab_node::increase_alignment): Correct max
7264 2018-10-22 Yury Gribov <tetra2005@gmail.com>
7266 PR tree-optimization/87633
7267 * match.pd: Do not generate unordered integer comparisons.
7269 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
7271 PR rtl-optimization/87600
7272 * combine.c: Add include of expr.h.
7273 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
7274 register to a pseudo.
7275 (make_more_copies): New function, add a copy to a new pseudo after
7276 the moves from hard registers into pseudos.
7277 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
7278 later. Call make_more_copies.
7280 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
7282 * lra-constraints.c (process_alt_operands): New local array,
7283 matching_early_clobber. Check matching_early_clobber before
7284 decrementing reject, and set matching_early_clobber after.
7286 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
7289 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
7290 call output_addr_const and hope for the best.
7292 2018-10-22 Richard Biener <rguenther@suse.de>
7294 * gimple-ssa-evrp-analyze.c
7295 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
7296 smarter about what ranges to use.
7297 * tree-vrp.c (add_assert_info): Dump here.
7298 (register_edge_assert_for_2): Instead of here at multiple but
7301 * gcc.dg/tree-ssa/evrp12.c: New testcase.
7302 * gcc.dg/predict-6.c: Adjust.
7303 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
7304 * gcc.dg/tree-ssa/vrp02.c: Likewise.
7305 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
7307 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
7308 Richard Biener <rguenther@suse.de>
7310 * bitmap.h: Update data structure documentation, including a
7311 description of bitmap views as either linked-lists or splay trees.
7312 (struct bitmap_element_def): Update comments for splay tree bitmaps.
7313 (struct bitmap_head_def): Likewise.
7314 (bitmap_list_view, bitmap_tree_view): New prototypes.
7315 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
7317 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
7318 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
7319 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
7320 released bitmap element here.
7321 (bitmap_element_free): Remove.
7322 (bitmap_elt_clear_from): Work on splay tree bitmaps.
7323 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
7324 this function similar ones such that linked-list bitmap implementation
7325 functions are grouped.
7326 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
7327 and moved for grouping.
7328 (bitmap_list_insert_element_after): Renamed from
7329 bitmap_elt_insert_after, and moved for grouping.
7330 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
7331 (bitmap_tree_link_left, bitmap_tree_link_right,
7332 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
7333 bitmap_tree_link_element, bitmap_tree_unlink_element,
7334 bitmap_tree_find_element): New functions for splay-tree bitmap
7336 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
7337 Renamed and moved, see above entries.
7338 (bitmap_tree_listify_from): New function to convert part of a splay
7339 tree bitmap to a linked-list bitmap.
7340 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
7341 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
7342 (bitmap_find_bit): Remove.
7343 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
7344 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
7345 Handle splay tree bitmaps.
7346 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
7347 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
7348 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
7349 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
7350 bitmap_intersect_compl_p, bitmap_ior_and_compl,
7351 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
7352 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
7353 corresponding changes to use linked-list specific bitmap_element
7354 manipulation functions as applicable for efficiency.
7355 (bitmap_tree_to_vec): New function.
7356 (debug_bitmap_elt_file): New function split out from ...
7357 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
7358 (bitmap_print): Likewise.
7360 PR tree-optimization/63155
7361 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
7363 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
7366 2018-10-22 Martin Liska <mliska@suse.cz>
7368 PR tree-optimization/87686
7370 2018-08-29 Martin Liska <mliska@suse.cz>
7372 * tree-switch-conversion.c (switch_conversion::expand):
7373 Strenghten assumption about gswitch statements.
7375 2018-10-22 Martin Liska <mliska@suse.cz>
7377 * ipa-icf.c (sem_item::compare_attributes): Remove.
7378 (sem_item::compare_referenced_symbol_properties): Use
7379 attribute_list_equal instead.
7380 (sem_function::equals_wpa): Likewise.
7381 * ipa-icf.h: Remove compare_attributes.
7383 2018-10-22 Richard Biener <rguenther@suse.de>
7386 * mem-stats.h (mem_usage::operator==): Fix pasto.
7388 2018-10-22 Richard Biener <rguenther@suse.de>
7390 PR tree-optimization/87640
7391 * tree-vrp.c (set_value_range_with_overflow): Decompose
7393 (extract_range_from_binary_expr_1): Adjust.
7395 2018-10-22 Martin Jambor <mjambor@suse.cz>
7397 * tree-eh.h (stmt_could_throw_p): Add function parameter.
7398 (stmt_can_throw_external): Likewise.
7399 (stmt_can_throw_internal): Likewise.
7400 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
7401 (lower_eh_constructs_2): Likewise.
7402 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
7403 (stmt_can_throw_external): Likewise.
7404 (stmt_can_throw_internal): Likewise.
7405 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
7406 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
7407 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
7408 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
7409 (pass_lower_eh_dispatch::execute): Pass cfun to
7410 stmt_can_throw_external.
7411 (cleanup_empty_eh): Likewise.
7412 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
7413 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
7414 stmt_can_throw_external instead of pushing it to cfun.
7415 (symbol_table::create_edge): Likewise.
7416 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
7417 stmt_can_throw_internal.
7418 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
7419 to stmt_could_throw_p.
7420 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
7421 stmt_can_throw_internal.
7422 (pass_store_merging::execute): Likewise.
7423 * gimple-ssa-strength-reduction.c
7424 (find_candidates_dom_walker::before_dom_children): Pass cfun to
7426 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
7427 stmt_can_throw_internal.
7428 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
7429 to stmt_can_throw_external.
7430 (check_stmt): Pass cfun to stmt_could_throw_p.
7431 (check_stmt): Pass cfun to stmt_can_throw_external.
7432 (pass_nothrow::execute): Likewise.
7433 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
7434 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
7435 stmt_can_throw_internal.
7436 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
7437 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
7438 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
7439 * tree-complex.c (expand_complex_libcall): Pass cfun to
7440 stmt_could_throw_p and to stmt_can_throw_internal.
7441 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
7442 * tree-inline.c (copy_edges_for_bb): Likewise.
7443 (maybe_move_debug_stmts_to_successors): Likewise.
7444 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
7446 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
7447 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
7448 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
7449 stmt_can_throw_internal.
7450 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
7451 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
7453 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
7454 stmt_can_throw_internal.
7455 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
7456 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
7458 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
7459 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
7460 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
7461 (convert_mult_to_fma_1): Likewise.
7462 (convert_to_divmod): Likewise.
7463 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
7464 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
7465 * tree-ssa-propagate.c
7466 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
7467 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
7468 (maybe_optimize_range_tests): Likewise.
7469 (linearize_expr_tree): Likewise.
7470 (reassociate_bb): Likewise.
7471 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
7472 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
7473 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
7474 (handle_char_store): Likewise.
7475 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
7476 stmt_can_throw_internal.
7477 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
7479 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7480 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
7481 (vectorizable_simd_clone_call): Likewise.
7482 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
7483 (gimple_stringop_fixed_value): Likewise.
7485 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
7487 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
7488 literal pool references.
7489 (s390_check_qrst_address): Adapt to the new behavior of
7490 s390_loadrelative_operand_p ().
7492 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
7495 * config/i386/sse.md (*andnot<mode>3_bcst): New.
7497 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
7500 * config/i386/sse.md (*<code><mode>3_bcst): New.
7502 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
7505 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
7506 V4DI, V16SI and V8DI.
7507 (*sub<mode>3<mask_name>_bcst): New.
7508 (*add<mode>3<mask_name>_bcst): Likewise.
7510 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
7511 Jinsong Ji <jji@us.ibm.com>
7513 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
7514 __m64 with __vector unsigned long long for compatibility.
7515 (_mm_movemask_epi8): Likewise.
7516 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
7517 (_mm_cvttps_pi32): Likewise.
7518 (_mm_cvtpi32_ps): Likewise.
7519 (_mm_cvtps_pi16): Likewise.
7520 (_mm_loadh_pi): Likewise.
7521 (_mm_storeh_pi): Likewise.
7522 (_mm_movehl_ps): Likewise.
7523 (_mm_movelh_ps): Likewise.
7524 (_mm_loadl_pi): Likewise.
7525 (_mm_storel_pi): Likewise.
7526 (_mm_movemask_ps): Likewise.
7527 (_mm_shuffle_pi16): Likewise.
7529 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7532 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
7533 __builtin_ia32_vfnmsubpd512_mask.
7534 (_mm512_mask_fnmsub_round_pd): Likewise.
7535 (_mm512_fnmsub_pd): Likewise.
7536 (_mm512_mask_fnmsub_pd): Likewise.
7537 (_mm512_maskz_fnmsub_round_pd): Use
7538 __builtin_ia32_vfnmsubpd512_maskz.
7539 (_mm512_maskz_fnmsub_pd): Likewise.
7540 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
7541 (_mm512_mask_fnmsub_round_ps): Likewise.
7542 (_mm512_fnmsub_ps): Likewise.
7543 (_mm512_mask_fnmsub_ps): Likewise.
7544 (_mm512_maskz_fnmsub_round_ps): Use
7545 __builtin_ia32_vfnmsubps512_maskz.
7546 (_mm512_maskz_fnmsub_ps): Likewise.
7547 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
7548 __builtin_ia32_vfnmsubpd256_mask.
7549 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
7550 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
7551 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
7552 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
7553 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
7554 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
7555 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
7556 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
7557 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
7558 __builtin_ia32_vfnmsubpd.
7559 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
7560 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
7561 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
7562 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
7563 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
7564 * config/i386/i386-builtin.def: Add
7565 __builtin_ia32_vfnmsubpd256_mask,
7566 __builtin_ia32_vfnmsubpd256_maskz,
7567 __builtin_ia32_vfnmsubpd128_mask,
7568 __builtin_ia32_vfnmsubpd128_maskz,
7569 __builtin_ia32_vfnmsubps256_mask,
7570 __builtin_ia32_vfnmsubps256_maskz,
7571 __builtin_ia32_vfnmsubps128_mask,
7572 __builtin_ia32_vfnmsubps128_maskz,
7573 __builtin_ia32_vfnmsubpd512_mask,
7574 __builtin_ia32_vfnmsubpd512_maskz,
7575 __builtin_ia32_vfnmsubps512_mask,
7576 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
7577 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
7578 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
7579 __builtin_ia32_vfnmsubpd256.
7580 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
7581 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
7582 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
7584 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
7586 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
7588 (fmai_vmfnmsub_<mode><round_name>): Likewise.
7590 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7593 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
7594 __builtin_ia32_vfnmaddpd512_mask.
7595 (_mm512_mask_fnmadd_round_pd): Likewise.
7596 (_mm512_fnmadd_pd): Likewise.
7597 (_mm512_mask_fnmadd_pd): Likewise.
7598 (_mm512_maskz_fnmadd_round_pd): Use
7599 __builtin_ia32_vfnmaddpd512_maskz.
7600 (_mm512_maskz_fnmadd_pd): Likewise.
7601 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
7602 (_mm512_mask_fnmadd_round_ps): Likewise.
7603 (_mm512_fnmadd_ps): Likewise.
7604 (_mm512_mask_fnmadd_ps): Likewise.
7605 (_mm512_maskz_fnmadd_round_ps): Use
7606 __builtin_ia32_vfnmaddps512_maskz.
7607 (_mm512_maskz_fnmadd_ps): Likewise.
7608 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
7609 __builtin_ia32_vfnmaddpd256_mask.
7610 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
7611 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
7612 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
7613 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
7614 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
7615 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
7616 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
7617 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
7618 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
7619 __builtin_ia32_vfnmaddpd.
7620 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
7621 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
7622 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
7623 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
7624 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
7625 * config/i386/i386-builtin.def: Add
7626 __builtin_ia32_vfnmaddpd256_mask,
7627 __builtin_ia32_vfnmaddpd256_maskz,
7628 __builtin_ia32_vfnmaddpd128_mask,
7629 __builtin_ia32_vfnmaddpd128_maskz,
7630 __builtin_ia32_vfnmaddps256_mask,
7631 __builtin_ia32_vfnmaddps256_maskz,
7632 __builtin_ia32_vfnmaddps128_mask,
7633 __builtin_ia32_vfnmaddps128_maskz,
7634 __builtin_ia32_vfnmaddpd512_mask,
7635 __builtin_ia32_vfnmaddpd512_maskz,
7636 __builtin_ia32_vfnmaddps512_mask,
7637 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
7638 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
7639 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
7640 __builtin_ia32_vfnmaddpd256.
7641 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
7642 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
7643 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
7645 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
7647 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
7649 (fmai_vmfnmadd_<mode><round_name>): Likewise.
7651 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7654 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
7655 __builtin_ia32_vfmsubpd512_mask.
7656 (_mm512_mask_fmsub_round_pd): Likewise.
7657 (_mm512_fmsub_pd): Likewise.
7658 (_mm512_mask_fmsub_pd): Likewise.
7659 (_mm512_maskz_fmsub_round_pd): Use
7660 __builtin_ia32_vfmsubpd512_maskz.
7661 (_mm512_maskz_fmsub_pd): Likewise.
7662 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
7663 (_mm512_mask_fmsub_round_ps): Likewise.
7664 (_mm512_fmsub_ps): Likewise.
7665 (_mm512_mask_fmsub_ps): Likewise.
7666 (_mm512_maskz_fmsub_round_ps): Use
7667 __builtin_ia32_vfmsubps512_maskz.
7668 (_mm512_maskz_fmsub_ps): Likewise.
7669 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
7670 __builtin_ia32_vfmsubpd256_mask.
7671 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
7672 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
7673 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
7674 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
7675 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
7676 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
7677 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
7678 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
7679 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
7680 __builtin_ia32_vfmsubpd.
7681 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
7682 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
7683 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
7684 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
7685 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
7686 * config/i386/i386-builtin.def: Add
7687 __builtin_ia32_vfmsubpd256_mask,
7688 __builtin_ia32_vfmsubpd256_maskz,
7689 __builtin_ia32_vfmsubpd128_mask,
7690 __builtin_ia32_vfmsubpd128_maskz,
7691 __builtin_ia32_vfmsubps256_mask,
7692 __builtin_ia32_vfmsubps256_maskz,
7693 __builtin_ia32_vfmsubps128_mask,
7694 __builtin_ia32_vfmsubps128_maskz,
7695 __builtin_ia32_vfmsubpd512_mask,
7696 __builtin_ia32_vfmsubpd512_maskz,
7697 __builtin_ia32_vfmsubps512_mask,
7698 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
7699 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
7700 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
7701 __builtin_ia32_vfmsubpd256.
7702 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
7703 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
7704 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
7706 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
7708 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
7710 (fmai_vmfmsub_<mode><round_name>): Likewise.
7712 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7714 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
7715 Remove plus. Renamed to ...
7716 (*sub<mode>3<mask_name>_bcst): This.
7717 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
7718 (*add<mode>3<mask_name>_bcst): This.
7720 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7723 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
7725 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7728 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
7729 (_mm_or_epi32): Likewise.
7730 (_mm256_xor_epi32): Likewise.
7731 (_mm_xor_epi32): Likewise.
7732 (_mm256_or_epi64): Likewise.
7733 (_mm_or_epi64): Likewise.
7734 (_mm256_xor_epi64): Likewise.
7735 (_mm_xor_epi64): Likewise.
7737 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
7740 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
7742 2018-10-20 Jakub Jelinek <jakub@redhat.com>
7745 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
7747 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
7749 * doc/ux.texi: Move @section directly after @node.
7751 2018-10-19 Jakub Jelinek <jakub@redhat.com>
7755 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
7756 depend closely nested inside of loop with ordered clause with
7759 2018-10-19 David Malcolm <dmalcolm@redhat.com>
7761 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
7762 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
7763 * doc/ux.texi: New file.
7765 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
7767 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
7768 be the first CR field allocated.
7770 2018-10-19 Richard Biener <rguenther@suse.de>
7773 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
7774 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
7776 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
7779 * config/i386/sse.md
7780 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
7781 (*add<mode>3<mask_name>_bcst_2): Likewise.
7783 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
7785 * config/i386/sse.md
7786 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
7787 Replace nonimmediate_operand with register_operand.
7788 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
7790 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
7793 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
7795 PR rtl-optimization/87596
7796 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
7797 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
7798 for instructions in FROM..TO range.
7800 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
7802 * cfgexpand.c (expand_one_var): Use specific wording in error message
7803 for non-local frame variables.
7804 * stor-layout.c (layout_decl): Do not issue a warning for them.
7806 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
7808 * haifa-sched.c (priority): Add force_recompute parameter.
7809 (apply_replacement): Call priority () with force_recompute = true.
7810 (restore_pattern): Likewise.
7812 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
7814 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
7815 HOST_BITS_PER_WIDE_INT.
7816 (test_vector_ops_duplicate): Likewise.
7818 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
7821 * config/i386/sse.md (VF_AVX512): New.
7822 (avx512bcst): Likewise.
7823 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
7825 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
7827 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
7830 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
7832 * doc/invoke.texi (-dumpversion): Improve grammar.
7833 (-dumpfullversion): Make more consistent with -dumpversion.
7835 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
7837 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
7838 Set JUMP_LABEL to the jump insn.
7839 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
7840 Predict emitted jump and add label to jump insn.
7842 2018-10-18 David Malcolm <dmalcolm@redhat.com>
7844 PR tree-optimization/87562
7845 * input.c (get_substring_ranges_for_loc): Use
7846 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
7847 getting the linemap for the endpoint. Verify that it's either
7848 in the same linemap as the start point's spelling location, or
7849 at least in the same file.
7851 2018-10-18 Richard Biener <rguenther@suse.de>
7853 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
7854 feed width-specific load/store costs through ix86_vec_cost.
7855 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
7856 (k8_cost): Likewise.
7857 (bdver_cost): Likewise.
7858 (znver1_cost): Likewise.
7859 (btver1_cost): Likewise.
7860 (btver2_cost): Likewise.
7862 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
7864 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
7865 to simplify subreg of vec_merge.
7867 2018-10-18 Richard Biener <rguenther@suse.de>
7869 * config/i386/i386.c: Fix costing of vector FMA.
7871 2018-10-18 Richard Biener <rguenther@suse.de>
7873 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
7875 (ix86_builtin_vectorization_cost): For vec_construct properly
7876 cost insertion into SSE regs.
7877 (...): Adjust calls to ix86_vec_cost.
7879 2018-10-18 Richard Biener <rguenther@suse.de>
7883 2018-02-07 Richard Biener <rguenther@suse.de>
7885 PR tree-optimization/84204
7886 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
7889 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
7892 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
7894 (test_vector_ops_duplicate): Add test for a scalar subreg of a
7895 VEC_MERGE of a VEC_DUPLICATE.
7897 2018-10-17 Joseph Myers <joseph@codesourcery.com>
7899 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
7900 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
7901 * doc/standards.texi (C Language): Document C2X.
7902 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
7903 (rl78_option_override): Handle "GNU C2X" language name.
7905 2018-10-17 Joseph Myers <joseph@codesourcery.com>
7907 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
7908 Document C17 as published in 2018.
7910 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
7913 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
7914 bail out if both sides do not have the same storage order.
7916 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
7918 * bitmap.c (bitmap_head::dump): New.
7919 * bitmap.h (bitmap_head): Add dump().
7920 * gimple-ssa-evrp-analyze.c
7921 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
7922 (evrp_range_analyzer::set_ssa_range_info): Same.
7923 (evrp_range_analyzer::record_ranges_from_phis): Same.
7924 (evrp_range_analyzer::record_ranges_from_stmt): Same.
7925 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
7926 * gimple-ssa-sprintf.c (get_int_range): Same.
7927 (format_integer): Same.
7928 (sprintf_dom_walker::handle_gimple_call): Same.
7929 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
7930 (ipcp_vr_lattice::top_p): Same.
7931 (ipcp_vr_lattice::bottom_p): Same.
7932 (ipcp_vr_lattice::set_to_bottom): Same.
7933 (ipa_vr_operation_and_type_effects): Same.
7934 (propagate_vr_across_jump_function): Same.
7935 (ipcp_store_vr_results): Same.
7936 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
7937 (ipa_print_node_jump_functions_for_edge): Same.
7938 (ipa_get_value_range): Same.
7939 (ipa_compute_jump_functions_for_edge): Same.
7940 (ipa_write_jump_function): Same.
7941 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
7942 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
7944 * vr-values.c (set_value_range_to_nonnegative): Same.
7945 (set_value_range_to_truthvalue): Same.
7946 (vr_values::get_value_range): Same.
7947 (vr_values::set_defs_to_varying): Same.
7948 (vr_values::update_value_range): Same.
7949 (symbolic_range_based_on_p): Same.
7950 (vr_values::op_with_boolean_value_range_p): Same.
7951 (vr_values::extract_range_for_var_from_comparison_expr): Same.
7952 (vr_values::extract_range_from_ssa_name): Same.
7953 (vr_values::extract_range_from_binary_expr): Same.
7954 (vr_values::extract_range_from_unary_expr): Same.
7955 (vr_values::extract_range_from_cond_expr): Same.
7956 (vr_values::extract_range_from_comparison): Same.
7957 (vr_values::check_for_binary_op_overflow): Same.
7958 (vr_values::extract_range_basic): Same.
7959 (vr_values::extract_range_from_assignment): Same.
7960 (compare_ranges): Same.
7961 (compare_range_with_value): Same.
7962 (vr_values::adjust_range_with_scev): Same.
7963 (vrp_valueize): Same.
7964 (vrp_valueize_1): Same.
7965 (vr_values::get_vr_for_comparison): Same.
7966 (vr_values::compare_name_with_value): Same.
7967 (vr_values::compare_names): Same.
7968 (vr_values::vrp_evaluate_conditional): Same.
7969 (find_case_label_ranges): Same.
7970 (vr_values::vrp_visit_switch_stmt): Same.
7971 (vr_values::extract_range_from_phi_node): Same.
7972 (vr_values::simplify_div_or_mod_using_ranges): Same.
7973 (vr_values::simplify_bit_ops_using_ranges): Same.
7974 (test_for_singularity): Same.
7975 (range_fits_type_p): Same.
7976 (vr_values::simplify_cond_using_ranges_1): Same.
7977 (vr_values::simplify_switch_using_ranges): Same.
7978 (vr_values::simplify_float_conversion_using_ranges): Same.
7979 (vr_values::two_valued_val_range_p): Same.
7980 (vr_values::add_equivalence): Move to value_range::equiv_add.
7981 * vr-values.h (vr_values::add_equivalence): Remove.
7982 (VR_INITIALIZER): Remove.
7983 * tree-vrp.c (value_range::set): New.
7984 (value_range::equiv_add): New.
7985 (value_range::value_range): New.
7986 (value_range::deep_copy): New.
7987 (value_range::check): New.
7988 (value_range::equal_p): New.
7989 (value_range::ignore_equivs_equal_p): New.
7990 (value_range::operator==): New.
7991 (value_range::operator!=): New.
7992 (value_range::symbolic_p): New.
7993 (value_range::numeric_p): New.
7994 (value_range::set_undefined): New.
7995 (value_range::set_varying): New.
7996 (value_range::may_contain_p): New.
7997 (value_range::equiv_clear): New.
7998 (value_range::singleton_p): New.
7999 (value_range::intersect): New.
8000 (value_range::dump): New.
8001 (value_range::set_and_canonicalize): New.
8002 (set_value_range): Adjust for value_range API.
8003 (set_value_range_to_undefined): Same.
8004 (set_value_range_to_varying): Same.
8005 (set_and_canonicalize_value_range): Same.
8006 (set_value_range_to_nonnull): Same.
8007 (set_value_range_to_null): Same.
8008 (range_is_null): Same.
8009 (range_is_nonnull): Same.
8010 (range_int_cst_p): Same.
8011 (range_int_cst_singleton_p): Same.
8012 (symbolic_range_p): Same.
8013 (range_includes_zero_p): Same.
8014 (value_range_constant_singleton): Same.
8015 (vrp_set_zero_nonzero_bits): Same.
8016 (ranges_from_anti_range): Same.
8017 (extract_range_into_wide_ints): Same.
8018 (extract_range_from_multiplicative_op): Same.
8019 (set_value_range_with_overflow): Same.
8020 (extract_range_from_binary_expr_1): Same.
8021 (extract_range_from_unary_expr): Same.
8022 (dump_value_range): Same.
8023 (debug_value_range): Same.
8024 (vrp_prop::check_array_ref): Same.
8025 (vrp_prop::check_mem_ref): Same.
8026 (vrp_prop::vrp_initialize): Same.
8027 (vrp_prop::visit_stmt): Same.
8028 (intersect_ranges): Same.
8029 (vrp_prop::visit_phi): Same.
8030 (vrp_prop::vrp_finalize): Same.
8031 (determine_value_range_1): Same.
8032 (determine_value_range): Same.
8033 (vrp_intersect_ranges_1): Rename to...
8034 (vrp_intersect_1): this.
8035 (vrp_intersect_ranges): Rename to...
8036 (value_range::intersect_helper): ...this.
8037 (vrp_meet_1): Rename to...
8038 (value_range::union_helper): ...this.
8039 (vrp_meet): Rename to...
8040 (value_range::union_): ...this.
8041 (copy_value_range): Remove.
8042 * tree-vrp.h (struct value_range): Rewrite into a proper class.
8043 (value_range::vrtype): New.
8044 (value_range::type): New.
8045 (value_range::equiv): New.
8046 (value_range::min): New.
8047 (value_range::max): New.
8048 (value_range::varying_p): New.
8049 (value_range::undefined_p): New.
8050 (value_range::null_p): New.
8051 (value_range::equiv_add): New.
8052 (copy_value_range): Remove.
8054 2018-10-17 David Malcolm <dmalcolm@redhat.com>
8056 * Makefile.in (SELFTEST_TARGETS): New.
8057 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
8058 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
8059 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
8061 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
8062 (selftest-c++-gdb, selftest-c++-valgrind): Move to
8064 * configure: Regenerate.
8065 * configure.ac (selftest_languages): New.
8067 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
8069 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
8070 overflow wraps argument.
8071 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
8072 wide_int_range_multiplicative_op.
8073 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
8074 overflow wraps argument.
8075 (wide_int_range_multiplicative_op): Same.
8076 (wide_int_range_lshift): Same.
8077 (wide_int_range_div): Same.
8078 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
8079 (wide_int_range_lshift): Same.
8080 (wide_int_range_div): Same.
8082 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
8084 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
8085 use sign as argument.
8086 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
8087 wide_int_range_shift_undefined_p.
8089 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8091 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
8093 (@despeculate_copy<ALLI_TI:mode>): ... This.
8094 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
8097 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8099 * config.gcc: Obsolete *-*-solaris2.10*.
8100 * doc/install.texi (Specific, *-*-solaris2*): Document it.
8102 2018-10-12 Jeff Law <law@redhat.com>
8104 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
8105 reg + sym +- const_int addressing modes.
8107 2018-10-15 David Malcolm <dmalcolm@redhat.com>
8109 * common.opt (fdiagnostics-minimum-margin-width=): New option.
8110 * diagnostic-show-locus.c (layout::layout): Apply the minimum
8112 (layout::start_annotation_line): Only print up to 3 of the
8113 margin character, to avoid touching the left-hand side.
8114 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
8115 minimum margin width, as set by test_diagnostic_context's ctor.
8116 (selftest::test_fixit_insert_containing_newline): Likewise.
8117 (selftest::test_fixit_insert_containing_newline_2): Likewise.
8118 (selftest::test_line_numbers_multiline_range): Clear
8119 dc.min_margin_width.
8120 * diagnostic.c (diagnostic_initialize): Initialize
8122 * diagnostic.h (struct diagnostic_context): Add field
8124 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
8125 * opts.c (common_handle_option): Handle
8126 OPT_fdiagnostics_minimum_margin_width_.
8127 * selftest-diagnostic.c
8128 (selftest::test_diagnostic_context::test_diagnostic_context):
8129 Initialize min_margin_width to 6.
8130 * toplev.c (general_init): Initialize global_dc->min_margin_width.
8132 2018-10-15 David Malcolm <dmalcolm@redhat.com>
8134 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
8135 Fix usage of "error_at_rich_loc" in the comment.
8137 2018-10-15 Renlin Li <renlin.li@arm.com>
8140 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
8141 if-conversioned loop when it contains ifn with types not
8142 supported by backend.
8143 * internal-fn.c (expand_direct_optab_fn): Add an assert.
8144 (direct_internal_fn_supported_p): New helper function.
8145 * internal-fn.h (direct_internal_fn_supported_p): Declare.
8147 2018-10-15 Jakub Jelinek <jakub@redhat.com>
8150 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
8151 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
8152 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
8154 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
8156 PR tree-optimization/87022
8157 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
8158 bits in dist vector rather than the first one.
8160 2018-10-15 Richard Biener <rguenther@suse.de>
8163 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
8164 (visit_loadstore): When a used restrict tag escaped verify that
8165 the points-to solution of "other" pointers do not include
8167 (compute_dependence_clique): If a used restrict tag escaped
8168 communicated that down to visit_loadstore.
8170 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
8172 * config/s390/s390.c (s390_expand_vec_init): Force vector element
8173 into reg if it isn't a general operand.
8175 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
8178 * config/i386/sse.md (*vec_dupv2di): Add register source to
8181 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
8184 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
8185 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
8186 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
8187 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
8189 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
8191 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
8192 (notice_args_size): Set it in the current trace if no insn that can
8193 throw internally has been seen yet.
8194 (connect_traces): When connecting args_size between traces, allow the
8195 incoming values not to match if there is an insn setting it before the
8196 first insn that can throw internally; in that case, force the creation
8197 of a CFI note on this latter insn.
8199 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
8201 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
8202 the base class, because using the injected-class-name was not clearly
8203 specified until DR 176.
8205 2018-10-12 Paul Koning <ni1d@arrl.net>
8207 * config/pdp11/pdp11.md (doloop_end): New expander.
8208 (doloop_end_insn): renamed from "doloop_end".
8209 (addqi3): New pattern.
8210 (subqi3): New pattern.
8211 * config/pdp11/predicates.md (incdec_operand): New predicate.
8213 2018-10-12 Yury Gribov <tetra2005@gmail.com>
8216 * real.c (format_helper::can_represent_integral_type_p): New function
8217 * real.h (format_helper::can_represent_integral_type_p): Ditto.
8218 * match.pd: New pattern.
8220 2018-10-12 Alexandre Oliva <oliva@adacore.com>
8222 * configure.ac: Introduce --enable-large-address-aware
8223 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
8224 * doc/install.texi: Document it.
8225 * configure, config.in: Rebuilt.
8226 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
8227 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
8228 (LINK_SPEC): Insert it.
8229 * config/i386/mingw-w64.h: Likewise.
8231 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
8233 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
8235 PR rtl-optimization/87600
8236 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
8238 2018-10-12 Paul Koning <ni1d@arrl.net>
8240 * doc/md.texi (doloop_end): Document that the pattern code may
8241 need to check operand mode.
8243 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
8245 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
8246 to zero-extend between int and floating-point registers.
8247 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
8248 ldp into floating-point registers. Add type and arch attributes.
8249 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
8250 Use f_loads for type attribute.
8252 2018-10-11 Martin Sebor <msebor@redhat.com>
8254 * doc/extend.texi (attribute packed): Correct typos.
8256 2018-10-11 Martin Sebor <msebor@redhat.com>
8258 * doc/extend.texi (attribute flatten): Mention interaction with
8261 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
8264 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
8265 Set new_decl virtual flag to zero.
8267 2018-10-11 Martin Sebor <msebor@redhat.com>
8270 * doc/extend.texi (attribute format_arg): Discuss using multiple
8271 attributes on a single function.
8273 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
8275 PR tree-optimization/86829
8276 * match.pd (sin (atan (x))): New simplification rules.
8277 (cos (atan (x))): Likewise.
8278 * real.c (build_sinatan_real): New function.
8279 * real.h (build_sinatan_real): Prototype.
8281 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
8283 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
8285 (fold_mergeeo_helper): New helper function.
8286 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
8287 intrinsics. Correct some whitespace indentation issues.
8289 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
8292 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
8293 Use HOST_WIDE_INT_1U for shift.
8295 2018-10-11 Doug Rupp <rupp@adacore.com>
8296 Olivier Hainque <hainque@adacore.com>
8298 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
8299 Pass --relax to the linker for RTPs.
8300 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
8302 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
8303 Jan Hubicka <jh@suse.cz>
8304 Martin Jambor <mjambor@suse.cz>
8306 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
8307 the same elements are repeated rather than printing all of them.
8308 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
8309 "repeated" elements.
8310 * read-rtl-function.c (test_loading_repeat): New function.
8311 (read_rtl_function_c_tests): Call test_loading_repeat.
8312 * rtl-tests.c (test_dumping_repeat): New function.
8313 (rtl_tests_c_tests): Call test_dumping_repeat.
8315 2018-10-11 Richard Biener <rguenther@suse.de>
8317 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
8318 bdver?_cost): Unify to ...
8319 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
8320 * config/i386/i386.c (processor_cost_table): Adjust.
8322 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
8325 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
8326 the thunk when expanding to GIMPLE.
8328 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
8331 * varasm.c (mergeable_string_section): Don't try to move zero-length
8332 strings to the merge section.
8334 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
8337 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
8339 2018-10-10 Jakub Jelinek <jakub@redhat.com>
8342 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
8343 to special_args set.
8345 2018-10-10 Richard Biener <rguenther@suse.de>
8347 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
8348 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
8349 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
8350 and recursing and pattern terminating the recursion on SSE
8351 vector width using ix86_expand_reduc.
8352 (reduc_sminmax_scal_<mode>): Split into part reducing to half
8353 width and recursing and SSE2 vector variant doing the final
8354 reduction with ix86_expand_reduc.
8355 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
8356 with terminating the recursion at AVX level, splitting that
8359 2018-10-09 David Malcolm <dmalcolm@redhat.com>
8361 * genmatch.c (error_cb): Rename to...
8362 (diagnostic_cb): ...this, converting int params to enums.
8363 (fatal_at): Update for renaming.
8364 (warning_at): Likewise.
8366 * input.c (selftest::ebcdic_execution_charset::apply):
8367 Update for renaming of...
8368 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
8370 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
8371 converting level and reason to enums.
8372 (class selftest::lexer_error_sink): Rename to...
8373 (class selftest::lexer_test_options): ...this, renaming field
8374 "m_errors" to "m_diagnostics".
8375 (selftest::lexer_test_options::apply): Update for renaming of...
8376 (selftest::lexer_test_options::on_error): ...this, renaming to...
8377 (selftest::lexer_test_options::on_diagnostic): ...this
8378 converting level and reason to enums.
8379 (selftest::test_lexer_string_locations_raw_string_unterminated):
8380 Update for renamings.
8381 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
8384 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
8386 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
8387 * config/rs6000/pmmintrin.h: New file.
8389 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
8391 PR tree-optimization/86659
8392 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
8394 2018-10-09 Richard Biener <rguenther@suse.de>
8396 PR tree-optimization/63155
8397 * tree-ssa-structalias.c: Include tree-ssa.h.
8398 (get_constraint_for_ssa_var): For undefs return nothing_id.
8399 (find_func_aliases): Cleanup PHI handling.
8401 2018-10-09 Richard Biener <rguenther@suse.de>
8403 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
8406 2018-10-09 Martin Liska <mliska@suse.cz>
8408 * asan.c (asan_emit_stack_protection): If a stack variable
8409 is located in a same file as current function, then emit
8410 line info into variable definition string.
8412 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
8414 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
8417 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
8419 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
8422 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
8424 PR tree-optimization/86659
8425 * gimple-match.h (struct gimple_match_op): Add reverse field.
8426 (gimple_match_op::set_op): New overloaded method.
8427 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
8428 the REF_REVERSE_STORAGE_ORDER flag on the value.
8429 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
8430 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
8432 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
8435 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
8436 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
8438 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
8441 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
8442 Defined with __builtin_ia32_vfmaddsubpd512_mask.
8444 2018-10-08 Richard Biener <rguenther@suse.de>
8446 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
8447 cost the same as AVX128 ones.
8449 2018-10-08 Paul Koning <ni1d@arrl.net>
8451 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
8452 (expand_block_move): New function.
8453 * config/pdp11/pdp11.c (output_block_move): Remove.
8454 (expand_block_move): New function.
8455 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
8456 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
8457 (*movmemhi1): Remove.
8459 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
8461 * config/s390/2827.md: Increase latencies for some FP instructions.
8463 2018-10-08 Richard Biener <rguenther@suse.de>
8465 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
8467 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
8468 * tree-vectorizer.h (dump_stmt_cost): Adjust.
8469 (add_stmt_cost): Dump return value of the hook.
8471 2018-10-08 Richard Biener <rguenther@suse.de>
8473 PR tree-optimization/63155
8474 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
8475 (ssa_propagation_engine::ssa_propagate): Remove redundant
8476 bitmap bit clearing.
8478 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
8480 PR rtl-optimization/86939
8481 PR rtl-optimization/87479
8482 * ira.h (non_conflicting_reg_copy_p): New prototype.
8483 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
8484 (make_hard_regno_dead): Don't add conflicts for register
8485 ignore_reg_for_conflicts.
8486 (make_object_dead): Likewise.
8487 (non_conflicting_reg_copy_p): New function.
8488 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
8489 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
8490 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
8491 (make_hard_regno_dead): Don't add conflicts for register
8492 ignore_reg_for_conflicts. Remove special conflict handling of
8493 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
8494 check_pic_pseudo_p and update callers.
8495 (mark_pseudo_dead): Don't add conflicts for register
8496 ignore_reg_for_conflicts.
8497 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
8499 2018-10-05 Andrew Waterman <andrew@sifive.com>
8500 Jim Wilson <jimw@sifive.com>
8502 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
8503 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
8504 new pattern using HONOR_SNANS that emits one extra instruction.
8506 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
8508 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
8509 patterns): Merge SI and DI patterns to a GPR pattern.
8510 (unnamed define_insn and define_split for record form of that): Merge
8511 to a single define_insn_and_split pattern.
8513 2018-10-05 David Malcolm <dmalcolm@redhat.com>
8516 * input.c (expand_location_to_spelling_point): Add param "aspect"
8517 and use rather than hardcoding LOCATION_ASPECT_CARET.
8518 (get_substring_ranges_for_loc): Handle the case of a single token
8519 within a macro expansion.
8520 * input.h (expand_location_to_spelling_point): Add "aspect" param,
8521 defaulting to LOCATION_ASPECT_CARET.
8523 2018-10-05 Paul Koning <ni1d@arrl.net>
8525 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
8526 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
8527 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
8528 (pdp11_guard_type): New function.
8530 2018-10-05 Paul Koning <ni1d@arrl.net>
8532 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
8533 * config/pdp11/pdp11.opt (mfloat32): Remove.
8535 * doc/invoke.texi (pdp11 -mfloat32): Remove:
8536 (pdp11 -mfloat64): Remove.
8538 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
8540 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
8541 (*cmp<mode>_cc_i387): Ditto.
8542 (*cmpu<mode>_cc_i387): Ditto.
8543 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
8544 * config/i386/i386.c (ix86_expand_fp_compare): Remove
8546 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
8547 Emit x86_sahf_1 pattern.
8548 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
8549 (ix86_expand_carry_flag_compare): Ditto.
8551 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
8553 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
8554 to reg_or_0_operand. Add "C" constraint.
8555 (*cmpxf_cc_i387): Ditto.
8556 (*cmp<mode>_i387): Change operand 2 predicate
8557 to nonimm_or_0_operand. Add "C" constraint.
8558 (*cmp<mode>_cc_i387): Ditto.
8559 (*cmp<mode>_0_i387): Remove insn pattern.
8560 (*cmp<mode>_0_cc_i387): Ditto.
8562 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
8564 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
8565 * config/i386/predicates.md (nonimm_or_0_operand): Rename
8566 from vector_move_operand. Update all uses.
8568 2018-10-05 Martin Sebor <msebor@redhat.com>
8570 PR tree-optimization/87490
8571 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
8574 2018-10-05 Richard Biener <rguenther@suse.de>
8576 PR tree-optimization/63155
8577 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
8578 vertical space in dumpfiles.
8579 * tree-ssa-propagate.h
8580 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
8581 * tree-ssa-propagate.c (cfg_blocks_back): New global.
8582 (ssa_edge_worklist_back): Likewise.
8583 (curr_order): Likewise.
8584 (cfg_blocks_get): Remove abstraction.
8585 (cfg_blocks_add): Likewise.
8586 (cfg_blocks_empty_p): Likewise.
8587 (add_ssa_edge): Add to current or next worklist based on
8589 (add_control_edge): Likewise.
8590 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
8592 (ssa_propagation_engine::ssa_propagate): ... here. Unify
8593 iteration from CFG and SSA edge worklist so we process
8594 everything in RPO order, prioritizing forward progress
8596 (ssa_prop_init): Allocate new worklists, do not dump
8598 (ssa_prop_fini): Free new worklists.
8600 2018-10-05 Richard Biener <rguenther@suse.de>
8602 * tree-core.h (tree_block::abstract_flag): Remove.
8603 (tree_block::block_num): Make full 32bits.
8604 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
8605 * tree.h (BLOCK_ABSTRACT): Remove.
8606 * dwarf2out.c (gen_lexical_block_die): Remove dead code
8607 resulting from BLOCK_ABSTRACT being always false.
8608 (gen_inlined_subroutine_die): Likewise.
8609 (gen_block_die): Likewise.
8610 * tree.c (block_ultimate_origin): Likewise.
8611 * tree-pretty-print.c (dump_block_node): Remove code dealing
8612 with BLOCK_ABSTRACT.
8613 * tree-ssa-live.c (dump_scope_block): Likewise.
8614 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
8615 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
8617 2018-10-05 Richard Biener <rguenther@suse.de>
8619 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
8620 is asked for initialize mode to the component mode of the
8623 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
8626 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
8627 assembler for -mavx.
8628 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
8630 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
8633 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
8635 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
8636 to be DImode. When using mffscrn, force the operand to a register.
8638 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
8640 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
8641 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
8642 X87MODEF mode iterator.
8643 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
8644 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
8645 X87MODEF mode iterator.
8647 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
8649 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
8650 -Wno-prio-ctor-dtor.
8652 2018-10-04 David Malcolm <dmalcolm@redhat.com>
8654 * Makefile.in (OBJS): Add opt-problem.o.
8655 * dump-context.h: Include "selftest.h.
8656 (selftest::temp_dump_context): New forward decl.
8657 (class dump_context): Make friend of class
8658 selftest::temp_dump_context.
8659 (dump_context::dump_loc_immediate): New decl.
8660 (class dump_pretty_printer): Move here from dumpfile.c.
8661 (class temp_dump_context): Move to namespace selftest.
8662 (temp_dump_context::temp_dump_context): Add param
8663 "forcibly_enable_dumping".
8664 (selftest::verify_dumped_text):
8665 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
8666 (selftest::verify_item):
8667 (ASSERT_IS_TEXT): Move here from dumpfile.c.
8668 (ASSERT_IS_TREE): Likewise.
8669 (ASSERT_IS_GIMPLE): Likewise.
8670 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
8672 (dump_context::dump_loc_immediate): ...this new function.
8673 (class dump_pretty_printer): Move to dump-context.h.
8674 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
8675 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
8676 (temp_dump_context::temp_dump_context): Move to "selftest"
8677 namespace. Add param "forcibly_enable_dumping", and use it to
8678 conditionalize the use of m_pp;
8679 (selftest::verify_dumped_text): Make non-static.
8680 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
8681 (selftest::verify_item): Make non-static.
8682 (ASSERT_IS_TEXT): Move to dump-context.h.
8683 (ASSERT_IS_TREE): Likewise.
8684 (ASSERT_IS_GIMPLE): Likewise.
8685 (selftest::test_capture_of_dump_calls): Pass "true" for new
8686 param of temp_dump_context.
8687 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
8688 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
8690 * opt-problem.cc: New file.
8691 * opt-problem.h: New file.
8692 * optinfo-emit-json.cc
8693 (selftest::test_building_json_from_dump_calls): Pass "true" for
8694 new param of temp_dump_context.
8695 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
8696 (optinfo::emit_for_opt_problem): New function.
8697 (optinfo::emit): Clarity which emit_item is used.
8698 * optinfo.h (optinfo::get_dump_location): New accessor.
8699 (optinfo::emit_for_opt_problem): New decl.
8700 (optinfo::emit): Make const.
8701 * selftest-run-tests.c (selftest::run_tests): Call
8702 selftest::opt_problem_cc_tests.
8703 * selftest.h (selftest::opt_problem_cc_tests): New decl.
8704 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
8705 bool to opt_result, converting fprintf messages to
8706 opt_result::failure_at calls. Add "stmt" param for use by the
8708 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
8709 (runtime_alias_check_p): Convert return type from bool to
8710 opt_result, converting dump_printf calls to
8711 opt_result::failure_at, using the statement DDR_A for their
8713 (find_data_references_in_stmt): Convert return type from bool to
8714 opt_result, converting "return false" to opt_result::failure_at
8716 * tree-data-ref.h: Include "opt-problem.h".
8717 (dr_analyze_innermost): Convert return type from bool to opt_result,
8718 and add a const gimple * param.
8719 (find_data_references_in_stmt): Convert return type from bool to
8721 (runtime_alias_check_p): Likewise.
8722 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
8723 dr_analyze_innermost.
8724 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
8725 Convert return type from bool to opt_result, adding a message for
8726 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
8727 (vect_analyze_data_ref_dependence): Convert return type from bool
8728 to opt_result. Change sense of return type from "false"
8729 effectively meaning "no problems" to "false" meaning a problem,
8730 so that "return false" becomes "return opt_result::success".
8731 Convert "return true" calls to opt_result::failure_at, using
8732 the location of statement A rather than vect_location.
8733 (vect_analyze_data_ref_dependences): Convert return type from bool
8735 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
8736 calls to opt_result::failure_at, using the stmt location rather
8738 (vect_verify_datarefs_alignment): Convert return type from bool
8740 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
8741 into multiple more-tightly-scoped copies.
8742 (vect_analyze_data_refs_alignment): Convert return type from bool
8744 (vect_analyze_data_ref_accesses): Likewise, converting a
8745 "return false" to a "return opt_result::failure_at", adding a
8747 (vect_prune_runtime_alias_test_list): Convert return type from
8748 bool to opt_result, converting dump_printf_loc to
8749 opt_result::failure_at. Add a %G to show the pertinent statement,
8750 and use the stmt's location rather than vect_location.
8751 (vect_find_stmt_data_reference): Convert return type from
8752 bool to opt_result, converting dump_printf_loc to
8753 opt_result::failure_at, using stmt's location.
8754 (vect_analyze_data_refs): Convert return type from bool to
8755 opt_result. Convert "return false" to "return
8756 opt_result::failure_at", adding messages as needed.
8757 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
8758 type from bool to opt_result.
8759 (vect_determine_vf_for_stmt): Likewise.
8760 (vect_determine_vectorization_factor): Likewise, converting
8761 dump_printf_loc to opt_result::failure_at, using location of phi
8762 rather than vect_location.
8763 (vect_analyze_loop_form_1): Convert return type from bool to
8764 opt_result, converting dump_printf_loc calls, retaining the use of
8766 (vect_analyze_loop_form): Convert return type from loop_vec_info
8767 to opt_loop_vec_info.
8768 (vect_analyze_loop_operations): Convert return type from bool to
8769 opt_result, converting dump_printf_loc calls, using the location
8770 of phi/stmt rather than vect_location where available. Convert
8771 various "return false" to "return opt_result::failure_at" with
8772 "unsupported phi" messages.
8773 (vect_get_datarefs_in_loop): Convert return type from bool to
8774 opt_result. Add a message for the
8775 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
8776 (vect_analyze_loop_2): Convert return type from bool to
8777 opt_result. Ensure "ok" is set to a opt_result::failure_at before
8778 each "goto again;", adding new messages where needed.
8779 Add "unsupported grouped {store|load}" messages.
8780 (vect_analyze_loop): Convert return type from loop_vec_info to
8782 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
8784 * tree-vect-stmts.c (process_use): Likewise, converting
8785 dump_printf_loc call and using stmt location, rather than
8787 (vect_mark_stmts_to_be_vectorized): Likeise.
8788 (vect_analyze_stmt): Likewise, adding a %G.
8789 (vect_get_vector_types_for_stmt): Convert return type from bool to
8790 opt_result, converting dump_printf_loc calls and using stmt
8791 location, rather than vect_location.
8792 (vect_get_mask_type_for_stmt): Convert return type from tree to
8793 opt_tree, converting dump_printf_loc calls and using stmt location.
8794 * tree-vectorizer.c: Include "opt-problem.h.
8795 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
8796 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
8797 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
8798 enabled, use it to report at the top level "couldn't vectorize
8799 loop" followed by the problem.
8800 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
8801 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
8803 (vect_analyze_stmt): Likewise.
8804 (vect_get_vector_types_for_stmt): Likewise.
8805 (tree vect_get_mask_type_for_stmt): Likewise.
8806 (vect_analyze_data_ref_dependences): Likewise.
8807 (vect_enhance_data_refs_alignment): Likewise.
8808 (vect_analyze_data_refs_alignment): Likewise.
8809 (vect_verify_datarefs_alignment): Likewise.
8810 (vect_analyze_data_ref_accesses): Likewise.
8811 (vect_prune_runtime_alias_test_list): Likewise.
8812 (vect_find_stmt_data_reference): Likewise.
8813 (vect_analyze_data_refs): Likewise.
8814 (vect_analyze_loop): Convert return type from loop_vec_info to
8816 (vect_analyze_loop_form): Likewise.
8817 (vect_analyze_slp): Convert return type from bool to opt_result.
8819 2018-10-04 David Malcolm <dmalcolm@redhat.com>
8821 * doc/invoke.texi (-fopt-info): Document new "internals"
8823 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
8824 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
8826 (optinfo_verbosity_options): Add "internals".
8827 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
8828 (dump_context::apply_dump_filter_p): New member function.
8829 (dump_context::dump_loc): Use apply_dump_filter_p rather than
8830 explicitly masking the dump_kind.
8831 (dump_context::begin_scope): Increment the scope depth first. Use
8832 apply_dump_filter_p rather than explicitly masking the dump_kind.
8833 (dump_context::emit_item): Use apply_dump_filter_p rather than
8834 explicitly masking the dump_kind.
8835 (dump_dec): Likewise.
8836 (dump_hex): Likewise.
8837 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
8838 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
8839 (opt_info_switch_p): Update handling of default
8840 MSG_OPTIMIZED_LOCATIONS to cope with default of
8841 MSG_PRIORITY_USER_FACING.
8842 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
8843 masking the dump_kind.
8844 (selftest::test_capture_of_dump_calls): Update test_dump_context
8845 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
8846 than MSG_ALL. Generalize scope test to be run at all four
8847 combinations of with/without MSG_PRIORITY_USER_FACING and
8848 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
8849 for each of the two values.
8850 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
8851 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
8852 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
8853 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
8854 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
8855 with MSG_PRIORITY_*.
8856 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
8857 dump messages as MSG_PRIORITY_USER_FACING.
8858 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
8859 about the interaction with MSG_PRIORITY_*.
8861 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
8863 * varasm.c (output_constant): Add new parameter merge_strings.
8864 Make strings properly zero terminated in merge string sections.
8865 (mergeable_string_section): Don't fail if the last char is non-zero.
8866 (assemble_variable_contents): Handle merge string sections.
8867 (assemble_variable): Likewise.
8868 (assemble_constant_contents): Likewise.
8869 (output_constant_def_contents): Likewise.
8870 (output_constructor_array_range,
8871 output_constructor_regular_field): Adjust call to output_constant.
8872 (output_object_block): Adjust call to assemble_constant_contents
8873 and assemble_variable_contents.
8875 2018-10-04 Martin Liska <mliska@suse.cz>
8878 * cgraphunit.c (process_function_and_variable_attributes):
8879 Warn about a function with alias attribute and a body.
8881 2018-10-04 Martin Liska <mliska@suse.cz>
8884 * multiple_target.c (redirect_to_specific_clone): New function.
8885 (ipa_target_clone): Use it.
8886 * tree-inline.c: Fix comment.
8888 2018-10-04 David Malcolm <dmalcolm@redhat.com>
8890 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
8892 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
8893 (gcc::dump_manager::register_pass): New member function, adapted
8894 from loop body in gcc::pass_manager::register_pass, adding a
8895 call to update_dfi_for_opt_info.
8896 (gcc::dump_manager::opt_info_enable_passes): Store the
8897 -fopt-info options into the new fields. Move the loop
8899 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
8901 * dumpfile.h (struct opt_pass): New forward decl.
8902 (gcc::dump_manager::register_pass): New decl.
8903 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
8904 (class gcc::dump_manager): Add fields "m_optgroup_flags",
8905 "m_optinfo_flags", and "m_optinfo_filename".
8906 * passes.c (gcc::pass_manager::register_pass): Move all of the
8907 dump-handling code to gcc::dump_manager::register_pass.
8909 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
8911 PR rtl-optimization/87466
8912 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
8913 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
8914 * doc/tm.texi: Regenerate.
8915 * ira-lives.c (process_bb_node_lives): Use the new target hook.
8916 * lra-lives.c (process_bb_lives): Likewise.
8917 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
8920 2018-10-04 Tamar Christina <tamar.christina@arm.com>
8922 * params.c (add_params): Fix initialization.
8924 2018-10-04 Martin Liska <mliska@suse.cz>
8926 PR gcov-profile/84107
8927 * tree-profile.c (init_ic_make_global_vars):
8928 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
8929 Come up with new ic_tuple* variables. Emit
8930 __gcov_indirect_call{,_topn} variables.
8931 (gimple_gen_ic_profiler): Access the variable
8933 (gimple_gen_ic_func_profiler): Access
8934 __gcov_indirect_call.callee field.
8935 (gimple_init_gcov_profiler): Use ptr_type_node.
8936 * value-prof.c (gimple_ic): Use ptr_type_node.
8938 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8940 PR tree-optimization/85787
8941 * ipa-pure-const.c (malloc_candidate_p_1): Move most of
8942 malloc_candidate_p into this function and add support for
8943 detecting multiple phis.
8944 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
8946 2018-10-04 Martin Liska <mliska@suse.cz>
8949 * ipa-inline.c (inline_to_all_callers_1):
8950 Call ultimate_alias_target for node being inlined.
8952 2018-10-03 Jeff Law <law@redhat.com>
8954 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
8956 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
8957 * tree.h (get_typenode_from_name): Prototype.
8959 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
8961 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
8962 Change operand 2 predicate to nonimmediate_operand.
8963 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
8965 2018-10-03 Martin Sebor <msebor@redhat.com>
8966 Jeff Law <law@redhat.com>
8968 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
8970 (get_string_length): Detect unterminated arrays.
8971 (format_string): Same.
8972 (format_directive): Warn about unterminated arrays.
8973 (handle_gimple_call): Mark statements with no_warning as needed.
8975 2018-10-03 Jim Wilson <jimw@sifive.com>
8977 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
8978 also define __riscv_abi_rve. Delete trailing white space.
8980 2018-10-03 Paul Koning <ni1d@arrl.net>
8982 Enable LRA register allocator for PDP11.
8983 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
8986 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
8987 * config/pdp11/pdp11.opt (-mlra): New option.
8988 * doc/invoke.texi (PDP-11 Options): Document -mlra.
8990 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
8992 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
8993 (*<absneg:code>extend<mode>xf2): Ditto.
8995 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
8997 PR tree-optimization/87415
8998 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
9001 2018-10-02 Jeff Law <law@redhat.com>
9003 * gimple-fold.c (get_range_strlen): Only set *nonstr when
9004 an unterminated string is discovered. Bubble up range
9005 even for unterminated strings.
9006 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
9007 indicates the string was not terminated via NONSTR.
9009 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
9011 * tree-vrp.c (extract_range_from_unary_expr): Special case all
9012 pointer conversions.
9013 Do not do anything special for anti-ranges.
9015 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
9017 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
9018 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
9020 2018-10-03 Martin Liska <mliska@suse.cz>
9022 PR gcov-profile/86109
9023 * coverage.c (coverage_begin_function): Do not
9024 mark lambdas as artificial.
9025 * tree-core.h (struct GTY): Remove tm_clone_flag
9026 and introduce new lambda_function.
9027 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
9029 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
9032 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
9033 P8_VECTOR and VSX are enabled.
9035 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
9037 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
9038 0x3907 as CPU model number.
9040 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
9042 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
9043 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
9044 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
9045 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
9046 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
9047 * config/s390/s390.md: Likewise. Rename also the cpu attribute
9048 value from arch12 to z14.
9050 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
9052 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
9054 (isinf<mode>2): Ditto.
9056 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
9058 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
9059 before emitting fxam. Perform calculations in XFmode.
9061 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
9063 * match.pd (((X /[ex] A) +- B) * A): New transformation.
9065 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
9068 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
9069 * tree.c (signed_or_unsigned_type_for): Handle complex.
9071 2018-10-02 Jeff Law <law@redhat.com>
9073 * gimple-fold.c (get_range_strlen): Remove dead code.
9075 2018-10-02 Martin Sebor <msebor@redhat.com>
9076 Jeff Law <law@redhat.com>
9078 * builtins.c (unterminated_array): Add new arguments.
9079 If argument is not terminated, bubble up size and exact
9081 (expand_builtin_strnlen): Detect, avoid expanding
9082 and diagnose unterminated arrays.
9083 (c_strlen): Fill in offset of start of unterminated strings.
9084 * builtins.h (unterminated_array): Update prototype.
9086 2018-10-02 Richard Biener <rguenther@suse.de>
9088 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
9089 of haddv4df, first reduce to SSE width and exploit the fact
9090 that we only need element zero with the reduction result.
9091 (reduc_plus_scal_v2df): Likewise.
9093 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
9095 * dojump.h (do_jump): Delete.
9096 (do_jump_1): Likewise.
9097 (split_comparison): Move around.
9098 * dojump.c (do_jump): Make static.
9099 (do_jump_1): Likewise.
9100 (jumpifnot): Move around.
9101 (jumpifnot_1): Likewise.
9103 (jumpif_1): Likewise.
9104 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
9106 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
9108 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
9109 insns in the delay slot and add_insn_after for the jump insn.
9111 2018-10-02 Richard Biener <rguenther@suse.de>
9113 * tree-inline.c (expand_call_inline): Use the location of
9114 the callee declaration for the inline-entry marker.
9115 * final.c (notice_source_line): Remove special-casing of
9116 NOTE_INSN_INLINE_ENTRY.
9118 2018-10-01 Carl Love <cel@us.ibm.com>
9121 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
9122 (__builtin_mtfsb0): New.
9123 (__builtin_mtfsb1): New.
9124 ( __builtin_set_fpscr_rn): New.
9125 (__builtin_set_fpscr_drn): New.
9126 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
9127 (rs6000_expand_set_fpscr_rn_builtin): Add.
9128 (rs6000_expand_set_fpscr_drn_builtin): Add.
9129 (rs6000_expand_builtin): Add case statement entries for
9130 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
9131 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
9132 RS6000_BUILTIN_MFFSL.
9133 (rs6000_init_builtins): Add ftype initialization and def_builtin
9134 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
9135 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
9136 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
9137 rs6000_mffscdrn): Add define_insn.
9138 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
9139 * doc/extend.texi: Add documentation for the builtins.
9141 2018-10-01 Richard Biener <rguenther@suse.de>
9143 PR tree-optimization/87465
9144 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
9145 causing branch miscounts.
9147 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9149 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
9150 aarch64_option_default_param): New.
9151 (params.h): Include.
9152 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
9153 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
9154 stack-clash protection validation code.
9156 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9158 * params.c (validate_param): New.
9159 (add_params): Use it.
9160 (set_param_value): Refactor param validation into validate_param.
9161 (diagnostic.h): Include.
9162 * diagnostic.h (diagnostic_ready_p): New.
9164 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9166 * params.c (set_param_value):
9167 Add index of parameter being validated.
9168 * common/common-target.def (option_validate_param): New.
9169 * common/common-targhooks.h (default_option_validate_param): New.
9170 * common/common-targhooks.c (default_option_validate_param): New.
9171 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
9172 * doc/tm.texi: Regenerate.
9174 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9177 * config/aarch64/aarch64.c (aarch64_override_options_internal):
9178 Add validation for stack-clash parameters and set defaults.
9180 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9183 * configure.ac: Add stack-clash-protection-guard-size.
9184 * doc/install.texi: Document it.
9185 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
9186 * params.def: Update comment for guard-size.
9187 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
9188 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
9189 * configure: Regenerate.
9191 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9194 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
9195 STACK_DYNAMIC_OFFSET): New.
9196 * config/aarch64/aarch64.c (aarch64_layout_frame):
9197 Update outgoing args size.
9198 (aarch64_stack_clash_protection_alloca_probe_range,
9199 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
9201 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9204 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
9206 * target.def (stack_clash_protection_alloca_probe_range): New.
9207 (stack_clash_protection_final_dynamic_probe): Remove.
9208 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
9209 (default_stack_clash_protection_final_dynamic_probe): Remove.
9210 * targhooks.c: Likewise.
9211 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
9212 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
9213 * doc/tm.texi: Regenerate.
9215 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9218 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
9219 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
9220 aarch64_clamp_to_uimm12_shift): New.
9221 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
9222 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
9224 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9227 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
9229 2018-10-01 Jeff Law <law@redhat.com>
9230 Richard Sandiford <richard.sandiford@linaro.org>
9231 Tamar Christina <tamar.christina@arm.com>
9234 * config/aarch64/aarch64.md
9235 (probe_stack_range): Add k (SP) constraint.
9236 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
9237 STACK_CLASH_MAX_UNROLL_PAGES): New.
9238 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
9239 stack probes for stack clash.
9240 (aarch64_allocate_and_probe_stack_space): New.
9241 (aarch64_expand_prologue): Use it.
9242 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
9243 (aarch64_sub_sp): Add emit_move_imm optional param.
9245 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
9247 PR tree-optimization/87261
9248 * match.pd: Remove trailing whitespace.
9249 Add (x & y) | ~(x | y) -> ~(x ^ y),
9250 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
9252 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
9254 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
9256 (ashlsi3_insn): Update instruction constraints.
9257 (ashrsi3_insn): Likewise.
9258 (rotrsi3): Likewise.
9259 (add_shift): Likewise.
9260 * config/arc/constraints.md (Csz): New 32 bit constraint. It
9261 avoids placing in the limm field small constants which, otherwise,
9262 could end into a small instruction.
9264 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
9266 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
9267 destination register is not odd-even.
9268 (umaddsidi4_split): Likewise.
9270 2018-10-01 Richard Biener <rguenther@suse.de>
9272 * tree-inline.c (expand_call_inline): Store origin of fn
9273 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
9274 * tree.c (block_ultimate_origin): Simplify and do some
9277 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
9279 * config/i386/mmx.md (EMMS): New int iterator.
9280 (emms): New int attribute.
9281 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
9282 EMMS int iterator. Explicitly declare clobbers.
9283 (mmx_emms): Remove expander.
9285 * config/i386/predicates.md (emms_operation): Remove predicate.
9286 (vzeroall_pattern): New predicate.
9287 (vzeroupper_pattern): Rename from vzeroupper_operation.
9288 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
9289 vzeroupper_pattern and vzeroall_pattern predicates.
9291 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
9293 PR rtl-optimization/86939
9294 * ira-lives.c (make_hard_regno_born): Rename from this...
9295 (make_hard_regno_live): ... to this. Remove update to conflict
9296 information. Update function comment.
9297 (make_hard_regno_dead): Add conflict information update. Update
9299 (make_object_born): Rename from this...
9300 (make_object_live): ... to this. Remove update to conflict information.
9301 Update function comment.
9302 (make_object_dead): Add conflict information update. Update function
9304 (mark_pseudo_regno_live): Call make_object_live.
9305 (mark_pseudo_regno_subword_live): Likewise.
9306 (mark_hard_reg_dead): Update function comment.
9307 (mark_hard_reg_live): Call make_hard_regno_live.
9308 (process_bb_node_lives): Likewise.
9309 * lra-lives.c (make_hard_regno_born): Rename from this...
9310 (make_hard_regno_live): ... to this. Remove update to conflict
9311 information. Remove now uneeded check_pic_pseudo_p argument.
9312 Update function comment.
9313 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
9314 to conflict information. Update function comment.
9315 (mark_pseudo_live): Remove update to conflict information. Update
9317 (mark_pseudo_dead): Add conflict information update.
9318 (mark_regno_live): Call make_hard_regno_live.
9319 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
9320 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
9322 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
9325 * config/i386/i386.c (construct_container): Use TImode for
9326 BLKmode values in 2 integer registers.
9328 2018-09-29 Jeff Law <law@redhat.com>
9330 * builtins.c (unterminated_array): Pass in c_strlen_data * to
9331 c_strlen rather than just a tree *.
9332 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
9333 Update recursive calls appropriately. If caller did not provide a
9334 suitable data pointer, create a local one. When a non-terminated
9335 string is discovered, bubble up information about the string via the
9336 c_strlen_data object.
9337 * builtins.h (c_strlen): Update prototype.
9338 (c_strlen_data): New structure.
9339 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
9340 For a type 2 call, if c_strlen indicates a non-terminated string
9341 use the length of the non-terminated string.
9342 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
9344 2018-09-29 Jakub Jelinek <jakub@redhat.com>
9347 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
9348 __m512d type for __A argument rather than __m512.
9350 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
9352 * match.pd (simple_comparison): Don't optimize if either operand is
9353 a function pointer when target needs function pointer canonicalization.
9355 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
9357 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
9358 power5 .. power9 to remove indirection.
9359 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
9360 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
9361 ASM_CPU_476_SPEC): Delete.
9362 (ASM_CPU_SPEC): Adjust.
9363 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
9364 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
9366 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
9368 * config.in: Delete HAVE_AS_DCI.
9369 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
9370 * config/rs6000/rs6000.h: Ditto.
9371 * configure.ac: Delete HAVE_AS_DCI.
9372 * configure: Regenerate.
9374 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
9376 * config.in (HAVE_AS_LWSYNC): Delete.
9377 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
9378 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
9380 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
9381 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
9383 * configure.ac: Delete HAVE_AS_LWSYNC.
9384 * configure: Regenerate.
9386 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
9387 Pierre-Marie de Rodat <derodat@adacore.com>
9389 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
9390 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
9391 (cgraph_node::create_thunk): Add indirect_offset parameter.
9392 (thunk_adjust): Likewise.
9393 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
9394 and initialize the corresponding field with it.
9395 (cgraph_node::dump): Dump indirect_offset field.
9396 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
9397 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
9398 (thunk_adjust): Add indirect_offset parameter and deal with it.
9399 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
9400 pass it to thunk_adjust. Do not call the target hook if it's non-zero
9401 or if the thunk is external or local. Fix formatting. Do not chain
9402 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
9403 if any, in the GIMPLE representation.
9404 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
9405 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
9406 (input_node): Read indirect_offset field.
9407 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
9408 call to thunk_adjust.
9409 * tree-nested.c (struct nesting_info): Add thunk_p field.
9410 (create_nesting_tree): Set it.
9411 (convert_all_function_calls): Copy static chain from targets to thunks.
9412 (finalize_nesting_tree_1): Return early for thunks.
9413 (unnest_nesting_tree_1): Do not finalize thunks.
9414 (gimplify_all_functions): Do not gimplify thunks.
9416 2018-09-28 David Malcolm <dmalcolm@redhat.com>
9418 * opt-suggestions.c (option_proposer::build_option_suggestions):
9419 Release "option_values".
9421 2018-09-28 David Malcolm <dmalcolm@redhat.com>
9423 * coverage.c (get_coverage_counts): Convert problem-reporting dump
9424 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
9425 * dumpfile.c (kind_as_string): New function.
9426 (dump_loc): Rather than a hardcoded prefix of "note: ", use
9427 kind_as_string to vary the prefix based on dump_kind.
9428 (selftest::test_capture_of_dump_calls): Update for above.
9430 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
9432 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
9433 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
9435 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
9437 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
9438 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
9439 INVALID_REGNUM instead of FPSR_REG.
9440 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
9441 * config/i386/i386.md: Update comment of FP compares.
9442 (fldenv): Do not clobber FPSR_REG.
9444 2018-09-28 Richard Biener <rguenther@suse.de>
9446 * tree.h (BLOCK_ORIGIN): New.
9447 * omp-expand.c (grid_expand_target_grid_body): Assign
9448 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
9449 * tree-inline.c (remap_block): Likewise.
9450 * auto-profile.c (get_function_decl_from_block): Simplify
9451 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
9452 * langhooks.c (lhd_print_error_function): Likewise.
9453 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
9455 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
9456 * tree.c (block_nonartificial_location): Likewise.
9457 (block_ultimate_origin): Likewise.
9458 * tree-pretty-print.c (percent_K_format): Likewise. Remove
9459 no longer needed LTO case.
9461 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
9462 Jan Hubicka <jh@suse.cz>
9463 Martin Jambor <mjambor@suse.cz>
9465 * simplify-rtx.c (simplify_merge_mask): New function.
9466 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
9467 same masks are used in op1 or op2.
9468 (test_vec_merge): New function.
9469 (test_vector_ops): Call test_vec_merge.
9471 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
9473 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
9474 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
9475 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
9476 (cypress_costs): Set it.
9477 (supersparc_costs): Likewise.
9478 (hypersparc_costs): Likewise.
9479 (leon_cost): Likewise.
9480 (leon3_costs): Likewise.
9481 (sparclet_costs): Likewise.
9482 (ultrasparc_costs): Likewise.
9483 (ultrasparc_costs): Likewise.
9484 (niagara_costs): Likewise.
9485 (niagara2_costs): Likewise.
9486 (niagara3_costs): Likewise.
9487 (niagara4_costs): Likewise.
9488 (niagara7_costs): Likewise.
9489 (m8_costs): Likewise.
9490 (TARGET_CAN_FOLLOW_JUMP): Define.
9491 (pass_work_around_errata::gate): Minor tweak.
9492 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
9493 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
9494 Automaitcally clear MASK_FSMULD mask for V7 processors.
9495 (sparc_can_follow_jump): New static function.
9496 (output_ubranch): Deal with CROSSING_JUMP_P.
9497 (sparc_use_sched_lookahead): Rewrite using switch statement.
9498 (sparc_issue_rate): Reorder.
9499 (sparc_branch_cost): New function.
9501 2018-09-27 Martin Sebor <msebor@redhat.com>
9503 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
9504 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
9505 (int_fits_type_p): Same.
9507 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
9509 * config/i386/i386.md (FPCR_REG): Remove.
9510 (UNSPEC_FLDCW): Remove.
9511 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
9512 (x86_fldcw_1): Remove insn pattern.
9513 (fnstenv): Do not clobber FPCR_REG.
9515 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
9516 (CALL_USED_REGISTERS): Ditto.
9517 (REG_ALLOC_ORDER): Ditto.
9518 (REG_CLASS_CONTENTS): Ditto.
9519 (HI_REGISTER_NAMES): Ditto.
9520 (ADDITIONAL_REGISTER_NAMES): Use defines instead
9521 of numerical constants.
9522 * config/i386/i386.c (regclass_map): Remove fpsr register.
9523 (dbx_register_map): Ditto.
9524 (dbx64_register_map): Ditto.
9525 (svr4_dbx_register_map): Ditto.
9526 (print_reg): Do not handle FPCR_REG.
9528 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
9531 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
9532 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
9533 Delete, always treat as true.
9534 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
9535 Ditto. Simplify remaining code.
9536 * config/powerpcspe/powerpcspe.h: Ditto.
9537 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
9538 Simplify remaining code.
9539 (rs6000_expand_builtin): Ditto.
9540 * config/rs6000/rs6000.h: Ditto.
9541 * configure.ac: Ditto.
9542 * configure: Regenerate.
9544 2018-09-27 Martin Liska <mliska@suse.cz>
9546 * coverage.c (get_coverage_counts): Revert the formatting
9547 of missing profile opt info.
9549 2018-09-27 Richard Biener <rguenther@suse.de>
9553 * dwarf2out.c (set_block_origin_self): Do not mark outermost
9554 block as we do not output that.
9555 (gen_inlined_subroutine_die): Elide the originally outermost
9556 block, matching what we do for concrete instances.
9557 (decls_for_scope): Add parameter specifying whether to recurse
9560 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
9561 Tom de Vries <tom@codesourcery.com>
9565 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
9566 STORE_FLAG_VALUE == 1.
9568 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
9570 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
9571 constant definitions.
9572 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
9573 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
9574 ("speculation_barrier"): New expander definition.
9576 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
9578 PR gcov-profile/86957
9579 * common.opt: New warning option -Wmissing-profile.
9580 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
9581 * doc/invoke.texi: Document -Wmissing-profile.
9583 2018-09-26 Jim Wilson <jimw@sifive.com>
9585 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
9586 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
9588 2018-09-26 Martin Sebor <msebor@redhat.com>
9590 * tree.c (zerop): Change return type to bool.
9591 (integer_zerop, integer_onep, integer_each_onep): Same.
9592 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
9593 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
9594 (real_onep, real_minus_onep, chain_index): Same.
9595 (print_type_hash_statistics, type_list_equal): Same.
9596 * tree.h (zerop): Same.
9597 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
9598 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
9599 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
9600 (real_onep, real_minus_onep, chain_index): Same.
9601 (print_type_hash_statistics, type_list_equal): Same.
9603 2018-09-26 Jim Wilson <jimw@sifive.com>
9605 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
9607 2018-09-26 Jakub Jelinek <jakub@redhat.com>
9610 * config/i386/i386.c: Include debug.h and dwarf2out.h.
9611 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
9614 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
9616 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
9618 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
9620 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
9621 and FP_SECOND_SSE_REGS.
9622 (REG_CLASS_NAMES): Ditto.
9623 (REG_CLASS_CONTENTS): Ditto.
9624 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
9625 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
9626 (ix86_preferred_output_reload_class): Ditto.
9627 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
9628 clobber constraint to "=&f".
9629 (fix_truncdi_i387): Ditto.
9630 (lrintxfdi2): Ditto.
9631 (fistdi2_<rounding>): Ditto.
9632 (fpremxf4_i387): Change "=u" constraint to "=f".
9633 (fprem1xf4_i387): Ditto.
9635 (fptanxf4_i387): Ditto.
9636 (fxtractxf3_i387): Ditto.
9637 (fscalexf4_i387): Ditto.
9638 (atan2xf3): Change "u" constraint to "f".
9639 (fyl2xxf3_i387): Ditto.
9640 (fyl2xp1xf3_i387): Ditto.
9642 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
9645 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
9646 for removed I387_MASK_PM entity.
9649 2018-09-26 Jeff Law <law@redhat.com>
9651 2018-09-26 Alexey Neyman <stilor@att.net>
9653 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
9654 headers are no longer pulled in by <isl/val.h>.
9656 2018-09-26 Richard Biener <rguenther@suse.de>
9659 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
9660 or concrete instance DIE to the tree. Create abstract origin
9661 attributes also for concrete instances.
9663 2018-09-26 Alexey Neyman <stilor@att.net>
9665 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
9666 headers are no longer pulled in by <isl/val.h>.
9668 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
9670 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
9671 Use new helper functions.
9672 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
9673 Use new helper functions.
9674 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
9675 aarch_mm_needs_release): New declarations.
9676 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
9677 aarch_mm_needs_release): New.
9679 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
9681 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
9682 (arm32_output_mi_thunk): Deal with long calls.
9684 2018-09-26 Richard Biener <rguenther@suse.de>
9688 * tree-inline.c (expand_call_inline): When the location
9689 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
9690 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
9691 the inserted BLOCK to make inlined_function_outer_scope_p
9693 * dwarf2out.c (add_call_src_coords_attributes): Do not add
9694 coords for reserved locations.
9696 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
9698 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
9699 (*call_indirect_nonlocal_sysv<mode>): Ditto.
9700 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
9701 (*sibcall_nonlocal_sysv<mode>): Ditto.
9702 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
9703 (<bd>_<mode>): Ditto.
9704 (<bd>tf_<mode>): Ditto.
9706 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
9708 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
9709 control string as a list of templates instead of as C code.
9710 (*altivec_movti): Ditto.
9711 * config/rs6000/darwin.md (movdf_low_di): Ditto.
9713 2018-09-25 Jim Wilson <jimw@sifive.com>
9715 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
9716 when target symbol is weak.
9718 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
9721 * builtins.c (unterminated_array): Simplify.
9722 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
9723 where pointer arithmetic is safe.
9725 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
9728 * config/rs6000/altivec.md (altivec_vspltb): Use
9729 const_0_to_15_operand instead of u5bit_cint_operand.
9730 (*altivec_vspltb_internal): Ditto.
9731 (altivec_vspltb_direct): Ditto.
9732 (altivec_vsplth): Use const_0_to_7_operand instead of
9734 (*altivec_vsplth_internal): Ditto.
9735 (altivec_vsplth_direct): Ditto.
9736 (altivec_vspltw): Use const_0_to_3_operand instead of
9738 (*altivec_vspltw_internal): Ditto.
9739 (altivec_vspltw_direct): Ditto.
9740 (altivec_vspltsf): Ditto.
9741 (*altivec_vspltsf_internal): Ditto.
9742 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
9743 various splats with the proper size immediate. Reorder the various
9744 cases by ascending size of immediate, and put all such together.
9746 2018-09-25 Richard Biener <rguenther@suse.de>
9749 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
9751 (maybe_create_die_with_external_ref): Do not create
9752 DW_TAG_imported_unit here.
9753 (add_abstract_origin_attribute): Handle external BLOCK refs.
9754 (dwarf2out_abstract_function): Simplify LTO case.
9755 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
9756 rather than using maybe_create_die_with_external_ref.
9758 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
9761 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
9762 (frndintxf2_mask_pm_i387): Ditto.
9763 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
9764 Enable for !flag_trapping_math.
9765 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
9766 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
9767 Change operand 1 predicate to nonimmediate_operand.
9768 (attr "i387_cw"): Remove mask_pm.
9769 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
9770 (enum ix86_entity): Remove I387_MASK_PM.
9771 * config/i386/i386.c (ix86_i387_mode_needed): Do not
9772 handle I387_MASK_PM.
9773 (ix86_mode_needed): Ditto.
9774 (ix86_mode_after): Ditto.
9775 (ix86_mode_entry): Ditto.
9776 (ix86_mode_exit): Ditto.
9777 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
9779 2018-09-25 Jakub Jelinek <jakub@redhat.com>
9781 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
9782 to_update_switch_stmts to vNULL instead of calling create on them
9785 2018-09-25 Richard Biener <rguenther@suse.de>
9787 PR tree-optimization/87402
9788 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
9789 (visit_phi): Re-instantiate handling of supposed to be VARYING
9790 but non-VARYING backedge value.
9792 2018-09-25 Richard Biener <rguenther@suse.de>
9795 * dwarf2out.c (struct sym_off_pair): New.
9796 (external_die_map): New global.
9797 (lookup_decl_die): When in LTO create DIEs lazily from the
9799 (lookup_block_die): New function, create DIEs lazily in LTO.
9800 (equate_block_to_die): New function.
9801 (dwarf2out_die_ref_for_decl): During WPA get the association
9802 from the external DIE map.
9803 (dwarf2out_register_external_die): Record mapping into the
9805 (maybe_create_die_with_external_ref): New function split out from
9806 DIE generation part of old dwarf2out_register_external_die.
9807 (add_abstract_origin_attribute): Do not return the DIE. When
9808 in LTO reference externals directly.
9809 (dwarf2out_abstract_function): When in LTO ignore calls for
9810 decls with external DIEs (already present abstract instances).
9811 (gen_call_site_die): Adjust.
9812 (add_high_low_attributes): Likewise.
9813 (gen_lexical_block_die): Likewise.
9814 (gen_inlined_subroutine_die): Likewie.
9815 (gen_block_die): Likewise.
9816 (dwarf2out_inline_entry): Likewise.
9817 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
9820 2018-09-25 Martin Liska <mliska@suse.cz>
9822 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
9823 integers and not by a float value.
9825 2018-09-25 Martin Liska <mliska@suse.cz>
9828 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
9830 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
9831 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
9832 * godump.c (go_format_type): Remove extra parenthesis.
9834 2018-09-25 Martin Liska <mliska@suse.cz>
9836 * alias.c (set_dest_equal_p): Remove unused function.
9837 * config/i386/i386.c (def_builtin_pure2): Likewise.
9838 * diagnostic-show-locus.c (class layout): Remove
9840 (layout::layout): Likewise here.
9841 * dump-context.h (class temp_dump_context): Likewise.
9842 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
9843 (add_AT_loclistsptr): Likewise.
9844 (add_AT_offset): Likewise.
9845 (get_AT_hi_pc): Likewise.
9846 (is_comdat_die): Likewise.
9847 (type_is_enum): Likewise.
9848 (ceiling): Likewise.
9849 (add_AT_vms_delta): Likewise.
9850 (is_class_die): Likewise.
9851 * edit-context.c (class line_event): Remove unused field.
9852 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
9854 * ipa-cp.c (ipa_get_vr_lat): Likewise.
9855 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
9856 (ok_for_base_p_nonstrict): Likewise.
9857 * tree-chrec.c (is_not_constant_evolution): Likewise.
9858 (chrec_fold_poly_cst): Likewise.
9859 * tree-if-conv.c (has_pred_critical_p): Likewise.
9860 * tree-ssa-coalesce.c (print_exprs): Likewise.
9861 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
9862 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
9863 * tree-vrp.c (value_ranges_intersect_p): Likewise.
9864 (value_range_nonnegative_p): Likewise.
9866 2018-09-25 Martin Liska <mliska@suse.cz>
9868 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
9869 Do not handle "GNU Pascal".
9870 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
9872 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
9873 from documentation. Likewise.
9874 * dbxout.c (dbxout_range_type): Likewise.
9875 * doc/cpp.texi: Likewise.
9876 * doc/extend.texi: Likewise.
9877 * doc/frontends.texi: Likewise.
9878 * doc/invoke.texi: Remove Pascal entry.
9879 * tree.def (CLEANUP_POINT_EXPR): Likewise.
9880 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
9882 2018-09-25 Martin Liska <mliska@suse.cz>
9885 * doc/invoke.texi: Document all parameters and remove default
9888 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
9891 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
9892 contains HOST_WIDE_INTs when computing its size.
9894 2018-09-24 Jim Wilson <jimw@sifive.com>
9897 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
9899 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
9901 2018-09-24 Andrew Pinski <apinski@marvell.com>
9903 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
9904 access prev before checking it for NULLness in the
9905 AARCH64_FUSE_CMP_BRANCH case.
9907 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
9910 * config/i386/i386.c (rest_of_insert_endbranch): Set
9911 endbr_queued_at_entrance to true and don't insert ENDBR if
9912 x86_function_profiler will be called.
9913 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
9915 * config/i386/i386.h (machine_function): Add
9916 endbr_queued_at_entrance.
9918 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
9920 * genattrtab.c (mk_attr_alt): Use alternative_mask.
9921 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
9923 (check_attr_test): Use alternative_mask.
9924 (get_attr_value): Likewise.
9925 (compute_alternative_mask): Use alternative_mask and XWINT.
9926 (make_alternative_compare): Use alternative_mask.
9927 (attr_alt_subset_p): Use XWINT.
9928 (attr_alt_subset_of_compl_p): Likewise.
9929 (attr_alt_intersection): Use alternative_mask and XWINT.
9930 (attr_alt_union): Likewise.
9931 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
9932 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
9933 (simplify_test_exp): Use alternative_mask and XWINT.
9934 (write_test_expr): Use alternative_mask and XWINT, adjust bit
9935 number calculation to support 64 bits. Generate code that
9936 checks 64-bit masks.
9937 (main): Use alternative_mask.
9938 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
9940 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
9943 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
9944 RETURN+USE when returning via %r14.
9946 2018-09-24 Martin Liska <mliska@suse.cz>
9948 * gcov.c (output_lines): Print colorization legend
9949 for both flag_use_colors and flag_use_hotness_colors.
9952 2018-09-24 Martin Liska <mliska@suse.cz>
9954 * coverage.c (get_coverage_counts): Use warning_at
9955 with current_function_decl location. Use %qD in warning
9958 2018-09-24 Martin Liska <mliska@suse.cz>
9960 * memory-block.h (memory_block_pool::release): Annotate with
9961 valgrind that the memory is not accessible.
9963 2018-09-24 Martin Liska <mliska@suse.cz>
9966 * asan.c: Make asan_handled_variables extern.
9968 * cfgexpand.c (expand_stack_vars): Make sure
9969 a representative is unpoison if another
9970 variable in the partition is handled by
9971 use-after-scope sanitization.
9973 2018-09-24 Richard Biener <rguenther@suse.de>
9975 PR tree-optimization/63155
9976 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
9977 the worklist when the edge of the respective argument isn't
9980 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
9982 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
9983 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
9984 (MASK_CLASS_P): Update for rename.
9985 (MAYBE_MASK_CLASS_P): Ditto.
9986 (REG_CLASS_NAMES): Update.
9987 (REG_CLASS_CONTENT): Update.
9988 * config/i386/i386.c (regclass_map): Update for MASK_REG
9989 and ALL_MASK_REGS rename.
9990 * config/i386/constraints.md (Yk): Update for rename.
9993 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
9995 * config/i386/i386.h (enum reg_class): Remove
9996 EVEX_SSE_REGS and MOD4_SSE_REGS.
9997 (REG_CLASS_NAMES): Update.
9998 (REG_CLASS_CONTENT): Update.
9999 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
10000 registers as ALL_SSE_REGS.
10001 (ix86_additional_allocno_class_p): Remove.
10002 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
10003 (ix86_register_priority): Lower priority of EVEX SSE registers.
10004 Use IN_RANGE macro where appropriate.
10005 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
10006 AVX-5124VNNIW checks.
10007 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
10008 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
10009 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
10010 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
10011 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
10012 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
10013 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
10014 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
10015 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
10016 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
10017 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
10018 * config/i386/constraints.md (Yh): Remove.
10020 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
10022 * config/i386/i386.c (regclass_map): Declare integer REX registers
10025 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
10027 * doc/service.texi (Service): Switch the fsf.org link to https.
10029 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
10032 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10033 Define to speculation_safe_value_not_needed.
10035 2018-09-21 Florian Weimer <fweimer@redhat.com>
10037 PR middle-end/81035
10038 * doc/extend.texi (Common Function Attributes): Mention that
10039 noreturn suppresses tail call optimization.
10041 2018-09-21 Jeff Law <law@redhat.com>
10043 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
10044 vr_values::cleanup_edges_and_switches.
10045 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
10047 (identify_jump_threads): Remove EDGE_IGNORE handling.
10048 (execute_vrp): Move handling of to_remove_edges and
10049 to_update_switch_stmts into vr_values class member functions.
10050 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
10051 (to_update_switch_stmts): Likewise.
10052 * vr-values.c: Include cfghooks.h.
10053 (vr_values::vr_values): Initialize to_remove_edges and
10054 to_update_switch_stmts.
10055 (vr_values::~vr_values): Verify to_remove_edges and
10056 to_update_switch_stmts are empty.
10057 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
10058 (vr_values::cleanup_edges_and_switches): New member function.
10059 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
10060 function. Add new data members.
10062 2018-09-21 David Malcolm <dmalcolm@redhat.com>
10064 PR tree-optimization/87309
10065 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
10066 calls with pflags and alt_flags.
10067 (selftest::test_capture_of_dump_calls): Add test of interaction of
10068 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
10070 2018-09-21 Olivier Hainque <hainque@adacore.com>
10072 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
10074 2018-09-21 Olivier Hainque <hainque@adacore.com>
10076 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
10078 2018-09-21 Olivier Hainque <hainque@adacore.com>
10080 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
10081 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
10082 (VXWORKS_LIBS_RTP): Minor reordering.
10084 2018-09-21 Olivier Hainque <hainque@adacore.com>
10086 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
10087 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
10089 2018-09-21 Olivier Hainque <hainque@adacore.com>
10091 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
10092 (PTRDIFF_TYPE): Likewise.
10094 2018-09-21 Olivier Hainque <hainque@adacore.com>
10096 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
10097 triplet, similar to support for VxWorks7.
10098 * config/vxworks-dummy.h: Provide a default definition
10099 of TARGET_VXWORKS64 to 0.
10101 2018-09-21 Olivier Hainque <hainque@adacore.com>
10103 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
10104 * config/vxworks-dummy.h: here.
10106 2018-09-21 Olivier Hainque <hainque@adacore.com>
10108 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
10110 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
10111 Bo Zhou <zbo.zhou@hisilicon.com>
10113 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
10114 * config/aarch64/aarch64-tune.md: Regenerated.
10115 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
10116 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
10117 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
10119 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
10120 Julian Brown <julian@codesourcery.com>
10122 * builtins.c (get_builtin_sync_mem): Handle address spaces.
10124 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
10126 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
10127 if the call takes a static chain.
10129 2018-09-21 Martin Liska <mliska@suse.cz>
10131 * auto-profile.c (autofdo_source_profile::read): Do not
10133 (read_profile): Do not add working sets.
10134 (read_autofdo_file): Remove sum_all.
10135 (afdo_callsite_hot_enough_for_early_inline): Remove const
10137 * coverage.c (struct counts_entry): Remove gcov_summary.
10138 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
10139 do not support GCOV_TAG_PROGRAM_SUMMARY.
10140 (get_coverage_counts): Remove summary and expected
10142 * coverage.h (get_coverage_counts): Likewise.
10143 * doc/gcov-dump.texi: Remove -w option.
10144 * gcov-dump.c (dump_working_sets): Remove.
10145 (main): Do not support '-w' option.
10146 (print_usage): Likewise.
10147 (tag_summary): Likewise.
10148 * gcov-io.c (gcov_write_summary): Do not dump
10150 (gcov_read_summary): Likewise.
10151 (gcov_histo_index): Remove.
10152 (gcov_histogram_merge): Likewise.
10153 (compute_working_sets): Likewise.
10154 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
10156 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
10157 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
10158 (GCOV_HISTOGRAM_SIZE): Remove.
10159 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
10160 (struct gcov_summary): Simplify rapidly just
10161 to runs and sum_max fields.
10162 (gcov_histo_index): Remove.
10163 (NUM_GCOV_WORKING_SETS): Likewise.
10164 (compute_working_sets): Likewise.
10165 * gcov-tool.c (print_overlap_usage_message): Remove
10166 trailing empty line.
10167 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
10168 (output_lines): Remove program related line.
10169 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
10170 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
10172 (input_profile_summary): Do not read it.
10173 (merge_profile_summaries): And do not merge it.
10174 (input_symtab): Do not call removed function.
10175 * modulo-sched.c (sms_schedule): Do not print sum_max.
10176 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
10177 removed when histogram method was invented.
10178 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
10180 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
10182 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
10183 and dump selected value.
10184 * profile.c (add_working_set): Remove.
10185 (get_working_sets): Likewise.
10186 (find_working_set): Likewise.
10187 (get_exec_counts): Do not work with working sets.
10188 (read_profile_edge_counts): Do not inform as sum_max is removed.
10189 (compute_branch_probabilities): Likewise.
10190 (compute_value_histograms): Remove argument for call of
10191 get_coverage_counts.
10192 * profile.h: Do not make gcov_summary const.
10194 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
10196 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
10198 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
10200 PR tree-optimization/86990
10201 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
10202 Check that the entire merged store group is made of constants only for
10203 overlapping stores.
10205 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
10207 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
10208 (VTABLE_VERIFICATION_SPEC): Likewise.
10209 (SANITIZER_EARLY_SPEC): Likewise.
10210 (SANITIZER_SPEC): Likewise.
10211 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
10212 * doc/invoke.texi (Link Options): Document -r.
10214 2018-09-20 Richard Biener <rguenther@suse.de>
10216 PR middle-end/87054
10217 * gimplify.c (gimplify_expr): Retain alignment of
10218 addressable lvalue in dereference.
10220 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
10223 * configure.ac: Check for .loc is_stmt support.
10224 * configure, config.in: Rebuilt.
10225 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
10228 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
10230 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
10231 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
10234 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
10236 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10238 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
10241 2018-09-20 Marek Polacek <polacek@redhat.com>
10243 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
10245 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
10247 PR tree-optimization/87288
10248 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
10249 into account when determining PEELING_FOR_NITERS.
10251 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
10253 PR tree-optimization/86877
10254 * tree-vect-loop.c (vect_analyze_loop_2): Call
10255 vect_verify_datarefs_alignment.
10257 2018-09-19 Marek Polacek <polacek@redhat.com>
10259 * doc/invoke.texi: Document -Wclass-conversion.
10261 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
10263 * config/pa/pa.c (pa_adjust_priority): Delete.
10264 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
10266 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
10267 (atomic_storehi): Likewise.
10268 (atomic_storesi): Likewise.
10269 (atomic_loaddi): Restore compare and swap exchange loop code.
10271 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
10273 PR rtl-optimization/86902
10274 * combine.c (try_combine): When changing the CC mode used, don't change
10275 an unrelated mode in other_insn to that new CC mode.
10277 2018-09-19 David Malcolm <dmalcolm@redhat.com>
10279 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
10280 with %T in place of calls to dump_generic_expr.
10281 (prune_runtime_alias_test_list): Likewise.
10282 (create_runtime_alias_checks): Likewise.
10283 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
10284 (vect_analyze_data_ref_dependence): Likewise.
10285 (vect_slp_analyze_data_ref_dependence): Likewise.
10286 (vect_record_base_alignment): Likewise. Use %G in place of call
10287 to dump_gimple_stmt.
10288 (vect_compute_data_ref_alignment): Likewise.
10289 (verify_data_ref_alignment): Likewise.
10290 (vect_find_same_alignment_drs): Likewise.
10291 (vect_analyze_group_access_1): Likewise.
10292 (vect_analyze_data_ref_accesses): Likewise.
10293 (dependence_distance_ge_vf): Likewise.
10294 (dump_lower_bound): Likewise.
10295 (vect_prune_runtime_alias_test_list): Likewise.
10296 (vect_find_stmt_data_reference): Likewise.
10297 (vect_analyze_data_refs): Likewise.
10298 (vect_create_addr_base_for_vector_ref): Likewise.
10299 (vect_create_data_ref_ptr): Likewise.
10300 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
10301 (vect_can_advance_ivs_p): Likewise.
10302 (vect_update_ivs_after_vectorizer): Likewise.
10303 (vect_gen_prolog_loop_niters): Likewise.
10304 (vect_prepare_for_masked_peels): Likewise.
10305 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
10306 (vect_determine_vectorization_factor): Likewise.
10307 (vect_is_simple_iv_evolution): Likewise.
10308 (vect_analyze_scalar_cycles_1): Likewise.
10309 (vect_analyze_loop_operations): Likewise.
10310 (report_vect_op): Likewise.
10311 (vect_is_slp_reduction): Likewise.
10312 (check_reduction_path): Likewise.
10313 (vect_is_simple_reduction): Likewise.
10314 (vect_create_epilog_for_reduction): Likewise.
10315 (vect_finalize_reduction:): Likewise.
10316 (vectorizable_induction): Likewise.
10317 (vect_transform_loop_stmt): Likewise.
10318 (vect_transform_loop): Likewise.
10319 (optimize_mask_stores): Likewise.
10320 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
10321 (vect_split_statement): Likewise.
10322 (vect_recog_over_widening_pattern): Likewise.
10323 (vect_recog_average_pattern): Likewise.
10324 (vect_determine_min_output_precision_1): Likewise.
10325 (vect_determine_precisions_from_range): Likewise.
10326 (vect_determine_precisions_from_users): Likewise.
10327 (vect_mark_pattern_stmts): Likewise.
10328 (vect_pattern_recog_1): Likewise.
10329 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
10330 (vect_record_max_nunits): Likewise.
10331 (vect_build_slp_tree_1): Likewise.
10332 (vect_build_slp_tree_2): Likewise.
10333 (vect_print_slp_tree): Likewise.
10334 (vect_analyze_slp_instance): Likewise.
10335 (vect_detect_hybrid_slp_stmts): Likewise.
10336 (vect_detect_hybrid_slp_1): Likewise.
10337 (vect_slp_analyze_operations): Likewise.
10338 (vect_slp_analyze_bb_1): Likewise.
10339 (vect_transform_slp_perm_load): Likewise.
10340 (vect_schedule_slp_instance): Likewise.
10341 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
10342 (vect_mark_stmts_to_be_vectorized): Likewise.
10343 (vect_init_vector_1): Likewise.
10344 (vect_get_vec_def_for_operand): Likewise.
10345 (vect_finish_stmt_generation_1): Likewise.
10346 (vect_check_load_store_mask): Likewise.
10347 (vectorizable_call): Likewise.
10348 (vectorizable_conversion): Likewise.
10349 (vectorizable_operation): Likewise.
10350 (vectorizable_load): Likewise.
10351 (vect_analyze_stmt): Likewise.
10352 (vect_is_simple_use): Likewise.
10353 (vect_get_vector_types_for_stmt): Likewise.
10354 (vect_get_mask_type_for_stmt): Likewise.
10355 * tree-vectorizer.c (increase_alignment): Likewise.
10357 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
10359 * doc/rtl.texi: Adjust vec_select description.
10360 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
10361 non-constant selectors.
10363 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
10365 * config/aarch64/aarch64-protos.h
10366 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
10367 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
10368 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
10369 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
10370 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
10371 (AARCH64_FL_PROFILE): Move index so flags are ordered.
10372 (AARCH64_ISA_RCPC8_4): New flag.
10373 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
10374 to aarch64_offset_9bit_signed_unscaled_p.
10375 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
10377 * config/aarch64/constraints.md (Ust): New constraint.
10378 * config/aarch64/predicates.md.
10379 (aarch64_9bit_offset_memory_operand): New predicate.
10380 (aarch64_rcpc_memory_operand): New predicate.
10382 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
10384 PR rtl-optimization/87361
10385 * rtlanal.c (nonzero_bits1): Revert accidental change.
10387 2018-09-19 Richard Biener <rguenther@suse.de>
10389 PR tree-optimization/87349
10390 PR tree-optimization/87342
10391 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
10393 2018-09-18 Marek Polacek <polacek@redhat.com>
10395 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
10396 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
10398 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
10400 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
10402 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
10404 PR rtl-optimization/86882
10405 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
10407 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
10409 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
10410 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
10412 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
10415 * doc/invoke.texi (Link Options): Fix formatting and grammar.
10417 2018-09-18 Richard Biener <rguenther@suse.de>
10419 PR middle-end/63155
10420 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
10421 (compute_samebase_partition_bases): Likewise.
10422 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
10423 (gimple_can_coalesce_p): Simplify.
10425 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
10427 Handle a library implementation of ffs calling __builtin_ffs.
10428 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
10429 (mmix_init_libfuncs): New function: make __builtin_ffs expand
10432 2018-09-17 David Malcolm <dmalcolm@redhat.com>
10434 * diagnostic-show-locus.c (class layout_range): Add field
10436 (layout_range::layout_range): Add "original_idx" param and use it
10437 to initialize new field.
10438 (make_range): Use 0 for original_idx.
10439 (layout::layout): Pass in index to calls to
10440 maybe_add_location_range.
10441 (layout::maybe_add_location_range): Add param "original_idx" and
10442 pass it on to layout_range.
10443 (layout::print_any_labels): Pass on range->m_original_idx to
10445 (gcc_rich_location::add_location_if_nearby): Use 0 for
10447 * gcc-rich-location.h (text_range_label::get_text): Update for new
10449 (range_label_for_type_mismatch::get_text): Likewise.
10451 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
10453 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
10455 2018-09-17 David Malcolm <dmalcolm@redhat.com>
10457 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
10458 format_string_diagnostic_t.
10459 (fmtwarn_n): Likewise.
10460 * substring-locations.c
10461 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
10462 (format_warning_n_va): Convert to...
10463 (format_string_diagnostic_t::emit_warning_n_va): ...this.
10464 (format_warning_va): Convert to...
10465 (format_string_diagnostic_t::emit_warning_va): ...this.
10466 (format_warning_at_substring): Convert to...
10467 (format_string_diagnostic_t::emit_warning): ...this.
10468 (format_warning_at_substring_n): Convert to...
10469 (format_string_diagnostic_t::emit_warning_n): ...this.
10470 * substring-locations.h (class format_string_diagnostic_t): New
10472 (format_warning_va): Convert to
10473 format_string_diagnostic_t::emit_warning_va.
10474 (format_warning_n_va): Convert to
10475 format_string_diagnostic_t::emit_warning_n_va.
10476 (format_warning_at_substring): Convert to
10477 format_string_diagnostic_t::emit_warning.
10478 (format_warning_at_substring_n): Convert to
10479 format_string_diagnostic_t::emit_warning_n.
10481 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
10482 Bernd Schmidt <bernds_cb1@t-online.de>
10484 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
10487 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
10489 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
10490 operand 0 predicate to nonimmediate operand.
10491 (rint<mode>2_frndint): Remove insn pattern.
10492 (rint<mode>2): Change operand 1 predicate to general_operand.
10493 Extend operand 1 to XFmode and generate rintxf2 insn.
10494 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
10495 Do not use X87MODEF mode macro.
10496 (frndintxf2_<rounding>_i387): Rename from
10497 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
10498 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
10499 to XFmode and generate significandxf3 insn.
10501 2018-09-17 Richard Biener <rguenther@suse.de>
10503 PR tree-optimization/87328
10504 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
10505 visiting unexecutable backedges when not iterating.
10506 (do_rpo_vn): Mark all edges not executable even when not
10509 2018-09-17 Martin Jambor <mjambor@suse.cz>
10512 * doc/invoke.texi (Warning Options): Likewise.
10514 2018-09-17 Richard Biener <rguenther@suse.de>
10516 PR tree-optimization/87301
10517 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
10518 clean EH info from leftover copy assignments.
10520 2018-09-17 Martin Liska <mliska@suse.cz>
10522 PR gcov-profile/85871
10523 * gcov.c (output_intermediate_file): Fix out of bounds
10526 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
10528 * config/arc/arc.c: Object attributes for core4 not reflected
10530 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
10533 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
10535 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
10537 2018-09-17 Martin Liska <mliska@suse.cz>
10539 * doc/gcov.texi: Document new option --use-hotness-colors.
10540 * gcov.c (struct source_info): Declare new field.
10541 (source_info::source_info): Set default for maximum_count.
10542 (print_usage): Add new -q option.
10543 (process_args): Process it.
10544 (accumulate_line_info): Save src->maximum_count.
10545 (output_line_beginning): Make color line number if
10546 flag_use_hotness_colors is set.
10547 (output_line_details): Pass default argument value.
10548 (output_lines): Pass src->maximum_count.
10550 2018-09-17 Martin Liska <mliska@suse.cz>
10552 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
10553 Use processor_names table.
10554 * config/i386/i386.c (ix86_default_align): Use
10555 processor_cost_table for alignment values.
10556 (ix86_option_override_internal): Use processor_names.
10557 (ix86_function_specific_print): Likewise.
10558 * config/i386/i386.h (struct processor_costs):
10559 Add alignment values.
10560 (struct ptt): Remove and replace with const char *.
10561 * config/i386/x86-tune-costs.h (struct processor_costs):
10562 Declare default alignments for all costs.
10564 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
10566 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
10567 symbolics or VR_VARYING ranges for ABS_EXPR.
10568 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
10569 when range will wrap.
10571 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
10573 PR middle-end/86864
10574 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
10575 before and after a JUMP_TABLE_DATA.
10577 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
10579 PR middle-end/87188
10580 * dojump.c (do_compare_and_jump): Canonicalize function pointers
10581 when one operand is a function pointer. Use POINTER_TYPE_P and
10582 FUNC_OR_METHOD_TYPE_P.
10583 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
10584 * fold-const.c (build_range_check): Likewise.
10585 * match.pd (simple_comparison): Likewise.
10587 2018-09-14 David Malcolm <dmalcolm@redhat.com>
10590 * spellcheck.c (get_edit_distance_cutoff): New function.
10591 (selftest::test_edit_distance_unit_test_oneway): Rename to...
10592 (selftest::test_get_edit_distance_one_way): ...this.
10593 (selftest::test_get_edit_distance_unit): Rename to...
10594 (selftest::test_get_edit_distance_both_ways): ...this.
10595 (selftest::test_edit_distances): Move tests to this new function,
10596 and test some more pairs of strings. Update for above renaming.
10597 (selftest::get_old_cutoff): New function.
10598 (selftest::test_get_edit_distance_cutoff): New function.
10599 (selftest::assert_suggested_for): New function.
10600 (ASSERT_SUGGESTED_FOR): New macro.
10601 (selftest::assert_not_suggested_for): New function.
10602 (ASSERT_NOT_SUGGESTED_FOR): New macro.
10603 (selftest::test_suggestions): New function.
10604 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
10605 tests to selftest::test_edit_distances and call it. Add calls to
10606 selftest::test_get_edit_distance_cutoff and
10607 selftest::test_suggestions.
10608 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
10609 (best_match::consider): Replace hard-coded cutoff calculation with
10611 (best_match::get_cutoff): New declaration.
10612 (best_match::get_best_meaningful_candidate): Likewise.
10614 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
10616 * builtins.c (fold_builtin_strlen): Remove TODO comment.
10618 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
10621 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
10623 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
10624 terminated string literal.
10626 2018-09-14 Martin Sebor <msebor@redhat.com>
10628 * builtins.c (unterminated_array): Handle ARRAY_REF.
10629 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
10630 * builtins.h (unterminated_array): Declare extern.
10631 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
10633 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
10636 2018-09-14 Martin Sebor <msebor@redhat.com>
10637 Jeff Law <law@redhat.com>
10639 * builtins.c (unterminated_array): New.
10640 (expand_builtin_strcpy): Adjust.
10641 (expand_builtin_strcpy_args): Detect unterminated arrays.
10642 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
10643 unterminated arrays.
10644 * gimple-fold.h (get_maxval_strlen): Add argument.
10645 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
10647 * gimple-fold.c (get_range_strlen): Add argument.
10648 (get_maxval_strlen): Adjust.
10649 * gimple-fold.h (get_range_strlen): Add argument.
10651 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
10653 * config/i386/movdirintrin.h: Fix copyright year.
10655 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
10657 * reg-stack.c: Include regs.h.
10658 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
10659 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
10660 FIRST_STACK_REG, not DFmode.
10661 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
10662 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
10663 (change stack): Default register mode to the reg_raw_mode of
10664 FIRST_STACK_REG, not DFmode.
10665 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
10666 (*swapxf): Rename from swapxf.
10668 2018-09-14 Carl Love <cel@us.ibm.com>
10670 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
10671 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
10673 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
10676 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
10679 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
10682 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
10684 2018-09-14 Jason Merrill <jason@redhat.com>
10686 Fix --enable-gather-detailed-mem-stats.
10687 * hash-table.c (hash_table_usage): Change from variable to function.
10688 * hash-table.h: Adjust.
10689 * Makefile.in: Add missing dependencies on hash-table.h.
10691 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10693 PR tree-optimization/87259
10695 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
10696 execute_cse_reciprocals_1 has tried transforming.
10698 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
10700 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
10701 VR_VARYING for PLUS/MINUS_EXPR.
10703 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
10705 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
10708 2018-09-14 Richard Biener <rguenther@suse.de>
10710 PR middle-end/63155
10711 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
10712 bits for the merged partition.
10714 2018-09-13 Martin Sebor <msebor@redhat.com>
10715 Bernd Edlinger <bernd.edlinger@hotmail.de>
10717 * builtins.h (c_srlen): Add argument.
10718 * builtins.c (warn_string_no_nul): New function.
10719 (c_strlen): Add argument and use it. Update recursive calls.
10720 Pass DECL argument to string_constant to get info on non
10721 terminated strings. Update *NONSTR as needed.
10722 (fold_builtin_strlen): Add argument to calls to c_strlen.
10723 Warn for unterminated arrays.
10724 (warn_string_no_null): Add prototype.
10725 * expr.c (string_constant): Update arguments. Update recursive
10726 calls appropriately. Detect missing NUL terminator and outermost
10727 declaration its missing in.
10728 Improve checks for arrays with nonzero lower bound or elements
10729 that are not a single byte. Simplify offset computation.
10730 Simplify checks for non-NUL terminated strings.
10731 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
10732 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
10734 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
10736 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
10738 * fold-const.c (c_getstr): Fix function comment. Remove unused third
10739 argument. Fix range checks.
10740 * fold-const.h (c_getstr): Adjust protoype.
10741 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
10742 string is constant but contains no NUL byte.
10744 * expr.c (string_constant): Adjust function comment.
10745 Remove bogus check for zero termination.
10747 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
10749 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
10750 (get_constant_size): Don't make STRING_CSTs larger than they are.
10751 (check_string_literal): New check function for STRING_CSTs.
10752 (output_constant): Use it.
10754 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
10757 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
10759 2018-09-13 Richard Biener <rguenther@suse.de>
10761 PR tree-optimization/87263
10762 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
10763 (struct unwind_state): Add max_rpo field.
10764 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
10765 Compute max_rpo, the max RPO number a block can be backwards reached
10766 from. Re-write non-iterating mode to a RPO ordered worklist approach,
10767 separating it from the iterating mode.
10769 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
10771 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
10772 (rfs_decision): New scheduling decision.
10774 2018-09-13 Richard Biener <rguenther@suse.de>
10777 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
10778 (vn_nary_op_insert_pieces_predicated): Do not write useless
10779 valid_dominated_by_p entry outside of the allocated storage.
10781 2018-09-13 Omar Sandoval <osandov@osandov.com>
10782 Tom de Vries <tdevries@suse.de>
10785 * dwarf2out.c (is_c): New function.
10786 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
10788 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
10791 * config/aarch64/aarch64.md (*aarch64_bfxil):
10793 * config/aarch64/constraints.md (Ulc): Define.
10794 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
10796 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
10799 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
10801 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
10802 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
10803 aarch64_layout_frame call.
10804 (aarch64_expand_epilogue): Likewise.
10805 (aarch64_initial_elimination_offset): Likewise.
10806 (aarch64_get_separate_components): Likewise.
10807 (aarch64_use_return_insn_p): Likewise.
10808 (aarch64_layout_frame): Remove unneeded check.
10810 2018-09-13 Jakub Jelinek <jakub@redhat.com>
10812 * configure.ac: Only append
10813 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
10814 gcc_config_arguments if it was never reconfigured or last reconfigure
10815 was with different arguments.
10816 * configure: Regenerated.
10818 2018-09-13 Jakub Jelinek <jakub@redhat.com>
10819 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10821 PR middle-end/87290
10822 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
10823 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
10825 2018-09-13 Jakub Jelinek <jakub@redhat.com>
10827 PR tree-optimization/87287
10828 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
10829 X % C == 0 to X % (unsigned) C == 0 optimization to ...
10830 * match.pd (X % C == 0): ... here. New optimization.
10832 2018-09-12 Jakub Jelinek <jakub@redhat.com>
10834 PR middle-end/82853
10835 * expr.h (maybe_optimize_mod_cmp): Declare.
10836 * expr.c (mod_inv): New function.
10837 (maybe_optimize_mod_cmp): New function.
10838 (do_store_flag): Use it.
10839 * cfgexpand.c (expand_gimple_cond): Likewise.
10841 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
10842 Julian Brown <julian@codesourcery.com>
10844 PR middle-end/86336
10845 * gimplify.c (gimplify_scan_omp_clauses): Set
10846 target_firstprivatize_array_bases in OpenACC parallel and kernels
10847 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
10848 OpenACC data regions.
10850 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
10852 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
10853 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
10855 2018-09-12 Richard Biener <rguenther@suse.de>
10857 PR tree-optimization/87280
10858 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
10859 edge but unreachable target.
10860 (do_rpo_vn): For conservatively handling a PHI only mark
10861 the backedge executable but not the block reachable.
10863 2018-09-12 Richard Biener <rguenther@suse.de>
10865 PR tree-optimization/87266
10866 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
10869 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
10871 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
10873 ("trunc<BFP:mode><DFP_ALL:mode>2")
10874 ("trunc<DFP_ALL:mode><BFP:mode>2")
10875 ("extend<BFP:mode><DFP_ALL:mode>2")
10876 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
10877 according to the target operand type.
10879 2018-09-12 Jakub Jelinek <jakub@redhat.com>
10880 Andreas Krebbel <krebbel@linux.ibm.com>
10882 PR tree-optimization/86844
10883 * gimple-ssa-store-merging.c
10884 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
10885 there are any overlapping stores in between them, make sure they are
10886 also coalesced or we give up completely.
10888 2018-09-12 Jakub Jelinek <jakub@redhat.com>
10890 PR middle-end/87248
10891 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
10892 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
10894 2018-09-12 Tom de Vries <tdevries@suse.de>
10896 * common.opt (gdescribe-dies): Add option.
10897 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
10898 attribute for artifical and nameless decls.
10899 (dwarf2out_register_external_die): Add description attribute to
10900 external reference die.
10901 (add_desc_attribute): New functions.
10902 (gen_subprogram_die): Add description attribute to
10903 DW_TAG_call_site_parameter.
10904 * tree-pretty-print.c (print_generic_expr_to_str): New function.
10905 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
10906 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
10907 -gno-describe-dies.
10908 (@item -gdescribe-dies): Add.
10910 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
10912 * tree-vrp.c (vrp_shift_undefined_p): Remove.
10913 (extract_range_from_binary_expr_1: Call
10914 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
10915 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
10918 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
10920 * gimple-ssa-warn-alloca.c
10921 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
10922 field for ALLOCA_BOUND_*_LARGE.
10924 2018-09-11 Nathan Sidwell <nathan@acm.org>
10926 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
10928 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
10930 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
10931 for clobbers. Remove obsolete comment.
10933 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
10935 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
10936 mpxchk, mpxld and mpxst types.
10937 (define_attr length_immediate): Remove all processing of mpx types.
10938 (define_attr prefix_0f): Ditto.
10939 (define_attr memory): Ditto.
10941 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
10943 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
10944 (log<mode>2): Change operand 1 predicate to general_operand.
10945 Extend operand 1 to XFmode and generate logxf3 insn.
10946 (log10<mode>2): Change operand 1 predicate to general_operand.
10947 Extend operand 1 to XFmode and generate log10xf3 insn.
10948 (log2<mode>2): Change operand 1 predicate to general_operand.
10949 Extend operand 1 to XFmode and generate log2xf3 insn.
10950 (fyl2xp1_extend<mode>xf3_i387): Remove.
10951 (log1p<mode>2): Change operand 1 predicate to general_operand.
10952 Extend operand 1 to XFmode and generate log1pxf3 insn.
10953 (fxtract_extend<mode>xf3_i387): Remove.
10954 (logb<mode>2): Change operand 1 predicate to general_operand.
10955 Extend operand 1 to XFmode and generate logbxf3 insn.
10956 (ilogb<mode>2): Change operand 1 predicate to general_operand.
10957 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
10958 (significand<mode>2): Change operand 1 predicate to general_operand.
10959 Extend operand 1 to XFmode and generate significandxf3 insn.
10961 2018-09-11 Nathan Sidwell <nathan@acm.org>
10963 * gcc.c (perror_with_name, pfatal_with_name): Delete.
10964 (load_specs): Use fatal_error.
10965 (DELETE_IF_ORDINARY, process_command): Use error.
10966 (execute, run_attempt): Use fatal_error.
10968 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
10970 * diagnostic-core.h (sorry_at): New prototype.
10971 * diagnostic.c (sorry_at): New function.
10973 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
10975 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
10976 by zero as VR_UNDEFINED.
10978 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
10980 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
10981 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
10982 (<sincos>mode2): New expander.
10983 (sincos_extend<mode>xf3_i387): Remove insn pattern.
10984 (sincos -> sin, cos splitters): Remove splitter patterns.
10985 (sincos<mode>3): Change operand 2 predicate to general_operand.
10986 Extend operand 2 to XFmode and generate sincosxf3 insn.
10987 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
10988 Change operand 3 predicate to const1_operand.
10989 (fptan_extend<mode>xf4_i387): Remove insn pattern.
10990 (tanxf2): Update operands in the call to fptanxf4_i387.
10991 (tan<mode>2): Change operand 1 predicate to general_operand.
10992 Extend operand 1 to XFmode and generate tanxf3 insn.
10993 (atan2xf3): Rename from *fpatanxf3_i387.
10994 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
10995 (atan2xf3): Remove expander.
10996 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
10997 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
10998 (atan<mode>2): Change operand 1 predicate to general_operand.
10999 Extend operand 1 to XFmode and generate atanxf3 insn.
11001 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
11003 * config/i386/i386.md (x87/SSE constant load splitter): Use
11004 memory_operand instead of nonimmediate_operand for input operand
11007 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
11009 * config/i386/i386.md (float partial SSE register stall splitter): Move
11010 splitter near its instruction pattern.
11011 (float_extend partial SSE register stall splitter): Ditto.
11012 (float_truncate partial SSE register stall splitter): Ditto.
11014 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
11017 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
11018 to speculation_safe_value_not_needed.
11021 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
11022 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
11023 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
11024 leaf_function_p, instead use has_hard_reg_initial_val.
11026 2018-09-09 Nathan Sidwell <nathan@acm.org>
11028 * gcc.h (pfatal_with_name): Don't declare here.
11029 * gcc.c (pfatal_with_name): Make static.
11031 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
11033 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
11036 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
11038 PR rtl-optimization/85458
11039 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
11040 priority hook to reduce the priority of EXPR.
11042 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
11044 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
11045 DImode for x87 on 32bit targets. Conditionally disable x87 modes
11046 with X87_ENABLE_FLOAT. Remove preparation code.
11047 (*float<SWI48:mode><MODEF:mode>2): Rename from
11048 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
11049 math using "enabled" attribute.
11050 (*floatdi<MODEF:mode>2_i387): Rename from
11051 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
11052 enable for 32bit targets only.
11053 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
11055 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
11056 as operand 1 predicate. Rewrite as define_insn_and_split.
11057 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
11059 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
11061 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
11062 to fallthru to FLOAT case.
11064 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
11067 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
11068 around folding of vec_sl to handle out of range shift values.
11070 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
11072 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
11073 Update callers to gen_fix_trunc<mode>_i387_fisttp
11074 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
11075 nonimmediate_operand.
11076 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
11077 and corresponding splitters.
11078 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
11079 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
11080 (fix_truncdi_i387_with_temp): Remove insn pattern
11081 and corresponding splitters.
11082 (fix_trunc<mode>_i387): Change operand 0 predicate to
11083 nonimmediate_operand.
11084 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
11085 and corresponding splitters.
11086 (*fistdi2_1): Remove.
11088 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
11089 (lrintxfdi2): Remove expander. Reimplement as define_insn.
11090 (*fist<mode>2_1): Remove.
11091 (fist<mode>2): Ditto.
11092 (fist<mode>2_with_temp): Remove insn pattern and corresponding
11094 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
11095 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
11096 (fistdi2_<rounding>): Change operand 0 predicate to
11097 nonimmediate_operand.
11098 (fistdi2_<rounding>_with_temp): Remove insn pattern
11099 and corresponding splitters.
11100 (fist<mode>2_<rounding>): Change operand 0 predicate to
11101 nonimmediate_operand.
11102 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
11103 and corresponding splitters.
11105 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
11107 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
11109 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
11112 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
11114 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
11115 early gimple folding of vec_splat().
11116 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
11117 * gimple-fold.h: Add an extern define for tree_vec_extract().
11119 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
11121 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
11122 wrappers around TREE_TYPE comparisons.
11124 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
11127 * config/s390/predicates.md: Add nonsym_memory_operand.
11128 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
11129 contains a SYMBOL_REF, load it into an intermediate pseudo.
11130 (s390_emit_compare_and_swap): Legitimize operand.
11131 * config/s390/s390.md: Use the new nonsym_memory_operand
11132 with UNSPECV_CAS patterns.
11134 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
11137 * config/s390/s390-passes.def: New file.
11138 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
11140 (make_pass_s390_early_mach): Add declaration.
11141 * config/s390/s390.c (make_pass_s390_early_mach):
11142 (s390_option_override): Remove dynamic registration.
11143 * config/s390/t-s390: Add s390-passes.def.
11145 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
11147 * config/s390/s390.c (s390_decompose_constant_pool_ref):
11148 Remove UNSPEC_LTREL_BASE check.
11149 (annotate_constant_pool_refs): Likewise.
11150 (find_constant_pool_ref): Likewise.
11151 (find_ltrel_base): Removed.
11152 (replace_ltrel_base): Removed.
11153 (s390_mainpool_finish): Remove replace_ltrel_base call.
11154 (s390_chunkify_start): Remove pending LTREL_BASE logic.
11155 (s390_chunkify_finish): Remove replace_ltrel_base call.
11156 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
11158 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
11161 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
11162 to speculation_safe_value_not_needed.
11164 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
11165 Bernd Schmidt <bernds_cb1@t-online.de>
11167 * config/nvptx/nvptx-opts.h: New file.
11168 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
11169 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
11170 (ASM_SPEC): Define.
11171 (TARGET_SM35): New macro.
11172 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
11174 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
11176 (misa=): New option.
11177 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
11179 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
11181 * config/i386/i386.md (truncdfsf2): Remove expander.
11182 (truncdfsf2_with_temp): Ditto.
11183 (truncxf<mode>2): Ditto.
11184 (*truncdfsf_fast_mixed): Remove insn pattern.
11185 (*truncdfsf_fast_i387): Ditto.
11186 (*truncdfsf_mixed): Ditto.
11187 (*truncdfsf_i387): Ditto.
11188 (*truncdfsf2_i387_1): Ditto.
11189 (*truncxfsf2_mixed): Ditto.
11190 (*truncxfdf2_mixed): Ditto.
11191 (*truncxf<mode>2_i387_noop): Ditto. Update callers
11192 to call gen_truncxf<mode>2 instead.
11193 (*truncxf<mode>2_i387): Remove.
11194 (reg->reg splitters): Remove splitter pattern.
11195 (reg->mem splitters): Ditto.
11197 (truncdfsf2): New insn pattern.
11198 (truncxf<mode>2): Ditto.
11200 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11202 * tree-ssa-math-opts.c (is_mult_by): New function.
11203 (is_square_of): Use the above.
11204 (optimize_recip_sqrt): New function.
11205 (pass_cse_reciprocals::execute): Use the above.
11207 2018-09-05 Richard Biener <rguenther@suse.de>
11210 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
11211 to zero-init the emplaced vec.
11213 2018-09-05 Martin Liska <mliska@suse.cz>
11215 PR tree-optimization/87205
11216 * tree-switch-conversion.c (pass_lower_switch::execute):
11217 Group cases for switch statements.
11219 2018-09-05 Richard Biener <rguenther@suse.de>
11221 PR tree-optimization/87217
11222 * tree-ssa-sccvn.c (vuse_valueize): New.
11223 (vn_reference_lookup_pieces): Use it.
11224 (vn_reference_lookup): Likewise.
11226 2018-09-05 Nathan Sidwell <nathan@acm.org>
11229 * stor-layout.c (place_field): Scan forwards to check last
11230 bitfield when ms_bitfield_placement is in effect.
11232 2018-09-05 Richard Biener <rguenther@suse.de>
11235 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
11238 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
11239 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
11241 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
11242 * config.gcc (extra_objs): Build it.
11243 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
11245 * config/aarch64/aarch64-passes.def
11246 (pass_tag_collision_avoidance): New pass.
11247 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
11248 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
11249 (aarch64_classify_address): Remove static qualifier.
11250 (aarch64_address_info, aarch64_address_type): Move to...
11251 * config/aarch64/aarch64-protos.h: ... here.
11252 (make_pass_tag_collision_avoidance): New function.
11253 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
11256 2018-09-05 Martin Liska <mliska@suse.cz>
11258 * doc/gcov.texi: Update documentation of humar
11260 * gcov.c (format_count): Print one decimal place, it provides
11261 more fine number of situations like '1G' vs. '1.4G'.
11263 2018-09-05 Martin Liska <mliska@suse.cz>
11266 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
11267 * optc-gen.awk: Allow 'Var' for Deprecated options in order
11268 to generate a MASK value.
11270 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
11273 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
11274 if frame pointer isn't used.
11275 (compute_frame_pointer_to_fb_displacement): Likewise.
11277 2018-09-04 Jakub Jelinek <jakub@redhat.com>
11280 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
11281 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
11282 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
11283 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
11284 and OPTION_MASK_ISA_XSAVEC_UNSET.
11286 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
11288 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
11289 XOR operations in NAND case.
11291 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
11293 * wide-int-range.cc (wide_int_range_convert): New.
11294 * wide-int-range.h (wide_int_range_convert): New.
11295 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
11296 code into wide_int_range_convert.
11297 (extract_range_into_wide_ints): Do not munge anti range constants
11298 into the entire domain. Just return the range back.
11300 2018-09-04 Martin Liska <mliska@suse.cz>
11302 * genmatch.c (output_line_directive): Add new argument
11304 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
11306 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
11308 * doc/invoke.texi (Option Summary): Add whitespace.
11310 * doc/invoke.texi (Option Summary): Add -Waligned-new.
11312 2018-09-04 Richard Biener <rguenther@suse.de>
11314 PR tree-optimization/87211
11315 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
11316 backedge value we're supposed to treat as VARYING also number
11317 the PHI to VARYING in case it got a different value-number already.
11319 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
11321 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
11322 (extract_range_from_binary_expr_1): Do not call
11323 vrp_can_optimize_bit_op.
11324 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
11326 (wide_int_range_get_mask_and_bounds): New.
11327 (wide_int_range_optimize_bit_op): New.
11328 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
11329 (wide_int_range_bit_and): Same.
11330 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
11331 (wide_int_range_optimize_bit_op): New.
11332 (wide_int_range_get_mask_and_bounds): New.
11334 2018-09-04 Richard Biener <rguenther@suse.de>
11336 PR tree-optimization/87176
11337 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
11338 variable. When value-numbering a virtual PHI node make sure
11339 to not value-number to the backedge value.
11341 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
11343 * doc/extend.texi (Long Long, Hex Floats): Document support for
11344 long long and hex floats in more recent versions of ISO C++.
11346 2018-09-03 Richard Biener <rguenther@suse.de>
11348 PR tree-optimization/87177
11349 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
11352 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
11354 * bb-reorder.c (edge_order): Convert to C-qsort-style
11355 tri-state comparator.
11356 (reorder_basic_blocks_simple): Change std::stable_sort to
11359 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
11361 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
11362 tri-state comparator.
11363 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
11365 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
11367 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
11368 (mergesort): ... here as maximum count for using netsort.
11369 (gcc_qsort): Set nlim to 3 if stable sort is requested.
11370 (gcc_stablesort): New.
11371 * system.h (gcc_stablesort): Declare.
11373 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
11375 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
11376 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
11377 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
11379 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
11381 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
11382 lxsdx and stxsdx alternatives.
11383 (*mov<mode>_hardfloat64): Ditto.
11384 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
11386 2018-09-03 Richard Biener <rguenther@suse.de>
11388 PR tree-optimization/87200
11389 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
11392 2018-09-03 Martin Liska <mliska@suse.cz>
11394 PR tree-optimization/87201
11395 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
11396 Fix parenthesis in an expression.
11398 2018-09-03 Richard Biener <rguenther@suse.de>
11400 PR tree-optimization/87197
11401 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
11402 visited. CSE the VN_INFO hashtable lookup.
11404 PR tree-optimization/87169
11405 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
11406 iterating make sure there's no extra backedges from irreducible
11407 regions feeding the header. Mark the destination block
11410 2018-09-03 Martin Liska <mliska@suse.cz>
11413 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
11414 * common/common-targhooks.c (default_get_valid_option_values):
11416 * common/common-targhooks.h (default_get_valid_option_values):
11418 * common/config/i386/i386-common.c: Move processor_target_table
11420 (ix86_get_valid_option_values): New function.
11421 (TARGET_GET_VALID_OPTION_VALUES): New macro.
11422 * config/i386/i386.c (struct ptt): Move to i386-common.c.
11423 (PTA_*): Move all defined masks into i386-common.c.
11424 (ix86_function_specific_restore): Use new processor_cost_table.
11425 * config/i386/i386.h (struct ptt): Moved from i386.c.
11426 (struct pta): Likewise.
11427 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
11428 * doc/tm.texi.in: Likewise.
11429 * opt-suggestions.c (option_proposer::suggest_option):
11430 Pass prefix to build_option_suggestions.
11431 (option_proposer::get_completions): Likewise.
11432 (option_proposer::build_option_suggestions): Use the new target
11434 * opts.c (struct option_help_tuple): New struct.
11435 (print_filtered_help): Use the new target hook.
11437 2018-09-03 Martin Liska <mliska@suse.cz>
11439 PR middle-end/59521
11440 * predict.c (set_even_probabilities): Add likely_edges
11441 argument and handle cases where we have precisely one
11443 (combine_predictions_for_bb): Catch also likely_edges.
11444 (tree_predict_by_opcode): Handle gswitch statements.
11445 * tree-cfg.h (find_case_label_for_value): New declaration.
11446 (find_taken_edge_switch_expr): Likewise.
11447 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
11448 Find pivot in decision tree based on probabily, not by number of
11451 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
11453 * doc/standards.texi (Standards): Update Objective-C reference.
11455 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
11457 * doc/install.texi (Prerequisites): Update link for MPC.
11459 2018-09-01 Michael Matz <matz@suse.de>
11461 PR tree-optimization/87074
11462 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
11463 PHIs for outer-loop uses.
11465 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
11467 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
11468 * doc/invoke.texi (C Dialect Options): Ditto.
11470 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
11472 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
11474 2018-08-31 Richard Biener <rguenther@suse.de>
11476 PR tree-optimization/87168
11477 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
11478 (rpo_elim::eliminate_avail): When OP was not visited it must
11481 2018-08-31 David Malcolm <dmalcolm@redhat.com>
11483 * tree-vrp.c (copy_value_range): Convert param "from" from
11484 "value_range *" to "const value_range *".
11485 (range_is_null): Likewise for param "vr".
11486 (range_int_cst_p): Likewise.
11487 (range_int_cst_singleton_p): Likewise.
11488 (symbolic_range_p): Likewise.
11489 (value_ranges_intersect_p): Likewise for both params.
11490 (value_range_nonnegative_p): Likewise for param "vr".
11491 (value_range_constant_singleton): Likewise.
11492 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
11493 (extract_range_into_wide_ints): Likewise for param "vr".
11494 (extract_range_from_multiplicative_op): Likewise for params "vr0"
11496 (vrp_can_optimize_bit_op): Likewise.
11497 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
11499 (extract_range_from_unary_expr): Likewise.
11500 (debug_value_range): Likewise for param "vr".
11501 (value_range::dump): Add "const" qualifier.
11502 (vrp_prop::check_array_ref): Convert local "vr" from
11503 "value_range *" to "const value_range *".
11504 (vrp_prop::check_mem_ref): Likewise.
11505 (vrp_prop::visit_stmt): Likewise for local "old_vr".
11506 (vrp_intersect_ranges_1): Likewise for param "vr_1".
11507 (vrp_intersect_ranges): Likewise.
11508 (simplify_stmt_for_jump_threading): Likewise for local "vr".
11509 (vrp_prop::vrp_finalize): Likewise.
11510 * tree-vrp.h (value_range::dump): Add "const" qualifier.
11511 (vrp_intersect_ranges): Add "const" qualifier to params as above.
11512 (extract_range_from_unary_expr): Likewise.
11513 (value_range_constant_singleton): Likewise.
11514 (symbolic_range_p): Likewise.
11515 (copy_value_range): Likewise.
11516 (extract_range_from_binary_expr_1): Likewise.
11517 (range_int_cst_p): Likewise.
11518 (vrp_set_zero_nonzero_bits): Likewise.
11519 (range_int_cst_singleton_p): Likewise.
11521 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
11523 * config/aarch64/arm_neon.h (vabsd_s64): New.
11524 (vnegd_s64): Likewise.
11526 2018-08-31 Martin Jambor <mjambor@suse.cz>
11528 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
11530 2018-08-31 Martin Liska <mliska@suse.cz>
11532 * ipa-icf.c (sem_item::add_type): Use
11533 sem_item::m_type_hash_cache.
11534 * ipa-icf.h: Move the cache from sem_item_optimizer
11537 2018-08-31 Nathan Sidwell <nathan@acm.org>
11539 * doc/extend.texi (Backwards Compatibility): Remove implicit
11540 extern C leeway of () being (...).
11542 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11544 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
11546 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
11550 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
11552 2018-08-31 Jakub Jelinek <jakub@redhat.com>
11554 PR middle-end/87138
11555 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
11556 gen_int_mode. Formatting fixes.
11558 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
11560 * target.def (custom_function_descriptors): Improve documentation.
11561 * doc/tm.texi.in (Trampolines): Expand discussion of function
11562 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
11563 beginning of the section.
11564 * doc/tm.texi: Regenerated.
11566 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
11568 * cfg.h (class auto_edge_flag): Spell out the template-id of the
11569 base class in the initializer list. This is a workaround for
11570 building with older GCC.
11571 (class auto_bb_flag): Likewise.
11573 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
11575 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
11576 (altivec_vcmpequ<VI_char>_p): Remove star.
11577 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
11579 (expand_strncmp_vec_sequence): New function.
11580 (emit_final_str_compare_vec): New function.
11581 (expand_strn_compare): Add support for vector strncmp.
11582 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
11583 length specification to bytes.
11584 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
11585 (vcmpnezb_p): New pattern.
11586 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
11587 for option -mstring-compare-inline-limit.
11589 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
11591 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
11592 (PTA_SKYLAKE): Add PTA_AES.
11593 (PTA_GOLDMONT): Likewise.
11595 2018-08-29 Jan Hubicka <jh@suse.cz>
11598 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
11599 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
11601 2018-08-29 Jan Hubicka <jh@suse.cz>
11603 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
11605 (hash_tree): Do not visit TYPE_STUB_DECL.
11606 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
11607 stream TYPE_STUB_DECL.
11608 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
11609 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
11610 after free_lang_data.
11611 (type_in_anonymous_namespace_p): Likewise.
11613 2018-08-29 Jan Hubicka <jh@suse.cz>
11615 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
11616 comment that it has to be even number.
11617 (class sreal): Change m_sig type to int32_t.
11618 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
11619 int64_t for temporary calculations.
11620 (sreal_verify_basics): Drop one bit from minimum and maximum.
11622 2018-08-30 Richard Biener <rguenther@suse.de>
11624 PR tree-optimization/87147
11625 * tree-ssa-sccvn.c (SSA_VISITED): New function.
11626 (visit_phi): When the degenerate result is from the backedge and
11627 we didn't visit its definition yet drop to VARYING.
11628 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
11630 2018-08-29 Jan Hubicka <jh@suse.cz>
11632 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
11634 (hash_tree): Likewise.
11636 2018-08-29 Jan Hubicka <jh@suse.cz>
11638 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
11639 and TYPE_NEXT_REF_TO.
11641 2018-08-29 Jan Hubicka <jh@suse.cz>
11643 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
11644 comment that it has to be even number.
11645 (class sreal): Change m_sig type to int32_t.
11646 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
11647 int64_t for temporary calculations.
11648 (sreal_verify_basics): Drop one bit from minimum and maximum.
11650 2018-08-30 Tamar Christina <tamar.christina@arm.com>
11652 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
11654 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
11656 PR middle-end/86995
11657 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
11658 if to_add is negative.
11660 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
11662 PR middle-end/87053
11663 * builtins.c (c_strlen): Improve range checks.
11665 2018-08-29 Martin Sebor <msebor@redhat.com>
11666 Jeff Law <law@redhat.com>
11668 PR tree-optimization/86714
11669 PR tree-optimization/86711
11670 * builtins.c (c_strlen): Add arguments to call to string_constant.
11671 * expr.c (string_constant): Add argument. Detect missing nul
11672 terminator and outermost declaration it's missing in.
11673 * expr.h (string_constant): Add argument.
11674 * fold-const.c (read_from_constant_string): Add arguments to call to
11676 (c_getstr): Likewise.
11677 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
11678 to string_constant.
11679 * tree-ssa-strlen.c (get_stridx): Likewise.
11681 2018-08-29 Jan Hubicka <jh@suse.cz>
11683 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
11684 Do not stream DECL_VINDEX.
11685 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
11686 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
11687 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
11689 2018-08-29 Richard Biener <rguenther@suse.de>
11691 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
11692 virtual operands that are not default defs to honor region
11694 (rpo_vn_valueize): Remove ineffective code here.
11696 2018-08-29 Richard Biener <rguenther@suse.de>
11698 PR tree-optimization/87132
11699 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
11700 when skipping defs reachable over backedges.
11702 2018-08-29 Richard Biener <rguenther@suse.de>
11704 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
11705 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
11706 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
11707 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
11708 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
11709 (vn_reference_lookup_3): Remove use of const_parms.
11710 (free_rpo_vn): Do not free const_parms.
11711 (do_rpo_vn): Do not call init_const_parms.
11712 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
11713 SSA_NAME_POINTS_TO_READONLY_MEMORY.
11714 (call_may_clobber_ref_p_1): Likewise.
11716 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
11719 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
11721 (-ftree-scev-cprop): Document.
11723 2018-08-29 Jan Hubicka <jh@suse.cz>
11725 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
11727 (sreal constructor): Update.
11728 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
11729 sreal:operator/): Update.
11731 2018-08-29 Martin Liska <mliska@suse.cz>
11733 * tree-switch-conversion.c (switch_conversion::expand):
11734 Strenghten assumption about gswitch statements.
11736 2018-08-29 Richard Biener <rguenther@suse.de>
11738 PR tree-optimization/87117
11739 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
11740 re-value-number released SSA VDEFs.
11742 2018-08-29 Richard Biener <rguenther@suse.de>
11744 PR tree-optimization/87126
11745 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
11747 2018-08-28 Jim Wilson <jimw@sifive.com>
11749 * config/riscv/pic.md: Rewrite.
11750 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
11752 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
11753 (SOFTF, default_load, softload, softstore): New.
11755 2018-08-28 Jeff Law <law@redhat.com>
11757 * fold-const.c (fold_binary_loc): Remove recently added assert.
11759 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
11761 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
11762 to OP parmeter of generated function.
11764 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
11766 PR tree-optimization/87009
11767 * match.pd: Add boolean optimizations.
11769 2018-08-28 Martin Sebor <msebor@redhat.com>
11771 PR middle-end/86631
11772 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
11773 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
11774 (pass_walloca::gate): Use it.
11775 (alloca_call_type): Same.
11776 (pass_walloca::execute): Same.
11777 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
11779 2018-08-28 David Malcolm <dmalcolm@redhat.com>
11781 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
11782 GCC_VERSION for usage of "__gcc_dump_printf__" format from
11783 >= 3005 to >= 9000.
11785 2018-08-28 Richard Biener <rguenther@suse.de>
11787 PR tree-optimization/87124
11788 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
11789 constants before looking up avail.
11791 2018-08-28 Jakub Jelinek <jakub@redhat.com>
11793 PR middle-end/87099
11794 * calls.c (maybe_warn_nonstring_arg): Punt early if
11795 warn_stringop_overflow is zero. Don't call get_range_strlen
11796 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
11797 Swap comparison operands to have constants on rhs. Only use
11798 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
11799 increment lenrng[0].
11801 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
11803 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
11804 use of tree_to_shwi. Remove duplicated test for the size being
11805 a whole number of bytes.
11807 2018-08-28 Richard Biener <rguenther@suse.de>
11809 PR tree-optimization/87117
11810 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
11811 Handle removed stmt without LHS (GIMPLE_NOP).
11813 2018-08-28 Richard Biener <rguenther@suse.de>
11815 PR tree-optimization/87117
11816 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
11817 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
11819 2018-08-28 Richard Biener <rguenther@suse.de>
11821 PR tree-optimization/87117
11822 * tree-ssa-pre.c (compute_avail): Do not make expressions
11823 with predicated values available.
11824 (get_expr_value_id): Assert we do not run into predicated value
11827 2018-08-28 Richard Biener <rguenther@suse.de>
11829 PR tree-optimization/87117
11830 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
11831 get virtual operands.
11832 (get_expr_operands): Handle STRING_CST like other decls.
11834 2018-08-28 Martin Liska <mliska@suse.cz>
11836 * tree.h: Update documentation of fndecl_built_in_p
11840 2018-08-27 Jeff Law <law@redhat.com>
11841 PR tree-optimization/87110
11842 * tree-ssa-dse.c (compute_trims): Handle non-constant
11845 2018-08-27 Martin Sebor <msebor@redhat.com>
11847 PR tree-optimization/86914
11848 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
11850 2018-08-27 Martin Sebor <msebor@redhat.com>
11852 PR tree-optimization/87112
11853 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
11854 the type of the bound argument.
11856 2018-08-27 Jeff Law <law@redhat.com>
11858 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
11859 type does not have a TYPE_SIZE_UNIT.
11861 2018-08-27 Steve Ellcey <sellcey@cavium.com>
11863 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
11864 with include of backend.h.
11866 2018-08-27 Richard Biener <rguenther@suse.de>
11868 PR tree-optimization/86927
11869 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
11870 use const cond reduction code.
11872 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
11874 PR tree-optimization/85758
11875 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
11877 2018-08-27 David Malcolm <dmalcolm@redhat.com>
11880 * diagnostic-show-locus.c (class layout_range): Update for
11881 conversion of show_caret_p to a tri-state.
11882 (layout_range::layout_range): Likewise.
11883 (make_range): Likewise.
11884 (layout::maybe_add_location_range): Likewise.
11885 (layout::should_print_annotation_line_p): Don't show annotation
11886 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
11887 (layout::get_state_at_point): Update for conversion of
11888 show_caret_p to a tri-state. Bail out early for
11889 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
11890 underlining or source colorization.
11891 (gcc_rich_location::add_location_if_nearby): Update for conversion
11892 of show_caret_p to a tri-state.
11893 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
11894 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
11896 (selftest::test_one_liner_labels): Likewise.
11897 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
11898 conversion of show_caret_p to a tri-state.
11899 * pretty-print.c (text_info::set_location): Likewise.
11900 * pretty-print.h (text_info::set_location): Likewise.
11901 * substring-locations.c (format_warning_n_va): Likewise.
11902 * tree-diagnostic.c (default_tree_printer): Likewise.
11903 * tree-pretty-print.c (newline_and_indent): Likewise.
11905 2018-08-27 David Malcolm <dmalcolm@redhat.com>
11908 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
11909 line above for line-insertion fix-it hints.
11910 (selftest::test_fixit_insert_containing_newline): Update the
11911 expected results, and add a test with line-numbering enabled.
11913 2018-08-27 Martin Liska <mliska@suse.cz>
11916 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
11917 params with DECL_HAS_VALUE_EXPR_P.
11919 2018-08-27 Martin Liska <mliska@suse.cz>
11921 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
11922 selected expansion strategy.
11924 2018-08-27 Martin Liska <mliska@suse.cz>
11926 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
11927 * builtins.c (is_builtin_fn): Likewise.
11928 * attribs.c (diag_attr_exclusions): Use new function
11929 fndecl_built_in_p and remove check for FUNCTION_DECL if
11931 (builtin_mathfn_code): Likewise.
11932 (fold_builtin_expect): Likewise.
11933 (fold_call_expr): Likewise.
11934 (fold_builtin_call_array): Likewise.
11935 (fold_call_stmt): Likewise.
11936 (set_builtin_user_assembler_name): Likewise.
11937 (is_simple_builtin): Likewise.
11938 * calls.c (gimple_alloca_call_p): Likewise.
11939 (maybe_warn_nonstring_arg): Likewise.
11940 * cfgexpand.c (expand_call_stmt): Likewise.
11941 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
11942 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
11943 (cgraph_node::verify_node): Likewise.
11944 * cgraphclones.c (build_function_decl_skip_args): Likewise.
11945 (cgraph_node::create_clone): Likewise.
11946 * config/arm/arm.c (arm_insert_attributes): Likewise.
11947 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
11948 * dse.c (scan_insn): Likewise.
11949 * expr.c (expand_expr_real_1): Likewise.
11950 * fold-const.c (operand_equal_p): Likewise.
11951 (fold_binary_loc): Likewise.
11952 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
11953 * gimple-low.c (lower_stmt): Likewise.
11954 * gimple-pretty-print.c (dump_gimple_call): Likewise.
11955 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
11957 * gimple.c (gimple_build_call_from_tree): Likewise.
11958 (gimple_call_builtin_p): Likewise.
11959 (gimple_call_combined_fn): Likewise.
11960 * gimplify.c (gimplify_call_expr): Likewise.
11961 (gimple_boolify): Likewise.
11962 (gimplify_modify_expr): Likewise.
11963 (gimplify_addr_expr): Likewise.
11964 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
11965 * ipa-cp.c (determine_versionability): Likewise.
11966 * ipa-fnsummary.c (compute_fn_summary): Likewise.
11967 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
11968 * ipa-split.c (visit_bb): Likewise.
11969 (split_function): Likewise.
11970 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
11971 * lto-cgraph.c (input_node): Likewise.
11972 * lto-streamer-out.c (write_symbol): Likewise.
11973 * omp-low.c (setjmp_or_longjmp_p): Likewise.
11974 (lower_omp_1): Likewise.
11975 * predict.c (strip_predict_hints): Likewise.
11976 * print-tree.c (print_node): Likewise.
11977 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
11978 * trans-mem.c (is_tm_irrevocable): Likewise.
11979 (is_tm_load): Likewise.
11980 (is_tm_simple_load): Likewise.
11981 (is_tm_store): Likewise.
11982 (is_tm_simple_store): Likewise.
11983 (is_tm_abort): Likewise.
11984 (tm_region_init_1): Likewise.
11985 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
11986 * tree-cfg.c (verify_gimple_call): Likewise.
11987 (move_stmt_r): Likewise.
11988 (stmt_can_terminate_bb_p): Likewise.
11989 * tree-eh.c (lower_eh_constructs_2): Likewise.
11990 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
11991 * tree-inline.c (remap_gimple_stmt): Likewise.
11992 (copy_bb): Likewise.
11993 (estimate_num_insns): Likewise.
11994 (fold_marked_statements): Likewise.
11995 * tree-sra.c (scan_function): Likewise.
11996 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
11997 (optimize_stack_restore): Likewise.
11998 (pass_fold_builtins::execute): Likewise.
11999 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
12000 (mark_all_reaching_defs_necessary_1): Likewise.
12001 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
12002 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
12003 (pass_forwprop::execute): Likewise.
12004 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12005 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
12006 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
12007 * tree-ssa-strlen.c (get_string_length): Likewise.
12008 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
12009 (find_func_aliases_for_call): Likewise.
12010 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
12011 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
12012 * tree-tailcall.c (find_tail_calls): Likewise.
12013 * tree.c (need_assembler_name_p): Likewise.
12014 (free_lang_data_in_decl): Likewise.
12015 (get_call_combined_fn): Likewise.
12016 * ubsan.c (is_ubsan_builtin_p): Likewise.
12017 * varasm.c (incorporeal_function_p): Likewise.
12018 * tree.h (DECL_BUILT_IN): Remove and replace with
12020 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
12021 (fndecl_built_in_p): New.
12023 2018-08-27 Martin Liska <mliska@suse.cz>
12025 PR tree-optimization/86847
12026 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
12027 Dump also subtree probability.
12028 (switch_decision_tree::do_jump_if_equal): New function.
12029 (switch_decision_tree::emit_case_nodes): Handle special
12030 situations in balanced tree that can be emitted much simpler.
12031 Fix calculation of probabilities that happen in tree expansion.
12032 * tree-switch-conversion.h (struct cluster): Add
12034 (struct simple_cluster): Likewise.
12035 (struct case_tree_node): Add new function has_child.
12036 (do_jump_if_equal): New.
12038 2018-08-27 Martin Liska <mliska@suse.cz>
12040 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
12041 Add new argument to bit_test_cluster constructor.
12042 (bit_test_cluster::emit): Set bits really number of values
12044 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
12045 probability argument.
12046 * tree-switch-conversion.h (struct bit_test_cluster):
12047 Add m_handles_entire_switch.
12049 2018-08-27 Martin Liska <mliska@suse.cz>
12051 PR tree-optimization/86702
12052 * tree-switch-conversion.c (jump_table_cluster::emit):
12053 Make probabilities even for values in jump table
12054 according to number of cases handled.
12055 (switch_decision_tree::compute_cases_per_edge): Pass
12056 argument to reset_out_edges_aux function.
12057 (switch_decision_tree::analyze_switch_statement): Likewise.
12058 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
12061 2018-08-27 Martin Liska <mliska@suse.cz>
12063 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
12064 cfun argument explicitly.
12065 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
12066 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
12067 function gimple_switch_default_bb.
12068 (convert_switch_statements):
12070 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
12071 * stmt.c (label_to_block_fn): Use label_to_block and pass
12072 cfun argument explicitly and use gimple_switch_label_bb.
12073 (expand_case): Likewise.
12074 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
12075 cfun argument explicitly. Likewise.
12076 (make_edges_bb): Likewise.
12077 (make_cond_expr_edges): Likewise.
12078 (get_cases_for_edge): Likewise.
12079 (make_gimple_switch_edges): Likewise.
12080 (label_to_block_fn): Likewise.
12081 (label_to_block): Likewise.
12082 (make_goto_expr_edges): Likewise.
12083 (make_gimple_asm_edges): Likewise.
12084 (main_block_label): Likewise.
12085 (group_case_labels_stmt): Likewise.
12086 (find_taken_edge_computed_goto): Likewise.
12087 (find_taken_edge_switch_expr): Likewise.
12088 (gimple_verify_flow_info): Likewise.
12089 (gimple_redirect_edge_and_branch): Likewise.
12090 (gimple_switch_label_bb): New function.
12091 (gimple_switch_default_bb): Likewise.
12092 (gimple_switch_edge): Likewise.
12093 (gimple_switch_default_edge): Likewise.
12094 * tree-cfg.h (label_to_block_fn): Remove and replace ...
12095 (label_to_block): ... with this.
12096 (gimple_switch_label_bb): New.
12097 (gimple_switch_default_bb): Likewise.
12098 (gimple_switch_edge): Likewise.
12099 (gimple_switch_default_edge): Likewise.
12100 * tree-cfgcleanup.c (convert_single_case_switch): Use
12101 new gimple functions and pass new argument to label_to_block.
12102 (cleanup_control_flow_bb):
12103 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
12104 cfun argument explicitly.
12105 (make_eh_edges): Likewise.
12106 (redirect_eh_dispatch_edge): Likewise.
12107 (lower_resx): Likewise.
12108 (lower_eh_dispatch): Likewise.
12109 (maybe_remove_unreachable_handlers): Likewise.
12110 (unsplit_eh): Likewise.
12111 (cleanup_empty_eh): Likewise.
12112 (verify_eh_edges): Likewise.
12113 (verify_eh_dispatch_edge): Likewise.
12114 * tree-ssa-dom.c (record_edge_info): Likewise.
12115 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
12116 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
12117 (thread_through_normal_block): Likewise.
12118 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
12119 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
12120 * tree-switch-conversion.c (switch_conversion::collect): Use new
12122 (switch_conversion::check_final_bb): Likewise.
12123 (switch_conversion::gather_default_values): Pass new argument
12125 (switch_conversion::build_constructors): Likewise.
12126 (switch_decision_tree::compute_cases_per_edge): Use new
12127 gimple_switch_edge function.
12128 (switch_decision_tree::analyze_switch_statement): Pass new argument
12130 (switch_decision_tree::try_switch_expansion): Use
12131 gimple_switch_default_edge.
12132 * tree-vrp.c (find_switch_asserts): Pass new argument
12134 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
12135 (vr_values::simplify_switch_using_ranges): Likewise.
12137 2018-08-27 Richard Biener <rguenther@suse.de>
12139 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
12140 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
12142 * tree-ssa-sccvn.h (struct vn_pval): New structure.
12143 (struct vn_nary_op_s): Add unwind_to member. Add
12144 predicated_values flag and put result into a union together
12145 with a linked list of vn_pval.
12146 (struct vn_ssa_aux): Add name member to make maintaining
12147 a map of SSA name to vn_ssa_aux possible. Remove no longer
12148 needed info, dfsnum, low, visited, on_sccstack, use_processed
12149 and range_info_anti_range_p members.
12150 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
12151 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
12153 (vn_valueize): New global.
12154 (vn_context_bb): Likewise.
12155 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
12156 VN_INFO_PTR_INFO): Remove.
12157 * tree-ssa-sccvn.c: ... (rewrite)
12158 (pass_fre::execute): For -O2+ initialize loops and run
12159 RPO VN in optimistic mode (iterating). For -O1 and -Og
12160 run RPO VN in non-optimistic mode.
12161 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
12162 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
12163 * doc/invoke.texi (sccvn-max-scc-size): Remove.
12164 (rpo-vn-max-loop-depth): Document.
12165 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
12166 when valuezing the VUSE signals we walked out of the region.
12167 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
12168 (phi_translate): Set VN context block to use for availability
12170 (compute_avail): Likewise.
12171 (pre_valueize): New function.
12172 (pass_pre::execute): Adjust to the RPO VN API.
12174 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
12175 (propagate_constants_for_unrolling): Remove.
12176 (tree_unroll_loops_completely): Perform value-numbering
12177 on the unrolled bodies loop parent.
12179 2018-08-27 Richard Biener <rguenther@suse.de>
12181 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
12182 for partial antic compute.
12184 2018-08-27 Jakub Jelinek <jakub@redhat.com>
12186 PR rtl-optimization/87065
12187 * combine.c (simplify_if_then_else): Formatting fix.
12188 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
12190 (known_cond): Don't return const_true_rtx for vector modes. Use
12191 CONST0_RTX instead of const0_rtx. Formatting fixes.
12193 2018-08-27 Martin Liska <mliska@suse.cz>
12195 PR gcov-profile/87069
12196 * gcov.c (process_file): Record files already processed
12197 and warn about a file being processed multiple times.
12199 2018-08-27 Martin Liska <mliska@suse.cz>
12202 * config/aarch64/aarch64.c (aarch64_override_options_internal):
12203 Set default values for x_aarch64_*_string strings.
12204 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
12205 prefix. For -mabi do not print '=ABI' in help and use
12206 <option_value> format for -msve-vector-bits and -moverride
12209 2018-08-26 Jeff Law <law@redhat.com>
12211 * config/mips/frame-header-opt.c: Include "backend.h" rather than
12214 2018-08-26 Marek Polacek <polacek@redhat.com>
12216 PR c++/87029, Implement -Wredundant-move.
12217 * doc/invoke.texi: Document -Wredundant-move.
12219 2018-08-25 Martin Sebor <msebor@redhat.com>
12221 PR tree-optimization/87059
12222 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
12223 to the same type as the other.
12224 * fold-const.c (fold_binary_loc): Assert expectation.
12226 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
12228 * config/darwin.c (machopic_legitimize_pic_address): Clean up
12229 extraneous parentheses, dead code section and formatting.
12231 2018-08-24 David Malcolm <dmalcolm@redhat.com>
12234 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
12235 wide enough for jumps in the line-numbering to be visible.
12236 (layout::print_gap_in_line_numbering): New member function.
12237 (layout::calculate_line_spans): When using line numbering, merge
12238 line spans that are only 1 line apart.
12239 (diagnostic_show_locus): When printing line numbers, show gaps in
12240 line numbering directly, rather than printing headers.
12241 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
12242 line-numbering with multiple line spans.
12243 (selftest::test_fixit_insert_containing_newline_2): Add test of
12244 line-numbering, in which the spans are close enough to be merged.
12246 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
12248 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
12249 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
12250 * tree-vrp.c (range_is_nonnull): Remove.
12251 (range_includes_zero_p): Accept value_range instead of min/max.
12252 (extract_range_from_binary_expr_1): Do not early bail on
12254 Use range_includes_zero_p instead of range_is_nonnull.
12255 (extract_range_from_unary_expr): Use range_includes_zero_p instead
12256 of range_is_nonnull.
12257 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
12258 special case VR_ANTI_RANGE.
12259 (vrp_finalize): Same.
12260 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
12261 instead of min/max.
12262 (range_is_nonnull): Remove.
12263 * vr-values.c (vrp_stmt_computes_nonzero): Use
12264 range_includes_zero_p instead of range_is_nonnull.
12265 (extract_range_basic): Pass value_range to range_includes_zero_p
12266 instead of range_is_nonnull.
12268 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
12270 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
12271 * emit-rtl.h (rtl_data): Remove return_bnd.
12272 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
12273 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
12274 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
12275 (POINTER_BOUNDS_MODE): Remove definition.
12276 (make_pointer_bounds_mode): Remove.
12277 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
12278 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
12279 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
12280 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
12281 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
12282 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
12283 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
12285 * config/i386/i386-modes.def (BND32, BND64): Remove.
12286 * config/i386/i386.c (dbx_register_map): Remove bound registers.
12287 (dbx64_register_map): Ditto.
12288 (svr4_dbx_register_map): Ditto.
12289 (indirect_thunk_bnd_needed): Remove.
12290 (indirect_thunks_bnd_used): Ditto.
12291 (indirect_return_bnd_needed): Ditto.
12292 (indirect_return_via_cx_bnd): Ditto.
12293 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
12294 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
12295 (output_indirect_thunk): Ditto. Remove need_prefix argument.
12296 (output_indirect_thunk_function): Remove handling of
12297 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
12298 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
12299 (ix86_save_reg): Remove handling of crtl->return_bnd.
12300 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
12301 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
12302 and UNSPEC_BNDLX_ADDR.
12303 (ix86_output_indirect_branch_via_reg): Remove handling of
12304 indirect_thunk_prefix_bnd.
12305 (ix86_output_indirect_branch_via_push): Ditto.
12306 (ix86_output_function_return): Ditto.
12307 (ix86_output_indirect_function_return): Ditto.
12308 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
12309 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
12310 (CALL_USED_REGISTERS): Ditto.
12311 (REG_ALLOC_ORDER): Update for removal of bound registers.
12312 (HI_REGISTER_NAMES): Ditto.
12313 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
12314 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
12315 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
12316 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
12317 (FIRST_PSEUDO_REG): Update.
12318 (BND): Remove mode iterator.
12319 * config/i386/predicates.md (bnd_mem_operator): Remove.
12321 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
12323 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
12326 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
12328 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
12329 the case in which the permute needs only a single element and
12330 repeats for every vector of the result. Extend that case to
12331 handle variable-length vectors.
12332 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
12334 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
12337 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
12338 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
12340 2018-08-24 Richard Biener <rguenther@suse.de>
12342 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
12343 bb_flags_allocated members.
12344 (auto_flag): New RAII class for allocating flags.
12345 (auto_edge_flag): New RAII class for allocating edge flags.
12346 (auto_bb_flag): New RAII class for allocating bb flags.
12347 * cfgloop.c (verify_loop_structure): Allocate temporary edge
12349 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
12350 in favor of temporarily allocated BB flag.
12351 * hsa-brig.c: Re-order includes.
12352 * hsa-dump.c: Likewise.
12353 * hsa-regalloc.c: Likewise.
12354 * print-rtl.c: Likewise.
12355 * profile-count.c: Likewise.
12357 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
12360 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
12363 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
12366 * wide-int-range.cc (wide_int_range_div): Do not ignore result
12367 from wide_int_range_multiplicative_op.
12369 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12371 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
12374 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
12376 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
12379 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
12381 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
12382 full GENERIC expression used for replacement.
12384 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
12386 * tree-vrp.c (abs_extent_range): Remove.
12387 (extract_range_into_wide_ints): Pass wide ints by reference.
12388 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
12389 Pass wide ints by reference in all calls to
12390 extract_range_into_wide_ints.
12391 * wide-int-range.cc (wide_int_range_div): New.
12392 * wide-int-range.h (wide_int_range_div): New.
12393 (wide_int_range_includes_zero_p): New.
12394 (wide_int_range_zero_p): New.
12396 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
12398 * config/aarch64/aarch64.md (arches): New enum.
12399 (arch): New enum attr.
12400 (arch_enabled): New attr.
12401 (enabled): Now uses arch_enabled only.
12402 (simd, sve, fp16): Removed attribute.
12403 (fp): Attr now defined in terms of 'arch'.
12404 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
12405 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
12406 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
12407 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
12408 attributes into 'arch'.
12409 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
12410 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
12411 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
12412 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
12413 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
12414 'simd' attribute into 'arch'.
12415 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
12416 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
12417 Convert use of 'fp' attribute to 'arch'.
12418 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
12419 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
12421 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
12422 (different modes) Merge 'fp' and 'simd' into 'arch'.
12423 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
12424 'simd' into 'arch'.
12426 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
12428 PR rtl-optimization/87026
12429 * expmed.c (canonicalize_comparison): If we can no longer create
12430 pseudoregisters, don't.
12432 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
12435 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
12437 * config/arm/arm.c (speculation_barrier_libfunc): New static
12439 (arm_init_libfuncs): Initialize it.
12440 (arm_emit_speculation_barrier): New function.
12441 * config/arm/arm.md (speculation_barrier): Call
12442 arm_emit_speculation_barrier for architectures that do not have
12444 (speculation_barrier_insn): Only match on Armv7 or later.
12446 2018-08-23 Richard Biener <rguenther@suse.de>
12448 PR middle-end/87024
12449 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
12452 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
12454 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
12455 of single-vector TBLs.
12456 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
12457 one input is given.
12459 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
12462 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
12463 aarch64_evpc_tbl guard.
12465 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
12467 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
12470 2018-08-22 Martin Sebor <msebor@redhat.com>
12472 PR middle-end/87052
12473 * tree-pretty-print.c (pretty_print_string): Add argument.
12474 (dump_generic_node): Call to pretty_print_string with string size.
12476 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
12478 PR rtl-optimization/86771
12479 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
12480 of two SETs into those two SETs, one to be placed at i2, if that SETs
12481 destination is modified between i2 and i3.
12483 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
12485 PR tree-optimization/86725
12486 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
12488 (vect_analyze_scalar_cycles_1): Check it.
12490 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
12492 PR tree-optimization/86725
12493 * tree-vect-loop.c (vect_is_simple_reduction): When treating
12494 an outer loop phi as a double reduction, make sure that the
12495 single user of the phi result is an inner loop phi.
12497 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
12499 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
12500 grouped stores with gaps to a strided group.
12502 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
12504 * tree-vect-stmts.c (get_group_load_store_type)
12505 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
12506 first statement in a group.
12508 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12510 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
12511 the sequence used in gcc/gcc.c.
12513 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12516 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
12519 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12521 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
12522 Darwin10-specific unwinder-shim.
12523 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
12524 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
12525 New to cater for Darwin10 Rosetta.
12527 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12529 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
12530 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
12532 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12537 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
12538 (dwarf2out_switch_text_section): Generate a local label for the
12539 second function sub-section and apply it as the second FDE start
12541 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
12542 second sub-section start.
12544 2018-08-22 Richard Biener <rguenther@suse.de>
12546 PR tree-optimization/86988
12547 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
12549 2018-08-22 Richard Biener <rguenther@suse.de>
12551 PR tree-optimization/86945
12552 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
12554 2018-08-22 Alexandre Oliva <oliva@adacore.com>
12556 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
12557 a comment about how uses of r2 for .sdata2 come about.
12559 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
12561 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
12563 2018-08-21 Marek Polacek <polacek@redhat.com>
12565 PR c++/86981, Implement -Wpessimizing-move.
12566 * doc/invoke.texi: Document -Wpessimizing-move.
12568 2018-08-21 Jan Hubicka <jh@suse.cz>
12570 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
12571 * tree.h (is_redundant_typedef): Remove.
12572 * dwarf2out.c (is_redundant_typedef): Turn into static function.
12574 2018-08-21 Jan Hubicka <jh@suse.cz>
12576 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
12579 2018-08-21 Tamar Christina <tamar.christina@arm.com>
12581 * expmed.c (extract_low_bits): Reject invalid subregs early.
12583 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
12585 PR middle-end/86121
12586 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
12589 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12591 * config/vxworks.h: Guard vxworks_asm_out_constructor and
12592 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
12593 * config/vxworks.c: Likewise.
12595 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12597 * config/vxworks.c: Set targetm.have_ctors_dtors
12598 if HAVE_INITFINI_ARRAY_SUPPORT.
12599 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
12600 if HAVE_INITFINI_ARRAY_SUPPORT.
12602 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12604 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
12605 default search path for VxWorks < 7.
12607 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
12609 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
12610 (get_format_string): Refer to c_getstr.
12612 2018-08-21 Tom de Vries <tdevries@suse.de>
12614 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
12615 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
12616 (debuginfo_early_stop): Declare.
12617 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
12618 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
12619 (debuginfo_early_stop): New function.
12620 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
12621 and debuginfo_early_stop.
12622 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
12623 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
12624 (general_init): Call debuginfo_early_init.
12625 (finalize): Call debuginfo_fini.
12626 (do_compile): Call debuginfo_init.
12627 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
12628 -fdump-early-debug.
12629 (@item -fdump-debug, @item -fdump-earlydebug): Add.
12631 2018-08-21 Tom de Vries <tdevries@suse.de>
12633 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
12634 flag_dump_noaddr and flag_dump_unnumbered.
12636 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
12638 * wide-int-range.cc (wide_int_range_abs): New.
12639 (wide_int_range_order_set): Rename from wide_int_range_min_max.
12640 * wide-int-range.h (wide_int_range_abs): New.
12641 (wide_int_range_min_max): New.
12642 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
12643 case to call wide_int_range_abs.
12644 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
12645 (extract_range_from_abs_expr): Delete.
12647 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
12650 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
12651 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
12654 2018-08-20 Nathan Sidwell <nathan@acm.org>
12655 Jeff Law <law@redhat.com>
12657 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
12658 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
12660 2018-08-20 David Malcolm <dmalcolm@redhat.com>
12663 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
12664 (decl_attributes): Likewise.
12665 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
12667 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
12668 * diagnostic-core.h (class auto_diagnostic_group): New class.
12669 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
12670 (diagnostic_report_diagnostic): Handle the first diagnostics within
12672 (emit_diagnostic): Add auto_diagnostic_group instance.
12673 (inform): Likewise.
12674 (inform_n): Likewise.
12675 (warning): Likewise.
12676 (warning_at): Likewise.
12677 (warning_n): Likewise.
12678 (pedwarn): Likewise.
12679 (permerror): Likewise.
12681 (error_n): Likewise.
12682 (error_at): Likewise.
12684 (fatal_error): Likewise.
12685 (internal_error): Likewise.
12686 (internal_error_no_backtrace): Likewise.
12687 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
12688 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
12689 * diagnostic.h (struct diagnostic_context): Add fields
12690 "diagnostic_group_nesting_depth",
12691 "diagnostic_group_emission_count", "begin_group_cb",
12693 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
12694 Add auto_diagnostic_group instance(s).
12695 (find_explicit_erroneous_behavior): Likewise.
12696 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
12697 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
12698 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
12699 (gimplify_va_arg_expr): Likewise.
12700 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
12701 (HSA_SORRY_AT): Likewise.
12702 * ipa-devirt.c (compare_virtual_tables): Likewise.
12703 (warn_odr): Likewise.
12704 * multiple_target.c (expand_target_clones): Likewise.
12705 * opts-common.c (cmdline_handle_error): Likewise.
12706 * reginfo.c (globalize_reg): Likewise.
12707 * substring-locations.c (format_warning_n_va): Likewise.
12708 * tree-inline.c (expand_call_inline): Likewise.
12709 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
12710 * tree-ssa-loop-niter.c
12711 (do_warn_aggressive_loop_optimizations): Likewise.
12712 * tree-ssa-uninit.c (warn_uninit): Likewise.
12713 * tree.c (warn_deprecated_use): Likewise.
12715 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
12718 * config/i386/i386.md (eh_return): Always update EH return
12719 address in word_mode.
12721 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
12723 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
12724 TARGET_SPLIT_COMPLEX_ARG is defined.
12726 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
12728 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
12730 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
12733 * expr.c (expand_assignment): Assert that bitpos is positive.
12734 (store_field): Likewise
12735 (expand_expr_real_1): Make sure that bitpos is positive.
12736 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
12739 2018-08-20 Nathan Sidwell <nathan@acm.org>
12741 * Makefile.in (CPP_ID_DATA_H): Delete.
12742 (CPP_INTERNAL_H): Don't add it.
12743 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
12744 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
12746 2018-08-20 Richard Biener <rguenther@suse.de>
12748 PR tree-optimization/78655
12749 * tree-vrp.c (extract_range_from_binary_expr_1): Make
12750 pointer + offset nonnull if either operand is nonnull work.
12752 2018-08-20 Tom de Vries <tdevries@suse.de>
12754 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
12755 unless the referenced die describes the added property using
12756 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
12757 Otherwise, add a DW_AT_location to the referenced die.
12759 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
12762 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
12763 register_operand when calling ix86_set_reg_reg_cost.
12764 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
12765 Set *total to 0 for operands that satisfy x86_64_immediate_operand
12766 predicate and to 1 otherwise.
12768 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
12770 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
12771 emit a diagnostic that it is not supported and reset the option.
12772 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
12773 supported and consume the option. (ASM_FINAL_SPEC): New.
12775 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
12777 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
12780 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
12782 C-SKY port: Documentation
12784 * doc/extend.texi (C-SKY Function Attributes): New section.
12785 * doc/invoke.texi (Option Summary): Add C-SKY options.
12786 (C-SKY Options): New section.
12787 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
12789 2018-08-17 Jojo <jijie_rong@c-sky.com>
12790 Huibin Wang <huibin_wang@c-sky.com>
12791 Sandra Loosemore <sandra@codesourcery.com>
12792 Chung-Lin Tang <cltang@codesourcery.com>
12794 C-SKY port: Backend implementation
12796 * config/csky/*: New.
12797 * common/config/csky/*: New.
12799 2018-08-17 Jojo <jijie_rong@c-sky.com>
12800 Huibin Wang <huibin_wang@c-sky.com>
12801 Sandra Loosemore <sandra@codesourcery.com>
12802 Chung-Lin Tang <cltang@codesourcery.com>
12803 Andrew Jenner <andrew@codesourcery.com>
12805 C-SKY port: Configury
12807 * config.gcc (csky-*-*): New.
12808 * configure.ac: Add csky to targets for dwarf2 debug_line support.
12809 * configure: Regenerated.
12811 2018-08-17 David Malcolm <dmalcolm@redhat.com>
12813 * dump-context.h: Include "dumpfile.h".
12814 (dump_context::dump_printf_va): Convert final param from va_list
12815 to va_list *. Convert from ATTRIBUTE_PRINTF to
12816 ATTRIBUTE_GCC_DUMP_PRINTF.
12817 (dump_context::dump_printf_loc_va): Likewise.
12818 * dumpfile.c: Include "stringpool.h".
12819 (make_item_for_dump_printf_va): Delete.
12820 (make_item_for_dump_printf): Delete.
12821 (class dump_pretty_printer): New class.
12822 (dump_pretty_printer::dump_pretty_printer): New ctor.
12823 (dump_pretty_printer::emit_items): New member function.
12824 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
12826 (dump_pretty_printer::emit_item): New member function.
12827 (dump_pretty_printer::stash_item): New member function.
12828 (dump_pretty_printer::format_decoder_cb): New member function.
12829 (dump_pretty_printer::decode_format): New member function.
12830 (dump_context::dump_printf_va): Reimplement in terms of
12831 dump_pretty_printer.
12832 (dump_context::dump_printf_loc_va): Convert final param from va_list
12834 (dump_context::begin_scope): Reimplement call to
12835 make_item_for_dump_printf.
12836 (dump_printf): Update for change to dump_printf_va.
12837 (dump_printf_loc): Likewise.
12838 (selftest::test_capture_of_dump_calls): Convert "stmt" from
12839 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
12840 with %T, %E, and %G.
12841 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
12842 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
12843 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
12844 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
12845 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
12846 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
12847 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
12848 within a dump_printf_loc call to "%wu".
12849 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
12850 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
12851 missing space after "=".
12852 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
12853 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
12854 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
12855 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
12856 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
12857 duplicate "vectorized" from message.
12859 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
12861 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
12862 polyNxK_t element's TYPE_STRING_FLAG.
12864 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
12866 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
12867 (they were unnamed before). Fix comments.
12869 2018-08-17 Nathan Sidwell <nathan@acm.org>
12871 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
12873 2018-08-17 Richard Biener <rguenther@suse.de>
12875 PR tree-optimization/86841
12876 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
12878 2018-08-17 Martin Liska <mliska@suse.cz>
12880 * common.opt: Remove Warn, Init and Report for options with
12881 Ignore/Deprecated flag. Warning is done automatically for
12883 * config/i386/i386.opt: Likewise.
12884 * config/ia64/ia64.opt: Likewise.
12885 * config/rs6000/rs6000.opt: Likewise.
12886 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
12887 Remove usage of flag_check_pointer_bounds.
12888 * lto-wrapper.c (merge_and_complain): Do not handle
12889 OPT_fcheck_pointer_bounds.
12890 (append_compiler_options): Likewise.
12891 * opt-functions.awk: Do not handle Deprecated.
12892 * optc-gen.awk: Check that Var, Report and Init are not
12893 used for an option with Ignore/Deprecated flag.
12894 * opts-common.c (decode_cmdline_option): Do not report
12896 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
12898 * opts.h (struct cl_option): Remove cl_deprecated flag.
12899 (CL_ERR_DEPRECATED): Remove error enum value.
12901 2018-08-17 Richard Biener <rguenther@suse.de>
12903 PR middle-end/86505
12904 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
12905 across a va-arg-pack using call adjust its return value accordingly.
12907 2018-08-16 Martin Sebor <msebor@redhat.com>
12909 PR tree-optimization/86853
12910 * gimple-ssa-sprintf.c (struct format_result): Rename member.
12911 (struct fmtresult): Add member and initialize it in ctors.
12912 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
12913 (format_string): Handle %S the same as %ls. Set MAYFAIL.
12914 (format_directive): Set POSUNDER4K when MAYFAIL is set.
12915 (parse_directive): Handle %C same as %c.
12916 (sprintf_dom_walker::compute_format_length): Adjust.
12917 (is_call_safe): Adjust.
12919 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
12921 * builtins.c (c_strlen): Add new parameter eltsize. Use it
12922 for determining how to count the elements.
12923 * builtins.h (c_strlen): Adjust prototype.
12924 * expr.c (string_constant): Add new parameter mem_size.
12925 Set *mem_size appropriately.
12926 * expr.h (string_constant): Adjust protoype.
12927 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
12928 * gimple-fold.h (get_range_strlen): Adjust prototype.
12929 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
12930 (format_string): Call get_string_length with eltsize.
12932 2018-08-16 David Malcolm <dmalcolm@redhat.com>
12934 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
12935 to emit the span, rather than setting it as the prefix.
12937 2018-08-16 David Malcolm <dmalcolm@redhat.com>
12939 * diagnostic-show-locus.c (layout::start_annotation_line): Add
12940 "margin_char" parameter, defaulting to space. Use it in place
12941 of pp_space for the initial part of the margin.
12942 (layout::print_leading_fixits): Use '+' when filling the margin
12943 of line-insertion fix-it hints.
12945 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
12947 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
12950 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
12952 * config/rs6000/altivec.md: Don't set length attribute to the default
12954 * config/rs6000/darwin.md: Ditto.
12955 * config/rs6000/dfp.md: Ditto.
12956 * config/rs6000/htm.md: Ditto.
12957 * config/rs6000/rs6000.md: Ditto.
12958 * config/rs6000/sync.md: Ditto.
12959 * config/rs6000/vsx.md: Ditto.
12961 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
12963 * config/rs6000/altivec.md: Don't set length attribute to the default
12964 value, for branch instructions.
12965 * config/rs6000/darwin.md: Ditto.
12966 * config/rs6000/rs6000.md: Ditto.
12968 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
12970 * config/rs6000/rs6000.md (length): Always define as const_int 4.
12971 (unnamed conditional branch define_insn): Set length to 4 or 8
12972 depending on offset.
12973 (<bd>_<mode>): Similar, for alternative 0.
12974 (<bd>tf_<mode>): Ditto.
12976 2018-08-16 Tamar Christina <tamar.christina@arm.com>
12978 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
12980 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
12982 * doc/rtl.texi: Replace old RTX class names with new names.
12985 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
12987 * expmed.h (canonicalize_comparison): New declaration.
12988 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
12989 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
12990 * optabs.c (prepare_cmp_insn): Likewise.
12991 * rtl.h (unsigned_condition_p): New function which checks if a
12992 comparison operator is unsigned.
12994 2018-08-16 Nathan Sidwell <nathan@acm.org>
12996 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
12997 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
12999 2018-08-16 Tamar Christina <tamar.christina@arm.com>
13002 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
13003 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
13004 (mov<mov>): ..this and enable unconditionally.
13006 2018-08-16 Tamar Christina <tamar.christina@arm.com>
13008 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
13010 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
13012 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
13013 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
13014 "Common" with "Target".
13016 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
13018 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
13019 * doc/invoke.texi (mmitigate-rop): Remove.
13020 * config/i386/i386.c: Do not include "regrename.h".
13021 (ix86_rop_should_change_byte_p, reg_encoded_number)
13022 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
13024 (ix86_reorg): Remove call to ix86_mitigate_rop.
13025 * config/i386/i386.md (attr "modrm_class"): Remove.
13026 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
13027 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
13028 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
13030 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
13032 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
13033 allow folding of mergeh() and mergel() for the float and double types.
13034 (fold_mergehl_helper): Rework to handle building a permute tree
13037 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
13039 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
13042 2018-08-15 David Malcolm <dmalcolm@redhat.com>
13044 * common.opt (fdiagnostics-show-labels): New option.
13045 * diagnostic-show-locus.c (class layout_range): Add field
13047 (class layout): Add field "m_show_labels_p".
13048 (layout_range::layout_range): Add param "label" and use it to
13049 initialize m_label.
13050 (make_range): Pass in NULL for new "label" param of layout_range's
13052 (layout::layout): Initialize m_show_labels_p.
13053 (layout::maybe_add_location_range): Pass in loc_range->m_label
13054 when constructing layout_range instances.
13055 (struct line_label): New struct.
13056 (layout::print_any_labels): New member function.
13057 (layout::print_line): Call it if label-printing is enabled.
13058 (selftest::test_one_liner_labels): New test.
13059 (selftest::test_diagnostic_show_locus_one_liner): Call it.
13060 * diagnostic.c (diagnostic_initialize): Initialize
13061 context->show_labels_p.
13062 * diagnostic.h (struct diagnostic_context): Add field
13064 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
13065 -fno-diagnostics-show-labels.
13066 * dwarf2out.c (gen_producer_string): Add
13067 OPT_fdiagnostics_show_labels to the ignored options.
13068 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
13070 (gcc_rich_location::maybe_add_expr): Likewise.
13071 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
13072 label" param, defaulting to NULL.
13073 (gcc_rich_location::add_expr): Add "label" param.
13074 (gcc_rich_location::maybe_add_expr): Likewise.
13075 (class text_range_label): New class.
13076 (class range_label_for_type_mismatch): New class.
13077 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
13078 of format_warning_va.
13079 (fmtwarn_n): Likewise for new params of format_warning_n_va.
13080 * lto-wrapper.c (merge_and_complain): Add
13081 OPT_fdiagnostics_show_labels to the "pick one setting" options.
13082 (append_compiler_options): Likewise to the dropped options.
13083 (append_diag_options): Likewise to the passed-on options.
13084 * opts.c (common_handle_option): Handle the new option.
13085 * selftest-diagnostic.c
13086 (test_diagnostic_context::test_diagnostic_context): Enable
13088 * substring-locations.c: Include "gcc-rich-location.h".
13089 (format_warning_n_va): Add "fmt_label" and "param_label" params
13090 and use them as appropriate.
13091 (format_warning_va): Add "fmt_label" and "param_label" params,
13092 passing them on to format_warning_n_va.
13093 (format_warning_at_substring): Likewise.
13094 (format_warning_at_substring_n): Likewise.
13095 * substring-locations.h (format_warning_va): Add "fmt_label" and
13096 "param_label" params.
13097 (format_warning_n_va): Likewise.
13098 (format_warning_at_substring): Likewise.
13099 (format_warning_at_substring_n): Likewise.
13100 * toplev.c (general_init): Initialize global_dc->show_labels_p.
13102 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
13105 * builtins.c (expand_builtin_memcmp): Do not expand the call
13106 when overflow is detected.
13108 2018-08-15 Martin Sebor <msebor@redhat.com>
13110 PR tree-optimization/71625
13111 * config/aarch64/aarch64-builtins.c
13112 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
13114 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
13116 * config/s390/s390.c (s390_reorg): Remove loop.
13118 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
13121 (darwin_function_switched_text_sections): Delete.
13122 * gcc/config/darwin.h
13123 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
13125 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
13128 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
13129 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
13130 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
13132 2018-08-15 Martin Liska <mliska@suse.cz>
13134 PR tree-optimization/86925
13135 * predict.c (expr_expected_value_1): When taking
13136 later predictor, assign also probability.
13137 Use fold_build2_initializer_loc in order to fold
13138 the expression in -frounding-math.
13140 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
13142 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
13144 (expand_vec_perm_1): Try the new method.
13146 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
13149 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
13150 Check whether lra_live_max_point is 0 before dividing.
13152 2018-08-14 Martin Sebor <msebor@redhat.com>
13154 PR tree-optimization/86650
13155 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
13156 (vrp_prop::check_mem_ref): Same.
13158 2018-08-13 Liu Hao <lh_mouse@126.com>
13160 * pretty-print.c (eat_esc_sequence): Swap the foreground and
13161 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
13162 and clear it thereafter, as it only works for DBCS.
13164 2018-08-13 Liu Hao <lh_mouse@126.com>
13166 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
13167 handle returned by _get_osf_handle().
13169 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
13171 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
13172 for folding vec_perm.
13174 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
13176 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
13177 Add support for gimple-folding of vec_pack() and vec_unpack()
13180 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
13182 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
13183 vec_xst variants to the list.
13184 (rs6000_gimple_fold_builtin): Add support for folding unaligned
13185 vector loads and stores.
13187 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
13189 * config.gcc (rs6000-ibm-aix4.x): Delete.
13190 (rs6000-ibm-aix5.1): Delete.
13191 (rs6000-ibm-aix5.2): Delete.
13192 (rs6000-ibm-aix5.3): Delete.
13193 * config/rs6000/aix43.h: Delete.
13194 * config/rs6000/aix51.h: Delete.
13195 * config/rs6000/aix52.h: Delete.
13196 * config/rs6000/t-aix43: Delete.
13198 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
13200 * config/s390/s390.c (s390_decompose_constant_pool_ref):
13202 (s390_decompose_address): Factor out constant pool ref
13205 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
13207 * config/nds32/nds32-predicates.c
13208 (nds32_can_use_bclr_p): Change return type as bool.
13209 (nds32_can_use_bset_p): Ditto.
13210 (nds32_can_use_btgl_p): Ditto.
13211 (nds32_can_use_bitci_p): Ditto.
13212 * config/nds32/nds32-protos.h
13213 (nds32_can_use_bclr_p): Change declaration.
13214 (nds32_can_use_bset_p): Ditto.
13215 (nds32_can_use_btgl_p): Ditto.
13216 (nds32_can_use_bitci_p): Ditto.
13218 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
13220 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
13221 Support -msched-prolog-epilog option.
13222 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
13224 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
13226 * common/config/nds32/nds32-common.c
13227 (nds32_option_optimization_table): Enalbe -malways-align.
13229 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
13231 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
13233 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
13234 OPT_misr_secure_ case.
13235 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
13236 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
13237 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
13239 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
13240 (nds32_isr_info): New field security_level.
13241 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
13242 * config/nds32/nds32.md (return_internal): Consider critical attribute.
13243 * config/nds32/nds32.opt (misr-secure): New option.
13244 * config/nds32/nds32_init.inc: New file.
13245 * config/nds32/nds32_isr.h: New file.
13247 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
13249 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
13250 Update comment for atomic instructions.
13251 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
13252 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
13254 (atomic_loaddi): Revise fence expansion to only emit fence prior to
13255 load for __ATOMIC_SEQ_CST model.
13256 (atomic_loaddi_1): Remove float register target.
13257 (atomic_storedi): Handle CONST_INT values.
13258 (atomic_storedi_1): Remove float register source. Add special case
13260 (memory_barrier): New expander and insn.
13262 2018-08-11 Jakub Jelinek <jakub@redhat.com>
13264 PR tree-optimization/86835
13265 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
13266 new_stmt after def_gsi, make sure to insert new_square_stmt after
13267 that stmt, not 2 stmts before it.
13269 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
13272 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
13275 2018-08-10 Martin Liska <mliska@suse.cz>
13278 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
13280 * builtins.c (expand_builtin_expect_with_probability):
13282 (expand_builtin_expect_with_probability): New function.
13283 (build_builtin_expect_predicate): Add new argumnet probability
13284 for BUILT_IN_EXPECT_WITH_PROBABILITY.
13285 (fold_builtin_expect):
13288 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
13289 * builtins.h (fold_builtin_expect): Set new argument.
13290 * doc/extend.texi: Document __builtin_expect_with_probability.
13291 * doc/invoke.texi: Likewise.
13292 * gimple-fold.c (gimple_fold_call): Pass new argument.
13293 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
13294 also BUILT_IN_EXPECT_WITH_PROBABILITY.
13295 * predict.c (get_predictor_value): New function.
13296 (expr_expected_value): Add new argument probability. Assume
13297 that predictor and probability are always non-null.
13298 (expr_expected_value_1): Likewise. For __builtin_expect and
13299 __builtin_expect_with_probability set probability. Handle
13300 combination in binary expressions.
13301 (tree_predict_by_opcode): Simplify code by simply calling
13302 get_predictor_value.
13303 (pass_strip_predict_hints::execute): Add handling of
13304 BUILT_IN_EXPECT_WITH_PROBABILITY.
13305 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
13307 * tree.h (DECL_BUILT_IN_P): New function.
13309 2018-08-10 Martin Liska <mliska@suse.cz>
13311 PR tree-optimization/85799
13312 * passes.def: Add argument for pass_strip_predict_hints.
13313 * predict.c (class pass_strip_predict_hints): Add new argument
13315 (strip_predictor_early): New function.
13316 (pass_strip_predict_hints::execute): Call the function to
13318 (strip_predict_hints): New function.
13319 * predict.def: Fix comment.
13321 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
13323 * Makefile.in: Clarify which tm.texi to copy over to assert the
13324 right to grant a GFDL license for all.
13326 2018-08-09 Jeff Law <law@redhat.com>
13328 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
13331 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
13333 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
13336 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
13338 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
13339 reductions for variable-length vectors.
13341 2018-08-09 David Malcolm <dmalcolm@redhat.com>
13344 * common.opt (fdiagnostics-show-line-numbers): New option.
13345 * diagnostic-show-locus.c (class layout): Add fields
13346 "m_show_line_numbers_p" and "m_linenum_width";
13347 (num_digits): New function.
13348 (test_num_digits): New function.
13349 (layout::layout): Initialize new fields. Update m_x_offset
13350 logic to handle any left margin.
13351 (layout::print_source_line): Print line number when requested.
13352 (layout::start_annotation_line): New member function.
13353 (layout::print_annotation_line): Call it.
13354 (layout::print_leading_fixits): Likewise.
13355 (layout::print_trailing_fixits): Likewise. Update calls to
13356 move_to_column for new parameter.
13357 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
13358 it to potentially call start_annotation_line.
13359 (layout::show_ruler): Call start_annotation_line.
13360 (selftest::test_line_numbers_multiline_range): New selftest.
13361 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
13362 and selftest::test_line_numbers_multiline_range.
13363 * diagnostic.c (diagnostic_initialize): Initialize
13364 show_line_numbers_p.
13365 * diagnostic.h (struct diagnostic_context): Add field
13366 "show_line_numbers_p".
13367 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
13368 -fno-diagnostics-show-line-numbers.
13369 * dwarf2out.c (gen_producer_string): Add
13370 OPT_fdiagnostics_show_line_numbers to the ignored options.
13371 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
13372 one setting" options.
13373 (append_compiler_options): Likewise to the dropped options.
13374 (append_diag_options): Likewise to the passed-on options.
13375 * opts.c (common_handle_option): Handle the new option.
13376 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
13378 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
13380 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
13381 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
13382 third argument of type "const signed char" to descriptions of
13383 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
13384 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
13385 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
13386 __builtin_bcdsub_ov functions.
13388 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
13390 PR tree-optimization/86858
13391 * tree-vect-loop.c (vect_is_simple_reduction): Restore
13392 flow_bb_inside_loop_p calls.
13394 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
13396 PR tree-optimization/86871
13397 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
13398 instead of gimple_assign_lhs.
13400 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
13403 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
13404 register constraint to operand 0.
13405 (add<mode>3_carryinC): Likewise.
13406 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
13408 2018-08-09 Martin Liska <mliska@suse.cz>
13411 * common.opt: Remove extra line.
13413 2018-08-09 Martin Liska <mliska@suse.cz>
13415 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
13416 at the end of a line, make first letter capital and end up
13417 a sentence with a dot.
13418 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
13419 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
13420 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
13421 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
13422 (PARAM_MAX_ISL_OPERATIONS): Likewise.
13423 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
13424 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
13425 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
13426 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
13427 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
13428 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
13429 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
13430 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
13431 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
13432 (PARAM_TREE_REASSOC_WIDTH): Likewise.
13433 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
13434 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
13435 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
13437 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
13440 * config/s390/s390.c (s390_option_override_internal): Reduce the
13441 stack-clash-protection-probe-interval param if it would be too big
13444 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
13447 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
13448 * config/m68k/m68k.c (handle_move_double): Don't call
13449 m68k_final_prescan_insn.
13450 (m68k_adjust_decorated_operand): Renamed from
13451 m68k_final_prescan_insn, remove first and third operand and
13453 (print_operand): Call it.
13454 (print_operand_address): Call it.
13456 2018-08-08 Nathan Sidwell <nathan@acm.org>
13458 * diagnostic.c (diagnostic_report_current_module): Use
13459 linemap_included_from & linemap_included_from_linemap.
13461 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
13463 * config/aarch64/aarch64-cores.def: Add phecda core.
13464 * config/aarch64/aarch64-tune.md: Regenerate.
13465 * doc/invoke.texi: Add phecda core.
13467 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
13470 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
13472 * config/s390/s390.md ("movti"): Add more alternatives for
13473 constant to GPR copies.
13475 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
13477 * config/s390/s390.c: Fix whitespace damage throughout the file.
13478 * config/s390/s390.h: Likewise.
13479 * config/s390/tpf.h: Likewise.
13481 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
13483 * config/s390/s390.c (s390_loadrelative_operand_p):
13484 Remove TARGET_CPU_ZARCH usages.
13485 (s390_rtx_costs): Likewise.
13486 (s390_legitimate_constant_p): Likewise.
13487 (s390_cannot_force_const_mem): Likewise.
13488 (legitimate_reload_constant_p): Likewise.
13489 (s390_preferred_reload_class): Likewise.
13490 (legitimize_pic_address): Likewise.
13491 (legitimize_tls_address): Likewise.
13492 (s390_split_branches): Removed.
13493 (s390_add_execute): Removed.
13494 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
13495 (s390_mainpool_start): Likewise.
13496 (s390_mainpool_finish): Likewise.
13497 (s390_mainpool_cancel): Removed.
13498 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
13499 (s390_chunkify_cancel): Likewise.
13500 (s390_return_addr_rtx): Likewise.
13501 (s390_register_info): Remove split_branches_pending_p uages.
13502 (s390_optimize_register_info): Likewise.
13503 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
13504 split_branches_pending_p usages.
13505 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
13506 (s390_load_got): Likewise.
13507 (s390_expand_split_stack_prologue): Likewise.
13508 (output_asm_nops): Likewise.
13509 (s390_function_profiler): Likewise.
13510 (s390_emit_call): Likewise.
13511 (s390_conditional_register_usage): Likewise.
13512 (s390_optimize_prologue): Likewise.
13513 (s390_reorg): Remove TARGET_CPU_ZARCH and
13514 split_branches_pending_p usages.
13515 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
13517 (s390_output_indirect_thunk_function): Likewise.
13518 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
13519 (TARGET_CPU_ZARCH_P): Removed.
13520 (struct machine_function): Remove split_branches_pending_p.
13521 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
13523 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
13525 * common/config/s390/s390-common.c (processor_flags_table):
13527 * config.gcc: Remove with_arch/with_tune support.
13528 * config/s390/2064.md: Remove cpu attribute comparisons.
13529 * config/s390/driver-native.c (s390_host_detect_local_cpu):
13531 * config/s390/linux.h (ASM_SPEC):
13532 Remove -march support.
13533 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
13534 Use a table to get an arch level.
13535 * config/s390/s390-opts.h (enum processor_type):
13536 Remove enum values.
13537 * config/s390/s390.c
13538 (processor_table): Remove entries, add arch_level values.
13539 (s390_issue_rate): Remove cases.
13540 (s390_option_override): Adjust
13541 s390_option_override_internal() call.
13542 (s390_option_override_internal): Remove deprecation warning.
13543 (s390_valid_target_attribute_tree): Adjust
13544 s390_option_override_internal() call.
13545 * config/s390/s390.h (struct s390_processor):
13546 Share with s390-c.c, add arch_level field.
13547 * config/s390/s390.md:
13548 Remove occurrences in cpu attribute.
13549 * config/s390/s390.opt: Remove -march/-mtune support.
13550 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
13551 * doc/invoke.texi: Remove deprecation warning.
13553 2018-08-08 Luis Machado <luis.machado@linaro.org>
13555 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
13557 (qdf24xx_tunings): Set vector cost structure to
13558 qdf24xx_vector_cost.
13560 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
13561 <register_sextend>: Set to 3.
13563 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
13566 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
13567 * config/aarch64/aarch64-simd.md
13568 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
13569 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
13570 (aarch64_frecpx<mode>): ...this new pattern.
13571 * config/aarch64/aarch64-simd-builtins.def: Remove comment
13572 about aarch64_frecp<FRECP:frecp_suffix><mode>.
13574 2018-08-07 Martin Liska <mliska@suse.cz>
13576 PR middle-end/83023
13577 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
13578 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
13579 * predict.def (PRED_MALLOC_NONNULL): New predictor.
13580 * doc/extend.texi: Document that malloc attribute adds
13583 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
13586 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13587 Define to speculation_safe_value_not_needed.
13589 2018-08-06 Jeff Law <law@redhat.com>
13591 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
13592 the vr_values instance to cprop_into_stmt.
13593 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
13594 (cprop_operand): Also query EVRP to determine if OP is a constant.
13596 2018-08-06 Nathan Sidwell <nathan@acm.org>
13598 * diagnostic.c (diagnostic_report_current_module): Reroll
13599 included-at loop. Translate text.
13601 2018-08-06 David Malcolm <dmalcolm@redhat.com>
13603 * function-tests.c (selftest::test_expansion_to_rtl): Call
13604 free_after_compilation.
13606 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13608 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
13610 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
13612 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
13613 loops with memory block operations from getting unrolled.
13615 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
13618 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13619 Define to speculation_safe_value_not_needed.
13621 2018-08-06 Jeff Law <law@redhat.com>
13623 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
13626 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13629 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
13630 with all enabled __intN types.
13632 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
13634 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13636 * alias.c (record_set): Check for clobber high.
13637 * cfgexpand.c (expand_gimple_stmt): Likewise.
13638 * combine-stack-adj.c (single_set_for_csa): Likewise.
13639 * combine.c (find_single_use_1): Likewise.
13640 (set_nonzero_bits_and_sign_copies): Likewise.
13641 (get_combine_src_dest): Likewise.
13642 (is_parallel_of_n_reg_sets): Likewise.
13643 (try_combine): Likewise.
13644 (record_dead_and_set_regs_1): Likewise.
13645 (reg_dead_at_p_1): Likewise.
13646 (reg_dead_at_p): Likewise.
13647 * dce.c (deletable_insn_p): Likewise.
13648 (mark_nonreg_stores_1): Likewise.
13649 (mark_nonreg_stores_2): Likewise.
13650 * df-scan.c (df_find_hard_reg_defs): Likewise.
13651 (df_uses_record): Likewise.
13652 (df_get_call_refs): Likewise.
13653 * dwarf2out.c (mem_loc_descriptor): Likewise.
13654 * haifa-sched.c (haifa_classify_rtx): Likewise.
13655 * ira-build.c (create_insn_allocnos): Likewise.
13656 * ira-costs.c (scan_one_insn): Likewise.
13657 * ira.c (equiv_init_movable_p): Likewise.
13658 (rtx_moveable_p): Likewise.
13659 (interesting_dest_for_shprep): Likewise.
13660 * jump.c (mark_jump_label_1): Likewise.
13661 * postreload-gcse.c (record_opr_changes): Likewise.
13662 * postreload.c (reload_cse_simplify): Likewise.
13663 (struct reg_use): Add source expr.
13664 (reload_combine): Check for clobber high.
13665 (reload_combine_note_use): Likewise.
13666 (reload_cse_move2add): Likewise.
13667 (move2add_note_store): Likewise.
13668 * print-rtl.c (print_pattern): Likewise.
13669 * recog.c (decode_asm_operands): Likewise.
13670 (store_data_bypass_p): Likewise.
13671 (if_test_bypass_p): Likewise.
13672 * regcprop.c (kill_clobbered_value): Likewise.
13673 (kill_set_value): Likewise.
13674 * reginfo.c (reg_scan_mark_refs): Likewise.
13675 * reload1.c (maybe_fix_stack_asms): Likewise.
13676 (eliminate_regs_1): Likewise.
13677 (elimination_effects): Likewise.
13678 (mark_not_eliminable): Likewise.
13679 (scan_paradoxical_subregs): Likewise.
13680 (forget_old_reloads_1): Likewise.
13681 * reorg.c (find_end_label): Likewise.
13682 (try_merge_delay_insns): Likewise.
13683 (redundant_insn): Likewise.
13684 (own_thread_p): Likewise.
13685 (fill_simple_delay_slots): Likewise.
13686 (fill_slots_from_thread): Likewise.
13687 (dbr_schedule): Likewise.
13688 * resource.c (update_live_status): Likewise.
13689 (mark_referenced_resources): Likewise.
13690 (mark_set_resources): Likewise.
13691 * rtl.c (copy_rtx): Likewise.
13692 * rtlanal.c (reg_referenced_p): Likewise.
13693 (single_set_2): Likewise.
13694 (noop_move_p): Likewise.
13695 (note_stores): Likewise.
13696 * sched-deps.c (sched_analyze_reg): Likewise.
13697 (sched_analyze_insn): Likewise.
13699 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13701 * cse.c (invalidate_reg): New function extracted from...
13702 (invalidate): ...here.
13703 (canonicalize_insn): Check for clobber high.
13704 (invalidate_from_clobbers): invalidate clobber highs.
13705 (invalidate_from_sets_and_clobbers): Likewise.
13706 (count_reg_usage): Check for clobber high.
13707 (insn_live_p): Likewise.
13708 * cselib.c (cselib_expand_value_rtx_1):Likewise.
13709 (cselib_invalidate_regno): Check for clobber in setter.
13710 (cselib_invalidate_rtx): Pass through setter.
13711 (cselib_invalidate_rtx_note_stores):
13712 (cselib_process_insn): Check for clobber high.
13713 * cselib.h (cselib_invalidate_rtx): Add operand.
13715 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13717 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
13718 (mark_not_eliminable): Likewise.
13719 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
13720 * lra-lives.c (process_bb_lives): Check for clobber high.
13721 * lra.c (new_insn_reg): Remember clobber highs.
13722 (collect_non_operand_hard_regs): Check for clobber high.
13723 (lra_set_insn_recog_data): Likewise.
13724 (add_regs_to_insn_regno_info): Likewise.
13725 (lra_update_insn_regno_info): Likewise.
13727 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13729 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
13730 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
13732 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13734 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
13735 (copy_insn_1): Likewise.
13736 (gen_hard_reg_clobber_high): New gen function.
13737 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
13738 * genemit.c (gen_exp): Likewise.
13739 (gen_emit_seq): Pass through info.
13740 (gen_insn): Check for CLOBBER_HIGH.
13741 (gen_expand): Pass through info.
13742 (gen_split): Likewise.
13743 (output_add_clobbers): Likewise.
13744 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
13745 (remove_clobbers): Likewise.
13746 * rtl.h (gen_hard_reg_clobber_high): New declaration.
13748 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13750 * doc/rtl.texi (clobber_high): Add.
13751 (parallel): Add in clobber high
13752 * rtl.c (rtl_check_failed_code3): Add function.
13753 * rtl.def (CLOBBER_HIGH): Add expression.
13754 * rtl.h (RTL_CHECKC3): Add macro.
13755 (rtl_check_failed_code3): Add declaration.
13756 (XC3EXP): Add macro.
13758 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
13761 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
13762 cfun->machine->max_used_stack_alignment if needed.
13764 2018-08-04 Martin Sebor <msebor@redhat.com>
13766 PR tree-optimization/86571
13767 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
13770 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
13773 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13776 2018-08-03 Jeff Law <law@redhat.com>
13779 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13780 Define to speculation_safe_value_not_needed.
13782 2018-08-03 David Malcolm <dmalcolm@redhat.com>
13784 * doc/gcov.texi (-x): Remove duplicate "to".
13785 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
13786 (-Wif-not-aligned): Remove duplicate "is".
13787 (-flto): Remove duplicate "the".
13788 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
13789 duplicate "v5.00.b".
13790 (MSP430 Options): Remove duplicate "and" from the description
13791 of "-mgprel-sec=regexp".
13792 (x86 Options): Remove duplicate copies of "vmldLog102" and
13793 vmlsLog104 from description of "-mveclibabi=type".
13795 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
13797 * internal-fn.h (first_commutative_argument): Declare.
13798 * internal-fn.c (first_commutative_argument): New function.
13799 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
13800 restrictions for pattern statements. Use first_commutative_argument
13801 to look for commutative operands in calls to internal functions.
13803 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
13805 * Makefile.in (wide-int-range.o): New.
13806 * tree-vrp.c: Move all the wide_int_* functions to...
13807 * wide-int-range.cc: ...here.
13808 * tree-vrp.h: Move all the wide_int_* prototypes to...
13809 * wide-int-range.h: ...here.
13811 2018-08-03 Tom de Vries <tdevries@suse.de>
13813 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
13815 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
13816 * except.c (output_function_exception_table): Do early exit if
13817 targetm_common.except_unwind_info (&global_options) == UI_NONE.
13819 2018-08-03 Martin Liska <mliska@suse.cz>
13821 * predict.c (dump_prediction): Change to 2 digits
13824 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
13826 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
13828 (falkor_am_1_gtov_gtov): ... a new insn reservation.
13830 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
13832 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
13833 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
13834 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
13835 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
13836 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
13838 2018-08-02 David Malcolm <dmalcolm@redhat.com>
13840 * diagnostic-show-locus.c (diagnostic_show_locus): Use
13841 pp_take_prefix when saving the existing prefix.
13842 * diagnostic.c (diagnostic_append_note): Likewise.
13843 * langhooks.c (lhd_print_error_function): Likewise.
13844 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
13845 param's type. Free the existing prefix.
13846 (pp_take_prefix): New function.
13847 (pretty_printer::pretty_printer): Drop the prefix parameter.
13848 Rename the length parameter to match the comment.
13849 (pretty_printer::~pretty_printer): Free the prefix.
13850 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
13852 (struct pretty_printer): Drop the "const" from "prefix" field's
13853 type and clarify memory management.
13854 (pp_set_prefix): Drop the "const" from the 2nd param.
13855 (pp_take_prefix): New decl.
13857 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
13859 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
13860 for word_mode_ok here instead of passing as argument.
13861 (expand_block_compare): Change select_block_compare_mode() call.
13862 (expand_strncmp_gpr_sequence): New function.
13863 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
13865 2018-08-02 Jeff Law <law@redhat.com>
13868 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13869 Define to speculation_safe_value_not_needed.
13872 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13873 Define to speculation_safe_value_not_needed.
13875 2018-08-02 Tom de Vries <tdevries@suse.de>
13878 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
13879 function. Return UI_TARGET unconditionally.
13880 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
13881 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
13883 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
13885 * genemit.c (print_overload_test): Fix typo.
13887 2018-08-02 Richard Biener <rguenther@suse.de>
13889 PR tree-optimization/86816
13890 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
13891 which checks for value availability before querying it.
13892 (gvn_uses_equal): Use it.
13893 (same_succ_hash): Likewise.
13894 (gimple_equal_p): Likewise.
13896 2018-08-02 Nick Clifton <nickc@redhat.com>
13899 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13900 Define to speculation_safe_value_not_needed.
13903 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13904 Define to speculation_safe_value_not_needed.
13907 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13908 Define to speculation_safe_value_not_needed.
13911 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13912 Define to speculation_safe_value_not_needed.
13915 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13916 Define to speculation_safe_value_not_needed.
13919 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13920 Define to speculation_safe_value_not_needed.
13923 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13924 Define to speculation_safe_value_not_needed.
13927 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13928 Define to speculation_safe_value_not_needed.
13931 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
13932 speculation_safe_value_not_needed.
13935 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
13936 to speculation_safe_value_not_needed.
13938 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
13940 * doc/md.texi: Expand the documentation of instruction names
13941 to mention port-local uses. Document '@' in pattern names.
13942 * read-md.h (overloaded_instance, overloaded_name): New structs.
13943 (mapping): Declare.
13944 (md_reader::handle_overloaded_name): New member function.
13945 (md_reader::get_overloads): Likewise.
13946 (md_reader::m_first_overload): New member variable.
13947 (md_reader::m_next_overload_ptr): Likewise.
13948 (md_reader::m_overloads_htab): Likewise.
13949 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
13950 m_next_overload_ptr and m_overloads_htab.
13951 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
13952 (get_mode_token, get_code_token, get_int_token): New functions.
13953 (map_attr_string): Add an optional argument that passes back
13954 the associated iterator.
13955 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
13956 (md_reader::handle_overloaded_name, add_overload_instance): New
13958 (apply_iterators): Handle '@' names. Report an error if '@'
13959 is used without iterators.
13960 (initialize_iterators): Initialize the new iterator_group fields.
13961 * genopinit.c (handle_overloaded_code_for)
13962 (handle_overloaded_gen): New functions.
13963 (main): Use them to print declarations of maybe_code_for_* and
13964 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
13965 * genemit.c (print_overload_arguments, print_overload_test)
13966 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
13967 (main): Use it to print definitions of maybe_code_for_* and
13968 maybe_gen_* functions.
13969 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
13970 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
13971 instead of explicit mode checks.
13972 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
13973 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
13974 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
13975 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
13976 (aarch64_expand_compare_and_swap): Likewise
13977 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
13978 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
13979 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
13980 (aarch64_constant_pool_reload_icode): Delete.
13981 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
13982 instead of aarch64_constant_pool_reload_icode. Use
13983 code_for_aarch64_reload_mov instead of explicit mode checks.
13984 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
13985 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
13986 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
13987 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
13988 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
13989 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
13990 (aarch64_atomic_load_op_code): Delete.
13991 (aarch64_emit_atomic_load_op): Likewise.
13992 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
13993 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
13994 instead of aarch64_emit_atomic_load_op.
13995 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
13996 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
13997 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
13998 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
13999 character before the pattern name.
14000 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
14001 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
14002 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
14003 (aarch64_frecps<mode>): Likewise.
14004 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
14005 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
14006 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
14007 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
14008 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
14010 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
14012 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
14013 Allow HFmode constants if TARGET_FP_F16INST.
14015 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
14018 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
14019 No longer check last store for clobber of address register.
14021 2018-08-02 Martin Liska <mliska@suse.cz>
14023 PR gcov-profile/86817
14024 * gcov.c (process_all_functions): New function.
14026 (process_file): Move functions processing to
14027 process_all_functions.
14029 2018-08-02 David Malcolm <dmalcolm@redhat.com>
14031 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
14032 "const" to the "gimple *" and "rtx_insn *" parameters.
14033 * dumpfile.h (dump_user_location_t::dump_user_location_t):
14035 (dump_location_t::dump_location_t): Likewise.
14037 2018-08-01 Martin Sebor <msebor@redhat.com>
14039 PR tree-optimization/86650
14040 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
14041 rather than a "gcall *". Directly pass the data of interest
14042 to percent_K_format, rather than building a temporary CALL_EXPR
14044 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
14045 (gimple_fold_builtin_strncat): Adjust.
14046 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
14047 gcall* argument with gimple*.
14048 * gimple-ssa-warn-restrict.c (check_call): Same.
14049 (wrestrict_dom_walker::before_dom_children): Same.
14050 (builtin_access::builtin_access): Same.
14051 (check_bounds_or_overlap): Same
14052 (maybe_diag_overlap): Same.
14053 (maybe_diag_offset_bounds): Same.
14054 * tree-diagnostic.c (default_tree_printer): Move usage of
14055 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
14057 * tree-pretty-print.c (percent_K_format): Add argument.
14058 * tree-pretty-print.h: Add argument.
14059 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
14060 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
14061 (maybe_diag_stxncpy_trunc): Same.
14062 (handle_builtin_stxncpy): Same.
14063 (handle_builtin_strcat): Same.
14065 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14067 * match.pd: Optimise pointer range checks.
14069 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14071 PR tree-optimization/86758
14072 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
14073 to remove pattern statements.
14075 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14077 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
14078 result of dfs_enumerate_from when constructing stmt_vec_infos,
14079 instead of additionally calling get_loop_body.
14081 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14083 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
14085 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
14086 When creating an iv, assert that the step is not known to be zero.
14087 (vect_setup_realignment): Update call accordingly.
14088 * tree-vect-stmts.c (vectorizable_store): Likewise.
14089 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
14091 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14093 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
14094 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
14095 (vectorizable_reduction): Likewise.
14096 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14097 (vect_detect_hybrid_slp_stmts): Likewise.
14098 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
14100 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
14102 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
14103 (wide_int_set_zero_nonzero_bits): ...this.
14104 (zero_nonzero_bits_from_vr): Rename to...
14105 (vrp_set_zero_nonzero_bits): ...this.
14106 (extract_range_from_multiplicative_op_1): Abstract wide int
14108 (wide_int_range_multiplicative_op): ...here.
14109 (extract_range_from_binary_expr_1): Extract wide int binary
14110 operations into their own functions.
14111 (wide_int_range_lshift): New.
14112 (wide_int_range_can_optimize_bit_op): New.
14113 (wide_int_range_shift_undefined_p): New.
14114 (wide_int_range_bit_xor): New.
14115 (wide_int_range_bit_ior): New.
14116 (wide_int_range_bit_and): New.
14117 (wide_int_range_trunc_mod): New.
14118 (extract_range_into_wide_ints): New.
14119 (vrp_shift_undefined_p): New.
14120 (extract_range_from_multiplicative_op): New.
14121 (vrp_can_optimize_bit_op): New.
14122 * tree-vrp.h (value_range::dump): New.
14123 (wide_int_range_multiplicative_op): New.
14124 (wide_int_range_lshift):New.
14125 (wide_int_range_shift_undefined_p): New.
14126 (wide_int_range_bit_xor): New.
14127 (wide_int_range_bit_ior): New.
14128 (wide_int_range_bit_and): New.
14129 (wide_int_range_trunc_mod): New.
14130 (zero_nonzero_bits_from_bounds): Rename to...
14131 (wide_int_set_zero_nonzero_bits): ...this.
14132 (zero_nonzero_bits_from_vr): Rename to...
14133 (vrp_set_zero_nonzero_bits): ...this.
14134 (range_easy_mask_min_max): Rename to...
14135 (wide_int_range_can_optimize_bit_op): this.
14136 * vr-values.c (simplify_bit_ops_using_ranges): Rename
14137 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
14139 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14141 * tree-vectorizer.h (vect_orig_stmt): New function.
14142 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
14143 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
14144 (vect_create_epilog_for_reduction): Likewise.
14145 (vectorizable_live_operation): Likewise.
14146 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
14147 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
14148 * tree-vect-stmts.c (vectorizable_call): Likewise.
14149 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
14151 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14153 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
14155 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
14156 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
14157 (vect_transform_loop): Likewise.
14158 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
14160 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14162 * tree-vectorizer.h (vect_schedule_slp): Return void.
14163 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
14164 (vect_schedule_slp): Likewise.
14166 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14168 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
14170 (vect_transform_loop): Update calls accordingly. Schedule SLP
14171 instances before the main loop, if any exist.
14173 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14175 PR tree-optimization/86749
14176 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
14177 If the lhs is used in a COND_EXPR, check that it is being used
14178 as the "then" or "else" value.
14180 2018-08-01 Tom de Vries <tdevries@suse.de>
14183 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
14184 speculation_safe_value_not_needed.
14186 2018-08-01 Richard Biener <rguenther@suse.de>
14188 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
14189 as base and offset.
14191 2018-08-01 Martin Liska <mliska@suse.cz>
14193 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
14194 format how successful transformation is dumped.
14195 (gimple_mod_pow2_value_transform): Likewise.
14196 (gimple_mod_subtract_transform): Likewise.
14197 (gimple_stringops_transform): Likewise.
14199 2018-08-01 Martin Liska <mliska@suse.cz>
14201 PR value-prof/35543
14202 * value-prof.c (interesting_stringop_to_profile_p):
14203 Simplify the code and add BUILT_IN_MEMMOVE.
14204 (gimple_stringops_transform): Likewise.
14206 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
14208 * config/aarch64/aarch64-simd.md
14209 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
14210 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
14211 use GPI iterator instead of SI mode.
14213 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
14215 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
14216 rs6000_speculation_barrier.
14217 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
14218 new barrier pattern name.
14220 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
14222 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
14223 (speculation_barrier): New insn.
14225 2018-08-01 Richard Biener <rguenther@suse.de>
14228 * graphite.h: Include isl/id.h and isl/space.h to allow build
14231 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
14234 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14235 mode for COFF targets.
14236 * defaults.h (TARGET_COFF): Define.
14237 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
14238 TARGET_COFF): Define.
14239 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
14240 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
14241 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
14243 2018-07-31 Alexandre Oliva <oliva@adacore.com>
14245 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
14246 * gimple-streamer-out.c (output_bb): Save it.
14247 * lto-streamer-in.c (input_struct_function_base): Restore
14248 instance discriminator if available. Create map on demand.
14249 * lto-streamer-out.c (output_struct_function_base): Save it if
14251 * final.c (decl_to_instance_map): Document LTO strategy.
14253 2018-07-31 Alexandre Oliva <oliva@adacore.com>
14254 Olivier Hainque <hainque@adacore.com>
14256 * debug.h (decl_to_instance_map_t): New type.
14257 (decl_to_instance_map): Declare.
14258 (maybe_create_decl_to_instance_map): New inline function.
14259 * final.c (bb_discriminator, last_bb_discriminator): New statics,
14260 to track basic block discriminators.
14261 (final_start_function_1): Initialize them.
14262 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
14264 (decl_to_instance_map): New variable.
14265 (map_decl_to_instance, maybe_set_discriminator): New functions.
14266 (notice_source_line): Set discriminator.
14268 2018-07-31 Ian Lance Taylor <iant@golang.org>
14270 * targhooks.c (default_have_speculation_safe_value): Add
14273 2018-07-31 David Malcolm <dmalcolm@redhat.com>
14275 * dump-context.h: Include "pretty-print.h".
14276 (dump_context::refresh_dumps_are_enabled): New decl.
14277 (dump_context::emit_item): New decl.
14278 (class dump_context): Add fields "m_test_pp" and
14280 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
14281 (temp_dump_context::get_dumped_text): New decl.
14282 (class temp_dump_context): Add field "m_pp".
14283 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
14284 (dump_context::refresh_dumps_are_enabled): ...and add a test for
14286 (set_dump_file): Update for above change.
14287 (set_alt_dump_file): Likewise.
14288 (dump_loc): New overload, taking a pretty_printer *.
14289 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
14290 to any test pretty-printer.
14291 (make_item_for_dump_gimple_stmt): New function, adapted from
14292 optinfo::add_gimple_stmt.
14293 (dump_context::dump_gimple_stmt): Call it, and use the result,
14294 eliminating the direct usage of dump_file and alt_dump_file in
14295 favor of indirectly using them via emit_item.
14296 (make_item_for_dump_gimple_expr): New function, adapted from
14297 optinfo::add_gimple_expr.
14298 (dump_context::dump_gimple_expr): Call it, and use the result,
14299 eliminating the direct usage of dump_file and alt_dump_file in
14300 favor of indirectly using them via emit_item.
14301 (make_item_for_dump_generic_expr): New function, adapted from
14303 (dump_context::dump_generic_expr): Call it, and use the result,
14304 eliminating the direct usage of dump_file and alt_dump_file in
14305 favor of indirectly using them via emit_item.
14306 (make_item_for_dump_printf_va): New function, adapted from
14307 optinfo::add_printf_va.
14308 (make_item_for_dump_printf): New function.
14309 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
14310 and use the result, eliminating the direct usage of dump_file and
14311 alt_dump_file in favor of indirectly using them via emit_item.
14312 (make_item_for_dump_dec): New function.
14313 (dump_context::dump_dec): Call it, and use the result,
14314 eliminating the direct usage of dump_file and alt_dump_file in
14315 favor of indirectly using them via emit_item.
14316 (make_item_for_dump_symtab_node): New function, adapted from
14317 optinfo::add_symtab_node.
14318 (dump_context::dump_symtab_node): Call it, and use the result,
14319 eliminating the direct usage of dump_file and alt_dump_file in
14320 favor of indirectly using them via emit_item.
14321 (dump_context::begin_scope): Reimplement, avoiding direct usage
14322 of dump_file and alt_dump_file in favor of indirectly using them
14324 (dump_context::emit_item): New member function.
14325 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
14326 Set up test pretty-printer on the underlying context. Call
14327 refresh_dumps_are_enabled.
14328 (temp_dump_context::~temp_dump_context): Call
14329 refresh_dumps_are_enabled.
14330 (temp_dump_context::get_dumped_text): New member function.
14331 (selftest::verify_dumped_text): New function.
14332 (ASSERT_DUMPED_TEXT_EQ): New macro.
14333 (selftest::test_capture_of_dump_calls): Run all tests twice, with
14334 and then without optinfo enabled. Add uses of
14335 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
14336 * dumpfile.h: Update comment for the dump_* API.
14337 * optinfo-emit-json.cc
14338 (selftest::test_building_json_from_dump_calls): Update for new
14339 param for temp_dump_context ctor.
14340 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
14341 and "m_owned" field.
14342 (optinfo_item::~optinfo_item): Likewise.
14343 (optinfo::add_item): New member function.
14344 (optinfo::emit): Update comment.
14345 (optinfo::add_string): Delete.
14346 (optinfo::add_printf): Delete.
14347 (optinfo::add_printf_va): Delete.
14348 (optinfo::add_gimple_stmt): Delete.
14349 (optinfo::add_gimple_expr): Delete.
14350 (optinfo::add_tree): Delete.
14351 (optinfo::add_symtab_node): Delete.
14352 (optinfo::add_dec): Delete.
14353 * optinfo.h (class dump_context): New forward decl.
14354 (optinfo::add_item): New decl.
14355 (optinfo::add_string): Delete.
14356 (optinfo::add_printf): Delete.
14357 (optinfo::add_printf_va): Delete.
14358 (optinfo::add_gimple_stmt): Delete.
14359 (optinfo::add_gimple_expr): Delete.
14360 (optinfo::add_tree): Delete.
14361 (optinfo::add_symtab_node): Delete.
14362 (optinfo::add_dec): Delete.
14363 (optinfo::add_poly_int): Delete.
14364 (optinfo_item::optinfo_item): Remove "owned" param.
14365 (class optinfo_item): Remove field "m_owned".
14367 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14369 PR middle-end/86705
14370 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
14371 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
14372 requested variable alignment.
14373 (expand_one_ssa_partition): Likewise.
14374 (expand_one_var): Likewise.
14376 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14378 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
14379 to speculation_safe_value_not_needed.
14381 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14383 * targhooks.h (speculation_safe_value_not_needed): New prototype.
14384 * targhooks.c (speculation_safe_value_not_needed): New function.
14385 * target.def (have_speculation_safe_value): Update documentation.
14386 * doc/tm.texi: Regenerated.
14388 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14390 * config/aarch64/iterators.md (ALLI_TI): New iterator.
14391 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
14393 (despeculate_copy<ALLI:mode>_insn): New insn.
14394 (despeculate_copyti_insn): New insn.
14395 (despeculate_simple<ALLI:mode>): New insn
14396 (despeculate_simpleti): New insn.
14397 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
14399 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
14400 aarch64_speculation_safe_value.
14401 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
14403 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14405 * config/aarch64/aarch64-speculation.cc: New file.
14406 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
14407 before pass_reorder_blocks.
14408 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
14410 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
14411 X14 and X15 when tracking speculation.
14412 * config/aarch64/aarch64.md (register name constants): Add
14413 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
14414 (unspec): Add UNSPEC_SPECULATION_TRACKER.
14415 (speculation_barrier): New insn attribute.
14416 (cmp<mode>): Allow SP in comparisons.
14417 (speculation_tracker): New insn.
14418 (speculation_barrier): Add speculation_barrier attribute.
14419 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
14420 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
14421 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
14423 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14425 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
14426 aarch64_track_speculation is true.
14427 (tb<optab><mode>1): Likewise.
14428 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
14429 generate CB[N]Z when tracking speculation.
14430 (aarch64_split_compare_and_swap): Likewise.
14431 (aarch64_split_atomic_op): Likewise.
14433 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14435 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
14437 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14439 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
14440 (speculation_barrier): New insn.
14442 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14444 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
14445 * config/arm/arm.md (speculation_barrier): New expand.
14446 (speculation_barrier_insn): New pattern.
14448 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14450 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
14451 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
14452 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
14453 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
14455 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
14456 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
14457 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
14458 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
14459 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
14460 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
14461 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
14462 * builtins.c (expand_speculation_safe_value): New function.
14463 (expand_builtin): Call it.
14464 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
14465 * doc/extend.texi: Document __builtin_speculation_safe_value.
14466 * doc/md.texi: Document "speculation_barrier" pattern.
14467 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
14468 TARGET_HAVE_SPECULATION_SAFE_VALUE.
14469 * doc/tm.texi: Regenerated.
14470 * target.def (have_speculation_safe_value, speculation_safe_value): New
14472 * targhooks.c (default_have_speculation_safe_value): New function.
14473 (default_speculation_safe_value): New function.
14474 * targhooks.h (default_have_speculation_safe_value): Add prototype.
14475 (default_speculation_safe_value): Add prototype.
14477 2018-07-31 David Malcolm <dmalcolm@redhat.com>
14479 * dump-context.h (dump_context::dump_loc): New decl.
14480 * dumpfile.c (dump_context::dump_loc): New member function.
14481 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
14482 and dump_gimple_stmt.
14483 (dump_context::dump_gimple_expr_loc): Likewise, using
14485 (dump_context::dump_generic_expr_loc): Likewise, using
14487 (dump_context::dump_printf_loc_va): Likewise, using
14489 (dump_context::begin_scope): Explicitly using the global function
14490 "dump_loc", rather than the member function.
14492 2018-07-31 Martin Sebor <msebor@redhat.com>
14494 PR tree-optimization/86741
14495 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
14497 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
14499 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
14500 depend on whether prefetch instructions will be emitted or not.
14501 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
14502 will be emitted or not.
14503 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
14504 (TARGET_SETMEM_PFD): New macros.
14506 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14508 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
14509 (NULL_STMT_VEC_INFO): Delete.
14510 (stmt_vec_info::operator*): Likewise.
14511 (stmt_vec_info::operator gimple *): Likewise.
14512 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
14513 of NULL_STMT_VEC_INFO.
14514 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
14515 (vect_reassociating_reduction_p): Likewise.
14516 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
14517 (vectorizable_store): Likewise.
14518 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
14519 (vec_info::free_stmt_vec_infos): Likewise.
14521 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14523 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
14524 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
14526 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14528 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
14529 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
14530 (vec_info::free_stmt_vec_info): New private member functions.
14531 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
14532 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
14533 * tree-parloops.c (gather_scalar_reductions): Remove calls to
14534 set_stmt_vec_info_vec and free_stmt_vec_infos.
14535 * tree-vect-loop.c (_loop_vec_info): Remove call to
14536 set_stmt_vec_info_vec.
14537 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
14538 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
14539 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
14540 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
14541 (vec_info::free_stmt_vec_info): ...these new functions. Remove
14542 assignments in {vec_info::,}new_stmt_vec_info that are redundant
14543 with the clearing in the xcalloc.
14544 (stmt_vec_info_vec): Delete.
14545 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
14546 (vectorize_loops): Likewise.
14547 (vec_info::~vec_info): Remove argument from call to
14548 free_stmt_vec_infos.
14549 (vec_info::add_stmt): Remove vinfo argument from call to
14552 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14554 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
14555 rather than a gimple stmt.
14556 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
14557 information for pattern statements when passed the original
14558 statement; instead wait to be passed the pattern statement itself.
14559 Don't call set_vinfo_for_stmt here.
14560 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
14561 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
14562 stmt_vec_infos here.
14563 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
14564 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
14565 stmt_vec_infos entry.
14567 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14569 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
14570 * tree-vectorizer.c (vec_info::replace_stmt): New function.
14571 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
14572 * tree-vect-stmts.c (vectorizable_call): Likewise.
14573 (vectorizable_simd_clone_call): Likewise.
14575 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14577 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
14578 * tree-vectorizer.c (vec_info::remove_stmt): New function.
14579 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
14580 * tree-vect-loop.c (vect_transform_loop): Likewise.
14581 * tree-vect-slp.c (vect_schedule_slp): Likewise.
14582 * tree-vect-stmts.c (vect_remove_stores): Likewise.
14584 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14586 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
14587 (vect_dr_stmt): Delete.
14588 * tree-vectorizer.c (vec_info::lookup_dr): New function.
14589 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
14591 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
14592 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
14593 (vect_verify_datarefs_alignment, vect_peeling_supportable)
14594 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
14595 (vect_analyze_data_refs): Likewise.
14596 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
14598 (vect_find_same_alignment_drs): Likewise.
14599 (vect_slp_analyze_node_dependences): Update calls accordingly.
14600 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
14601 instead of DR_VECT_AUX.
14602 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
14603 of a vector data references. Use vec_info::lookup_dr instead of
14605 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
14606 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
14607 instead of DR_VECT_AUX.
14609 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14611 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
14613 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
14615 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14616 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14617 (vect_gen_prolog_loop_niters): Likewise.
14619 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14621 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
14622 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
14623 (vect_known_alignment_in_bytes, vect_dr_behavior)
14624 (vect_get_scalar_dr_size): Take references as dr_vec_infos
14625 instead of data_references. Update calls to other routines for
14626 which the same change has been made.
14627 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
14628 dr_vec_infos instead of stmt_vec_infos.
14629 (vect_analyze_data_ref_dependence): Update call accordingly.
14630 (vect_slp_analyze_data_ref_dependence)
14631 (vect_record_base_alignments): Use DR_VECT_AUX.
14632 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
14633 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
14634 (vector_alignment_reachable_p, vect_get_data_access_cost)
14635 (vect_peeling_supportable, vect_analyze_group_access_1)
14636 (vect_analyze_group_access, vect_analyze_data_ref_access)
14637 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
14638 (vect_compile_time_alias, vect_small_gap_p)
14639 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
14640 (vect_supportable_dr_alignment): Take references as dr_vec_infos
14641 instead of data_references. Update calls to other routines for
14642 which the same change has been made.
14643 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
14644 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
14645 (vect_slp_analyze_and_verify_node_alignment)
14646 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
14647 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
14648 (vect_setup_realignment): Use dr_vec_infos. Update calls after
14650 (_vect_peel_info::dr): Replace with...
14651 (_vect_peel_info::dr_info): ...this new field.
14652 (vect_peeling_hash_get_most_frequent)
14653 (vect_peeling_hash_choose_best_peeling): Update accordingly.
14654 (vect_peeling_hash_get_lowest_cost):
14655 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
14656 routines for which the same change has been made.
14657 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
14659 * tree-vect-loop-manip.c (get_misalign_in_elems)
14660 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
14662 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14663 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
14664 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
14665 (get_group_load_store_type, get_negative_load_store_type)
14666 (vect_get_data_ptr_increment, vectorizable_store)
14667 (vectorizable_load): Likewise.
14668 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
14669 Update calls to other routines for which the same change has been made.
14671 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14673 * tree-vectorizer.h (vec_info::move_dr): New member function.
14674 (dataref_aux): Rename to...
14675 (dr_vec_info): ...this and add "dr" and "stmt" fields.
14676 (_stmt_vec_info::dr_aux): Update accordingly.
14677 (_stmt_vec_info::data_ref_info): Delete.
14678 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
14679 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
14680 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
14681 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
14683 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
14684 (STMT_VINFO_DR_INFO): New macro.
14685 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
14686 (set_dr_misalignment): Update after rename of dataref_aux.
14687 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
14688 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
14689 initialization of STMT_VINFO_DATA_REF.
14690 * tree-vectorizer.c (vec_info::move_dr): New function.
14691 * tree-vect-patterns.c (vect_recog_bool_pattern)
14692 (vect_recog_mask_conversion_pattern)
14693 (vect_recog_gather_scatter_pattern): Use it.
14694 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
14695 the "dr" and "stmt" fields of dr_vec_info instead of
14696 STMT_VINFO_DATA_REF.
14698 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14700 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
14701 (is_pattern_stmt_p): Use it.
14702 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
14703 on pattern statements.
14705 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14707 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
14708 original stmt as a stmt_vec_info rather than a gimple stmt.
14709 (vect_pattern_recog_1): Take the statement directly as a
14710 stmt_vec_info, rather than via a gimple_stmt_iterator.
14711 Update call to vect_mark_pattern_stmts.
14712 (vect_pattern_recog): Update calls accordingly.
14714 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14716 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
14717 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
14718 a vect_def_type for the first argument.
14719 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
14720 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
14721 operand if it isn't defined by a vectorized statement.
14722 (vect_build_gather_load_calls): Remove the mask_dt argument and
14723 update calls to vect_get_vec_def_for_stmt_copy.
14724 (vectorizable_bswap): Likewise the dt argument.
14725 (vectorizable_call): Update calls to vectorizable_bswap and
14726 vect_get_vec_def_for_stmt_copy.
14727 (vectorizable_simd_clone_call, vectorizable_assignment)
14728 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
14729 (vectorizable_comparison): Update calls to
14730 vect_get_vec_def_for_stmt_copy.
14731 (vectorizable_store): Likewise. Remove now-unnecessary calls to
14732 vect_is_simple_use.
14733 (vect_get_loop_based_defs): Remove dt argument and update call
14734 to vect_get_vec_def_for_stmt_copy.
14735 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
14736 and vect_get_vec_def_for_stmt_copy.
14737 (vectorizable_load): Update calls to vect_build_gather_load_calls
14738 and vect_get_vec_def_for_stmt_copy.
14739 * tree-vect-loop.c (vect_create_epilog_for_reduction)
14740 (vectorizable_reduction, vectorizable_live_operation): Update calls
14741 to vect_get_vec_def_for_stmt_copy.
14743 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14745 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
14746 and gimple stmt arguments with a stmt_vec_info.
14747 (vect_record_base_alignments): Update calls accordingly.
14748 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
14749 and gimple stmt arguments with a stmt_vec_info.
14750 (vect_build_slp_tree_1): Remove vinfo argument and update call
14751 to vect_record_max_nunits.
14752 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
14753 and vect_record_max_nunits.
14755 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14757 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
14758 file and take a stmt_vec_info instead of a gimple stmt.
14759 (supportable_widening_operation, vect_finish_replace_stmt)
14760 (vect_finish_stmt_generation, vect_get_store_rhs)
14761 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
14762 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
14763 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
14764 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
14765 (vect_create_data_ref_ptr, bump_vector_ptr)
14766 (vect_permute_store_chain, vect_setup_realignment)
14767 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
14768 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
14769 (vectorizable_reduction, vectorizable_induction)
14770 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
14771 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
14772 than gimple stmts as arguments.
14773 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
14774 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
14775 (can_group_stmts_p, vect_check_gather_scatter)
14776 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
14777 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
14778 (vect_permute_load_chain, vect_shift_permute_load_chain)
14779 (vect_transform_grouped_load)
14780 (vect_record_grouped_load_vectors): Likewise.
14781 * tree-vect-loop.c (vect_fixup_reduc_chain)
14782 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
14783 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
14784 (vectorizable_reduction, vectorizable_induction)
14785 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
14786 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
14787 (vect_get_load_store_mask): Likewise.
14788 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
14789 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
14790 * tree-vect-stmts.c (vect_mark_relevant)
14791 (is_simple_and_all_uses_invariant)
14792 (exist_non_indexing_operands_for_use_p, process_use)
14793 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
14794 (vect_get_vec_def_for_operand, vect_get_vec_defs)
14795 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
14796 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
14797 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
14798 (get_negative_load_store_type, get_load_store_type)
14799 (vect_check_load_store_mask, vect_check_store_rhs)
14800 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
14801 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
14802 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
14803 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
14804 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
14805 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
14806 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
14807 (supportable_widening_operation): Likewise.
14809 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14811 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
14812 a stmt_vec_info instead of a gcall.
14813 (vect_check_gather_scatter): Update call accordingly.
14814 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
14816 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
14817 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
14818 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
14819 instead of a gimple stmt.
14820 (vect_transform_loop): Update calls accordingly.
14821 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
14822 stmt_vec_infos instead of gimple stmts.
14823 (vect_analyze_slp_instance): Update use accordingly.
14824 * tree-vect-stmts.c (read_vector_array, write_vector_array)
14825 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
14826 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
14827 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
14828 (vect_gen_widened_results_half, vect_get_loop_based_defs)
14829 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
14830 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
14831 down to subroutines.
14833 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14835 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
14836 of the worklist from a vector of gimple stmts to a vector of
14838 * tree-vect-stmts.c (vect_mark_relevant, process_use)
14839 (vect_mark_stmts_to_be_vectorized): Likewise
14841 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14843 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
14844 statement before passing it to vect_analyze_stmt.
14845 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
14846 the chain of phi vector definitions. Track the exit phi via its
14848 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
14849 STMT_VINFO_REDUC_DEF.
14850 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
14851 stmt_vec_infos to handle the statement chains.
14852 (vect_get_slp_defs): Record the first statement in the node
14853 using a stmt_vec_info.
14854 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
14855 statements here and pass their stmt_vec_info down to subroutines.
14856 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
14857 down to vect_finish_stmt_generation.
14858 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
14859 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
14860 stmt_vec_infos to subroutines.
14861 (vect_remove_stores): Use stmt_vec_infos to handle the statement
14864 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14866 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
14867 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
14868 (vect_permute_store_chain, vect_setup_realignment)
14869 (vect_permute_load_chain, vect_shift_permute_load_chain)
14870 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
14871 stmts internally, and when passing values to other vectorizer routines.
14872 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
14873 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
14874 (vect_analyze_loop_operations, get_initial_def_for_reduction)
14875 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
14876 (vectorizable_reduction, vectorizable_induction)
14877 (vectorizable_live_operation, vect_transform_loop_stmt)
14878 (vect_transform_loop): Likewise.
14879 * tree-vect-patterns.c (vect_reassociating_reduction_p)
14880 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
14881 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
14882 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14883 (vect_slp_analyze_node_operations_1): Likewise.
14884 * tree-vect-stmts.c (vect_mark_relevant, process_use)
14885 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
14886 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
14887 (vect_finish_stmt_generation_1, get_group_load_store_type)
14888 (get_load_store_type, vect_build_gather_load_calls)
14889 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
14890 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
14891 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
14892 (vectorizable_store, vectorizable_load, vectorizable_condition)
14893 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
14894 (supportable_widening_operation): Likewise.
14895 (vect_get_vector_types_for_stmt): Likewise.
14896 * tree-vectorizer.h (vect_dr_behavior): Likewise.
14898 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14900 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14901 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
14902 (vect_permute_store_chain, vect_permute_load_chain)
14903 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
14904 repeated stmt_vec_info lookups.
14905 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
14906 (vect_update_ivs_after_vectorizer): Likewise.
14907 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
14908 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
14909 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
14910 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14911 (vect_bb_slp_scalar_cost): Likewise.
14912 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
14914 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14916 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
14917 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
14918 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
14919 to get gassigns and gcalls, rather than operating on generc gimple
14921 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
14922 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
14923 (vectorizable_load, vect_analyze_stmt): Likewise.
14924 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
14926 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14928 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
14929 return stmt_vec_infos rather than gimple stmts. Do not accept
14931 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
14933 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
14934 Update use of get_later_stmt.
14935 (vect_get_constant_vectors): Update call accordingly.
14936 (vect_schedule_slp_instance): Likewise
14937 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
14938 (vect_slp_analyze_instance_dependence): Likewise.
14939 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
14941 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14943 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
14944 (stmt_info_for_cost::stmt_info): ...this new field.
14945 (add_stmt_costs): Update accordingly.
14946 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
14947 (vect_get_known_peeling_cost): Likewise.
14948 (vect_estimate_min_profitable_iters): Likewise.
14949 * tree-vect-stmts.c (record_stmt_cost): Likewise.
14951 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14953 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
14954 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
14955 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
14957 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
14959 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14961 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
14962 a gimple stmt to a stmt_vec_info.
14963 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
14965 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14967 * tree-vectorizer.h (vec_info::grouped_stores): Change from
14968 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
14969 (_loop_vec_info::reduction_chains): Likewise.
14970 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
14972 * tree-vect-slp.c (vect_analyze_slp): Likewise.
14974 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14976 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
14977 a gimple stmt to a stmt_vec_info.
14978 (_stmt_vec_info::next_element): Likewise.
14979 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
14980 (vect_slp_analyze_and_verify_node_alignment)
14981 (vect_analyze_group_access_1, vect_analyze_group_access)
14982 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
14983 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
14984 (vect_supportable_dr_alignment): Update accordingly.
14985 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
14986 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
14987 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
14988 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
14989 * tree-vect-slp.c (vect_build_slp_tree_1)
14990 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
14991 (vect_split_slp_store_group, vect_analyze_slp_instance)
14992 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
14993 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
14994 (get_group_load_store_type, get_load_store_type)
14995 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
14996 (vect_transform_stmt, vect_remove_stores): Likewise.
14998 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15000 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
15001 than a gimple stmt.
15002 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15003 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
15004 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
15005 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
15006 (vector_alignment_reachable_p, vect_get_data_access_cost)
15007 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
15008 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
15009 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
15010 (vect_analyze_group_access_1, vect_analyze_group_access)
15011 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
15012 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
15013 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
15014 result of vect_dr_stmt and use the stmt_vec_info instead of
15015 the associated gimple stmt.
15016 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
15017 (vect_gen_prolog_loop_niters): Likewise.
15018 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
15020 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15022 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
15023 to a vec<stmt_vec_info>.
15024 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
15025 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
15026 vec<stmt_vec_info>.
15027 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
15028 to a vec<stmt_vec_info>.
15029 (bst_traits::value_type, bst_traits::value_type): Likewise.
15030 (bst_traits::hash): Update accordingly.
15031 (vect_get_and_check_slp_defs): Change the stmts parameter from
15032 a vec<gimple *> to a vec<stmt_vec_info>.
15033 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
15034 (vect_build_slp_tree): Likewise.
15035 (vect_build_slp_tree_2): Likewise. Update uses of
15036 SLP_TREE_SCALAR_STMTS.
15037 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
15038 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
15039 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
15040 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
15041 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
15042 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
15043 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
15044 (vect_get_constant_vectors, vect_get_slp_defs)
15045 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
15046 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
15047 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
15048 instead of gimple stmts.
15049 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
15050 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
15051 (vect_slp_analyze_instance_dependence): Update uses of
15052 SLP_TREE_SCALAR_STMTS.
15053 (vect_slp_analyze_and_verify_node_alignment): Likewise.
15054 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
15055 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
15056 (get_initial_defs_for_reduction): Likewise.
15057 (vect_create_epilog_for_reduction): Likewise.
15058 (vectorize_fold_left_reduction): Likewise.
15059 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
15060 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
15061 (can_vectorize_live_stmts): Likewise.
15063 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15065 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
15066 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
15067 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
15069 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
15071 (gather_scalar_reductions): Update after above interface changes.
15072 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
15073 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
15075 (vect_force_simple_reduction): Likewise.
15076 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
15077 LOOP_VINFO_REDUCTIONS.
15078 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
15080 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15082 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
15083 a gimple stmt to a stmt_vec_info.
15084 * tree-vect-loop.c (vect_active_double_reduction_p)
15085 (vect_force_simple_reduction, vectorizable_reduction): Update
15088 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15090 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
15091 vec<gimple *> to a vec<stmt_vec_info>.
15092 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
15093 the reduction_phis argument from a vec<gimple *> to a
15094 vec<stmt_vec_info>.
15095 (vectorizable_reduction): Likewise the phis local variable that
15096 is passed to vect_create_epilog_for_reduction. Update for new type
15097 of SLP_TREE_VEC_STMTS.
15098 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
15099 (vectorizable_live_operation): Likewise.
15100 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
15101 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
15103 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15105 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
15106 a gimple stmt to a stmt_vec_info.
15107 (vectorizable_condition, vectorizable_live_operation)
15108 (vectorizable_reduction, vectorizable_induction): Pass back the
15109 vectorized statement as a stmt_vec_info.
15110 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
15111 use of STMT_VINFO_VEC_STMT.
15112 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
15113 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
15114 as stmt_vec_infos rather than gimple stmts.
15115 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
15116 to a stmt_vec_info.
15117 (vectorizable_live_operation): Likewise.
15118 (vectorizable_reduction, vectorizable_induction): Likewise,
15119 updating use of STMT_VINFO_VEC_STMT.
15120 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
15121 of STMT_VINFO_VEC_STMT.
15122 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
15123 (vectorizable_simd_clone_call, vectorizable_conversion)
15124 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
15125 (vectorizable_store, vectorizable_load, vectorizable_condition)
15126 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
15127 from a gimple stmt to a stmt_vec_info.
15128 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
15129 pointer to a stmt_vec_info to the vectorizable_* routines.
15131 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15133 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
15134 a gimple stmt to a stmt_vec_info.
15135 (is_pattern_stmt_p): Update accordingly.
15136 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
15137 (vect_record_grouped_load_vectors): Likewise.
15138 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
15139 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
15140 (vect_model_reduction_cost): Likewise.
15141 (vect_create_epilog_for_reduction): Likewise.
15142 (vectorizable_reduction, vectorizable_induction): Likewise.
15143 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
15144 Return the stmt_vec_info for the pattern statement.
15145 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
15146 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
15147 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
15148 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
15149 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
15150 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
15151 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
15152 (free_stmt_vec_info, vect_is_simple_use): Likewise.
15154 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15156 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
15157 (vect_finish_stmt_generation): Likewise.
15158 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
15159 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
15160 (vect_build_gather_load_calls): Use the return value of the above
15161 functions instead of a separate call to vinfo_for_stmt. Use narrow
15162 scopes for the input gimple stmt and wider scopes for the associated
15163 stmt_vec_info. Use vec_info::lookup_def when setting these
15164 stmt_vec_infos from an SSA_NAME definition.
15165 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
15166 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
15167 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
15168 (vectorizable_store, vectorizable_load, vectorizable_condition)
15169 (vectorizable_comparison): Likewise.
15170 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
15171 (vectorizable_reduction): Likewise.
15173 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15175 * tree-vectorizer.h (vect_is_simple_use): Add an optional
15176 stmt_vec_info * parameter before the optional gimple **.
15177 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
15178 (process_use, vect_get_vec_def_for_operand_1): Update callers.
15179 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
15180 * tree-vect-loop.c (vectorizable_reduction): Likewise.
15181 (vectorizable_live_operation): Likewise.
15182 * tree-vect-patterns.c (type_conversion_p): Likewise.
15183 (vect_look_through_possible_promotion): Likewise.
15184 (vect_recog_rotate_pattern): Likewise.
15185 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
15187 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15189 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
15190 a typedef to a wrapper class.
15191 (NULL_STMT_VEC_INFO): New macro.
15192 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
15193 (stmt_vec_info::operator*): New function.
15194 (stmt_vec_info::operator gimple *): Likewise.
15195 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
15196 (add_stmt_costs): Likewise.
15197 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
15198 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
15199 (vect_get_known_peeling_cost): Likewise.
15200 (vect_estimate_min_profitable_iters): Likewise.
15201 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
15202 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
15203 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
15204 (vectorizable_store, free_stmt_vec_infos): Likewise.
15205 (new_stmt_vec_info): Change return type of xcalloc to
15208 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15210 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
15211 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
15212 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
15213 a single_imm_use-based sequence.
15214 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
15216 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15218 * tree-vectorizer.h (vec_info::lookup_def): Declare.
15219 * tree-vectorizer.c (vec_info::lookup_def): New function.
15220 * tree-vect-patterns.c (vect_get_internal_def): Use it.
15221 (vect_widened_op_tree): Likewise.
15222 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
15223 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
15224 (vectorizable_reduction): Likewise.
15225 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
15227 (vect_is_slp_reduction): Update calls accordingly. Use
15228 vec_info::lookup_def.
15229 (vect_is_simple_reduction): Likewise
15230 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
15232 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15234 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
15235 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
15236 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
15238 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
15239 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
15240 (vect_update_vf_for_slp, vect_analyze_loop_operations)
15241 (vect_is_slp_reduction, vectorizable_induction)
15242 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
15243 * tree-vect-patterns.c (vect_init_pattern_stmt):
15244 (vect_determine_min_output_precision_1, vect_determine_precisions)
15245 (vect_pattern_recog): Likewise.
15246 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
15247 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
15248 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
15249 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
15250 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
15251 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
15252 info field from a loop to a loop_vec_info.
15254 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15256 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
15257 (vec_info::add_stmt): Declare.
15258 * tree-vectorizer.c (vec_info::add_stmt): New function.
15259 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
15260 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
15261 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
15262 (vectorizable_induction): Likewise.
15263 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
15264 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
15265 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
15266 (vectorizable_load): Likewise.
15267 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
15268 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
15269 (vect_recog_gather_scatter_pattern): Likewise.
15270 (append_pattern_def_seq): Likewise. Remove a check that is
15271 performed by add_stmt itself.
15273 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15275 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
15276 which make_ssa_name was called with new_stmt before new_stmt
15279 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15281 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
15283 (vect_is_slp_reduction): ...here...
15284 (vect_is_simple_reduction): ...and here. Remove repetition of tests
15285 that are already known to be false.
15287 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15289 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
15290 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
15291 STMT_VINFO_NUM_SLP_USES when it's true.
15292 (vect_free_slp_instance): Add a final_p parameter and pass it to
15293 vect_free_slp_tree.
15294 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
15295 (vect_analyze_slp_instance): Likewise.
15296 (vect_slp_analyze_operations): Likewise.
15297 (vect_slp_analyze_bb_1): Likewise.
15298 * tree-vectorizer.c (vec_info): Likewise.
15299 * tree-vect-loop.c (vect_transform_loop): Likewise.
15301 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15303 * tree-vect-loop.c (vectorizable_reduction): Assert that the
15304 function is not called for second and subsequent members of
15307 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15309 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
15310 cases for nested loops from here to ...
15311 (vect_create_epilog_for_reduction): ...here. Only call
15312 vect_is_simple_use for inner-loop reductions.
15314 2018-07-31 Martin Liska <mliska@suse.cz>
15316 PR gcov-profile/85338
15317 PR gcov-profile/85350
15318 PR gcov-profile/85372
15319 * profile.c (struct location_triplet): New.
15320 (struct location_triplet_hash): Likewise.
15321 (output_location): Do not output a BB that
15322 is already recorded for a line.
15323 (branch_prob): Use streamed_locations.
15325 2018-07-31 Martin Liska <mliska@suse.cz>
15327 PR gcov-profile/85370
15328 * coverage.c (coverage_begin_function): Do not mark target
15329 clones as artificial functions.
15331 2018-07-31 Martin Liska <mliska@suse.cz>
15333 PR gcov-profile/83813
15334 PR gcov-profile/84758
15335 PR gcov-profile/85217
15336 PR gcov-profile/85332
15337 * profile.c (branch_prob): Do not record GOTO expressions
15338 for GIMPLE statements which locations are already streamed.
15340 2018-07-31 Olivier Hainque <hainque@adacore.com>
15342 * gcc.c (handle_spec_function): Accept a soft_matched_part
15343 argument, as do_spec_1. Pass it down to ...
15344 (eval_spec_function): Accept a soft_matched_part argument,
15345 and pass it down to ...
15346 (do_spec_2): Accept a soft_matched_part argument, and pass
15347 it down to do_spec_1.
15348 (do_spec_1): Pass soft_matched_part to handle_spec_function.
15349 (handle_braces): Update call to handle_spec_function.
15350 (driver::set_up_specs): Update calls to do_spec_2.
15351 (compare_debug_dump_opt_spec_function): Likewise.
15352 (compare_debug_self_opt_spec_function): Likewise.
15354 2018-07-31 Olivier Hainque <hainque@adacore.com>
15356 * common.opt (nolibc): New option.
15357 * doc/invoke.texi (Link Options): Document it.
15358 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
15359 * config/alpha/linux.h: Likewise.
15360 * config/arc/elf.h: Likewise.
15361 * config/arm/uclinux-elf.h: Likewise.
15362 * config/arm/unknown-elf.h: Likewise.
15363 * config/avr/avrlibc.h: Likewise.
15364 * config/bfin/bfin.h: Likewise.
15365 * config/bfin/linux.h: Likewise.
15366 * config/bfin/uclinux.h: Likewise.
15367 * config/darwin.h: Likewise.
15368 * config/darwin10.h: Likewise.
15369 * config/darwin12.h: Likewise.
15370 * config/gnu-user.h: Likewise.
15371 * config/lm32/uclinux-elf.h: Likewise.
15372 * config/pa/pa-hpux11.h: Likewise.
15373 * config/pa/pa64-hpux.h: Likewise.
15374 * config/sparc/sparc.h: Likewise.
15376 2018-07-31 Olivier Hainque <hainque@adacore.com>
15378 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
15379 undefined variables.
15381 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
15384 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
15385 instead of GEN_INT.
15387 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
15389 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
15390 terminated string literal.
15392 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
15394 PR rtl-optimization/85160
15395 * combine.c (is_just_move): New function.
15396 (try_combine): Allow combining two instructions into two if neither of
15397 the original instructions was a move.
15399 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
15402 * doc/extend.texi (Global Register Variables): Discourage use of type
15404 (Local Register Variables): Likewise.
15406 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
15408 PR tree-optimization/86506
15409 * hwint.h (ceil_log2): Resync with hwint.c implementation.
15411 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
15414 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
15415 hard_regno, make sure no insn between `from` and `to` clobbers it.
15417 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
15418 Tom de Vries <tdevries@suse.de>
15420 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
15421 (PTX_DEFAULT_RUNTIME_DIM): ... this.
15422 (nvptx_goacc_validate_dims): Set default worker and gang dims to
15423 PTX_DEFAULT_RUNTIME_DIM.
15424 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
15426 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
15428 * config/pa/pa.c (pa_output_addr_vec): Align address table.
15429 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
15430 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
15432 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
15434 * config/rs6000/constraints.md (wG constraint): Delete, no longer
15436 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
15437 predicate to reflect toc fusion has been deleted.
15438 (toc_fusion_mem_raw): Delete, no longer used.
15439 (toc_fusion_mem_wrapped): Likewise.
15440 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
15442 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
15443 Delete, no longer used.
15444 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
15445 meant to be used for toc fusion.
15446 (rs6000_debug_print_mode): Delete toc fusion debugging.
15447 (rs6000_debug_reg_global): Likewise.
15448 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
15449 fusion and secondary reload support that were never used.
15450 (rs6000_option_override_internal): Delete TOC fusion, that was only
15451 partially defined, and it did not work unless you also used the
15453 (rs6000_legitimate_address_p): Delete TOC fusion support.
15454 (rs6000_opt_masks): Likewise.
15455 (fusion_wrap_memory_address): Delete function, no longer used.
15456 (fusion_split_address); Delete TOC fusion support.
15457 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
15458 longer used with toc fusion being deleted.
15459 (TARGET_TOC_FUSION_FP): Likewise.
15460 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
15462 (toc fusion spliter): Delete TOC fusion support.
15463 (toc_fusionload_<mode>): Likewise.
15464 (toc_fusionload_di): Likewise.
15465 (fusion_gpr_load_<mode>): Delete generator function, this insn no
15466 longer needs to be named. Rename predicate to delete TOC fusion.
15467 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
15468 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
15469 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
15470 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
15471 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
15473 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
15475 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
15476 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
15477 __int128 in built-in function prototypes.
15478 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
15479 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
15481 2018-07-27 Martin Sebor <msebor@redhat.com>
15483 PR tree-optimization/86696
15484 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
15485 types, including enums.
15486 (handle_char_store): Be prepared for the above function to fail.
15488 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
15490 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
15491 when optimization level is lower than 2 or optimize for size.
15493 2018-07-26 Martin Sebor <msebor@redhat.com>
15495 PR tree-optimization/86043
15496 PR tree-optimization/86042
15497 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
15498 (get_string_cst_length): Rename...
15499 (get_min_string_length): ...to this. Add argument.
15500 (handle_char_store): Extend to handle multi-character stores by
15502 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
15503 * tree.h (initializer_zerop): Add argument.
15505 2018-07-26 Jakub Jelinek <jakub@redhat.com>
15507 PR middle-end/86660
15508 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
15509 declare target to variables if they have always,{to,from,tofrom} map
15512 2018-07-26 Martin Liska <mliska@suse.cz>
15515 * lto-wrapper.c: Add linker_output as prefix
15516 for ltrans_output_file.
15518 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
15520 PR rtl-optimization/85805
15521 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
15522 value for hard registers if that was written in the same mode.
15524 2018-07-26 Martin Liska <mliska@suse.cz>
15526 PR gcov-profile/86536
15527 * gcov.c (format_gcov): Use printf format %.*f directly
15528 and do not handle special values.
15530 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
15532 * common/config/arc/arc-common.c (arc_option_optimization_table):
15533 Update default optimizations for size.
15535 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
15537 * config/arc/arc.md (movsf_insn): Add short instruction selection.
15538 * config/arc/constraints.md (CfZ): New constraint.
15539 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
15540 (subsf3_fpu): Likewise.
15541 (cmpsf_fpu): Likewise.
15542 (cmpsf_fpu_uneq): Likewise.
15544 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
15546 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
15548 (arc_is_uncached_mem_p): uncached applies to both the variable and
15551 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
15553 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
15556 2018-07-25 David Malcolm <dmalcolm@redhat.com>
15558 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
15559 field "m_scopes" from vec to auto_vec.
15561 2018-07-25 Martin Liska <mliska@suse.cz>
15563 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
15566 2018-07-25 Richard Biener <rguenther@suse.de>
15569 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
15570 special wrt context_die late.
15571 (gen_subprogram_die): Re-use DIEs in local scope.
15573 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
15575 PR tree-optimization/86644
15576 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
15578 2018-07-25 Martin Liska <mliska@suse.cz>
15580 PR middle-end/86645
15581 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
15582 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
15584 2018-07-25 Martin Liska <mliska@suse.cz>
15587 * params.def: Explain ASan abbreviation and provide
15588 a documentation link.
15590 2018-07-24 Martin Sebor <msebor@redhat.com>
15592 PR tree-optimization/86622
15593 PR tree-optimization/86532
15594 * builtins.h (string_length): Declare.
15595 * builtins.c (c_strlen): Correct handling of non-constant offsets.
15596 (check_access): Be prepared for non-constant length ranges.
15597 (string_length): Make extern.
15598 * expr.c (string_constant): Only handle the minor non-constant
15599 array index. Use string_constant to compute the length of
15600 a generic string constant.
15602 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
15604 PR tree-optimization/86618
15605 * tree-vect-stmts.c (vectorizable_call): Don't take the address
15606 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
15608 2018-07-24 David Malcolm <dmalcolm@redhat.com>
15610 PR tree-optimization/86636
15611 * json.cc (json::object::set): Fix comment. Add assertions.
15612 (json::array::append): Move here from json.h. Add comment and an
15614 (json::string::string): Likewise.
15615 * json.h (json::array::append): Move to json.cc.
15616 (json::string::string): Likewise.
15617 * optinfo-emit-json.cc
15618 (optrecord_json_writer::impl_location_to_json): Assert that we
15619 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
15620 wrapper around it. Expand the location once, rather than three
15622 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
15623 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
15625 (optrecord_json_writer::optinfo_to_json): Likewise, in four
15626 places. Fix some overlong lines.
15628 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
15630 * config/aarch64/aarch64-simd.md
15631 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
15632 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
15633 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
15634 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
15635 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
15636 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
15637 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
15638 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
15639 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
15641 2018-07-24 Jakub Jelinek <jakub@redhat.com>
15643 PR middle-end/86627
15644 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
15645 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
15646 and abs_d == d, do the power of two handling if profitable.
15648 2018-07-24 Richard Biener <rguenther@suse.de>
15650 * match.pd: Add BIT_FIELD_REF canonicalizations.
15652 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
15655 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
15657 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
15659 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
15660 terminated STRING_CST object.
15662 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
15664 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
15666 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
15668 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
15669 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
15670 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
15671 the elements into a register.
15672 (rs6000_split_v4si_init_di_reg): Delete.
15673 (rs6000_split_v4si_init): Delete.
15674 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
15675 (vsx_init_v4si): Rewrite as a define_expand.
15677 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
15679 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
15680 zero_extend argument from memory): New.
15682 2018-07-22 Martin Sebor <msebor@redhat.com>
15685 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
15686 diagnosing calls with unknown arguments unless -Walloca-larger-than
15687 is restricted to less than PTRDIFF_MAX bytes.
15689 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
15691 * doc/gcov.texi (Invoking Gcov): Editorial changes.
15693 2018-07-20 David Malcolm <dmalcolm@redhat.com>
15695 * pretty-print.c (text_info::set_location): Remove redundant
15696 "line_table" parameter from call to rich_location::set_range.
15698 2018-07-20 Martin Sebor <msebor@redhat.com>
15700 PR middle-end/82063
15701 * builtins.c (expand_builtin_alloca): Adjust.
15702 * calls.c (alloc_max_size): Simplify.
15703 * cgraphunit.c (cgraph_node::expand): Adjust.
15704 * common.opt (larger_than_size, warn_frame_larger_than): Remove
15706 (frame_larger_than_size): Same.
15707 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
15708 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
15710 * doc/invoke.texi (GCC Command Options): Document option arguments.
15711 Explain byte-size arguments and suffixes.
15712 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
15713 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
15714 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
15715 * doc/options.texi (UInteger): Expand.
15716 (Host_Wide_Int, ByteSize): Document new properties.
15717 * final.c (final_start_function_1): Include sizes in an error message.
15718 * function.c (frame_offset_overflow): Same.
15719 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
15720 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
15721 Diagnose unbounded alloca calls only for limits of less than
15723 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
15724 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
15726 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
15727 only for limits of less than PTRDIFF_MAX.
15728 * langhooks-def.h (lhd_handle_option): Change function argument
15730 * langhooks.c (lhd_handle_option): Same.
15731 * langhooks.h (handle_option): Same.
15732 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
15734 (var_type, var_type_struct): Same.
15735 (var_set): Handle ByteSize flag.
15736 * optc-gen.awk: Add comments to output to ease debugging. Make
15737 use of HOST_WIDE_INT where appropriate.
15738 * opts-gen-save.awk: Use %lx to format unsigned long.
15739 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
15740 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
15741 arguments. Parse bytes-size suffixes.
15742 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
15743 (enum_value_to_arg): Same.
15744 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
15745 (handle_option): Adjust.
15746 (generate_option): Change function argument to HOST_WIDE_INT.
15747 (cmdline_handle_error): Adjust.
15748 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
15749 (set_option): Change function argument to HOST_WIDE_INT.
15750 (option_enabled): Handle cl_host_wide_int.
15751 (get_option_state): Handle CLVC_SIZE.
15752 (control_warning_option): Same.
15753 * opts.c (common_handle_option): Change function argument to
15754 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
15755 OPT_Wvla_larger_than_.
15756 * opts.h (enum cl_var_type): Add an enumerator.
15757 * stor-layout.c (layout_decl): Print a more meaningful warning.
15758 * toplev.c (output_stack_usage): Adjust.
15760 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
15762 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
15763 call to inline_expand_builtin_string_cmp.
15764 (expand_builtin_strcmp): Likewise.
15765 (expand_builtin_strncmp): Likewise.
15766 (inline_string_cmp): Delete the last parameter, change char_type_node
15767 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
15769 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
15770 the inlining expansion on target where the type of the call has same or
15771 narrower precision than unsigned char.
15773 2018-07-20 David Malcolm <dmalcolm@redhat.com>
15775 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
15776 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
15777 * common.opt (fsave-optimization-record): New option.
15778 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
15779 * doc/invoke.texi (-fsave-optimization-record): New option.
15780 * dumpfile.c: Include "optinfo-emit-json.h".
15781 (struct kv_pair): Move to coretypes.h.
15782 (optgroup_options): Make non-static.
15783 (dump_context::end_scope): Call
15784 optimization_records_maybe_pop_dump_scope.
15785 * dumpfile.h (optgroup_options): New decl.
15786 * json.cc: New file.
15787 * json.h: New file.
15788 * optinfo-emit-json.cc: New file.
15789 * optinfo-emit-json.h: New file.
15790 * optinfo.cc: Include "optinfo-emit-json.h".
15791 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
15792 (optinfo_enabled_p): Check optimization_records_enabled_p.
15793 (optinfo_wants_inlining_info_p): Likewise.
15794 * optinfo.h: Update comment.
15795 * profile-count.c (profile_quality_as_string): New function.
15796 * profile-count.h (profile_quality_as_string): New decl.
15797 (profile_count::quality): New accessor.
15798 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
15799 and optinfo_emit_json_cc_tests.
15800 * selftest.h (selftest::json_cc_tests): New decl.
15801 (selftest::optinfo_emit_json_cc_tests): New decl.
15802 * toplev.c: Include "optinfo-emit-json.h".
15803 (compile_file): Call optimization_records_finish.
15804 (do_compile): Call optimization_records_start.
15805 * tree-ssa-live.c: Include optinfo.h.
15806 (remove_unused_scope_block_p): Retain inlining information if
15807 optinfo_wants_inlining_info_p returns true.
15809 2018-07-20 Richard Biener <rguenther@suse.de>
15812 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
15813 to cover -flto-partition=none.
15815 2018-07-20 Martin Liska <mliska@suse.cz>
15817 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
15818 (get_decl_source_range): Remove unused function.
15820 2018-07-20 Richard Biener <rguenther@suse.de>
15822 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
15823 (struct vn_phi_s): Likewise.
15824 (struct vn_reference_s): Likewise.
15825 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
15826 for searching the slot of an entry known to be in the hash itself.
15827 (vn_phi_hasher::equal): Likewise.
15828 (vn_reference_hasher::equal): Likewise.
15829 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
15831 (optimistic_info, current_info): Remove, keeping only valid_info.
15832 (vn_reference_lookup_1): Remove fallback lookup.
15833 (vn_reference_lookup_2): Likewise.
15834 (vn_nary_op_lookup_1): Likewise.
15835 (vn_phi_lookup): Likewise.
15836 (vn_nary_build_or_lookup_1): Make sure to not chain the built
15838 (vn_reference_insert): Adjust, chain the inserted hash element
15839 at last_inserted_ref.
15840 (vn_reference_insert_pieces): Likewise.
15841 (visit_reference_op_call): Likewise.
15842 (vn_nary_op_insert_into): Chain the inserted hash element at
15843 last_inserted_nary.
15844 (vn_nary_op_insert_pieces): Adjust.
15845 (vn_nary_op_insert): Likewise.
15846 (vn_nary_op_insert_stmt): Likewise.
15847 (vn_phi_insert): Adjust, chain the inserted hash element at
15849 (process_scc): Remove clearing and copying the optimistic
15850 table. Instead remove elements inserted during an optimistic
15851 iteration from the single table we maintain.
15852 (init_scc_vn): Adjust.
15853 (free_scc_vn): Likewise.
15854 (sccvn_dom_walker::record_cond): Likewise.
15855 (sccvn_dom_walker::after_dom_children): Likewise.
15857 2018-07-19 Martin Sebor <msebor@redhat.com>
15859 PR tree-optimization/84047
15860 PR tree-optimization/83776
15861 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
15862 (check_array_bounds): Call it.
15864 2018-07-19 Martin Sebor <msebor@redhat.com>
15866 * align.h (align_flags): Use member initialization.
15868 2018-07-19 David Malcolm <dmalcolm@redhat.com>
15870 * Makefile.in (OBJS): Add optinfo.o.
15871 * coretypes.h (class symtab_node): New forward decl.
15872 (struct cgraph_node): New forward decl.
15873 (class varpool_node): New forward decl.
15874 * dump-context.h: New file.
15875 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
15877 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
15878 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
15879 (set_alt_dump_file): Likewise.
15880 (dump_context::~dump_context): New dtor.
15881 (dump_gimple_stmt): Move implementation to...
15882 (dump_context::dump_gimple_stmt): ...this new member function.
15883 Add the stmt to any pending optinfo, creating one if need be.
15884 (dump_gimple_stmt_loc): Move implementation to...
15885 (dump_context::dump_gimple_stmt_loc): ...this new member function.
15886 Start a new optinfo and add the stmt to it.
15887 (dump_gimple_expr): Move implementation to...
15888 (dump_context::dump_gimple_expr): ...this new member function.
15889 Add the stmt to any pending optinfo, creating one if need be.
15890 (dump_gimple_expr_loc): Move implementation to...
15891 (dump_context::dump_gimple_expr_loc): ...this new member function.
15892 Start a new optinfo and add the stmt to it.
15893 (dump_generic_expr): Move implementation to...
15894 (dump_context::dump_generic_expr): ...this new member function.
15895 Add the tree to any pending optinfo, creating one if need be.
15896 (dump_generic_expr_loc): Move implementation to...
15897 (dump_context::dump_generic_expr_loc): ...this new member
15898 function. Add the tree to any pending optinfo, creating one if
15900 (dump_printf): Move implementation to...
15901 (dump_context::dump_printf_va): ...this new member function. Add
15902 the text to any pending optinfo, creating one if need be.
15903 (dump_printf_loc): Move implementation to...
15904 (dump_context::dump_printf_loc_va): ...this new member function.
15905 Start a new optinfo and add the stmt to it.
15906 (dump_dec): Move implementation to...
15907 (dump_context::dump_dec): ...this new member function. Add the
15908 value to any pending optinfo, creating one if need be.
15909 (dump_context::dump_symtab_node): New member function.
15910 (dump_context::get_scope_depth): New member function.
15911 (dump_context::begin_scope): New member function.
15912 (dump_context::end_scope): New member function.
15913 (dump_context::ensure_pending_optinfo): New member function.
15914 (dump_context::begin_next_optinfo): New member function.
15915 (dump_context::end_any_optinfo): New member function.
15916 (dump_context::s_current): New global.
15917 (dump_context::s_default): New global.
15918 (dump_scope_depth): Delete global.
15919 (dumpfile_ensure_any_optinfo_are_flushed): New function.
15920 (dump_symtab_node): New function.
15921 (get_dump_scope_depth): Reimplement in terms of dump_context.
15922 (dump_begin_scope): Likewise.
15923 (dump_end_scope): Likewise.
15924 (selftest::temp_dump_context::temp_dump_context): New ctor.
15925 (selftest::temp_dump_context::~temp_dump_context): New dtor.
15926 (selftest::verify_item): New function.
15927 (ASSERT_IS_TEXT): New macro.
15928 (ASSERT_IS_TREE): New macro.
15929 (ASSERT_IS_GIMPLE): New macro.
15930 (selftest::test_capture_of_dump_calls): New test.
15931 (selftest::dumpfile_c_tests): Call it.
15932 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
15933 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
15934 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
15935 descriptive comment.
15936 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
15937 (dump_node, dump_bb): Move these unrelated decls.
15938 (class dump_manager): Add leading comment.
15939 * optinfo.cc: New file.
15940 * optinfo.h: New file.
15942 2018-07-19 Michael Collison <michael.collison@arm.com>
15943 Richard Henderson <rth@redhat.com>
15945 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
15946 (subti): Handle op1 zero.
15947 (subvti4, usub4ti4): New.
15948 (*sub<GPI>3_compare1_imm): New.
15949 (sub<GPI>3_carryinCV): New.
15950 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
15951 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
15953 2018-07-19 Michael Collison <michael.collison@arm.com>
15954 Richard Henderson <rth@redhat.com>
15956 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
15957 (addti3): Create simpler code if low part is already known to be 0.
15958 (addvti4, uaddvti4): New.
15959 (*add<GPI>3_compareC_cconly_imm): New.
15960 (*add<GPI>3_compareC_cconly): New.
15961 (*add<GPI>3_compareC_imm): New.
15962 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
15963 handle constants within this pattern..
15964 (*add<GPI>3_compareV_cconly_imm): New.
15965 (*add<GPI>3_compareV_cconly): New.
15966 (*add<GPI>3_compareV_imm): New.
15967 (add<GPI>3_compareV): New.
15968 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
15969 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
15970 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
15971 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
15972 with 'comparison' operator.
15973 (*add<GPI>3_compareV_cconly_imm): Ditto.
15974 (*add<GPI>3_compareV_cconly): Ditto.
15975 (*add<GPI>3_compareV_imm): Ditto.
15976 (add<GPI>3_compareV): Ditto.
15977 (add<mode>3_carryinC): Ditto.
15978 (*add<mode>3_carryinC_zero): Ditto.
15979 (*add<mode>3_carryinC): Ditto.
15980 (add<mode>3_carryinV): Ditto.
15981 (*add<mode>3_carryinV_zero): Ditto.
15982 (*add<mode>3_carryinV): Ditto.
15984 2018-07-19 Michael Collison <michael.collison@arm.com>
15985 Richard Henderson <rth@redhat.com>
15987 * config/aarch64/aarch64-modes.def (CC_V): New.
15988 * config/aarch64/aarch64-protos.h
15989 (aarch64_addti_scratch_regs): Declare
15990 (aarch64_subvti_scratch_regs): Declare.
15991 (aarch64_expand_subvti): Declare.
15992 (aarch64_gen_unlikely_cbranch): Declare
15993 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
15994 for signed overflow using CC_Vmode.
15995 (aarch64_get_condition_code_1): Handle CC_Vmode.
15996 (aarch64_gen_unlikely_cbranch): New function.
15997 (aarch64_addti_scratch_regs): New function.
15998 (aarch64_subvti_scratch_regs): New function.
15999 (aarch64_expand_subvti): New function.
16001 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
16003 * config/aarch64/aarch64-option-extensions.def: New entry for profile
16005 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
16006 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
16009 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
16012 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
16013 address check not strict.
16015 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
16017 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
16019 (store_pair_lanes<mode>): Likewise.
16020 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
16021 enum value 'ADDR_QUERY_LDP_STP_N'.
16022 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
16023 (aarch64_print_address_internal): Add declaration.
16024 (aarch64_print_ldpstp_address): Remove.
16025 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
16026 (aarch64_print_operand): Change printing of 'y'.
16027 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
16028 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
16029 'true' rather than '1'.
16030 * config/aarch64/constraints.md (Uml): Likewise.
16031 (Uml): Rename to Umn.
16034 2018-07-19 Richard Biener <rguenther@suse.de>
16036 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
16038 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
16039 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
16040 (vn_reference_hasher): Likewise.
16041 (struct vn_tables_s): Remove obstack and alloc-pool members.
16042 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
16043 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
16044 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
16045 (vn_reference_insert_pieces): Likewise.
16046 (alloc_vn_nary_op_noinit): Adjust.
16047 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
16048 (vn_phi_eq): Adjust.
16049 (shared_lookup_phiargs): Remove.
16050 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
16051 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
16052 (visit_reference_op_call): Likewise.
16053 (copy_nary, copy_phi, copy_reference): Remove.
16054 (process_scc): Rewind the obstack when iterating. Do not
16055 copy the elements to valid_info but just move them from one
16056 hashtable to the other.
16057 (allocate_vn_table): Adjust.
16058 (free_vn_table): Likewise.
16059 (init_scc_vn): Likewise.
16060 (free_scc_vn): Likewise.
16062 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
16065 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
16066 indirect_return as function type attribute.
16067 (ix86_attribute_table): Change indirect_return to function
16069 * doc/extend.texi: Update indirect_return attribute.
16071 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
16073 * wide-int.h (widest2_int): New.
16074 * gimple-fold.c (arith_overflowed_p): Use it.
16075 * tree.h (widest2_int_cst): New.
16076 * tree-vrp.c (wide_int_binop_overflow): Rename from
16077 vrp_int_const_binop.
16078 Rewrite to work on trees.
16079 (extract_range_from_multiplicative_op_1): Abstract code to...
16080 (wide_int_range_min_max): ...here.
16081 (wide_int_range_cross_product): ...and here.
16082 (extract_range_from_binary_expr_1): Abstract overflow code to...
16083 (wide_int_range_mult_wrapping): ...here.
16084 * tree-vrp.h (wide_int_range_cross_product): New.
16085 (wide_int_range_mult_wrapping): New.
16087 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
16088 Julia Koval <julia.koval@intel.com>
16090 * config/i386/x86-tune-costs.h (skylake_memcpy,
16091 skylake_memset): Replace rep_prefix with unrolling for size 512.
16093 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
16095 PR middle-end/86544
16096 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
16097 comparision with EQ_EXPR in last stmt.
16099 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
16101 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
16102 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
16103 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
16104 previously known as "PowerPC AltiVec Built-in Functions". Move
16105 some material to new subsubsections "PowerPC AltiVec Built-in
16106 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
16108 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
16109 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
16110 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
16111 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
16113 2018-07-18 Richard Biener <rguenther@suse.de>
16115 PR tree-optimization/86557
16116 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
16119 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
16121 * config/s390/s390.c (s390_function_profiler): Generate CFI.
16123 2018-07-17 Jeff Law <law@redhat.com>
16125 * config/arm/arm.c (get_label_padding): Update for recent
16126 changes to label_to_alignment.
16128 PR tree-optimization/86010
16129 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
16131 * config/mips/mips.c (vr4130_align_insns): Update for recent
16132 changes to label_to_alignment.
16134 * config/frv/frv.c (frv_label_align): Update for recent changes
16135 to label_to_alignment.
16137 * config/nios2/nios2.c (nios2_label_align): Update for recent
16138 changes which dropped ALIGN_LABELS_LOG.
16140 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
16142 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
16143 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
16145 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
16147 * config/arc/arc.c (arc_label_align): Use align_labels instead of
16148 deprecated align_labels_log.
16150 2018-07-17 Richard Biener <rguenther@suse.de>
16153 * dwarf2out.c (init_sections_and_labels): Always generate
16154 a debug_line_str_section for early LTO debug.
16155 (dwarf2out_finish): Reset debug_line_str_hash output early.
16156 Bump counter for extra dwarf5 .debug_loc labels to not conflict
16158 (dwarf2out_early_finish): Output debug_line_str.
16160 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
16162 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
16163 index register on z196 or later.
16165 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
16167 * config/s390/s390.c (s390_default_align): Set default function
16169 (s390_override_options_after_change): Call s390_default align.
16170 (s390_option_override_internal): Call s390_default_align.
16171 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
16173 2018-07-17 Jakub Jelinek <jakub@redhat.com>
16175 PR middle-end/86542
16176 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
16177 to _looptemp_ clauses, other than the first two.
16179 2018-07-17 Martin Liska <mliska@suse.cz>
16181 * opts.c: Do not enable OPT_falign_* for -Os.
16183 2018-07-17 Martin Liska <mliska@suse.cz>
16185 * align.h (MAX_CODE_ALIGN): New.
16186 (MAX_CODE_ALIGN_VALUE): New.
16187 * common/config/i386/i386-common.c (ix86_handle_option):
16188 (MAX_CODE_ALIGN): Moved to align.h.
16189 * final.c (MAX_CODE_ALIGN): Likewise.
16190 * opts.c (parse_and_check_align_values):
16191 (MAX_CODE_ALIGN): Likewise.
16192 (MAX_CODE_ALIGN_VALUE): Likewise.
16194 2018-07-17 Martin Liska <mliska@suse.cz>
16196 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
16197 in order to fulfil coding style.
16198 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
16199 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
16200 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
16201 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
16202 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
16203 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
16204 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
16205 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
16206 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
16208 2018-07-17 Martin Liska <mliska@suse.cz>
16210 * align.h: New file.
16211 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
16213 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
16214 align_flags of label_to_alignment.
16215 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
16217 * config/m68k/m68k.c: Do not use removed align_labels_value and
16219 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
16220 (LOOP_ALIGN): Likewise.
16221 (LABEL_ALIGN): Likewise.
16222 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
16223 Remove not used macro.
16224 (rs6000_loop_align): Change return type to align_flags.
16225 (rs6000_loop_align_max_skip): Remove.
16226 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
16227 Change return type to align_flags.
16228 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
16229 Remove not used macro.
16230 (rs6000_loop_align): Change return type to align_flags.
16231 (rs6000_loop_align_max_skip): Remove.
16232 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
16233 * config/rx/rx-protos.h (rx_align_for_label): Make it
16235 * config/rx/rx.c (rx_align_for_label): Change return type
16237 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
16239 into align_flags class.
16240 (LABEL_ALIGN): Likewise.
16241 (LOOP_ALIGN): Likewise.
16242 * config/s390/s390.c (s390_label_align): Use align_flags
16244 (s390_asm_output_function_label): Likewise.
16245 * config/sh/sh.c (sh_override_options_after_change):
16246 Use align_flags class directly without macros.
16247 (find_barrier): Likewise.
16248 (barrier_align): Likewise.
16249 (sh_loop_align): Likewise.
16250 * config/spu/spu.c (spu_option_override):
16251 Use align_flags_tuple::get_value instead of removed macros.
16252 (spu_sched_init): Likewise.
16253 * config/spu/spu.h (GTY): Likewise.
16254 * config/visium/visium.c (visium_option_override):
16255 Set "8" as default secondary alignment.
16256 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
16257 in order to guarantee secondary alignment of 8.
16258 * coretypes.h: Include align.h header file.
16259 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
16260 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
16261 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
16262 * doc/tm.texi.in: Likewise.
16263 * final.c (struct label_alignment): Remove not used structure.
16264 (LABEL_ALIGN): Change type to align_flags.
16265 (LOOP_ALIGN): Likewise.
16266 (JUMP_ALIGN): Likewise.
16267 (default_loop_align_max_skip): Remove.
16268 (default_label_align_max_skip): Likewise.
16269 (default_jump_align_max_skip): Likewise.
16270 (default_label_align_after_barrier_max_skip):
16271 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
16272 (LABEL_TO_MAX_SKIP): Remove.
16273 (label_to_alignment): Return align_flags type instead of integer.
16274 (label_to_max_skip): Remove.
16275 (align_fuzz): Use align_flags type.
16276 (compute_alignments): Use align_flags type and use align_flags::max
16277 to combine multiple alignments.
16278 (grow_label_align): Grow vec instead of C array.
16279 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
16280 (shorten_branches): Use align_flags type and use align_flags::max
16281 to combine multiple alignments.
16282 (final_scan_insn_1): Remove usage of secondary alignment that comes
16283 from label alignment, but instead use proper secondary alignment
16284 which is computed in grow_label_align.
16285 * flags.h (struct align_flags_tuple): Move to align.h.
16286 (struct align_flags): Likewise.
16287 (state_align_loops): Rename to align_loops.
16288 (state_align_jumps): Rename to align_jumps.
16289 (state_align_labels): Rename to align_labels.
16290 (state_align_functions): Rename to align_functions.
16291 (align_loops_log): Remove.
16292 (align_jumps_log): Remove.
16293 (align_labels_log): Remove.
16294 (align_functions_log): Remove.
16295 (align_loops_max_skip): Remove.
16296 (align_jumps_max_skip): Remove.
16297 (align_labels_max_skip): Remove.
16298 (align_functions_max_skip): Remove.
16299 (align_loops_value): Remove.
16300 (align_jumps_value): Remove.
16301 (align_labels_value): Remove.
16302 (align_functions_value): Remove.
16303 * output.h (label_to_alignment): Change return type to align_flags.
16304 (label_to_max_skip): Remove.
16305 * target.def: Remove loop_align_max_skip, label_align_max_skip,
16306 jump_align_max_skip macros.
16307 * targhooks.h (default_loop_align_max_skip): Remove.
16308 (default_label_align_max_skip): Likewise.
16309 (default_jump_align_max_skip): Likewise.
16310 (default_label_align_after_barrier_max_skip): Remove.
16311 * toplev.c (read_log_maxskip): Use ::normalize function.
16312 (parse_N_M): Remove not used argument and also call ::normalize.
16313 (parse_alignment_opts): Do not pass unused arguments.
16314 * varasm.c (assemble_start_function): Use directly align_functions
16315 instead of removed macros.
16316 * system.h: Do not poison removed macros.
16318 2018-07-17 Jakub Jelinek <jakub@redhat.com>
16320 PR middle-end/86539
16321 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
16322 and cond temporaries don't have reference type if iterator has
16323 pointer type. For init use &for_pre_body instead of pre_p if
16324 for_pre_body is non-empty.
16326 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
16328 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
16329 double-double modes to SFmode directly directly.
16330 (trunc<mode>sf2_fprs): Delete.
16332 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
16334 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
16335 for conversions between IFmode and the decimal floating point modes.
16336 (init_float128_ieee): Use the correct names for conversions between
16337 KFmode and the decimal floating point modes.
16339 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
16341 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
16342 for the conversions between TDmode and IFmode.
16343 (init_float128_ieee): Use more correct names for the conversions
16344 between TDmode and KFmode.
16346 2018-07-16 Jakub Jelinek <jakub@redhat.com>
16348 PR tree-optimization/86526
16349 * builtins.c (expand_builtin_memcmp): Formatting fixes.
16350 (inline_expand_builtin_string_cmp): Likewise.
16351 (inline_string_cmp): Likewise. Use c_readstr instead of
16352 builtin_memcpy_read_str. Add unit_mode temporary.
16354 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
16356 PR middle-end/86528
16357 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
16358 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
16360 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
16362 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
16363 Alphabetize prototypes of built-in functions, separating out
16364 built-in functions that are listed in this section but should be
16365 described elsewhere.
16367 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
16370 * expmed.c (emit_store_flag): Do not emit setcc followed by a
16371 conditional move when trapping comparison was split to a
16372 non-trapping one (and vice versa).
16374 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
16376 * config/s390/s390.c (s390_function_profiler): Generate nops
16377 instead of profiler call sequences.
16378 * config/s390/s390.opt: Add the new option.
16380 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
16382 * config/s390/s390.c (s390_function_profiler): Generate
16383 __mcount_loc section.
16384 * config/s390/s390.opt: Add the new option.
16386 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
16388 * common.opt: Add the new warning.
16389 * config/s390/s390.c (s390_function_profiler): Emit "brasl
16390 %r0,__fentry__" when -mfentry is specified.
16391 (s390_option_override_internal): Disallow -mfentry for 31-bit
16393 * config/s390/s390.opt: Add the new option.
16395 2018-07-16 Richard Biener <rguenther@suse.de>
16398 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
16399 for function-local FUNCTION_DECL and RESULT_DECL immediately.
16401 2018-07-16 Martin Liska <mliska@suse.cz>
16404 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
16407 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
16409 * config/arc/arcHS.md: Update ARCHS scheduling rules.
16411 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
16413 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
16415 * config/arc/arc-cpus.def (hs4x): New cpu.
16417 * config/arc/arc-tables.opt: Regenerate.
16418 * config/arc/arc.c (arc_sched_issue_rate): New function.
16419 (TARGET_SCHED_ISSUE_RATE): Define.
16420 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
16421 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
16423 (attr tune): Add ARCHS4x tune values.
16424 (attr tune_dspmpy): Define.
16425 (*tst): Correct instruction type.
16426 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
16427 * config/arc/arcHS4x.md: New file.
16428 * config/arc/fpu.md: Update instruction type attributes.
16429 * config/arc/t-multilib: Regenerate.
16431 2018-07-16 Tom de Vries <tdevries@suse.de>
16434 * var-tracking.c (vt_initialize): Fix pre_dec handling.
16436 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16438 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
16441 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
16443 PR tree-optimization/86514
16444 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
16445 conversion to a boolean type from a type with greater precision.
16447 2018-07-16 Tom de Vries <tdevries@suse.de>
16449 * var-tracking.c (vt_initialize): Print adjusted insn slim if
16450 dump_flags request TDF_SLIM.
16452 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
16454 * fold-const.c (int_const_binop_1): Abstract...
16455 (wide_int_binop): ...wide int code here.
16456 (poly_int_binop): ...poly int code here.
16457 Abstract the rest of int_const_binop_1 into int_const_binop.
16458 * fold-const.h (wide_int_binop): New.
16459 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
16460 Remove useless PLUS/MINUS_EXPR case.
16461 (zero_nonzero_bits_from_vr): Move wide int code...
16462 (zero_nonzero_bits_from_bounds): ...here.
16463 (extract_range_from_binary_expr_1): Move mask optimization code...
16464 (range_easy_mask_min_max): ...here.
16465 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
16466 (range_easy_mask_min_max): New.
16468 2018-07-15 Jeff Law <law@redhat.com>
16471 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
16474 2018-07-14 Jim Wilson <jimw@sifive.com>
16476 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
16478 2018-07-14 Paul Koning <ni1d@arrl.net>
16480 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
16482 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
16484 * lto-streamer-out.c (copy_function_or_variable): Dump info about
16487 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
16488 Steve Munroe <munroesj52@gmail.com>
16490 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
16491 (_mm_andnot_si128): Likewise.
16492 (_mm_or_si128): Likewise.
16493 (_mm_xor_si128): Likewise.
16495 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
16497 PR middle-end/78809
16498 * builtins.c (expand_builtin_memcmp): Inline the calls first
16499 when result_eq is false.
16500 (expand_builtin_strcmp): Inline the calls first.
16501 (expand_builtin_strncmp): Likewise.
16502 (inline_string_cmp): New routine. Expand a string compare
16503 call by using a sequence of char comparison.
16504 (inline_expand_builtin_string_cmp): New routine. Inline expansion
16505 a call to str(n)cmp/memcmp.
16506 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
16508 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
16510 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
16512 * config/arm/driver-arm.c: Include arm-native.h.
16513 (host_detect_local_cpu): Use auto-generated data tables.
16514 (vendors, arm_cpu_table): Delete. Move part information to ...
16515 * config/arm/arm-cpus.in: ... here.
16516 * config/arm/parsecpu.awk (gen_native): New function.
16517 (vendor, part): New CPU fields.
16518 (END): Add support for building the native CPU detection tables.
16519 * config/arm/t-arm (arm-native.h): Add build rule.
16520 (driver-arm.o): Add dependency on arm-native.h.
16522 2018-07-13 Richard Biener <rguenther@suse.de>
16524 PR middle-end/85974
16525 * match.pd (addr1 - addr2): Allow either of the operand to
16528 2018-07-13 Tom de Vries <tdevries@suse.de>
16530 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
16533 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
16535 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
16536 arrays instead of numbered variables.
16538 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
16540 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
16541 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
16543 2018-07-13 Richard Biener <rguenther@suse.de>
16546 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
16547 instead of get_context_die.
16549 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
16550 Richard Biener <rguenther@suse.de>
16552 PR middle-end/86489
16553 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
16554 that the loop latch destination where phi is defined.
16556 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
16558 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
16559 (riscv_expand_epilogue): Add assertion to check interrupt mode.
16560 (riscv_set_current_function): Extract getting interrupt type to new
16562 (riscv_get_interrupt_type): New function.
16563 (riscv_merge_decl_attributes): New function, checking interrupt type is
16565 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
16567 2018-07-12 Paul Koning <ni1d@arrl.net>
16569 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
16572 2018-07-12 Paul Koning <ni1d@arrl.net>
16574 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
16575 zero reference, add doloop_end instead.
16576 * doc/md.texi (decrement_and_branch_until_zero): Remove.
16577 (Looping patterns): Remove decrement_and_branch_until_zero. Add
16578 detail for doloop_end.
16580 2018-07-12 Martin Sebor <msebor@redhat.com>
16583 * attribs.c (decl_attributes): Reject conflicting attributes before
16584 calling attribute handlers.
16586 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
16588 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
16590 (gcc::dump_manager::get_dump_file_name): likewise.
16591 (dump_begin): Likewise.
16592 * dumpfile.h (dump_begin): Update prototype.
16593 (gcc::dump_manager::get_dump_file_name,
16594 gcc::dump_manager::get_dump_file_name): Update prototype.
16596 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16598 * internal-fn.h (vectorizable_internal_fn_p): New function.
16599 * tree-vect-slp.c (compatible_calls_p): Likewise.
16600 (vect_build_slp_tree_1): Remove nops argument. Handle calls
16601 to internal functions.
16602 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
16604 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16606 * fold-const.h (inverse_conditions_p): Declare.
16607 * fold-const.c (inverse_conditions_p): New function.
16608 * match.pd: Use inverse_conditions_p. Add folds of view_converts
16609 that test the inverse condition of a conditional internal function.
16610 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
16611 * internal-fn.c (internal_fn_mask_index): Handle conditional
16612 internal functions.
16613 (vectorized_internal_fn_supported_p): New function.
16614 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
16615 (any_pred_load_store): Replace with...
16616 (need_to_predicate): ...this new variable.
16617 (redundant_ssa_names): New variable.
16618 (ifcvt_can_use_mask_load_store): Move initial checks to...
16619 (ifcvt_can_predicate): ...this new function. Handle tree codes
16620 for which a conditional internal function exists.
16621 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
16622 instead of ifcvt_can_use_mask_load_store. Update after variable
16624 (predicate_load_or_store): New function, split out from
16625 predicate_mem_writes.
16626 (check_redundant_cond_expr): New function.
16627 (value_available_p): Likewise.
16628 (predicate_rhs_code): Likewise.
16629 (predicate_mem_writes): Rename to...
16630 (predicate_statements): ...this. Use predicate_load_or_store
16631 and predicate_rhs_code.
16632 (combine_blocks, tree_if_conversion): Update after above name changes.
16633 (ifcvt_local_dce): Handle redundant_ssa_names.
16634 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
16635 general conditional functions.
16636 * tree-vect-stmts.c (vectorizable_call): Likewise.
16638 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16639 Alan Hayward <alan.hayward@arm.com>
16640 David Sherwood <david.sherwood@arm.com>
16642 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
16643 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
16644 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
16645 plus and minus and convert them into IFN_COND_FMA-based sequences.
16646 (convert_mult_to_fma): Handle conditional plus and minus.
16648 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16650 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
16651 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
16652 (cond_fnms_optab): New optabs.
16653 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
16654 internal functions.
16655 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
16656 * internal-fn.h (get_conditional_internal_fn): Declare.
16657 (get_unconditional_internal_fn): Likewise.
16658 * internal-fn.c (cond_ternary_direct): New macro.
16659 (expand_cond_ternary_optab_fn): Likewise.
16660 (direct_cond_ternary_optab_supported_p): Likewise.
16661 (FOR_EACH_COND_FN_PAIR): Likewise.
16662 (get_conditional_internal_fn): New function.
16663 (get_unconditional_internal_fn): Likewise.
16664 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
16665 (gimple_match_op::gimple_match_op): Add a new overload for 5
16667 (gimple_match_op::set_op): Likewise.
16668 (gimple_resimplify5): Declare.
16669 * genmatch.c (decision_tree::gen): Generate simplifications for
16671 * gimple-match-head.c (gimple_simplify): Define an overload for
16672 5 operands. Handle calls with 5 arguments in the top-level overload.
16673 (convert_conditional_op): Handle conversions from unconditional
16674 internal functions to conditional ones.
16675 (gimple_resimplify5): New function.
16676 (build_call_internal): Pass a fifth operand.
16677 (maybe_push_res_to_seq): Likewise.
16678 (try_conditional_simplification): Try converting conditional
16679 internal functions to unconditional internal functions.
16680 Handle 3-operand unconditional forms.
16681 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
16682 Define ternary equivalents of the current rules for binary conditional
16683 internal functions.
16684 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
16685 ternary operations.
16686 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
16687 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
16688 (optab): Handle them.
16689 (SVE_COND_FP_TERNARY): New int iterator.
16690 (sve_fmla_op, sve_fmad_op): New int attributes.
16691 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
16692 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
16693 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
16695 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16697 * target.def (preferred_else_value): New target hook.
16698 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
16699 * doc/tm.texi: Regenerate.
16700 * targhooks.h (default_preferred_else_value): Declare.
16701 * targhooks.c (default_preferred_else_value): New function.
16702 * internal-fn.h (conditional_internal_fn_code): Declare.
16703 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
16704 (get_conditional_internal_fn): Use it.
16705 (conditional_internal_fn_code): New function.
16706 * gimple-match.h (gimple_match_cond): New struct.
16707 (gimple_match_op): Add a cond member function.
16708 (gimple_match_op::gimple_match_op): Update all forms to take a
16710 * genmatch.c (expr::gen_transform): Use the same condition as res_op
16711 for the suboperation, but don't specify a particular else_value.
16712 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
16713 (visit_nary_op, visit_reference_op_load): Pass
16714 gimple_match_cond::UNCOND to the gimple_match_op constructor.
16715 * gimple-match-head.c: Include tree-eh.h
16716 (convert_conditional_op): New function.
16717 (maybe_resimplify_conditional_op): Likewise.
16718 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
16719 (gimple_resimplify2): Likewise.
16720 (gimple_resimplify3): Likewise.
16721 (gimple_resimplify4): Likewise.
16722 (maybe_push_res_to_seq): Return null for conditional operations.
16723 (try_conditional_simplification): New function.
16724 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
16726 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
16728 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
16730 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
16732 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
16734 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
16736 (hash_tree): Do not hash DECL_FCONTEXT
16737 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
16738 Do not stream DECL_FCONTEXT.
16739 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
16740 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
16742 2018-07-12 Richard Biener <rguenther@suse.de>
16745 * dwarf2out.c (gen_block_die): Only output blocks when they have
16746 at least one !DECL_IGNORED_P variable.
16748 2018-07-12 Richard Biener <rguenther@suse.de>
16751 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
16752 Remove -mieee-fp handling.
16754 2018-07-12 Richard Biener <rguenther@suse.de>
16756 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
16757 left-over from last patch.
16759 2018-07-12 Jakub Jelinek <jakub@redhat.com>
16761 PR tree-optimization/86492
16762 * gimple-ssa-store-merging.c
16763 (imm_store_chain_info::coalesce_immediate_stores): Call
16764 check_no_overlap even for the merge_overlapping case. Formatting fix.
16766 2018-07-12 Richard Biener <rguenther@suse.de>
16768 PR middle-end/86479
16769 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
16770 move possibly trapping operations into the conditional.
16772 2018-07-12 Richard Biener <rguenther@suse.de>
16774 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
16775 (vn_lookup_simplify_result): Remove recursion limit applied
16777 (vn_nary_build_or_lookup_1): Adjust.
16778 (try_to_simplify): Likewise.
16779 * gimple-match-head.c (gimple_resimplify1): Instead apply one
16781 (gimple_resimplify2): Likewise.
16782 (gimple_resimplify3): Likewise.
16783 (gimple_resimplify4): Likewise.
16785 2018-07-11 Jakub Jelinek <jakub@redhat.com>
16787 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
16788 Use __mmask64 type instead of __mmask8 for __M argument.
16789 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
16790 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
16792 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
16793 __mmask16 for __M argument.
16794 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
16795 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
16796 to __mmask16 instead of __mmask8.
16797 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
16798 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
16799 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
16800 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
16801 instead of __mmask16 for __U argument.
16802 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
16803 __mmask16 instead of __mmask8 for __U argument.
16804 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
16806 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
16808 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
16810 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
16812 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
16814 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
16816 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
16818 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
16820 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
16822 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
16824 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
16825 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
16826 return type as well as __M argument type and all casts from __mmask8
16828 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
16829 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
16830 return type as well as __M argument type and all casts from __mmask8
16832 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
16833 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
16834 return type as well as __M argument type and all casts from __mmask8
16836 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
16837 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
16838 return type as well as __M argument type and all casts from __mmask8
16840 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
16841 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
16844 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
16846 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
16847 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
16850 2018-07-11 Paul Koning <ni1d@arrl.net>
16852 * doc/md.texi (define_subst): Document how multiple occurrences of
16853 the same argument in the replacement pattern are handled.
16855 2018-07-11 Paul Koning <ni1d@arrl.net>
16857 * doc/extend.texi (Common Variable Attributes): Move "mode" into
16858 alphabetical order.
16859 (Common Type Attributes): Add "mode" attribute.
16861 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
16863 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
16864 stream DECL_ORIGINAL_TYPE.
16865 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
16866 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
16867 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
16868 Do not walk original type.
16869 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
16871 (write_ts_decl_non_common_tree_pointers): Do not stream
16873 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
16874 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
16876 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
16878 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
16879 thread twice from the same starting edge.
16881 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
16883 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
16884 * gimple.c (gimple_call_nonnull_result_p): ...here...
16885 (gimple_call_nonnull_arg): ...and here.
16886 * gimple.h (gimple_call_nonnull_result_p): New.
16887 (gimple_call_nonnull_arg): New.
16889 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
16891 * config/arm/arm-cpus.in: Move information from fpu field of each
16892 cpu definition to the isa field.
16893 * config/arm/parsecpu.awk (fpu): Delete match rule.
16894 (gen_comm_data): Don't add bits from the CPU's FPU entry.
16896 2018-07-11 Richard Biener <rguenther@suse.de>
16899 * dwarf2out.c (init_sections_and_labels): Use
16900 output_asm_line_debug_info consistently.
16901 (dwarf2out_early_finish): Likewise.
16902 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
16905 2018-07-11 Richard Biener <rguenther@suse.de>
16907 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
16908 Rework father_bb setting in a way to avoid propagating constants
16909 multiple times on a loop body.
16911 2018-07-10 Mark Wielaard <mark@klomp.org>
16914 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
16916 2018-07-10 Richard Biener <rguenther@suse.de>
16918 * hash-map.h (hash_map::iterator::operator*): Return
16919 references to key and value.
16921 2018-07-10 Jakub Jelinek <jakub@redhat.com>
16924 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
16925 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
16926 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
16927 (gimplify_omp_for): For composite loops, move outer
16928 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
16929 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
16930 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
16931 TREE_LIST for both the original class iterator and the "last" helper
16932 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
16933 loop, remember has_decl_expr from outer composite loops for the
16934 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
16936 2018-07-09 Martin Sebor <msebor@redhat.com>
16938 PR middle-end/77357
16939 PR middle-end/86428
16940 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
16941 accessing implicitly initialized array elements.
16942 * expr.c (string_constant): Handle string initializers of
16943 character arrays within aggregates.
16944 * gimple-fold.c (fold_array_ctor_reference): Add argument.
16945 Store element offset. As a special case, handle zero size.
16946 (fold_nonarray_ctor_reference): Same.
16947 (fold_ctor_reference): Add argument. Store subobject offset.
16948 * gimple-fold.h (fold_ctor_reference): Add argument.
16950 2018-07-09 Paul Koning <ni1d@arrl.net>
16952 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
16953 (pdp11_insn_cost): New function.
16954 (pdp11_md_asm_adjust): New function.
16955 (TARGET_INVALID_WITHIN_DOLOOP): Define.
16956 (pdp11_rtx_costs): Update to match machine better.
16957 (output_addr_const_pdp11): Correct format mismatch warnings.
16958 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
16959 * config/pdp11/pdp11.md: General change to add base_cost and/or
16960 length attributes for use by new pdp11_insn_cost function.
16961 (MIN_BRANCH): Correct definition.
16963 (doloop_end): Use standard pattern name for looping pattern.
16964 (doloop_end_nocc): New.
16965 (movsf): Add another constraint alternative.
16966 (zero_extendqihi2): Add constraint alternatives for not in place
16968 (zero_extendhisi2): Remove.
16969 (shift patterns): Add CC handling variants.
16973 (define_peephole2): New peephole to recognize mov that sets CC for
16976 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16978 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
16979 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
16982 2018-07-09 Jakub Jelinek <jakub@redhat.com>
16985 * real.c (real_nextafter): Return true if result is denormal.
16987 2018-07-09 Martin Liska <mliska@suse.cz>
16989 * common.opt: Add back wrongly removed attribute.
16991 2018-07-09 Richard Biener <rguenther@suse.de>
16994 * dwarf2out.c (gen_block_die): For an early generated DIE
16995 always output high/low PC attributes.
16997 2018-07-09 Tom de Vries <tdevries@suse.de>
16999 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
17000 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
17001 onto VAR_DECL with abstract origin.
17003 2018-07-07 Jim Wilson <jimw@sifive.com>
17005 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
17007 2018-07-07 Tom de Vries <tdevries@suse.de>
17009 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
17011 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
17013 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
17015 (combine_bound): Use wide-int overflow calculation instead of
17017 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
17019 * fold-const.c (int_const_binop_2): Same.
17020 (extract_muldiv_1): Same.
17021 (fold_div_compare): Same.
17022 (fold_abs_const): Same.
17024 * poly-int.h (add): Same.
17028 * predict.c (predict_iv_comparison): Same.
17029 * profile-count.c (slow_safe_scale_64bit): Same.
17030 * simplify-rtx.c (simplify_const_binary_operation): Same.
17031 * tree-chrec.c (tree_fold_binomial): Same.
17032 * tree-data-ref.c (split_constant_offset_1): Same.
17033 * tree-if-conv.c (idx_within_array_bound): Same.
17034 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
17035 * tree-ssa-phiopt.c (minmax_replacement): Same.
17036 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
17037 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
17038 * vr-values.c (vr_values::adjust_range_with_scev): Same.
17039 * wide-int.cc (wi::add_large): Same.
17040 (wi::mul_internal): Same.
17041 (wi::sub_large): Same.
17042 (wi::divmod_internal): Same.
17043 * wide-int.h: Change overflow type to overflow_type for neg, add,
17044 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
17045 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
17046 mul_internal, divmod_internal.
17047 (overflow_type): New enum.
17048 (accumulate_overflow): New.
17050 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
17052 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
17053 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
17055 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
17057 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
17058 argument is checked for zero before entering loop, avoid checking again.
17060 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
17062 * gimplify.h (generic_expr_could_trap_p): Set as global function.
17063 * gimplify.h (generic_expr_could_trap_p): Likwise.
17064 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
17066 2018-07-06 Jakub Jelinek <jakub@redhat.com>
17068 PR tree-optimization/86401
17069 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
17070 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
17071 (fold_bit_and_mask): ... here. New helper function for match.pd.
17072 * fold-const.h (fold_bit_and_mask): Declare.
17073 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
17075 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
17078 * target.def (translate_mode_attribute): New hook.
17079 * targhooks.h (default_translate_mode_attribute): Declare.
17080 * targhooks.c (default_translate_mode_attribute): New function.
17081 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
17082 * doc/tm.texi: Regenerate.
17083 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
17084 (rs6000_translate_mode_attribute): New function.
17086 2018-07-06 Paul Koning <ni1d@arrl.net>
17088 * doc/md.texi (define_split): Document DONE and FAIL.
17089 (define_peephole2): Ditto.
17091 2018-07-05 Jeff Law <law@redhat.com>
17093 PR tree-optimization/86010
17094 * tree-ssa-dse.c (compute_trims): More aggressively trim at
17095 both the head and tail of mem* and str* calls.
17097 2018-07-05 Jim Wilson <jimw@sifive.com>
17099 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
17101 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
17103 * config/aarch64/aarch64-simd.md: correct flags text for
17104 MIN_EXPR replacement.
17106 2018-07-05 James Clarke <jrtc27@jrtc27.com>
17108 * configure: Regenerated.
17110 2018-07-05 Carl Love <cel@us.ibm.com>
17112 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
17113 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
17114 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
17115 VSX_BUILTIN_DOUBLEL_V4SF.
17117 2018-07-05 Martin Sebor <msebor@redhat.com>
17120 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
17121 than its domain to compute its the upper bound of a char array.
17123 2018-07-05 Nathan Sidwell <nathan@acm.org>
17125 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
17126 * doc/cpp.texi: Update comment.
17127 * doc/tm.texi: Rebuilt.
17128 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
17129 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
17130 * doc/extend.texi (Backwards Compatibility): Clarify it is system
17131 headers affected by extern "C".
17132 * system.h: Poison NO_IMPLICIT_EXTERN_C.
17133 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
17134 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
17135 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
17136 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
17137 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
17138 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
17139 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
17140 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
17141 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
17142 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
17143 config/sparc/sp64-elf.h, config/spu/spu.h,
17144 config/stormy16/stormy16.h, config/v850/v850.h,
17145 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
17146 define NO_IMPLICIT_EXTERN_C.
17147 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
17149 2018-07-05 Tamar Christina <tamar.christina@arm.com>
17152 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
17153 instead of GET_MODE_SIZE when comparing Units.
17155 2018-07-05 Tamar Christina <tamar.christina@arm.com>
17158 * rtlanal.c (set_noop_p): Constrain on mode change,
17159 include hard-reg-set.h
17161 2018-07-05 Tamar Christina <tamar.christina@arm.com>
17163 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
17165 2018-07-05 Jakub Jelinek <jakub@redhat.com>
17168 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
17171 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
17173 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
17175 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
17178 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
17180 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
17182 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
17184 PR middle-end/86380
17185 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
17187 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
17189 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
17190 neg_*_op* variables.
17192 2018-07-04 Martin Liska <mliska@suse.cz>
17194 * tree-switch-conversion.c: Define
17195 max_ratio_for_speed and max_ratio_for_size constants.
17197 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
17198 Martin Liska <mliska@suse.cz>
17200 PR middle-end/66240
17203 * common.opt: Rename align options with 'str_' prefix.
17204 * common/config/i386/i386-common.c (set_malign_value): New
17206 (ix86_handle_option): Use it to set -falign-* options/
17207 * config/aarch64/aarch64-protos.h (struct tune_params): Change
17208 type from int to string.
17209 * config/aarch64/aarch64.c: Update default values from int
17211 * config/alpha/alpha.c (alpha_override_options_after_change):
17213 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
17214 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17215 max skip conditionally.
17216 * config/i386/freebsd.h (SUBALIGN_LOG): New.
17217 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17218 max skip conditionally.
17219 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17220 max skip conditionally.
17221 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
17222 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17223 max skip conditionally.
17224 * config/i386/i386.c (struct ptt): Change type from int to
17226 (ix86_default_align): Set default values.
17227 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
17228 max skip conditionally.
17229 * config/i386/iamcu.h (SUBALIGN_LOG): New.
17230 (ASM_OUTPUT_MAX_SKIP_ALIGN):
17231 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
17232 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17233 max skip conditionally.
17234 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
17235 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
17236 * config/i386/x86-64.h (SUBALIGN_LOG): New.
17237 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17238 max skip conditionally.
17239 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
17240 * config/ia64/ia64.c (ia64_option_override): Set default values
17241 for alignment options.
17242 * config/m68k/m68k.c: Handle new str_align_* options.
17243 * config/mips/mips.c (mips_set_compression_mode): Change
17245 (mips_option_override): Set default values for options.
17246 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
17248 * config/rs6000/rs6000.c (rs6000_option_override_internal):
17250 * config/rx/rx.c (rx_option_override): Likewise.
17251 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
17252 (LABEL_ALIGN): Use align_labels_log.
17253 (LOOP_ALIGN): Use align_loops_align.
17254 * config/s390/s390.c (s390_asm_output_function_label): Use new
17256 * config/sh/sh.c (sh_override_options_after_change):
17257 Change type of constants.
17258 * config/spu/spu.c (spu_sched_init): Likewise.
17259 * config/sparc/sparc.c (sparc_option_override): Set default
17260 values for options.
17261 * config/visium/visium.c (visium_option_override): Likewise.
17262 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
17263 emit p2align format with last argument if it's not needed.
17264 * doc/invoke.texi: Document extended format of -falign-*.
17265 * final.c: Use align_labels alignment.
17266 * flags.h (struct target_flag_state): Change type to use
17268 (struct align_flags_tuple): New.
17269 (struct align_flags): Likewise.
17270 (align_loops_log): Redefine macro to use new types.
17271 (align_loops_max_skip): Redefine macro to use new types.
17272 (align_jumps_log): Redefine macro to use new types.
17273 (align_jumps_max_skip): Redefine macro to use new types.
17274 (align_labels_log): Redefine macro to use new types.
17275 (align_labels_max_skip): Redefine macro to use new types.
17276 (align_functions_log): Redefine macro to use new types.
17277 (align_loops): Redefine macro to use new types.
17278 (align_jumps): Redefine macro to use new types.
17279 (align_labels): Redefine macro to use new types.
17280 (align_functions): Redefine macro to use new types.
17281 (align_functions_max_skip): Redefine macro to use new types.
17282 (align_loops_value): New macro.
17283 (align_jumps_value): New macro.
17284 (align_labels_value): New macro.
17285 (align_functions_value): New macro.
17286 * function.c (invoke_set_current_function_hook): Propagate
17287 alignment values from flags to global variables default in
17289 * ipa-icf.c (sem_function::equals_wpa): Use
17290 cl_optimization_option_eq instead of memcmp.
17291 * lto-streamer.h (cl_optimization_stream_out): Support streaming
17293 (cl_optimization_stream_in): Likewise.
17294 * optc-save-gen.awk: Support strings in cl_optimization.
17295 * opth-gen.awk: Likewise.
17296 * opts.c (finish_options): Remove error checking of invalid
17298 (MAX_CODE_ALIGN): Remove.
17299 (MAX_CODE_ALIGN_VALUE): Likewise.
17300 (parse_and_check_align_values): New function.
17301 (check_alignment_argument): Likewise.
17302 (common_handle_option): Use check_alignment_argument.
17303 * opts.h (parse_and_check_align_values): Declare.
17304 * toplev.c (init_alignments): Remove.
17305 (read_log_maxskip): New.
17306 (parse_N_M): Likewise.
17307 (parse_alignment_opts): Likewise.
17308 (backend_init_target): Remove usage of init_alignments.
17309 * toplev.h (parse_alignment_opts): Declare.
17310 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
17312 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
17313 * tree.c (cl_option_hasher::equal): New.
17314 * varasm.c: Use new global macros.
17316 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
17318 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
17319 Use a simpler align directive also if MAXSKIP = ALIGN-1.
17320 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17321 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17322 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17323 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
17324 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
17325 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
17326 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
17327 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17328 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17329 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17330 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17332 2018-07-04 Martin Liska <mliska@suse.cz>
17333 Jonathan Wakely <jwakely@redhat.com>
17335 * coverage.c: Use correct type.
17336 * doc/invoke.texi: Language correction.
17338 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
17341 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
17342 ENDBRANCH for non-tail call which may return via indirect branch.
17343 * doc/extend.texi: Document indirect_return attribute.
17345 2018-07-03 Martin Sebor <msebor@redhat.com>
17347 PR tree-optimization/86274
17348 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
17350 (format_floating): Correct handling of infinities and NaNs.
17352 2018-07-03 Martin Sebor <msebor@redhat.com>
17354 * print-tree.c (print_real_cst): New function.
17355 (print_node_brief): Call it.
17356 (print_node): Ditto.
17358 2018-07-03 Jeff Law <law@redhat.com>
17360 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
17361 into a single pattern.
17363 * config/h8300/h8300.md (ors code_iterator): New.
17364 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
17365 a single pattern and single splitter.
17366 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
17367 (iorqi3_1, xorqi3_1): Likewise.
17368 (iorqi3, xorqi3 expanders): Similarly.
17370 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
17371 (movmd_internal) into a single pattern using the P mode iterator.
17372 (movmd splitters): Similarly.
17373 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
17374 (movsd splitters): Similarly.
17376 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
17377 ADDB, ADDW and ADDL into a single ADD attribute which selects the
17378 right table based on the size of the operand.
17379 * config/h8300/h8300.md (length_table): Corresponding changes. All
17380 references to "addb", "addw" and "addl" changed to "add".
17381 (btst patterns): Merge two variants into a single pattern.
17382 (tstqi, tsthi): Likewise.
17383 (addhi3_incdec, addsi3_incdec): Likewise.
17384 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
17385 (mulhi3, mulsi3): Likewise.
17386 (udivhi3, udivsi3): Likewise.
17387 (divhi3, divsi3): Likewise.
17388 (andorqi3, andorhi3, andorsi3): Likewise.
17390 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
17393 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
17394 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
17396 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17398 PR tree-optimization/85694
17399 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
17400 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
17402 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
17403 (<u>avg<mode>3_ceil): New patterns.
17405 2018-07-03 David Malcolm <dmalcolm@redhat.com>
17407 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
17408 scan-tree-dump directive.
17409 * gcc.dg/vect/slp-perm-2.c: Likewise.
17410 * gcc.dg/vect/slp-perm-3.c: Likewise.
17411 * gcc.dg/vect/slp-perm-5.c: Likewise.
17412 * gcc.dg/vect/slp-perm-6.c: Likewise.
17413 * gcc.dg/vect/slp-perm-7.c: Likewise.
17414 * gcc.dg/vect/slp-perm-8.c: Likewise.
17416 2018-07-03 Marek Polacek <polacek@redhat.com>
17418 PR middle-end/86202
17419 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
17421 2018-07-03 Richard Biener <rguenther@suse.de>
17424 * tree-ssa-structalias.c (find_func_clobbers): Properly
17425 handle indirect calls.
17427 2018-07-03 Jeff Law <law@redhat.com>
17429 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
17430 (shifts): New code iterator.
17431 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
17432 expander. Fix HImode handling on H8/SX.
17433 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
17434 (subqi3, subhi3, subsi3 expanders): Likewise.
17435 (andqi3, andhi3, andsi3 expanders): Likewise.
17436 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
17437 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
17438 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
17439 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
17440 (zero_extendqihi2, zero_extendqisi2): Likewise.
17441 (extendqihi2, extendqisi2): Likewise.
17442 (rotlqi3, rotlhi3, rotlsi3): Likewise.
17443 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
17444 (rotlqi3_1, rotlhi3_1): Likewise.
17445 (logicalhi3_sn, logicalsi3_sn): Likewise.
17446 (logicalhi3, logicalsi3): Likewise.
17448 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17450 * tree-vect-patterns.c (vect_recog_rotate_pattern)
17451 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
17452 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
17453 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
17454 type to append_pattern_def_seq instead of creating a stmt_vec_info
17456 (build_mask_conversion): Likewise. Remove vinfo argument.
17457 (vect_add_conversion_to_patterm): Likewise, renaming to...
17458 (vect_add_conversion_to_pattern): ...this.
17459 (vect_recog_mask_conversion_pattern): Update call to
17460 build_mask_conversion. Pass the vector type to
17461 append_pattern_def_seq here too.
17462 (vect_recog_gather_scatter_pattern): Update call to
17463 vect_add_conversion_to_pattern.
17465 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17467 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
17468 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
17469 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
17470 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
17471 STMT_VINFO_PATTERN_DEF_SEQ to null here.
17472 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
17473 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
17474 append_pattern_def_seq instead of new_pattern_def_seq.
17475 (vect_recog_divmod_pattern): Do both of the above.
17476 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
17479 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17481 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
17482 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
17483 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
17484 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
17485 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
17486 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
17487 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
17488 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
17489 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
17490 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
17491 parameter with a single stmt_vec_info.
17492 (vect_recog_func_ptr): Likewise.
17493 (vect_recog_gather_scatter_pattern): Likewise, folding in...
17494 (vect_try_gather_scatter_pattern): ...this.
17495 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
17496 the stmt_vec_info of the statement to be matched. Don't clear
17497 STMT_VINFO_RELATED_STMT.
17498 (vect_pattern_recog): Update call accordingly.
17500 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17502 PR tree-optimization/85694
17503 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
17504 (uavgM3_ceil): Document new optabs.
17505 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
17506 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
17508 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
17509 (savg_ceil_optab): New optabs.
17510 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
17511 (vect_vect_recog_func_ptrs): Add it.
17512 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
17513 constant directly from the associated lhs.
17515 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17517 * tree-vect-patterns.c (vect_split_statement): New function.
17518 (vect_convert_input): Use it to try to split an existing cast.
17520 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17522 * poly-int.h (print_hex): New function.
17523 * dumpfile.h (dump_dec, dump_hex): Declare.
17524 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
17525 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
17526 min_input_precision, operation_precision and operation_sign.
17527 * tree-vect-patterns.c (vect_get_range_info): New function.
17528 (vect_same_loop_or_bb_p, vect_single_imm_use)
17529 (vect_operation_fits_smaller_type): Delete.
17530 (vect_look_through_possible_promotion): Add an optional
17531 single_use_p parameter.
17532 (vect_recog_over_widening_pattern): Rewrite to use new
17533 stmt_vec_info infomration. Handle one operation at a time.
17534 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
17535 (vect_truncatable_operation_p, vect_set_operation_type)
17536 (vect_set_min_input_precision): New functions.
17537 (vect_determine_min_output_precision_1): Likewise.
17538 (vect_determine_min_output_precision): Likewise.
17539 (vect_determine_precisions_from_range): Likewise.
17540 (vect_determine_precisions_from_users): Likewise.
17541 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
17542 (vect_vect_recog_func_ptrs): Put over_widening first.
17544 (vect_pattern_recog): Call vect_determine_precisions.
17546 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17548 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
17549 statements that have been replaced by further pattern statements.
17550 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
17552 2018-07-03 Richard Biener <rguenther@suse.de>
17554 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
17555 always set *dt. Dump vectype in vectype overload.
17556 * dumpfile.h (dump_gimple_expr): New function.
17557 (dump_gimple_expr_loc): Likewise.
17558 * dumpfile.c (dump_gimple_expr): New function.
17559 (dump_gimple_expr_loc): Likewise.
17561 2018-07-02 Jeff Law <law@redhat.com>
17563 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
17564 the H8/300, H8/300H and H8/S variants into a single pattern.
17565 (movhi_h8300, movqi_h8300hs): Similarly.
17566 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
17567 (QHI mode iterator): New.
17569 * config/h8300/h8300.md: Remove trailing whitespace.
17571 2018-07-02 Jim Wilson <jimw@sifive.com>
17573 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
17574 instead of emit_insn for interrupt returns.
17575 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
17576 (riscv_sret, riscv_uret): Likewise.
17578 2018-07-02 David Malcolm <dmalcolm@redhat.com>
17580 * pretty-print.c (selftest::test_pp_format): Move save and restore
17581 of quotes to class auto_fix_quotes, and add an instance.
17582 * selftest.c: Include "intl.h".
17583 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
17584 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
17585 * selftest.h (selftest::auto_fix_quotes): New class.
17587 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
17589 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
17590 (aarch64_sve_prepare_conditional_op): Remove.
17591 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
17592 Allow aarch64_simd_reg_or_zero as select operand; remove
17593 the aarch64_sve_prepare_conditional_op call.
17594 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
17595 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
17596 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
17597 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
17598 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
17599 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
17600 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
17601 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
17602 and a splitters to match all of the *_any patterns.
17603 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
17605 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
17606 (SVE_COND_FP_BINARY_REV): Remove.
17607 (sve_int_op_rev, sve_fp_op_rev): New.
17608 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
17609 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
17610 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
17611 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
17612 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
17613 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
17614 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
17615 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
17616 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
17618 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
17619 Remove match_dup 1 from the inner unspec.
17620 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
17622 * config/aarch64/aarch64.md (movprfx): New attr.
17623 (length): Default movprfx to 8.
17624 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
17625 (*madd<SVE_I>, *msub<SVE_I): Likewise.
17626 (*<su>mul<SVE_I>3_highpart): Likewise.
17627 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
17628 (*v<ASHIFT><SVE_I>3): Likewise.
17629 (*<su><MAXMIN><SVE_I>3): Likewise.
17630 (*<su><MAXMIN><SVE_F>3): Likewise.
17631 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
17632 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
17633 (*div<SVE_F>4): Likewise.
17635 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
17637 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
17640 2018-07-02 Richard Biener <rguenther@suse.de>
17642 PR tree-optimization/86363
17643 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
17644 memset argument refers to a non-variable address.
17646 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
17648 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
17649 {PLUS,MINUS}_EXPR code to...
17650 (adjust_symbolic_bound): ...here,
17651 (combine_bound): ...here,
17652 (set_value_range_with_overflow): ...and here.
17654 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
17656 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
17658 (extract_range_from_abs_expr): ...here.
17660 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
17662 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
17663 -fno-omit-frame-pointer when not optimizing.
17665 2018-07-02 Martin Liska <mliska@suse.cz>
17668 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
17669 (propagate_nothrow): Likewise.
17671 2018-07-02 Martin Liska <mliska@suse.cz>
17674 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
17676 2018-07-02 David Malcolm <dmalcolm@redhat.com>
17678 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
17679 function in r262149, changing "loc" param from source_location to
17680 const dump_location_t &.
17681 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
17682 declaration, as above.
17684 2018-07-01 Paul Koning <ni1d@arrl.net>
17686 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
17687 -munit-asm, -mgnu-asm, -mdec-asm.
17688 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
17689 (pdp11_output_labelref): New.
17690 (pdp11_output_def): New.
17691 (pdp11_output_addr_vec_elt): New.
17692 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
17693 %# and %@ format codes.
17694 (pdp11_option_override): New.
17695 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
17696 (pdp11_output_ident): New.
17697 (pdp11_asm_named_section): New.
17698 (pdp11_asm_init_sections): New.
17699 (pdp11_file_start): New.
17700 (pdp11_file_end): New.
17701 (output_ascii): Use .ascii/.asciz for -mdec-asm.
17702 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
17703 %o, like %c but octal.
17704 (pdp11_option_override): New.
17705 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
17707 (DATA_SECTION_ASM_OP): Ditto.
17708 (READONLY_DATA_SECTION_ASM_OP): New.
17709 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
17710 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
17711 (ASM_OUTPUT_LABELREF): Ditto.
17712 (ASM_OUTPUT_DEF): Ditto.
17713 (ASM_OUTPUT_EXTERNAL): New.
17714 (ASM_OUTPUT_SOURCE_FILENAME): New.
17715 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
17716 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
17717 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
17718 %# and %@ format codes.
17719 * config/pdp11/pdp11.opt (mgnu-asm): New.
17720 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
17721 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
17722 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
17724 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
17726 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
17727 dereferencing path[] beyond its length.
17729 (debug_all_paths): New.
17730 (rewire_first_differing_edge): New.
17731 (adjust_paths_after_duplication): New.
17732 (duplicate_thread_path): Call adjust_paths_after_duplication.
17734 (thread_through_all_blocks): Add new argument to
17735 duplicate_thread_path.
17737 2018-06-30 Jim Wilson <jimw@sifive.com>
17739 * config/riscv/predicates.md (p2m1_shift_operand): New.
17740 (high_mask_shift_operand): New.
17741 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
17742 pattern using p2m1_shift_operand.
17743 (lshsi3_zero_extend_3+2): New combiner pattern using
17744 high_mask_shift_operand.
17746 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17748 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
17750 (vect_recog_rotate_pattern): ...here.
17751 (vect_convert_input): Try to insert casts of invariants in the
17753 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
17754 preheader to be empty.
17756 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17758 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
17759 vector type. If given, install it in the new statement's
17760 STMT_VINFO_VECTYPE.
17761 (vect_element_precision): New function.
17762 (vect_unpromoted_value): New struct.
17763 (vect_unpromoted_value::vect_unpromoted_value): New function.
17764 (vect_unpromoted_value::set_op): Likewise.
17765 (vect_look_through_possible_promotion): Likewise.
17766 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
17767 (vect_widened_op_tree, vect_convert_input): Likewise.
17768 (vect_convert_inputs, vect_convert_output): Likewise.
17769 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
17770 to handle the optional cast of the multiplication result and
17771 vect_widened_op_tree to detect the widened multiplication itself.
17772 Do not require the input and output of promotion casts to have
17773 the same sign, but base the signedness of the operation on the
17774 input rather than the result. If the pattern includes two
17775 promotions, check that those promotions have the same sign.
17776 Do not restrict the MULT_EXPR handling to a double-width result;
17777 handle quadruple-width results and wider. Use vect_convert_inputs
17778 to convert the inputs to the common type.
17779 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
17780 to handle the optional cast of the ABS result. Also allow a sign
17781 change or a sign extension between the ABS and MINUS.
17782 Use vect_widened_op_tree to detect the widened subtraction and use
17783 vect_convert_inputs to convert the inputs to the common type.
17784 (vect_handle_widen_op_by_const): Delete.
17785 (vect_recog_widen_op_pattern): New function.
17786 (vect_recog_widen_mult_pattern): Use it.
17787 (vect_recog_widen_shift_pattern): Likewise.
17788 (vect_recog_widen_sum_pattern): Use
17789 vect_look_through_possible_promotion to handle the promoted
17792 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17794 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
17795 the containing gimple_seq *.
17796 * gimple-iterator.h (gsi_for_stmt): Declare it.
17797 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
17798 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
17799 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
17800 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
17801 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
17803 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
17805 (vect_mark_pattern_stmts): ...here. Handle cases in which the
17806 statement being replaced is part of an existing pattern
17807 definition sequence, inserting the new pattern statements before
17809 (vect_pattern_recog_1): Don't return a bool. If the statement
17810 is already part of a pattern, instead apply pattern matching
17811 to the pattern definition statements. Don't clear the
17812 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
17813 (vect_pattern_recog): Don't break after the first match;
17814 continue processing the pattern definition statements instead.
17815 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
17817 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17819 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
17820 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
17821 (vect_recog_widen_sum_pattern): Use it.
17823 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17825 * tree-vect-loop.c (vectorizable_reduction): Assert that the
17826 phi is not a pattern statement and has not been replaced by
17827 a pattern statement.
17828 * tree-vect-patterns.c (type_conversion_p): Don't check
17829 STMT_VINFO_IN_PATTERN_P.
17830 (vect_recog_vector_vector_shift_pattern): Likewise.
17831 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
17832 the pattern statement rather than the original statement; check
17833 directly for a WIDEN_MULT_EXPR here.
17834 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
17835 vect_is_simple_use to return the pattern statement rather
17836 than the original statement; use is_pattern_stmt_p to check
17837 for such a pattern statement.
17838 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
17839 to return the pattern statement rather than the original statement;
17840 don't do the same transformation here.
17841 (vect_is_simple_use): If the defining statement has been replaced
17842 by a pattern statement, return the pattern statement instead.
17843 Remove the corresponding (local) transformation from the vectype
17846 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17848 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
17849 end and default to null.
17850 * tree-vect-loop.c (vect_create_epilog_for_reduction)
17851 (vectorizable_reduction): Update calls accordingly, dropping the
17852 gimple ** argument if the passed-back statement isn't needed.
17853 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
17854 (vect_recog_rotate_pattern): Likewise.
17855 (vect_recog_mask_conversion_pattern): Likewise.
17856 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
17857 (vect_mask_constant_operand_p): Likewise.
17858 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
17859 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
17860 (get_group_load_store_type, get_load_store_type): Likewise.
17861 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
17862 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
17863 (vectorizable_conversion, vectorizable_assignment): Likewise.
17864 (vectorizable_shift, vectorizable_operation): Likewise.
17865 (vectorizable_store, vect_is_simple_cond): Likewise.
17866 (vectorizable_condition, vectorizable_comparison): Likewise.
17867 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
17868 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
17869 and move it to the end. Cope with null def_stmt_outs.
17871 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
17873 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
17875 2018-06-29 Jeff Law <law@redhat.com>
17877 * config/v850/v850.c (v850_legitimate_address_p): Handle large
17878 displacements for TARGET_V850E2V3 and newer.
17879 (TARGET_LRA_P): Remove. Defaults to LRA now.
17880 * config/v850/v850.md (sign23byte_load): Remove.
17881 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
17882 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
17884 2018-06-29 Martin Liska <mliska@suse.cz>
17887 * coverage.c (coverage_init): Mangle full path name.
17888 * doc/invoke.texi: Document the change.
17889 * gcov-io.c (mangle_path): New.
17890 * gcov-io.h (mangle_path): Likewise.
17891 * gcov.c (mangle_name): Use mangle_path for path mangling.
17893 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17895 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
17896 if starting source register is not even.
17898 2018-06-29 Martin Liska <mliska@suse.cz>
17900 PR tree-optimization/86263
17901 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
17902 Make edge redirection.
17904 2018-06-29 David Malcolm <dmalcolm@redhat.com>
17906 * dumpfile.c (dump_loc): Add indentation based on scope depth.
17907 (dump_scope_depth): New variable.
17908 (get_dump_scope_depth): New function.
17909 (dump_begin_scope): New function.
17910 (dump_end_scope): New function.
17911 * dumpfile.h (get_dump_scope_depth): New declaration.
17912 (dump_begin_scope): New declaration.
17913 (dump_end_scope): New declaration.
17914 (class auto_dump_scope): New class.
17915 (AUTO_DUMP_SCOPE): New macro.
17916 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
17919 2018-06-29 Richard Biener <rguenther@suse.de>
17921 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
17922 compute_all_dependences succeeds.
17923 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
17924 exceed --param loop-max-datarefs-for-datadeps.
17926 2018-06-29 Jakub Jelinek <jakub@redhat.com>
17928 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
17930 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
17933 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
17934 alternative 0 in preferred_for_speed attribute.
17936 2018-06-28 Paul Koning <ni1d@arrl.net>
17938 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
17939 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
17940 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
17941 * config/pdp11/pdp11.md: Correct "length" attribute calculation
17942 for shift insn patterns.
17944 2018-06-28 David Malcolm <dmalcolm@redhat.com>
17946 * cgraph.c (cgraph_node::get_body): Replace assignments to
17947 "dump_file" with calls to set_dump_file.
17948 * dumpfile.c (alt_dump_file): Make static, and group with...
17949 (alt_flags): ...this definition.
17950 (dumps_are_enabled): New variable.
17951 (refresh_dumps_are_enabled): New function.
17952 (set_dump_file): New function.
17953 (set_alt_dump_file): New function.
17954 (gcc::dump_manager::dump_start): Replace assignments to
17955 "dump_file" and "alt_dump_file" with calls to set_dump_file and
17957 (gcc::dump_manager::dump_finish): Likewise.
17958 * dumpfile.h (alt_dump_file): Delete decl.
17959 (dumps_are_enabled): New variable decl.
17960 (set_dump_file): New function decl.
17961 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
17963 * tree-nested.c (lower_nested_functions): Replace assignments to
17964 "dump_file" with calls to set_dump_file.
17966 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
17968 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
17969 goto_locus of each outgoing edge of each basic block.
17971 2018-06-28 Richard Biener <rguenther@suse.de>
17973 * dwarf2out.c (decl_scope_table): Remove.
17974 (push_decl_scope): Likewise.
17975 (pop_decl_scope): Likewise.
17976 (gen_type_die_for_member): Do not call push/pop_decl_scope.
17977 (gen_struct_or_union_type_die): Likewise.
17978 (gen_tagged_type_die): Likewise.
17979 (dwarf2out_init): Do not initialize decl_scope_table.
17980 (dwarf2out_c_finalize): Do not free it.
17982 2018-06-28 Richard Biener <rguenther@suse.de>
17984 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
17985 deciding whether to not re-use a DIE.
17987 2018-06-28 Richard Biener <rguenther@suse.de>
17989 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
17990 DW_AT_abstract_origin attribute.
17992 2018-06-28 Martin Liska <mliska@suse.cz>
17994 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
17995 Use newly introduced constants.
17996 * tree-switch-conversion.h (struct jump_table_cluster):
17997 Define max_ratio_for_size and max_ratio_for_speed.
17999 2018-06-28 Martin Liska <mliska@suse.cz>
18001 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
18002 Add new checking assert to catch invalid state.
18003 (jump_table_cluster::can_be_handled): Handle single case
18005 (jump_table_cluster::is_beneficial): Bail out for such case.
18006 (bit_test_cluster::find_bit_tests):
18007 Add new checking assert to catch invalid state.
18008 (bit_test_cluster::can_be_handled): Handle single case
18010 (bit_test_cluster::is_beneficial): Bail out for such case.
18011 (switch_decision_tree::analyze_switch_statement):
18014 2018-06-28 Martin Liska <mliska@suse.cz>
18016 * common.opt: Introduce -completion option.
18017 * gcc.c (driver_handle_option): Handle it.
18018 (driver::main): Print completions if completion
18020 * opt-suggestions.c (option_proposer::get_completions):
18022 (option_proposer::suggest_completion): Likewise.
18023 (option_proposer::find_param_completions): Likewise.
18024 (verify_autocompletions): Likewise.
18025 (test_completion_valid_options): Likewise.
18026 (test_completion_valid_params): Likewise.
18027 (in_completion_p): Likewise.
18028 (empty_completion_p): Likewise.
18029 (test_completion_partial_match): Likewise.
18030 (test_completion_garbage): Likewise.
18031 (opt_proposer_c_tests): Likewise.
18032 * opt-suggestions.h: Declare new functions.
18033 * opts.c (common_handle_option): Handle OPT__completion_.
18034 * selftest-run-tests.c (selftest::run_tests): Add
18035 opt_proposer_c_tests.
18036 * selftest.c (assert_str_startswith): New.
18037 * selftest.h (assert_str_startswith): Likewise.
18038 (opt_proposer_c_tests): New.
18039 (ASSERT_STR_STARTSWITH): Likewise.
18041 2018-06-28 Martin Liska <mliska@suse.cz>
18043 * Makefile.in: Add opt-suggestions.o.
18044 * gcc-main.c: Include opt-suggestions.h.
18045 * gcc.c (driver::driver): Likewise.
18046 (driver::~driver): Remove m_option_suggestions.
18047 (driver::build_option_suggestions): Moved to option_proposer.
18048 (driver::suggest_option): Likewise.
18049 (driver::handle_unrecognized_options): Use option_proposer.
18050 * gcc.h (class driver): Add new memver m_option_proposer.
18051 * opt-suggestions.c: New file.
18052 * opt-suggestions.h: New file.
18054 2018-06-28 Martin Liska <mliska@suse.cz>
18056 * vec.h (class auto_string_vec): New (moved from auto_argvec).
18057 (auto_string_vec::~auto_string_vec): Likewise.
18059 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
18061 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
18062 prevent_decl_creation_for_types fields up and add reset_location field.
18063 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
18064 statement if id->reset_location is true.
18065 (copy_edges_for_bb): Do not set goto_locus on the new edges if
18066 id->reset_location is true.
18067 (copy_phis_for_bb): Force input_location on the arguments if
18068 id->reset_location is true.
18069 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
18070 is set on the function to be inlined.
18072 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
18074 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
18076 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
18078 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
18079 registers for Pmode.
18080 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
18081 hard registers for the clobbered pseudo.
18083 2018-06-27 Paul Koning <ni1d@arrl.net>
18085 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
18086 mutually exclusive options.
18087 * config/pdp11/constraints.md (h): New constraint.
18088 (O): Update definition to match shift code generation.
18089 (D): New constraint.
18090 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
18092 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
18094 (output_jump): Change arguments.
18095 (pdp11_fixed_cc_regs): New function.
18096 (pdp11_cc_mode): Ditto.
18097 (pdp11_expand_shift): Ditto.
18098 (pdp11_assemble_shift): Ditto.
18099 (pdp11_small_shift): Ditto.
18100 (pdp11_branch_cost): Remove.
18101 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
18103 (pdp11_register_move_cost): Update for CC registers.
18104 (pdp11_rtx_costs): Add case for LSHIFTRT.
18105 (pdp11_output_jump): Add CCNZ mode conditional branches.
18106 (notice_update_cc_on_set): Remove.
18107 (pdp11_cc_mode): New function.
18108 (simple_memory_operand): Correct pre/post decrement case.
18109 (no_side_effect_operand): New function.
18110 (pdp11_regno_reg_class): Add CC_REGS class.
18111 (pdp11_fixed_cc_regs): New function.
18112 (pdp11_small_shift): New function.
18113 (pdp11_expand_shift): New function to expand shift insns.
18114 (pdp11_assemble_shift): New function to output shifts.
18115 (pdp11_branch_cost): Remove.
18116 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
18117 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
18118 (WCHAR_TYPE): Ditto.
18119 (PTRDIFF_TYPE): Ditto.
18120 (ADJUST_INSN_LENGTH): New macro.
18121 (FIXED_REGISTERS): Add CC registers.
18122 (CALL_USED_REGISTERS): Ditto.
18123 (reg_class): Ditto.
18124 (REG_CLASS_NAMES): Ditto.
18125 (REG_CLASS_CONTENTS): Ditto.
18126 (SELECT_CC_MODE): Use new function.
18127 (TARGET_FLAGS_REGNUM): New macro.
18128 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
18129 (cc0_reg_rtx): Remove.
18130 (CC_STATUS_MDEP): Remove.
18131 (CC_STATUS_MDEFP_INIT): Remove.
18132 (CC_IN_FPU): Remove.
18133 (NOTICE_UPDATE_CC): Remove.
18134 (REGISTER_NAMES): Add CC registers.
18135 (BRANCH_COST): Change to constant 1.
18136 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
18138 * config/pdp11/pdp11.opt (mbcopy): Remove.
18139 (mbcopy-builtin): Remove.
18140 (mbranch-cheap): Remove.
18141 (mbranch-expensive): Remove.
18142 * config/pdp11/predicates.md (expand_shift_operand): Update to
18143 match shift code generation.
18144 (ccnz_operator): New predicate.
18145 * doc/invoke.texi (PDP-11 Options): Remove deleted options
18146 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
18147 Remove non-existent option -mabshi, -mno-abshi. Document mutually
18149 * doc/md.texi (PDP-11): Document new D and h constraints. Update
18150 description of O constraint.
18152 2018-06-27 Jeff Law <law@redhat.com>
18153 Austin Law <austinklaw@gmail.com>
18155 * config/v850/v850.md (addsi3_set_flags): New pattern.
18156 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
18157 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
18158 (zero_extendhisi2_v850_set_flags): Likewise.
18159 (zero_extendqisi2_v850_set_flags): Likewise.
18160 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
18161 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
18162 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
18164 * config/v850/v850-protos.h (notice_update_cc): Remove.
18165 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
18166 (v850_print_operand): Handle 'D' and "d".
18167 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
18168 Add handling of arithmetic/logical operations compared against zero.
18169 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
18170 Do not look at v850_compare_op, instead get mode from last argument.
18171 (v850_gen_compare): Remove
18172 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
18173 after reload for prologue insns.
18174 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
18176 (construct_save_jarl): Likewise.
18177 (TARGET_FLAGS_REGNUM): Define.
18178 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
18179 (NOTICE_UPDATE_CC): Remove.
18180 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
18181 than cc0. Conditionalize on reload_completed.
18182 (cmpsi_insn, setfcc_insn): Likewise.
18183 (tst1 splitter): Turn into define_and_split which sets the flags
18185 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
18186 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
18187 (cstoresf4, cstoredf4): Clobber the flags.
18188 (cmpsi, cmpsf, cmpdf): Remove expanders.
18189 (setf_insn): Remove pattern.
18190 (addsi3): Turn into define_and_split which clobbers the flags after
18191 reload and a suitable pattern (addsi3_clobber_flags) for use after
18193 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
18194 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
18195 (ashrsi3, ashrsi3_v850e2): Likewise.
18196 (bins): Clobber the flags.
18197 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
18198 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
18199 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
18200 (call_value_internal_short, call_value_internal_long): Likewise.
18201 (callt_save_interrupt, callt_return_interrupt): Likewise.
18202 (save_interrupt, return_interrupt): Likewise.
18203 (callt_save_all_interrupt, save_all_interrupt): Likewise.
18204 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
18205 (restore_all_interrupt, _restore_all_interrupt): Likewise.
18206 (All FP comparisons): Only allow after reload has completed.
18208 (divh, divhu): Tweak output template.
18209 (branch_z_normal, branch_z_invert): Remove
18210 (branch_nz_normal, branch_nz_invert): Likewise.
18211 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
18213 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
18214 * config/v850/v850.c (notice_update_cc): Remove.
18215 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
18216 (CC_NO_CARRY): Likewise.
18217 (NOTICE_UPDATE_CC): Define to nothing.
18218 * config/v850/v850.md: Remove block comment on cc0 handling
18219 Remove "cc" attribute from all patterns. Remove cc_status handling
18220 from all patterns. Minor formatting fixes.
18222 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18224 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
18225 (cortex-a76.cortex-a55): Likewise.
18226 * config/aarch64/aarch64-tune.md: Regenerate.
18227 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
18228 cortex-a76.cortex-a55.
18230 2018-06-27 Jeff Law <law@redhat.com>
18232 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
18233 (MULTILIB_DIRNAMES): Similarly.
18235 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
18237 * gimple.h (gimple_return_retbnd): Delete.
18238 (gimple_return_set_retbnd): Likewise.
18239 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
18240 gimple_return_set_retbnd.
18241 * gimple-pretty-print.c (dump_gimple_return): Remove call to
18242 gimple_return_retbnd and adjust.
18243 * tree-inline.h (struct copy_body_data): Remove retbnd field.
18244 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
18245 Explicitly return NULL in a couple more cases. Move assertion
18246 on debug statements and remove unreachable code.
18247 (reset_debug_binding): Do not test id->retbnd.
18248 (expand_call_inline): Do not set it.
18250 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
18252 * configure.ac: Add --disable-gcov option.
18253 * configure: Regenerate.
18254 * Makefile.in: Honour @enable_gcov@.
18255 * doc/install.texi: Document --disable-gcov.
18257 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18259 * config/arm/arm-cpus.in (cortex-a76): New entry.
18260 (cortex-a76.cortex-a55): Likewise.
18261 * config/arm/arm-tables.opt: Regenerate.
18262 * config/arm/arm-tune.md: Likewise.
18263 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
18264 * doc/invoke.texi (ARM Options): Document cortex-a76 and
18265 cortex-a76.cortex-a55.
18267 2018-06-27 Tamar Christina <tamar.christina@arm.com>
18270 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
18272 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
18274 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
18276 (EPILOGUE_USES): Likewise.
18278 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
18280 * tree-inline.c (remap_location): New function extracted from...
18281 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
18282 (copy_phis_for_bb): ...here. Call remap_location.
18283 (copy_cfg_body): Adjust call to copy_edges_for_bb.
18285 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
18287 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
18288 unaligned vsx for 16B memset.
18290 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
18293 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
18294 ieee128_float_type_node to long_double_type_node unless
18295 TARGET_LONG_DOUBLE_128 is set.
18297 2018-06-26 David Malcolm <dmalcolm@redhat.com>
18299 * cfgloop.c (get_loop_location): Convert return type from
18300 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
18301 by implicit construction from rtx_insn *, and using
18302 dump_user_location_t::from_function_decl for the fallback case.
18303 * cfgloop.h (get_loop_location): Convert return type from
18304 location_t to dump_user_location_t.
18305 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
18306 dump_printf_loc to pass in a dump_location_t rather than a
18307 location_t, via the gimple stmt.
18308 * coverage.c (get_coverage_counts): Update calls to
18309 dump_printf_loc to pass in dump_location_t rather than a
18311 * doc/optinfo.texi (Dump types): Convert example of
18312 dump_printf_loc from taking "locus" to taking "insn". Update
18313 description of the "_loc" calls to cover dump_location_t.
18314 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
18316 (dump_user_location_t::dump_user_location_t): New constructors,
18317 from gimple *stmt and rtx_insn *.
18318 (dump_user_location_t::from_function_decl): New function.
18319 (dump_loc): Make static.
18320 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
18321 const dump_location_t &.
18322 (dump_generic_expr_loc): Delete.
18323 (dump_printf_loc): Convert param "loc" from location_t to
18324 const dump_location_t &.
18325 (selftest::test_impl_location): New function.
18326 (selftest::dumpfile_c_tests): New function.
18327 * dumpfile.h: Include "profile-count.h".
18328 (class dump_user_location_t): New class.
18329 (struct dump_impl_location_t): New struct.
18330 (class dump_location_t): New class.
18331 (dump_printf_loc): Convert 2nd param from source_location to
18332 const dump_location_t &.
18333 (dump_generic_expr_loc): Delete.
18334 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
18335 const dump_location_t &.
18336 * gimple-fold.c (fold_gimple_assign): Update call to
18337 dump_printf_loc to pass in a dump_location_t rather than a
18338 location_t, via the gimple stmt.
18339 (gimple_fold_call): Likewise.
18340 * gimple-loop-interchange.cc
18341 (loop_cand::analyze_iloop_reduction_var): Update for change to
18342 check_reduction_path.
18343 (tree_loop_interchange::interchange): Update for change to
18344 find_loop_location.
18345 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
18346 change in return-type of find_loop_location.
18347 (graphite_regenerate_ast_isl): Likewise.
18348 * graphite-optimize-isl.c (optimize_isl): Likewise.
18349 * graphite.c (graphite_transform_loops): Likewise.
18350 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
18351 pass in a dump_location_t rather than a location_t, via the
18353 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
18354 * ipa.c (walk_polymorphic_call_targets): Likewise.
18355 * loop-unroll.c (report_unroll): Convert "locus" param from
18356 location_t to dump_location_t.
18357 (decide_unrolling): Update for change to get_loop_location's
18359 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
18360 location_t to dump_user_location_t.
18361 (grid_find_single_omp_among_assignments_1): Updates calls to
18362 dump_printf_loc to pass in a dump_location_t rather than a
18363 location_t, via the gimple stmt.
18364 (grid_parallel_clauses_gridifiable): Convert "tloc" from
18365 location_t to dump_location_t. Updates calls to dump_printf_loc
18366 to pass in a dump_location_t rather than a location_t, via the
18368 (grid_inner_loop_gridifiable_p): Likewise.
18369 (grid_dist_follows_simple_pattern): Likewise.
18370 (grid_gfor_follows_tiling_pattern): Likewise.
18371 (grid_target_follows_gridifiable_pattern): Likewise.
18372 (grid_attempt_target_gridification): Convert initialization
18373 of local "grid" from memset to zero-initialization; FIXME: does
18374 this require C++11? Update call to dump_printf_loc to pass in a
18375 optinfo_location rather than a location_t, via the gimple stmt.
18376 * profile.c (read_profile_edge_counts): Updates call to
18377 dump_printf_loc to pass in a dump_location_t rather than a
18379 (compute_branch_probabilities): Likewise.
18380 * selftest-run-tests.c (selftest::run_tests): Call
18382 * selftest.h (dumpfile_c_tests): New decl.
18383 * tree-loop-distribution.c (pass_loop_distribution::execute):
18384 Update for change in return type of find_loop_location.
18385 * tree-parloops.c (parallelize_loops): Likewise.
18386 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
18387 "locus" from location_t to dump_user_location_t.
18388 (canonicalize_loop_induction_variables): Likewise.
18389 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
18390 for change in return type of find_loop_location.
18391 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
18392 to dump_printf_loc to pass in a dump_location_t rather than a
18393 location_t, via the stmt.
18394 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
18396 * tree-vect-loop-manip.c (find_loop_location): Convert return
18397 type from source_location to dump_user_location_t.
18398 (vect_do_peeling): Update for above change.
18399 (vect_loop_versioning): Update for change in type of
18401 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
18402 from location_t to dump_user_location_t.
18403 (vect_estimate_min_profitable_iters): Update for change in type
18405 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
18406 location_t to dump_location_t.
18407 (vect_slp_bb): Update for change in type of vect_location.
18408 * tree-vectorizer.c (vect_location): Convert from source_location
18409 to dump_user_location_t.
18410 (try_vectorize_loop_1): Update for change in vect_location's type.
18411 (vectorize_loops): Likewise.
18412 (increase_alignment): Likewise.
18413 * tree-vectorizer.h (vect_location): Convert from source_location
18414 to dump_user_location_t.
18415 (find_loop_location): Convert return type from source_location to
18416 dump_user_location_t.
18417 (check_reduction_path): Convert 1st param from location_t to
18418 dump_user_location_t.
18419 * value-prof.c (check_counter): Update call to dump_printf_loc to
18420 pass in a dump_user_location_t rather than a location_t; update
18421 call to error_at for change in type of "locus".
18422 (check_ic_target): Update call to dump_printf_loc to
18423 pass in a dump_user_location_t rather than a location_t, via the
18426 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
18428 * config/s390/s390.h (enum processor_flags): Do not use
18429 default tune parameter when -march was specified.
18431 2018-06-26 Jakub Jelinek <jakub@redhat.com>
18434 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
18435 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
18438 2018-06-26 Richard Biener <rguenther@suse.de>
18440 PR tree-optimization/86287
18442 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
18443 (vect_analyze_loop): Initialize n_stmts.
18445 2018-06-26 Richard Biener <rguenther@suse.de>
18447 PR middle-end/86271
18448 * fold-const.c (fold_convertible_p): Pointer extension
18451 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
18454 * dwarf2out.c (loc_list_has_views): Adjust comments.
18455 (dw_loc_list): Split single cross-partition range with
18458 2018-06-25 Jeff Law <law@redhat.com>
18460 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
18461 on -mbig-switch by default.
18463 * config/v850/predicates.md (const_float_1_operand): Fix match_code
18465 (const_float_0_operand): Remove unused predicate.
18466 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
18467 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
18468 (recipsf2): New expander. Original pattern now called
18470 (recipdf2, recipdf2_insn): Similarly.
18471 (rsqrtsf2, rsqrtsf2_insn): Similarly
18472 (rsqrtdf2, rsqrtdf2_insn): Similarly
18474 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
18476 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
18477 Simplify logic for FreeBSD (twice).
18479 2018-06-25 Martin Sebor <msebor@redhat.com>
18481 PR tree-optimization/86204
18482 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
18483 a strnlen result if it's less than the length of the string.
18485 2018-06-25 Martin Sebor <msebor@redhat.com>
18487 PR tree-optimization/85700
18488 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
18489 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
18490 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
18492 2018-06-25 Martin Sebor <msebor@redhat.com>
18494 * doc/extend.texi (Zero-length arrays): Update and clarify.
18496 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
18498 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
18499 added IEEE/IBM long double multilib support on PowerPC little
18500 endian Linux systems.
18501 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
18502 (MULTILIB_DEFAULTS): Likewise.
18503 * config/rs6000/rs6000.c (rs6000_option_override_internal):
18505 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
18506 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
18507 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
18509 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
18511 PR middle-end/86311
18512 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
18513 (REORDER_45): Likewise.
18515 2018-06-25 Jeff Law <law@redhat.com>
18517 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
18518 dividend to 32 bits. Adjust length.
18519 (udivmodhi4): Cleanup output template. Fix length.
18521 2018-06-25 Carl Love <cel@us.ibm.com>
18523 * config/rs6000/vsx.md: Change word selector to prefered location.
18525 2018-06-25 Richard Biener <rguenther@suse.de>
18527 PR tree-optimization/86304
18528 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
18529 epilogue-if-converted loops as well.
18531 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
18533 * lto-section-out.c (lto_begin_section): Do not print section
18534 name for noaddr and unnumbered dumps.
18536 2018-06-25 Richard Biener <rguenther@suse.de>
18538 * tree-vectorizer.h (struct vec_info_shared): New structure
18539 with parts split out from struct vec_info and loop_nest from
18540 struct _loop_vec_info.
18541 (struct vec_info): Adjust accordingly.
18542 (struct _loop_vec_info): Likewise.
18543 (LOOP_VINFO_LOOP_NEST): Adjust.
18544 (LOOP_VINFO_DATAREFS): Likewise.
18545 (LOOP_VINFO_DDRS): Likewise.
18546 (struct _bb_vec_info): Likewise.
18547 (BB_VINFO_DATAREFS): Likewise.
18548 (BB_VINFO_DDRS): Likewise.
18549 (struct _stmt_vec_info): Add dr_aux member.
18550 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
18551 (DR_MISALIGNMENT_UNINITIALIZED): New.
18552 (set_dr_misalignment): Adjust.
18553 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
18554 (vect_analyze_loop): Adjust prototype.
18555 (vect_analyze_loop_form): Likewise.
18556 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
18557 Compute dependences lazily.
18558 (vect_record_base_alignments): Use shared datarefs/ddrs.
18559 (vect_verify_datarefs_alignment): Likewise.
18560 (vect_analyze_data_refs_alignment): Likewise.
18561 (vect_analyze_data_ref_accesses): Likewise.
18562 (vect_analyze_data_refs): Likewise.
18563 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
18564 constructor parameter for shared part.
18565 (vect_analyze_loop_form): Pass in shared part and adjust.
18566 (vect_analyze_loop_2): Pass in storage for the number of
18567 stmts. Move loop nest finding to the caller. Compute
18569 (vect_analyze_loop): Pass in shared part.
18570 (vect_transform_loop): Verify shared datarefs are unchanged.
18571 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
18572 constructor parameter for shared part.
18573 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
18574 (vect_slp_bb): Verify shared datarefs are unchanged before
18576 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
18578 (new_stmt_vec_info): Initialize DR_AUX misalignment to
18579 DR_MISALIGNMENT_UNINITIALIZED.
18580 * tree-vectorizer.c (vec_info::vec_info): Add constructor
18581 parameter for shared part.
18582 (vec_info::~vec_info): Adjust.
18583 (vec_info_shared::vec_info_shared): New.
18584 (vec_info_shared::~vec_info_shared): Likewise.
18585 (vec_info_shared::save_datarefs): Likewise.
18586 (vec_info_shared::check_datarefs): Likewise.
18587 (try_vectorize_loop_1): Construct shared part live for analyses
18588 of a single loop for multiple vector sizes.
18589 * tree-parloops.c (gather_scalar_reductions): Adjust.
18591 2018-06-25 Richard Biener <rguenther@suse.de>
18593 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
18594 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
18595 (vect_analyze_data_refs): Remove similar code from here and
18596 simplify accordingly.
18598 2018-06-25 Richard Biener <rguenther@suse.de>
18600 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
18601 for reverse storage order accesses rather than asserting
18602 they cannot happen here.
18604 2018-06-25 Tom de Vries <tdevries@suse.de>
18607 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
18608 Use data16 instead of .byte for insn prefix.
18610 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
18613 * parser.c (make_char_string_pack): Pass this literal chars
18614 through cpp_interpret_string.
18615 (cp_parser_userdef_numeric_literal): Check the result of
18616 make_char_string_pack.
18618 2018-06-24 Maya Rashish <coypu@sdf.org>
18620 * ginclude/stddef.h: Simplify conditions around avoiding
18621 re-definition of __size_t.
18623 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
18625 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
18626 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
18628 2018-06-22 Maya Rashish <coypu@sdf.org>
18630 * doc/invoke.texi (mno-fancy-math-387): Update for changes
18631 made to OpenBSD and NetBSD through the years.
18633 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18635 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
18636 behavior of vec_pack (vector double, vector double) to match
18637 behavior of vec_float2 (vector double, vector double).
18639 2018-06-22 Olivier Hainque <hainque@adacore.com>
18641 * gimplify.c (gimplify_function_tree): Prevent creation
18642 of a trampoline for the address of the current function
18643 passed to entry/exit instrumentation hooks.
18645 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
18648 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
18651 2018-06-22 Martin Liska <mliska@suse.cz>
18653 PR tree-optimization/86263
18654 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
18655 Bail out if is_enabled is false.
18656 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
18658 (jump_table_cluster::is_enabled): New function.
18660 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
18662 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
18663 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
18664 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
18665 (lto_input_ts_binfo_tree_pointers): Likewise.
18666 * tree-streamer-out.c (streamer_write_tree_bitfields,
18667 write_ts_binfo_tree_pointers): Likewise.
18668 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
18670 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
18672 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
18674 2018-06-22 Martin Liska <mliska@suse.cz>
18676 * symbol-summary.h (get): Make it pure and inline move
18677 functionality from ::get function.
18678 (get): Remove and inline into ::get and ::get_create.
18679 (get_create): Move code from ::get function.
18681 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18684 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
18685 -x assembler-with-cpp.
18687 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18689 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
18690 _FILE_OFFSET_BITS=64 for C++.
18692 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
18694 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
18695 conversion insn that shows up when pr85657-3.c is compiled using
18696 IEEE 128-bit long double.
18697 (neg<mode>2_internal): Use the correct mode to check whether the
18698 mode is IBM extended.
18699 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
18700 multiply and divide external functions from being created more
18703 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
18705 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
18707 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
18708 the edge can be forwarded.
18709 (cfg_layout_merge_blocks): Likewise.
18711 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
18713 * except.c (finish_eh_generation): Commit edge insertions only after
18714 the EH edges have been redirected from post-landing to landing pads.
18716 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
18718 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
18719 create_tmp_var_for to create the FRAME decl.
18720 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
18722 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
18724 * tree-inline.c (copy_edges_for_bb): Minor tweak.
18725 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
18726 debug statement when resetting its value.
18727 (expand_call_inline): Copy the locus of the call onto the assignment
18728 of the return value, if any. Use local variable in more cases.
18730 2018-06-21 Martin Liska <mliska@suse.cz>
18732 * ipa-pure-const.c (propagate_nothrow): Use
18733 funct_state_summaries->get.
18734 (dump_malloc_lattice): Likewise.
18735 (propagate_malloc): Likewise.
18737 2018-06-21 Richard Biener <rguenther@suse.de>
18739 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
18740 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
18741 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
18743 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
18744 BLOCK_ABSTRACT_ORIGIN unconditionally.
18746 2018-06-21 David Malcolm <dmalcolm@redhat.com>
18748 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
18750 * ipa-reference.c (ipa_reference_c_finalize): Delete
18751 ipa_ref_opt_sum_summaries and set it to NULL.
18753 2018-06-21 Tom de Vries <tdevries@suse.de>
18755 PR tree-optimization/85859
18756 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
18757 test with comment from bb_no_side_effects_p.
18759 2018-06-21 Richard Biener <rguenther@suse.de>
18761 PR tree-optimization/86232
18762 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
18763 max for constant niter.
18765 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
18767 * config/aarch64/aarch64-simd.md
18768 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
18770 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
18772 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
18773 Make opernads of the unspec commutative.
18775 2018-06-21 Richard Biener <rguenther@suse.de>
18777 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
18778 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
18779 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
18780 (vect_analyze_data_ref_dependence): Re-order checks to deal with
18782 (vect_record_base_alignments): Do not record base alignment
18783 for gathers or scatters.
18784 (vect_compute_data_ref_alignment): Drop return value that is always
18785 true. Bail out early for gathers or scatters.
18786 (vect_enhance_data_refs_alignment): Bail out early for gathers
18788 (vect_find_same_alignment_drs): Likewise.
18789 (vect_analyze_data_refs_alignment): Remove dead code.
18790 (vect_slp_analyze_and_verify_node_alignment): Likewise.
18791 (vect_analyze_data_refs): For possible gathers or scatters do
18792 not create an alternate DR, just check their possible validity
18793 and mark them. Adjust DECL_NONALIASED handling to not rely
18794 on DR_BASE_ADDRESS.
18795 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
18796 update inits of gathers or scatters.
18797 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
18798 Also copy gather/scatter flag to pattern vinfo.
18800 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
18802 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
18803 behavior of vec_packsu (vector unsigned long long, vector unsigned
18804 long long) to match behavior of vec_packs with same signature.
18806 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
18807 Thomas Schwinge <thomas@codesourcery.com>
18808 Cesar Philippidis <cesar@codesourcery.com>
18810 * gimplify.c (gimplify_scan_omp_clauses): Add support for
18811 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
18812 (gimplify_adjust_omp_clauses): Likewise.
18813 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
18814 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
18815 (gimplify_omp_target_update): Update handling of acc update and
18817 * omp-low.c (install_var_field): Remove unused parameter
18818 base_pointers_restrict.
18819 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
18820 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
18822 (omp_target_base_pointers_restrict_p): Delete.
18823 (scan_omp_target): Update call to scan_sharing_clauses.
18824 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
18826 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
18827 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
18828 (convert_local_omp_clauses): Likewise.
18829 * tree-pretty-print.c (dump_omp_clause): Likewise.
18830 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
18832 (omp_clause_code_name): Likewise.
18834 2018-06-20 Jakub Jelinek <jakub@redhat.com>
18837 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
18840 PR tree-optimization/86231
18841 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
18842 anti-range don't overwrite *vr0min before using it to compute *vr0max.
18844 2018-06-20 Tom de Vries <tdevries@suse.de>
18846 PR tree-optimization/86097
18847 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
18848 iv type if signedness of iv type is not the same as that of *nit.
18850 2018-06-20 Jakub Jelinek <jakub@redhat.com>
18852 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
18853 EDGE_EH edges, verify they are all EDGE_EH.
18855 2018-06-20 Maya Rashish <coypu@sdf.org>
18857 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
18859 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18861 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
18862 * config/aarch64/aarch64.c (xgene1_tunings): Add
18863 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
18864 (aarch64_mode_valid_for_sched_fusion_p):
18865 Allow 16-byte modes.
18866 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
18867 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
18869 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
18871 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
18872 * config/aarch64/iterators.md (VQ2): New mode iterator.
18874 2018-06-20 Martin Liska <mliska@suse.cz>
18876 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
18877 Change default ratio from 10 to 8.
18879 2018-06-20 Martin Liska <mliska@suse.cz>
18881 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
18883 (bit_test_cluster::find_bit_tests): Likewise.
18884 (switch_decision_tree::analyze_switch_statement): Find clusters.
18885 * tree-switch-conversion.h (struct jump_table_cluster): Document
18888 2018-06-20 Martin Liska <mliska@suse.cz>
18890 * tree-switch-conversion.c (switch_conversion::collect):
18891 Record m_uniq property.
18892 (switch_conversion::expand): Bail out for special conditions.
18893 (group_cluster::~group_cluster): New.
18894 (group_cluster::group_cluster): Likewise.
18895 (group_cluster::dump): Likewise.
18896 (jump_table_cluster::emit): New.
18897 (switch_decision_tree::fix_phi_operands_for_edges): New.
18898 (struct case_node): Remove struct.
18899 (jump_table_cluster::can_be_handled): New.
18900 (case_values_threshold): Moved to header.
18901 (reset_out_edges_aux): Likewise.
18902 (jump_table_cluster::is_beneficial): New.
18903 (bit_test_cluster::can_be_handled): Likewise.
18904 (add_case_node): Remove.
18905 (bit_test_cluster::is_beneficial): New.
18906 (case_bit_test::cmp): New.
18907 (bit_test_cluster::emit): New.
18908 (expand_switch_as_decision_tree_p): Remove.
18909 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
18910 (fix_phi_operands_for_edge): Likewise.
18911 (switch_decision_tree::analyze_switch_statement): New.
18912 (compute_cases_per_edge): Move ...
18913 (switch_decision_tree::compute_cases_per_edge): ... here.
18914 (try_switch_expansion): Likewise.
18915 (switch_decision_tree::try_switch_expansion): Likewise.
18916 (record_phi_operand_mapping): Likewise.
18917 (switch_decision_tree::record_phi_operand_mapping): Likewise.
18918 (emit_case_decision_tree): Likewise.
18919 (switch_decision_tree::emit): Likewise.
18920 (balance_case_nodes): Likewise.
18921 (switch_decision_tree::balance_case_nodes): Likewise.
18922 (dump_case_nodes): Likewise.
18923 (switch_decision_tree::dump_case_nodes): Likewise.
18924 (emit_jump): Likewise.
18925 (switch_decision_tree::emit_jump): Likewise.
18926 (emit_cmp_and_jump_insns): Likewise.
18927 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
18928 (emit_case_nodes): Likewise.
18929 (switch_decision_tree::emit_case_nodes): Likewise.
18930 (conditional_probability): Remove.
18931 * tree-switch-conversion.h (enum cluster_type): New.
18933 (struct cluster): Likewise.
18934 (cluster::cluster): Likewise.
18935 (struct simple_cluster): Likewise.
18936 (simple_cluster::simple_cluster): Likewise.
18937 (struct group_cluster): Likewise.
18938 (struct jump_table_cluster): Likewise.
18939 (struct bit_test_cluster): Likewise.
18940 (struct min_cluster_item): Likewise.
18941 (struct case_tree_node): Likewise.
18942 (case_tree_node::case_tree_node): Likewise.
18943 (jump_table_cluster::case_values_threshold): Likewise.
18944 (struct case_bit_test): Likewise.
18945 (struct switch_decision_tree): Likewise.
18946 (struct switch_conversion): Likewise.
18947 (switch_decision_tree::reset_out_edges_aux): Likewise.
18949 2018-06-20 Martin Liska <mliska@suse.cz>
18951 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
18952 (hoist_edge_and_branch_if_true): Likewise.
18953 (expand_switch_using_bit_tests_p): Likewise.
18954 (struct case_bit_test): Likewise.
18955 (case_bit_test_cmp): Likewise.
18956 (emit_case_bit_tests): Likewise.
18957 (switch_conversion::switch_conversion): New class.
18958 (struct switch_conv_info): Remove old struct.
18959 (collect_switch_conv_info): More to ...
18960 (switch_conversion::collect): ... this.
18961 (check_range): Likewise.
18962 (switch_conversion::check_range): Likewise.
18963 (check_all_empty_except_final): Likewise.
18964 (switch_conversion::check_all_empty_except_final): Likewise.
18965 (check_final_bb): Likewise.
18966 (switch_conversion::check_final_bb): Likewise.
18967 (create_temp_arrays): Likewise.
18968 (switch_conversion::create_temp_arrays): Likewise.
18969 (free_temp_arrays): Likewise.
18970 (gather_default_values): Likewise.
18971 (switch_conversion::gather_default_values): Likewise.
18972 (build_constructors): Likewise.
18973 (switch_conversion::build_constructors): Likewise.
18974 (constructor_contains_same_values_p): Likewise.
18975 (switch_conversion::contains_same_values_p): Likewise.
18976 (array_value_type): Likewise.
18977 (switch_conversion::array_value_type): Likewise.
18978 (build_one_array): Likewise.
18979 (switch_conversion::build_one_array): Likewise.
18980 (build_arrays): Likewise.
18981 (switch_conversion::build_arrays): Likewise.
18982 (gen_def_assigns): Likewise.
18983 (switch_conversion::gen_def_assigns): Likewise.
18984 (prune_bbs): Likewise.
18985 (switch_conversion::prune_bbs): Likewise.
18986 (fix_phi_nodes): Likewise.
18987 (switch_conversion::fix_phi_nodes): Likewise.
18988 (gen_inbound_check): Likewise.
18989 (switch_conversion::gen_inbound_check): Likewise.
18990 (process_switch): Use the newly created class.
18991 (switch_conversion::expand): New.
18992 (switch_conversion::~switch_conversion): New.
18993 * tree-switch-conversion.h: New file.
18995 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
18997 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
18998 tree-vect-patterns.c.
18999 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
19000 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
19001 (vect_recog_sad_pattern): Likewise.
19002 (vect_recog_widen_sum_pattern): Likewise.
19003 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
19004 (vect_recog_widen_shift_pattern): Remove the type_in argument.
19005 (vect_recog_rotate_pattern): Likewise.
19006 (vect_recog_mult_pattern): Likewise.
19007 (vect_recog_vector_vector_shift_pattern): Likewise.
19008 (vect_recog_divmod_pattern): Likewise.
19009 (vect_recog_mixed_size_cond_pattern): Likewise.
19010 (vect_recog_bool_pattern): Likewise.
19011 (vect_recog_mask_conversion_pattern): Likewise.
19012 (vect_try_gather_scatter_pattern): Likewise.
19013 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
19014 (vect_recog_over_widening_pattern): Likewise.
19015 (vect_recog_gather_scatter_pattern): Likewise.
19016 (vect_recog_func_ptr): Move from tree-vectorizer.h
19017 (vect_vect_recog_func_ptrs): Move further down the file.
19018 (vect_recog_func): Likewise. Remove the third argument.
19019 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
19020 (vect_pattern_recog_1): Expect the pattern function to do any
19021 necessary target tests. Also expect it to provide a vector type.
19022 Remove the type_in handling.
19024 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
19026 * tree-vect-patterns.c (vect_pattern_detected): New function.
19027 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
19028 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
19029 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
19030 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
19031 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
19032 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
19033 (vect_recog_mask_conversion_pattern)
19034 (vect_try_gather_scatter_pattern): Likewise.
19036 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
19038 * tree-vect-patterns.c (vect_get_internal_def): New function.
19039 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
19040 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
19041 (search_type_for_mask_1): Use it.
19043 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
19045 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
19046 redundant WIDEN_SUM_EXPR handling.
19047 (vect_recog_sad_pattern): Likewise.
19049 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
19051 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
19052 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
19053 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
19054 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
19055 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
19057 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
19059 * tree-vect-stmts.c (vectorizable_call): Make sure that we
19060 use the stmt_vec_info of the original bb statement for the
19061 new zero assignment, even if the call is part of a pattern.
19063 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
19065 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
19066 that the sequence is attached to the original statement rather
19067 than the pattern statement.
19068 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
19069 PATTERN_DEF_SEQ from the original statement rather than
19070 the main pattern statement.
19071 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
19072 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
19073 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
19075 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
19077 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
19078 definition statements before the early exit for statements that aren't
19080 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
19082 (vect_transform_loop): ...here. Process pattern definition
19083 statements without first checking whether the main pattern
19084 statement is live or relevant.
19086 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
19088 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
19089 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
19091 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
19093 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
19094 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
19095 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
19096 (expand_block_compare): Change select_block_compare_mode call.
19097 (expand_strncmp_align_check): Use new functions, fix comment.
19098 (emit_final_str_compare_gpr): New function.
19099 (expand_strn_compare): Refactor and clean up code.
19100 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
19102 2018-06-19 Tony Reix <tony.reix@atos.com>
19103 Damien Bergamini <damien.bergamini@atos.com>
19104 David Edelsohn <dje.gcc@gmail.com>
19106 * collect2.c (static_obj): New variable.
19107 (static_libs): New variable.
19108 (is_in_list): Uncomment declaration.
19109 (main): Track AIX libraries linked statically.
19110 (is_in_list): Uncomment definition.
19111 (scan_prog_file): Don't add AIX shared libraries initializer
19112 to constructor list if linking statically.
19114 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
19116 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
19118 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
19120 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
19122 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
19125 2018-06-19 Martin Liska <mliska@suse.cz>
19127 * config/i386/i386.c (ix86_can_inline_p): Do not use
19128 ipa_fn_summaries::get_create.
19129 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
19131 (devirtualization_time_bonus): Likewise.
19132 (ipcp_propagate_stage): Likewise.
19133 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
19134 (edge_set_predicate): Likewise.
19135 (evaluate_conditions_for_known_args): Likewise.
19136 (evaluate_properties_for_edge): Likewise.
19137 (ipa_call_summary::reset): Tranform to ...
19138 (ipa_call_summary::~ipa_call_summary): ... this.
19139 (ipa_fn_summary::reset): Transform to ...
19140 (ipa_fn_summary::~ipa_fn_summary): ... this.
19141 (ipa_fn_summary_t::remove): Rename to ...
19142 (ipa_fn_summary_t::remove_callees): ... this.
19143 (ipa_fn_summary_t::duplicate): Use placement new
19144 instead of memory copy.
19145 (ipa_call_summary_t::duplicate): Likewise.
19146 (ipa_call_summary_t::remove): Remove.
19147 (dump_ipa_call_summary): Change get_create to get.
19148 (ipa_dump_fn_summary): Dump only when summary exists.
19149 (analyze_function_body): Use symbol_summary::get instead
19151 (compute_fn_summary): Likewise.
19152 (estimate_edge_devirt_benefit): Likewise.
19153 (estimate_edge_size_and_time): Likewise.
19154 (inline_update_callee_summaries): Likewise.
19155 (remap_edge_change_prob): Likewise.
19156 (remap_edge_summaries): Likewise.
19157 (ipa_merge_fn_summary_after_inlining): Likewise.
19158 (write_ipa_call_summary): Likewise.
19159 (ipa_fn_summary_write): Likewise.
19160 (ipa_free_fn_summary): Likewise.
19161 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
19162 (struct ipa_call_summary): Likewise.
19163 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
19165 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
19166 (estimate_size_after_inlining): Likewise.
19167 (estimate_growth): Likewise.
19168 (growth_likely_positive): Likewise.
19169 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
19170 (inline_call): Likewise.
19171 * ipa-inline.c (caller_growth_limits): Likewise.
19172 (can_inline_edge_p): Likewise.
19173 (can_inline_edge_by_limits_p): Likewise.
19174 (compute_uninlined_call_time): Likewise.
19175 (compute_inlined_call_time): Likewise.
19176 (want_inline_small_function_p): Likewise.
19177 (edge_badness): Likewise.
19178 (update_caller_keys): Likewise.
19179 (update_callee_keys): Likewise.
19180 (inline_small_functions): Likewise.
19181 (inline_to_all_callers_1): Likewise.
19182 (dump_overall_stats): Likewise.
19183 (early_inline_small_functions): Likewise.
19184 (early_inliner): Likewise.
19185 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
19186 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
19187 * ipa-pure-const.c (malloc_candidate_p): Likewise.
19188 * ipa-split.c (execute_split_functions): Likewise.
19189 * symbol-summary.h: Likewise.
19190 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
19192 2018-06-19 Richard Biener <rguenther@suse.de>
19194 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
19195 (vectorize_loops): ... here. Fix dbgcnt handling.
19196 (try_vectorize_loop): Wrap try_vectorize_loop_1.
19198 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
19201 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
19202 ieee128 argument takes up only one (vector) register, not two (floating
19205 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
19207 * gimplify.c (gimplify_init_constructor): Really never clear for an
19208 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
19210 2018-06-19 Richard Biener <rguenther@suse.de>
19212 PR tree-optimization/86179
19213 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
19214 after failed recognition.
19216 2018-06-18 Martin Sebor <msebor@redhat.com>
19218 PR middle-end/85602
19219 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
19220 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
19221 Handle integer subtraction.
19222 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
19223 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
19225 2018-06-18 David Malcolm <dmalcolm@redhat.com>
19227 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
19228 param from rtx to rtx_insn *.
19229 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
19231 (frv_ifcvt_modify_insn): Likwise.
19232 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
19233 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
19234 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
19235 as_a <rtx_insn *> cast to local "unprotected_region" once
19236 it's been established that it's not NULL or pc_rtx.
19237 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
19238 param "sethi" from rtx to rtx_insn *.
19239 (nds32_group_float_insns): Likewise for param "insn".
19240 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
19242 (vax_output_int_subtract): Likewise.
19243 * config/vax/vax.c (vax_output_int_add): Likewise for param
19245 (vax_output_int_subtract): Likewise.
19246 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
19247 (emit_pattern_after): Likewise for param "after".
19248 (emit_insn_after): Likewise.
19249 (emit_jump_insn_after): Likewise.
19250 (emit_call_insn_after): Likewise.
19251 (emit_debug_insn_after): Likewise.
19252 (emit_pattern_before): Likewise for param "before".
19253 (emit_insn_before): Likewise.
19254 (emit_jump_insn_before): Likewise.
19255 * final.c (get_insn_template): Likewise for param "insn", removing
19257 * output.h (get_insn_template): Likewise for 2nd param.
19258 * rtl.h (emit_insn_before): Likewise.
19259 (emit_jump_insn_before): Likewise.
19260 (emit_debug_insn_before_noloc): Likewise.
19261 (emit_insn_after): Likewise.
19262 (emit_jump_insn_after): Likewise.
19263 (emit_call_insn_after): Likewise.
19264 (emit_debug_insn_after): Likewise.
19265 (set_insn_deleted): Likewise for param.
19267 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
19270 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
19271 floating point modes, so that IFmode is numerically greater than
19272 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
19273 to declare the ordering. This prevents IFmode from being
19274 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
19275 machine. Include rs6000-modes.h to share the fractional values
19276 between genmodes* and the rest of the compiler.
19277 (IFmode): Likewise.
19278 (KFmode): Likewise.
19279 (TFmode): Likewise.
19280 * config/rs6000/rs6000-modes.h: New file.
19281 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
19282 meaning of rs6000_long_double_size so that 126..128 selects an
19283 appropriate 128-bit floating point type.
19284 (rs6000_option_override_internal): Likewise.
19285 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
19286 (TARGET_LONG_DOUBLE_128): Change the meaning of
19287 rs6000_long_double_size so that 126..128 selects an appropriate
19288 128-bit floating point type.
19289 (LONG_DOUBLE_TYPE_SIZE): Update comment.
19290 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
19291 source and destination to match the standard usage.
19292 (truncifkf2): Likewise.
19293 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
19294 ISA 2.07 to use an explicit clobber, instead of passing in a
19296 (copysign<mode>3_soft): Likewise.
19298 2018-06-18 David Malcolm <dmalcolm@redhat.com>
19300 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
19301 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
19302 (vect_slp_analyze_instance_dependence): Likewise.
19303 (vect_enhance_data_refs_alignment): Likewise.
19304 (vect_analyze_data_refs_alignment): Likewise.
19305 (vect_slp_analyze_and_verify_instance_alignment
19306 (vect_analyze_data_ref_accesses): Likewise.
19307 (vect_prune_runtime_alias_test_list): Likewise.
19308 (vect_analyze_data_refs): Likewise.
19309 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
19310 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19311 (vect_analyze_scalar_cycles_1): Likewise.
19312 (vect_get_loop_niters): Likewise.
19313 (vect_analyze_loop_form_1): Likewise.
19314 (vect_update_vf_for_slp): Likewise.
19315 (vect_analyze_loop_operations): Likewise.
19316 (vect_analyze_loop): Likewise.
19317 (vectorizable_induction): Likewise.
19318 (vect_transform_loop): Likewise.
19319 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
19320 * tree-vect-slp.c (vect_analyze_slp): Likewise.
19321 (vect_make_slp_decision): Likewise.
19322 (vect_detect_hybrid_slp): Likewise.
19323 (vect_slp_analyze_operations): Likewise.
19324 (vect_slp_bb): Likewise.
19325 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
19326 (vectorizable_bswap): Likewise.
19327 (vectorizable_call): Likewise.
19328 (vectorizable_simd_clone_call): Likewise.
19329 (vectorizable_conversion): Likewise.
19330 (vectorizable_assignment): Likewise.
19331 (vectorizable_shift): Likewise.
19332 (vectorizable_operation): Likewise.
19333 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
19335 2018-06-18 Martin Sebor <msebor@redhat.com>
19337 PR tree-optimization/81384
19338 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
19339 * builtins.c (expand_builtin_strnlen): New function.
19340 (expand_builtin): Call it.
19341 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
19342 * builtins.def (BUILT_IN_STRNLEN): New.
19343 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
19344 Warn for bounds in excess of maximum object size.
19345 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
19346 single-value ranges. Handle strnlen.
19347 (handle_builtin_strlen): Handle strnlen.
19348 (strlen_check_and_optimize_stmt): Same.
19349 * doc/extend.texi (Other Builtins): Document strnlen.
19351 2018-06-18 Maya Rashish <coypu@sdf.org>
19353 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
19354 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
19355 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
19357 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
19359 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
19361 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19363 * tree.c (escaped_string::escape): Replace cast to char * by
19364 const_cast<char *> (unescaped).
19366 2018-06-18 Nick Clifton <nickc@redhat.com>
19369 * tree.c (escaped_string): New class. Converts an unescaped
19370 string into its escaped equivalent.
19371 (warn_deprecated_use): Use the new class to convert the
19372 deprecation message, if present.
19373 (test_escaped_strings): New self test.
19374 (test_c_tests): Add test_escaped_strings.
19375 * doc/extend.texi (deprecated): Add a note that the
19376 deprecation message is affected by the -fmessage-length
19377 option, and that control characters will be escaped.
19378 (#pragma GCC error): Document this pragma.
19379 (#pragma GCC warning): Likewise.
19380 * doc/invoke.texi (-fmessage-length): Document this option's
19381 effect on the #warning and #error preprocessor directives and
19382 the deprecated attribute.
19384 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
19386 * tree.c (decl_value_expr_lookup): Revert latest change.
19387 (decl_value_expr_insert): Likewise.
19389 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
19391 * gimplify.c (nonlocal_vlas): Delete.
19392 (nonlocal_vla_vars): Likewise.
19393 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
19395 (gimplify_body): Do not create and destroy nonlocal_vlas.
19396 * tree-nested.c: Include diagnostic.h.
19397 (use_pointer_in_frame): Tweak.
19398 (lookup_field_for_decl): Add assertion and declare the transformation.
19399 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
19400 internal error when the reference is in a wrong context. Do not
19401 create a debug decl by default.
19402 (note_nonlocal_block_vlas): Delete.
19403 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
19404 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
19405 create a debug decl by default.
19406 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
19407 call is in a wrong context.
19408 (fixup_vla_decls): New function.
19409 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
19410 debug variables were created.
19411 * tree.c (decl_value_expr_lookup): Add checking assertion.
19412 (decl_value_expr_insert): Likewise.
19414 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
19416 PR middle-end/82479
19417 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
19418 * tree-scalar-evolution.c (interpret_expr): Likewise.
19419 (expression_expensive_p): Likewise.
19420 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
19421 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
19422 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
19423 (ssa_defined_by_minus_one_stmt_p): New.
19425 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
19427 PR middle-end/64946
19428 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
19429 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
19430 * dojump.c (do_jump): Likewise.
19431 * expr.c (expand_expr_real_2): Check operand type's sign.
19432 * fold-const.c (const_unop): Handle ABSU_EXPR.
19433 (fold_abs_const): Likewise.
19434 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
19435 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
19436 (strip_sign_op_1): Likesise.
19437 * match.pd: Add new pattern to generate ABSU_EXPR.
19438 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
19439 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
19440 * tree-eh.c (operation_could_trap_helper_p): Likewise.
19441 * tree-inline.c (estimate_operator_cost): Likewise.
19442 * tree-pretty-print.c (dump_generic_node): Likewise.
19443 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
19444 * tree.def (ABSU_EXPR): New.
19446 2018-06-16 Jakub Jelinek <jakub@redhat.com>
19448 PR middle-end/86095
19449 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
19450 documented as preserved for backward compatibility only.
19451 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
19453 PR rtl-optimization/86108
19454 * bb-reorder.c (create_forwarder_block): Renamed to ...
19455 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
19456 jump from new landing pad to the second part.
19457 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
19460 2018-06-15 Jakub Jelinek <jakub@redhat.com>
19462 PR middle-end/85878
19463 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
19464 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
19465 Only call store_expr for halves if the mode is the same.
19467 PR middle-end/86123
19468 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
19469 Fix up comment formatting.
19471 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
19473 * typed-splay-tree.h (typed_splay_tree::remove): New function.
19474 (typed_splay_tree::closure,
19475 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
19476 (typed_splay_tree::typed_splay_tree,
19477 typed_splay_tree::operator =): Declared private.
19478 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
19479 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
19480 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
19481 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
19482 typed_splay_tree::splay_tree_splay,
19483 typed_splay_tree::splay_tree_foreach_helper,
19484 typed_splay_tree::splay_tree_insert,
19485 typed_splay_tree::splay_tree_remove,
19486 typed_splay_tree::splay_tree_lookup,
19487 typed_splay_tree::splay_tree_predecessor,
19488 typed_splay_tree::splay_tree_successor,
19489 typed_splay_tree::splay_tree_min,
19490 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
19491 (typed_splay_tree::root, typed_splay_tree::comp,
19492 typed_splay_tree::delete_key,
19493 typed_splay_tree::delete_value): New data members.
19494 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
19495 typed_splay_tree::remove.
19497 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
19499 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
19500 -mginv and -mno-ginv to the assembler.
19501 * config/mips/mips.opt (-mcrc): New option.
19502 (-mginv): Likewise.
19503 * doc/invoke.text (-mcrc): Document.
19504 (-mginv): Likewise.
19506 2018-06-15 Nick Clifton <nickc@redhat.com>
19509 * tree.c (escaped_string): New class. Converts an unescaped
19510 string into its escaped equivalent.
19511 (warn_deprecated_use): Use the new class to convert the
19512 deprecation message, if present.
19513 (test_escaped_strings): New self test.
19514 (test_c_tests): Add test_escaped_strings.
19515 * doc/extend.texi (deprecated): Add a note that the
19516 deprecation message is affected by the -fmessage-length
19517 option, and that control characters will be escaped.
19518 (#pragma GCC error): Document this pragma.
19519 (#pragma GCC warning): Likewise.
19520 * doc/invoke.texi (-fmessage-length): Document this option's
19521 effect on the #warning and #error preprocessor directives and
19522 the deprecated attribute.
19524 2018-06-15 Richard Biener <rguenther@suse.de>
19526 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
19527 here, also noting vector size used.
19528 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
19529 size used in MSG_OPTIMIZED_LOCATIONS dump.
19530 (pass_slp_vectorize::execute): Adjust.
19532 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
19535 * config/arc/arc.c (arc_return_address_register): Fix
19538 2018-06-15 Richard Biener <rguenther@suse.de>
19540 PR middle-end/86159
19541 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
19542 leave useless conversion stripping to force_gimple_operand_gsi.
19543 (gimplify_build2): Likewise.
19544 (gimplify_build1): Likewise.
19546 2018-06-15 Richard Biener <rguenther@suse.de>
19548 PR middle-end/86076
19549 * tree-cfg.c (move_stmt_op): unshare invariant addresses
19550 before adjusting their block.
19552 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
19554 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
19555 multilibs for *-*-rtems*.
19556 * config/riscv/t-rtems: New file.
19558 2018-06-14 Jakub Jelinek <jakub@redhat.com>
19560 PR middle-end/86122
19561 * match.pd ((A +- CST1) +- CST2): Punt if last resort
19562 unsigned_type_for returns NULL.
19565 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
19566 subregs of multi-word pseudos unless the float mode has word size.
19568 2018-06-14 Richard Biener <rguenther@suse.de>
19570 PR middle-end/86139
19571 * tree-vect-generic.c (build_word_mode_vector_type): Remove
19572 duplicate and harmful type_hash_canon.
19573 * tree.c (type_hash_canon): Assert we didn't find ourselves.
19575 2018-06-14 Richard Biener <rguenther@suse.de>
19578 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
19581 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
19583 * config/rtems.h (STDINT_LONG32): Define.
19585 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
19586 Prachi Godbole <prachi.godbole@imgtec.com>
19588 * config/mips/mips-cpus.def: Define P6600.
19589 * config/mips/mips-tables.opt: Regenerate.
19590 * config/mips/mips.c (mips_ucbranch_type): New enum.
19591 (mips_rtx_cost_data): Add support for P6600.
19592 (mips_issue_rate): Likewise.
19593 (mips_multipass_dfa_lookahead): Likewise.
19594 (mips_avoid_hazard): Likewise.
19595 (mips_reorg_process_insns): Likewise.
19596 (mips_classify_branch_p6600): New function.
19597 * config/mips/mips.h (TUNE_P6600): New define.
19598 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
19599 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
19600 * config/mips/mips.md: Include p6600.md.
19601 (processor): Add p6600.
19602 * config/mips/p6600.md: New file.
19603 * doc/invoke.texi: Add p6600 to supported architectures.
19605 2018-06-13 Martin Sebor <msebor@redhat.com>
19607 PR tree-optimization/86114
19608 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
19610 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
19612 2018-06-13 Richard Biener <rguenther@suse.de>
19614 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
19615 Properly set vector type of the intermediate stmt.
19616 * tree-vect-stmts.c (vectorizable_operation): The destination
19617 var always has vectype_out type.
19619 2018-06-13 Jeff Law <law@redhat.com>
19621 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
19622 integer 0 for argument to print_rtl_with_bb.
19623 (rl78_reorg): Likewise.
19625 2018-06-13 David Malcolm <dmalcolm@redhat.com>
19627 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
19628 from rtx to rtx_insn *.
19629 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
19631 (add_sched_insns_for_speculation): Likewise for local "target",
19632 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
19633 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
19634 from rtx_insn ** to rtx_code_label **.
19635 (reorg_emit_nops): Likewise.
19636 (c6x_reorg): Likewise for local "call_labels".
19637 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
19639 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
19640 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
19641 the loops over LABEL_REFS.
19642 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
19644 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
19645 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
19646 (split_branches): Strengthen local "olabel" from rtx to
19647 rtx_insn *, adding a safe_as_a cast.
19648 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
19650 (add_insn_after): Likewise for first two params.
19651 (add_insn_before): Likewise.
19652 (remove_insn): Likewise for param.
19653 (emit_pattern_before_noloc): Likewise for second and third params.
19654 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
19655 (emit_call_insn_before_noloc): Likewise.
19656 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
19658 (emit_barrier_before): Likewise.
19659 (emit_label_before): Strengthen "label" param from "rtx" to
19660 "rtx_code_label *". Strengthen "before" param from "rtx" to
19662 (emit_insn_after_1): Strengthen "after" param from "rtx" to
19664 (emit_pattern_after_noloc): Likewise.
19665 (emit_insn_after_noloc): Likewise.
19666 (emit_jump_insn_after_noloc): Likewise.
19667 (emit_call_insn_after_noloc): Likewise.
19668 (emit_debug_insn_after_noloc): Likewise.
19669 (emit_barrier_after): Likewise.
19670 (emit_label_after): Likewise for both params.
19671 (emit_pattern_after_setloc): Likewise for "after" param. Convert
19672 "loc" param from "int" to "location_t".
19673 (emit_insn_after_setloc): Likewise.
19674 (emit_jump_insn_after_setloc): Likewise.
19675 (emit_call_insn_after_setloc): Likewise.
19676 (emit_debug_insn_after_setloc): Likewise.
19677 (emit_pattern_before_setloc): Likewise for "before" param. Convert
19678 "loc" param from "int" to "location_t".
19679 (emit_pattern_before): Convert NULL_RTX to NULL.
19680 (emit_insn_before_setloc): Convert "loc" param from "int" to
19682 (emit_jump_insn_before_setloc): Likewise.
19683 (emit_call_insn_before_setloc): Likewise.
19684 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
19685 rtx_insn *. Convert "loc" param from "int" to "location_t".
19686 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
19687 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
19688 Convert 3rd param from "int" to "location_t".
19689 (emit_barrier_before, emit_barrier_after, next_real_insn):
19690 Strengthen param from rtx to rtx_insn *.
19691 (emit_label_before): Strengthen 1st param from "rtx" to
19692 "rtx_code_label *". Strengthen 2nd param from "rtx" to
19694 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
19695 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
19696 Strengthen 2nd param from "rtx" to "rtx_insn *".
19697 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
19698 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
19699 Likewise. Convert 3rd param from "int" to "location_t".
19700 (emit_label_after): Strengthen 1st param from "rtx" to
19701 "rtx_code_label *".
19702 (next_real_insn, remove_insn): Strengthen param from "rtx" to
19704 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
19705 from "rtx" to "rtx_insn *".
19707 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
19709 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
19710 bodies streamed in with -Q.
19711 * dumpfile.c (dump_files): Add lto-stream-out dump file.
19712 * dumpfile.h (tree_dump_index): Add lto_stream_out.
19713 * gimple-streamer-out.c: Include gimple-pretty-print.h
19714 (output_bb): Dump stmts streamed.
19715 * lto-section-out.c: Include print-tree.h
19716 (lto_begin_section): Dump sections created.
19717 (lto_output_decl_index): Dump decl encoded.
19718 * lto-streamer-out.c: Include print-tree.h
19719 (create_output_block): Dump output block created.
19720 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
19721 (output_function): Dump function output.
19722 (output_constructor): Dump constructor streamed.
19723 (write_global_stream): Output indexes encoded.
19724 (produce_asm_for_decls): Dump streams encoded.
19725 * lto-streamer.c (streamer_dump_file): New global var.
19726 * lto-streamer.h (streamer_dump_file): Declare.
19727 * passes.c (ipa_write_summaries): Initialize streamer dump.
19728 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
19731 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
19734 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
19735 offsets for register save directives. Emit a second batch of save
19736 directives, if need be, when the function accesses prior frames.
19738 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19740 * config/arc/fpu.md (fmasf4): Force operand to register.
19741 (fnmasf4): Likewise.
19743 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19745 * config/arc/arc-protos.h (arc_pad_return): Remove.
19746 * config/arc/arc.c (machine_function): Remove force_short_suffix
19748 (arc_print_operand): Adjust printing of '&'.
19749 (arc_verify_short): Remove conditional printing of short suffix.
19750 (arc_final_prescan_insn): Remove reference to size_reason.
19751 (pad_return): New function.
19752 (arc_reorg): Call pad_return.
19753 (arc_pad_return): Remove.
19754 (arc_init_machine_status): Remove reference to force_short_suffix.
19755 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
19756 (attr length): When attribute iscompact is true force to 2
19757 regardless; in the case of maybe check if we want to force the
19758 instruction to have 4 bytes length.
19759 (nopv): Change it to generate 4 byte long nop as well.
19760 (blockage): New pattern.
19761 (simple_return): Remove call to arc_pad_return.
19762 (p_return_i): Likewise.
19764 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19766 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
19768 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19770 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
19773 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19775 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
19776 for ARC700 and ARCv2.
19778 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
19781 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
19782 operands[2] instead of operands[1].
19785 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
19787 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
19788 case, check whether the outer register overlaps an unallocatable
19789 register, not just whether it fits the required class.
19791 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
19793 * poly-int.h (can_div_trunc_p): Add new overload in which all values
19795 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
19796 (memrefs_conflict_p): Likewise.
19797 (init_alias_analysis): Likewise.
19798 * cfgexpand.c (expand_debug_expr): Likewise.
19799 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
19800 * cse.c (fold_rtx): Likewise.
19801 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
19802 * expr.c (emit_block_move_hints): Likewise.
19803 (clear_storage_hints, push_block, emit_push_insn): Likewise.
19804 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
19805 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
19806 (emit_group_store): Likewise.
19807 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
19808 to read the PRE/POST_MODIFY increment.
19809 * calls.c (store_one_arg): Use strip_offset.
19810 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
19812 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
19814 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
19815 (simplify_binary_operation_1): Extend CONST_INT handling to
19817 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
19818 than a HOST_WIDE_INT.
19819 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
19821 (adjust_mems, add_stores): Update accodingly.
19822 (vt_canonicalize_addr): Track polynomial offsets.
19823 (emit_note_insn_var_location): Likewise.
19824 (vt_add_function_parameter): Likewise.
19825 (vt_initialize): Likewise.
19827 2018-06-12 Jeff Law <law@redhat.com>
19829 * config.gcc (alpha*-*-freebsd*): Remove.
19830 * config/alpha/freebsd.h: Remove.
19832 2018-06-12 David Malcolm <dmalcolm@redhat.com>
19835 * spellcheck-tree.c (levenshtein_distance): Rename to...
19836 (get_edit_distance): ...this, and update for underlying renaming.
19837 * spellcheck-tree.h (levenshtein_distance): Rename to...
19838 (get_edit_distance): ...this.
19839 * spellcheck.c (levenshtein_distance): Rename to...
19840 (get_edit_distance): ...this. Convert from Levenshtein distance
19841 to Damerau-Levenshtein distance by supporting transpositions of
19842 adjacent characters. Rename "v1" to "v_next" and "v0" to
19844 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
19845 (selftest::test_edit_distance_unit_test_oneway): ...this, and
19846 update for underlying renaming.
19847 (selftest::levenshtein_distance_unit_test): Rename to...
19848 (selftest::test_get_edit_distance_unit): ...this, and update for
19849 underlying renaming.
19850 (selftest::test_find_closest_string): Add example from PR 69968
19851 where transposition helps
19852 (selftest::test_metric_conditions): Update for renaming.
19853 (selftest::test_metric_conditions): Likewise.
19854 (selftest::spellcheck_c_tests): Likewise.
19855 * spellcheck.h (levenshtein_distance): Rename both overloads to...
19856 (get_edit_distance): ...this.
19857 (best_match::consider): Update for renaming.
19859 2018-06-12 Martin Sebor <msebor@redhat.com>
19861 PR tree-optimization/85259
19862 * builtins.c (compute_objsize): Handle constant offsets.
19863 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
19864 true iff a warning has been issued.
19865 * gimple.h (gimple_nonartificial_location): New function.
19866 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
19867 gimple_nonartificial_location and handle -Wno-system-headers.
19868 (handle_builtin_stxncpy): Same.
19870 2018-06-12 Martin Sebor <msebor@redhat.com>
19873 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
19875 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
19877 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
19878 BUILTIN_VEC_XST entries for pointer to double and long long.
19880 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
19883 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
19885 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
19888 2018-06-12 Martin Liska <mliska@suse.cz>
19890 * doc/options.texi: Document IntegerRange.
19892 2018-06-12 Martin Liska <mliska@suse.cz>
19894 * config/i386/i386.opt: Make MPX-related options as Deprecated.
19895 * opt-functions.awk: Handle Deprecated flag.
19896 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
19898 (read_cmdline_option): Report warning for a deprecated option.
19899 * opts.h (struct cl_option): Add new field cl_deprecated.
19900 (CL_ERR_DEPRECATED): New.
19902 2018-06-12 Martin Liska <mliska@suse.cz>
19904 * doc/options.texi: Document Deprecated option flag.
19906 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19908 * config/arc/arc-arch.h (arc_extras): New enum.
19909 (arc_cpu_t):Add field extra.
19910 (arc_cpu_types): Consider the extras.
19911 * config/arc/arc-cpus.def: Add extras info.
19912 * config/arc/arc-opts.h (processor_type): Consider extra field.
19913 * config/arc/arc.c (arc_override_options): Handle extra field.
19915 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19917 * config/arc/arc-arch.h: Update ARC_OPTX macro.
19918 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
19920 * config/arc/arc.c (arc_init): Update pic warning.
19921 (irq_range): Update irq range parsing warnings.
19922 (arc_override_options): Update various warning messages.
19923 (arc_handle_aux_attribute): Likewise.
19925 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
19927 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
19929 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
19931 * doc/sourcebuild.texi: Document usage of line number 0 in verify
19932 compiler messages directives.
19934 2018-06-12 Matthew Fortune <mfortune@gmail.com>
19936 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
19937 * config/mips/mips-tables.opt: Regenerate.
19938 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
19940 * doc/invoke.texi: Document -march=i6500.
19942 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
19944 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
19945 (i6400_gpmul): Add cpu_unit.
19946 (i6400_gpdiv): Likewise.
19947 (i6400_msa_add_d): Update reservations.
19948 (i6400_msa_int_add) Likewise.
19949 (i6400_msa_short_logic3) Likewise.
19950 (i6400_msa_short_logic2) Likewise.
19951 (i6400_msa_short_logic) Likewise.
19952 (i6400_msa_move) Likewise.
19953 (i6400_msa_cmp) Likewise.
19954 (i6400_msa_short_float2) Likewise.
19955 (i6400_msa_div_d) Likewise.
19956 (i6400_msa_long_logic1) Likewise.
19957 (i6400_msa_long_logic2) Likewise.
19958 (i6400_msa_mult) Likewise.
19959 (i6400_msa_long_float2) Likewise.
19960 (i6400_msa_long_float4) Likewise.
19961 (i6400_msa_long_float5) Likewise.
19962 (i6400_msa_long_float8) Likewise.
19963 (i6400_fpu_fadd): Include frint type.
19964 (i6400_fpu_store): New define_insn_reservation.
19965 (i6400_fpu_load): Likewise.
19966 (i6400_fpu_move): Likewise.
19967 (i6400_fpu_fcmp): Likewise.
19968 (i6400_fpu_fmadd): Likewise.
19969 (i6400_int_mult): Include imul3nc type and update reservation.
19970 (i6400_int_div): Include idiv3 type and update reservation.
19971 (i6400_int_load): Update to check type not move_type.
19972 (i6400_int_store): Likewise.
19973 (i6400_int_prefetch): Set zero latency.
19975 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
19977 * gcc.c: Document new %@{...} sequence.
19978 (LINK_COMMAND_SPEC): Use it for the -L switches.
19979 (cpp_unique_options): Use it for the -I switches.
19980 (at_file_argbuf): New global variable.
19981 (in_at_file): Likewise.
19982 (alloc_args): Create at_file_argbuf.
19983 (clear_args): Truncate at_file_argbuf.
19984 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
19985 (open_at_file): New function.
19986 (close_at_file): Likewise.
19987 (create_at_file): Delete.
19988 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
19991 (validate_switches_from_spec): Deal with %@{...} sequence.
19992 (validate_switches): Likewise.
19993 (driver::finalize): Call clear_args.
19995 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
19997 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
19999 2018-06-11 Martin Sebor <msebor@redhat.com>
20001 * doc/invoke.texi (-Wall): List -Wc++17-compat.
20002 (Wno-class-memaccess): Add @opindex.
20003 (Wno-templates, Wno-multiple-inheritance): Same.
20004 (Wno-virtual-inheritance, Wno-namespaces): Same.
20005 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
20006 (Wno-format-overflow, Wno-format-truncation): Same.
20007 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
20008 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
20009 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
20010 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
20011 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
20012 (Wno-misspelled-isr): Same.
20014 2018-06-11 Martin Sebor <msebor@redhat.com>
20016 * PR tree-optimization/86083
20017 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
20019 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
20021 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
20023 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
20026 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
20027 on the correct operand.
20028 (*movdi_internal64): Ditto.
20030 2018-06-11 Martin Liska <mliska@suse.cz>
20032 PR tree-optimization/86089
20033 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
20035 2018-06-11 Julia Koval <julia.koval@intel.com>
20037 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
20038 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
20039 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
20041 2018-06-11 Olivier Hainque <hainque@adacore.com>
20043 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
20044 for Ada with strict dwarf2.
20046 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
20049 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
20052 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
20054 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
20056 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
20058 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
20061 2018-06-08 Martin Liska <mliska@suse.cz>
20063 * tree-cfg.h (debug_function): Fix argument type to match
20066 2018-06-08 Martin Liska <mliska@suse.cz>
20068 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
20069 Remove usage of MPX-related (and removed) fields.
20070 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
20072 2018-06-08 David Malcolm <dmalcolm@redhat.com>
20074 * cfg.c (debug): Use TDF_NONE rather than 0.
20075 * cfghooks.c (debug): Likewise.
20076 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
20077 (struct dump_option_value_info): Convert to...
20078 (struct kv_pair): ...this template type.
20079 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
20081 (optinfo_verbosity_options): Likewise.
20082 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
20084 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
20085 than int for "optgroup_flags" param.
20086 (dump_generic_expr_loc): Use dump_flags_t rather than int for
20088 (dump_dec): Likewise.
20089 (dump_finish): Use TDF_NONE rather than 0.
20090 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
20091 rather than int for "optgroup_flags" param. Use TDF_NONE rather
20092 than 0. Update for change to option_ptr.
20093 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
20094 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
20095 0. Update for changes to optinfo_verbosity_options and
20097 (opt_info_switch_p): Convert optgroup_flags from int to
20099 (dump_basic_block): Use dump_flags_t rather than int
20100 for "dump_kind" param.
20101 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
20102 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
20103 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
20104 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
20105 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
20106 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
20107 TDF_NONE): Convert from macros to...
20108 (enum dump_flag): ...this new enum.
20109 (dump_flags_t): Update to use enum.
20110 (operator|, operator&, operator~, operator|=, operator&=):
20111 Implement for dump_flags_t.
20112 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
20113 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
20114 Convert from macros to...
20115 (enum optgroup_flag): ...this new enum.
20116 (optgroup_flags_t): New typedef.
20117 (operator|, operator|=): Implement for optgroup_flags_t.
20118 (struct dump_file_info): Convert field "alt_flags" to
20119 dump_flags_t. Convert field "optgroup_flags" to
20121 (dump_basic_block): Use dump_flags_t rather than int for param.
20122 (dump_generic_expr_loc): Likewise.
20123 (dump_dec): Likewise.
20124 (dump_register): Convert param "optgroup_flags" to
20126 (opt_info_enable_passes): Likewise.
20127 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
20129 * gimple-pretty-print.c (debug): Likewise.
20130 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
20131 (merged_store_group::apply_stores): Likewise.
20132 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
20133 * gimple.c (verify_gimple_pp): Likewise.
20134 * graphite-poly.c (print_pbb_body): Likewise.
20135 * passes.c (pass_manager::register_one_dump_file): Convert
20136 local "optgroup_flags" to optgroup_flags_t.
20137 * print-tree.c (print_node): Use TDF_NONE rather than 0.
20139 (debug_body): Likewise.
20140 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
20141 to optgroup_flags_t.
20142 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
20144 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
20145 (convert_mult_to_fma): Likewise.
20146 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
20147 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
20148 * tree-vect-data-refs.c (dump_lower_bound): Convert param
20149 "dump_kind" to dump_flags_t.
20151 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
20153 * config/rs6000/rs6000.c (min, max): Delete.
20155 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
20157 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
20158 -mabi=spe and -mabi=no-spe.
20160 2018-06-08 Martin Liska <mliska@suse.cz>
20162 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
20163 where we expect an existing summary.
20165 2018-06-08 Martin Liska <mliska@suse.cz>
20167 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
20168 * ipa-inline.h (estimate_edge_growth): Likewise.
20170 2018-06-08 Martin Liska <mliska@suse.cz>
20172 * cgraph.c (function_version_hasher::hash): Use
20173 cgraph_node::get_uid ().
20174 (function_version_hasher::equal):
20175 * cgraph.h (cgraph_node::get_uid): New method.
20176 * ipa-inline.c (update_caller_keys): Use
20177 cgraph_node::get_uid ().
20178 (update_callee_keys): Likewise.
20179 * ipa-utils.c (searchc): Likewise.
20180 (ipa_reduced_postorder): Likewise.
20181 * lto-cgraph.c (input_node): Likewise.
20182 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
20183 * symbol-summary.h (symtab_insertion): Likewise.
20184 (symtab_removal): Likewise.
20185 (symtab_duplication): Likewise.
20186 * tree-pretty-print.c (dump_function_header): Likewise.
20187 * tree-sra.c (convert_callers_for_node): Likewise.
20189 2018-06-08 Martin Liska <mliska@suse.cz>
20191 * cgraph.c (symbol_table::create_edge): Always assign a new
20193 (symbol_table::free_edge): Do not recycle numbers.
20194 * cgraph.h (cgraph_edge::get): New method.
20195 * symbol-summary.h (symtab_removal): Use it.
20196 (symtab_duplication): Likewise.
20197 (call_summary::hashable_uid): Remove.
20199 2018-06-08 Martin Liska <mliska@suse.cz>
20201 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
20202 (initialize_growth_caches): Remove.
20203 (free_growth_caches): Likewise.
20204 (do_estimate_edge_time): Use edge_growth_cache.
20205 (do_estimate_edge_size): Likewise.
20206 (do_estimate_edge_hints): Likewise.
20207 * ipa-inline.c (reset_edge_caches): Likewise.
20208 (recursive_inlining): Likewise.
20209 (inline_small_functions): Likewise.
20210 * ipa-inline.h (initialize_growth_caches): Remove.
20211 (estimate_edge_size): Likewise.
20212 (estimate_edge_time): Likewise.
20213 (estimate_edge_hints): Likewise.
20214 (reset_edge_growth_cache): Likewise.
20215 * symbol-summary.h (call_summary::remove): New method.
20217 2018-06-08 Martin Liska <mliska@suse.cz>
20219 * ipa-cp.c (class edge_clone_summary): New summary.
20220 (grow_edge_clone_vectors): Remove.
20221 (ipcp_edge_duplication_hook): Remove.
20222 (class edge_clone_summary_t): New call_summary class.
20223 (ipcp_edge_removal_hook): Remove.
20224 (edge_clone_summary_t::duplicate): New function.
20225 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
20226 (create_specialized_node): Likewise.
20227 (ipcp_driver): Initialize edge_clone_summaries and do not
20230 2018-06-08 Martin Liska <mliska@suse.cz>
20232 * symbol-summary.h (get): New function.
20233 (call_summary::m_initialize_when_cloning): New class member.
20235 2018-06-08 Martin Liska <mliska@suse.cz>
20237 * cgraph.c (cgraph_node::remove): Do not recycle uid.
20238 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
20239 (symbol_table::allocate_cgraph_symbol): Do not set uid.
20240 * passes.c (uid_hash_t): Record removed_nodes by their uids.
20241 (remove_cgraph_node_from_order): Use the removed_nodes set.
20242 (do_per_function_toporder): Likwise.
20243 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
20244 instead of summary_uid.
20245 (symtab_removal): Likewise.
20246 (symtab_duplication): Likewise.
20248 2018-06-08 Martin Liska <mliska@suse.cz>
20250 * ipa-cp.c (ipcp_store_bits_results): Use
20251 ipcp_transformation_sum.
20252 (ipcp_store_vr_results): Likewise.
20253 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
20255 (ipcp_transformation_initialize): ... this.
20256 (ipa_set_node_agg_value_chain):
20257 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
20258 (write_ipcp_transformation_info): Likewise.
20259 (read_ipcp_transformation_info): Likewise.
20260 (ipcp_update_bits): Likewise.
20261 (ipcp_update_vr): Likewise.
20262 (ipcp_transform_function): Likewise.
20263 * ipa-prop.h: Rename ipcp_transformation_summary to
20264 ipcp_transformation.
20265 (class ipcp_transformation_t): New function summary.
20266 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
20267 (ipa_get_agg_replacements_for_node): Likewise.
20269 2018-06-08 Martin Liska <mliska@suse.cz>
20271 * ipa-pure-const.c (struct funct_state_d): Do it class instead
20273 (class funct_state_summary_t): New function_summary class.
20274 (has_function_state): Remove.
20275 (get_function_state): Likewise.
20276 (set_function_state): Likewise.
20277 (add_new_function): Likewise.
20278 (funct_state_summary_t::insert): New function.
20279 (duplicate_node_data): Remove.
20280 (remove_node_data): Remove.
20281 (funct_state_summary_t::duplicate): New function.
20282 (register_hooks): Create new funct_state_summaries.
20283 (pure_const_generate_summary): Use it.
20284 (pure_const_write_summary): Likewise.
20285 (pure_const_read_summary): Likewise.
20286 (propagate_pure_const): Likewise.
20287 (propagate_nothrow): Likewise.
20288 (dump_malloc_lattice): Likewise.
20289 (propagate_malloc): Likewise.
20290 (execute): Do not register hooks, just remove summary
20292 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
20295 2018-06-08 Martin Liska <mliska@suse.cz>
20297 * ipa-reference.c (remove_node_data): Remove.
20298 (duplicate_node_data): Likewise.
20299 (class ipa_ref_var_info_summary_t): New class.
20300 (class ipa_ref_opt_summary_t): Likewise.
20301 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
20302 (get_reference_optimization_summary): Use
20303 ipa_ref_opt_sum_summaries.
20304 (set_reference_vars_info): Remove.
20305 (set_reference_optimization_summary): Likewise.
20306 (ipa_init): Create summaries.
20307 (init_function_info): Use function summary.
20308 (ipa_ref_opt_summary_t::duplicate): New function.
20309 (ipa_ref_opt_summary_t::remove): New function.
20310 (get_read_write_all_from_node): Fix GNU coding style.
20311 (propagate): Use function summary.
20312 (write_node_summary_p): Fix GNU coding style.
20313 (stream_out_bitmap): Likewise.
20314 (ipa_reference_read_optimization_summary): Use function summary.
20315 (ipa_reference_c_finalize): Do not release hooks.
20317 2018-06-08 Martin Liska <mliska@suse.cz>
20319 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
20320 (analyze_function_body): Extract multiple calls of get_create.
20321 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
20322 * ipa-inline.c (recursive_inlining): Use ::get method.
20323 * ipa-inline.h (estimate_edge_growth): Likewise.
20325 2018-06-08 Martin Liska <mliska@suse.cz>
20327 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
20329 (hsa_function_summary::hsa_function_summary): Use the new enum
20331 (hsa_gpu_implementation_p): Use hsa_summaries::get.
20332 * hsa-gen.c (hsa_get_host_function): Likewise.
20333 (get_brig_function_name): Likewise.
20334 * ipa-hsa.c (process_hsa_functions): Likewise.
20335 (ipa_hsa_write_summary): Likewise.
20336 * symbol-summary.h (symtab_duplication): Use ::get function/
20337 (get): New function.
20339 2018-06-08 Martin Liska <mliska@suse.cz>
20341 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
20343 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
20344 (hsa_register_kernel): Likewise.
20345 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
20346 * hsa-gen.c (hsa_get_host_function): Likewise.
20347 (get_brig_function_name): Likewise.
20348 (generate_hsa): Likewise.
20349 (pass_gen_hsail::execute): Likewise.
20350 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
20351 (devirtualization_time_bonus): Likewise.
20352 (ipcp_propagate_stage): Likewise.
20353 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
20354 (edge_set_predicate): Likewise.
20355 (evaluate_conditions_for_known_args): Likewise.
20356 (evaluate_properties_for_edge): Likewise.
20357 (ipa_fn_summary::reset): Likewise.
20358 (ipa_fn_summary_t::duplicate): Likewise.
20359 (dump_ipa_call_summary): Likewise.
20360 (ipa_dump_fn_summary): Likewise.
20361 (analyze_function_body): Likewise.
20362 (compute_fn_summary): Likewise.
20363 (estimate_edge_devirt_benefit): Likewise.
20364 (estimate_edge_size_and_time): Likewise.
20365 (estimate_calls_size_and_time): Likewise.
20366 (estimate_node_size_and_time): Likewise.
20367 (inline_update_callee_summaries): Likewise.
20368 (remap_edge_change_prob): Likewise.
20369 (remap_edge_summaries): Likewise.
20370 (ipa_merge_fn_summary_after_inlining): Likewise.
20371 (ipa_update_overall_fn_summary): Likewise.
20372 (read_ipa_call_summary): Likewise.
20373 (inline_read_section): Likewise.
20374 (write_ipa_call_summary): Likewise.
20375 (ipa_fn_summary_write): Likewise.
20376 (ipa_free_fn_summary): Likewise.
20377 * ipa-hsa.c (process_hsa_functions): Likewise.
20378 (ipa_hsa_write_summary): Likewise.
20379 (ipa_hsa_read_section): Likewise.
20380 * ipa-icf.c (sem_function::merge): Likewise.
20381 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
20382 (do_estimate_edge_time): Likewise.
20383 (estimate_size_after_inlining): Likewise.
20384 (estimate_growth): Likewise.
20385 (growth_likely_positive): Likewise.
20386 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
20387 (inline_call): Likewise.
20388 * ipa-inline.c (caller_growth_limits): Likewise.
20389 (can_inline_edge_p): Likewise.
20390 (can_inline_edge_by_limits_p): Likewise.
20391 (compute_uninlined_call_time): Likewise.
20392 (compute_inlined_call_time): Likewise.
20393 (want_inline_small_function_p): Likewise.
20394 (edge_badness): Likewise.
20395 (update_caller_keys): Likewise.
20396 (update_callee_keys): Likewise.
20397 (recursive_inlining): Likewise.
20398 (inline_small_functions): Likewise.
20399 (inline_to_all_callers_1): Likewise.
20400 (dump_overall_stats): Likewise.
20401 (early_inline_small_functions): Likewise.
20402 (early_inliner): Likewise.
20403 * ipa-inline.h (estimate_edge_growth): Likewise.
20404 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
20405 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
20406 * ipa-prop.h (IPA_NODE_REF): Likewise.
20407 (IPA_EDGE_REF): Likewise.
20408 * ipa-pure-const.c (malloc_candidate_p): Likewise.
20409 (propagate_malloc): Likewise.
20410 * ipa-split.c (execute_split_functions): Likewise.
20411 * symbol-summary.h: Rename get to get_create.
20413 (get_create): Likewise.
20414 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
20416 2018-06-08 Martin Liska <mliska@suse.cz>
20418 * symbol-summary.h (release): Move definition out of class
20420 (symtab_removal): Likewise.
20421 (symtab_duplication): Likewise.
20423 2018-06-08 Martin Liska <mliska@suse.cz>
20425 * symbol-summary.h (function_summary): Move constructor
20426 implementation out of class declaration.
20427 (release): Likewise.
20428 (symtab_insertion): Likewise.
20429 (symtab_removal): Likewise.
20430 (symtab_duplication): Likewise.
20433 2018-06-08 Martin Liska <mliska@suse.cz>
20435 * Makefile.in: Remove support for MPX (macros, related functions,
20436 fields in cgraph_node, ...).
20437 * builtin-types.def (BT_BND): Likewise.
20438 (BT_FN_BND_CONST_PTR): Likewise.
20439 (BT_FN_CONST_PTR_BND): Likewise.
20440 (BT_FN_VOID_PTR_BND): Likewise.
20441 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
20442 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
20443 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
20444 (expand_builtin_mempcpy_with_bounds): Likewise.
20445 (expand_builtin_memset_with_bounds): Likewise.
20446 (expand_builtin_memset_args): Likewise.
20447 (std_expand_builtin_va_start): Likewise.
20448 (expand_builtin): Likewise.
20449 (expand_builtin_with_bounds): Likewise.
20450 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
20451 (DEF_LIB_BUILTIN_CHKP): Likewise.
20452 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
20453 (DEF_CHKP_BUILTIN): Likewise.
20454 (BUILT_IN_MEMCPY): Likewise.
20455 (BUILT_IN_MEMMOVE): Likewise.
20456 (BUILT_IN_MEMPCPY): Likewise.
20457 (BUILT_IN_MEMSET): Likewise.
20458 (BUILT_IN_STPCPY): Likewise.
20459 (BUILT_IN_STRCAT): Likewise.
20460 (BUILT_IN_STRCHR): Likewise.
20461 (BUILT_IN_STRCPY): Likewise.
20462 (BUILT_IN_STRLEN): Likewise.
20463 (BUILT_IN_MEMCPY_CHK): Likewise.
20464 (BUILT_IN_MEMMOVE_CHK): Likewise.
20465 (BUILT_IN_MEMPCPY_CHK): Likewise.
20466 (BUILT_IN_MEMSET_CHK): Likewise.
20467 (BUILT_IN_STPCPY_CHK): Likewise.
20468 (BUILT_IN_STRCAT_CHK): Likewise.
20469 (BUILT_IN_STRCPY_CHK): Likewise.
20470 * calls.c (store_bounds): Likewise.
20471 (emit_call_1): Likewise.
20472 (special_function_p): Likewise.
20473 (maybe_warn_nonstring_arg): Likewise.
20474 (initialize_argument_information): Likewise.
20475 (finalize_must_preallocate): Likewise.
20476 (compute_argument_addresses): Likewise.
20477 (expand_call): Likewise.
20478 * cfgexpand.c (expand_call_stmt): Likewise.
20479 (expand_return): Likewise.
20480 (expand_gimple_stmt_1): Likewise.
20481 (pass_expand::execute): Likewise.
20482 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
20483 (cgraph_node::remove): Likewise.
20484 (cgraph_node::dump): Likewise.
20485 (cgraph_node::verify_node): Likewise.
20486 * cgraph.h (chkp_function_instrumented_p): Likewise.
20487 (symtab_node::get_alias_target): Likewise.
20488 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
20489 (cgraph_local_p): Likewise.
20490 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
20491 (cgraph_edge::rebuild_references): Likewise.
20492 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
20493 (walk_polymorphic_call_targets): Likewise.
20494 (cgraph_node::expand_thunk): Likewise.
20495 (symbol_table::output_weakrefs): Likewise.
20496 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
20497 (ix86_handle_option): Likewise.
20498 * config/i386/constraints.md: Likewise.
20499 * config/i386/i386-builtin-types.def (BND): Likewise.
20503 * config/i386/i386-builtin.def (BDESC_END): Likewise.
20504 (BDESC_FIRST): Likewise.
20506 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
20507 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
20508 * config/i386/i386.c (enum reg_class): Likewise.
20509 (ix86_target_string): Likewise.
20510 (ix86_option_override_internal): Likewise.
20511 (ix86_conditional_register_usage): Likewise.
20512 (ix86_valid_target_attribute_inner_p): Likewise.
20513 (ix86_set_indirect_branch_type): Likewise.
20514 (ix86_set_current_function): Likewise.
20515 (ix86_function_arg_regno_p): Likewise.
20516 (init_cumulative_args): Likewise.
20517 (ix86_function_arg_advance): Likewise.
20518 (ix86_function_arg): Likewise.
20519 (ix86_pass_by_reference): Likewise.
20520 (ix86_function_value_regno_p): Likewise.
20521 (ix86_function_value_1): Likewise.
20522 (ix86_function_value_bounds): Likewise.
20523 (ix86_return_in_memory): Likewise.
20524 (ix86_setup_incoming_vararg_bounds): Likewise.
20525 (ix86_va_start): Likewise.
20526 (indirect_thunk_need_prefix): Likewise.
20527 (print_reg): Likewise.
20528 (ix86_print_operand): Likewise.
20529 (ix86_expand_call): Likewise.
20530 (ix86_output_function_return): Likewise.
20531 (reg_encoded_number): Likewise.
20532 (BDESC_VERIFYS): Likewise.
20533 (ix86_init_mpx_builtins): Likewise.
20534 (ix86_init_builtins): Likewise.
20535 (ix86_emit_cmove): Likewise.
20536 (ix86_emit_move_max): Likewise.
20537 (ix86_expand_builtin): Likewise.
20538 (ix86_builtin_mpx_function): Likewise.
20539 (ix86_get_arg_address_for_bt): Likewise.
20540 (ix86_load_bounds): Likewise.
20541 (ix86_store_bounds): Likewise.
20542 (ix86_load_returned_bounds): Likewise.
20543 (ix86_store_returned_bounds): Likewise.
20544 (ix86_class_likely_spilled_p): Likewise.
20545 (ix86_hard_regno_mode_ok): Likewise.
20546 (x86_order_regs_for_local_alloc): Likewise.
20547 (ix86_mitigate_rop): Likewise.
20548 (ix86_bnd_prefixed_insn_p): Likewise.
20549 (ix86_mpx_bound_mode): Likewise.
20550 (ix86_make_bounds_constant): Likewise.
20551 (ix86_initialize_bounds): Likewise.
20552 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
20553 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
20554 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
20555 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
20556 (TARGET_CHKP_BOUND_MODE): Likewise.
20557 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
20558 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
20559 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
20560 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
20561 * config/i386/i386.h (TARGET_MPX): Likewise.
20562 (TARGET_MPX_P): Likewise.
20563 (VALID_BND_REG_MODE): Likewise.
20564 (FIRST_BND_REG): Likewise.
20565 (LAST_BND_REG): Likewise.
20566 (enum reg_class): Likewise.
20567 (BND_REG_P): Likewise.
20568 (BND_REGNO_P): Likewise.
20569 (BNDmode): Likewise.
20570 (ADJUST_INSN_LENGTH): Likewise.
20571 * config/i386/i386.md: Likewise.
20572 * config/i386/i386.opt: Likewise.
20573 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
20574 (defined): Likewise.
20575 (LINK_MPX): Likewise.
20576 (MPX_SPEC): Likewise.
20577 (LIBMPX_SPEC): Likewise.
20578 (LIBMPXWRAPPERS_SPEC): Likewise.
20579 (CHKP_SPEC): Likewise.
20580 * config/i386/predicates.md: Likewise.
20581 * dbxout.c (dbxout_type): Likewise.
20582 * doc/extend.texi: Likewise.
20583 * doc/invoke.texi: Likewise.
20584 * doc/md.texi: Likewise.
20585 * doc/tm.texi: Likewise.
20586 * doc/tm.texi.in: Likewise.
20587 * dwarf2out.c (is_base_type): Likewise.
20588 (gen_formal_types_die): Likewise.
20589 (gen_subprogram_die): Likewise.
20590 (gen_type_die_with_usage): Likewise.
20591 (gen_decl_die): Likewise.
20592 (dwarf2out_late_global_decl): Likewise.
20593 * expr.c (expand_assignment): Likewise.
20594 (emit_storent_insn): Likewise.
20595 (store_expr_with_bounds): Likewise.
20596 (store_expr): Likewise.
20597 (expand_expr_real_1): Likewise.
20598 * expr.h (store_expr_with_bounds): Likewise.
20599 * function.c (use_register_for_decl): Likewise.
20600 (struct bounds_parm_data): Likewise.
20601 (assign_parms_augmented_arg_list): Likewise.
20602 (assign_parm_find_entry_rtl): Likewise.
20603 (assign_parm_is_stack_parm): Likewise.
20604 (assign_parm_load_bounds): Likewise.
20605 (assign_bounds): Likewise.
20606 (assign_parms): Likewise.
20607 (expand_function_start): Likewise.
20608 * gcc.c (CHKP_SPEC): Likewise.
20609 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
20610 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
20611 (wrestrict_dom_walker::check_call): Likewise.
20612 * gimple.c (gimple_build_call_from_tree): Likewise.
20613 * gimple.h (enum gf_mask): Likewise.
20614 (gimple_call_with_bounds_p): Likewise.
20615 (gimple_call_set_with_bounds): Likewise.
20616 * gimplify.c (gimplify_init_constructor): Likewise.
20617 * ipa-cp.c (initialize_node_lattices): Likewise.
20618 (propagate_constants_across_call): Likewise.
20619 (find_more_scalar_values_for_callers_subset): Likewise.
20620 * ipa-hsa.c (process_hsa_functions): Likewise.
20621 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
20622 * ipa-icf.c (sem_function::merge): Likewise.
20623 * ipa-inline.c (early_inliner): Likewise.
20624 * ipa-pure-const.c (warn_function_noreturn): Likewise.
20625 (warn_function_cold): Likewise.
20626 (propagate_pure_const): Likewise.
20627 * ipa-ref.h (enum GTY): Likewise.
20628 * ipa-split.c (find_retbnd): Likewise.
20629 (consider_split): Likewise.
20630 (split_function): Likewise.
20631 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
20632 * ipa.c (walk_polymorphic_call_targets): Likewise.
20633 (symbol_table::remove_unreachable_nodes): Likewise.
20634 (process_references): Likewise.
20635 (cgraph_build_static_cdtor_1): Likewise.
20636 * lto-cgraph.c (lto_output_node): Likewise.
20637 (output_refs): Likewise.
20638 (compute_ltrans_boundary): Likewise.
20639 (input_overwrite_node): Likewise.
20640 (input_node): Likewise.
20641 (input_cgraph_1): Likewise.
20642 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
20643 * passes.c (pass_manager::execute_early_local_passes): Likewise.
20644 (class pass_chkp_instrumentation_passes): Likewise.
20645 (make_pass_chkp_instrumentation_passes): Likewise.
20646 * passes.def: Likewise.
20647 * rtl.h (struct GTY): Likewise.
20648 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
20649 * stor-layout.c (layout_type): Likewise.
20650 * symtab.c: Likewise.
20651 * target.def: Likewise.
20652 * targhooks.c (default_chkp_bound_type): Likewise.
20653 (default_chkp_bound_mode): Likewise.
20654 (default_builtin_chkp_function): Likewise.
20655 (default_chkp_function_value_bounds): Likewise.
20656 (default_chkp_make_bounds_constant): Likewise.
20657 (default_chkp_initialize_bounds): Likewise.
20658 * targhooks.h (default_chkp_bound_type): Likewise.
20659 (default_chkp_bound_mode): Likewise.
20660 (default_builtin_chkp_function): Likewise.
20661 (default_chkp_function_value_bounds): Likewise.
20662 (default_chkp_make_bounds_constant): Likewise.
20663 (default_chkp_initialize_bounds): Likewise.
20664 * toplev.c (compile_file): Likewise.
20665 (process_options): Likewise.
20666 * tree-core.h (DEF_BUILTIN): Likewise.
20667 (DEF_BUILTIN_CHKP): Likewise.
20668 * tree-inline.c (declare_return_variable): Likewise.
20669 (remap_gimple_stmt): Likewise.
20670 (copy_bb): Likewise.
20671 (initialize_inlined_parameters): Likewise.
20672 (expand_call_inline): Likewise.
20673 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
20674 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
20675 (make_pass_ipa_chkp_produce_thunks): Likewise.
20676 (make_pass_chkp): Likewise.
20677 (make_pass_chkp_opt): Likewise.
20678 (make_pass_chkp_instrumentation_passes): Likewise.
20679 * tree-pretty-print.c (dump_generic_node): Likewise.
20680 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
20681 * tree-ssa-dce.c (propagate_necessity): Likewise.
20682 (eliminate_unnecessary_stmts): Likewise.
20683 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
20684 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
20685 * tree-ssa-sccvn.h: Likewise.
20686 * tree-ssa-strlen.c (get_string_length): Likewise.
20687 (valid_builtin_call): Likewise.
20688 (adjust_last_stmt): Likewise.
20689 (handle_builtin_strchr): Likewise.
20690 (handle_builtin_strcpy): Likewise.
20691 (handle_builtin_stxncpy): Likewise.
20692 (handle_builtin_memcpy): Likewise.
20693 (handle_builtin_strcat): Likewise.
20694 (strlen_check_and_optimize_stmt): Likewise.
20695 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
20696 * tree-streamer-in.c: Likewise.
20697 * tree-streamer.c (record_common_node): Likewise.
20698 * tree.c (tree_code_size): Likewise.
20699 (wide_int_to_tree_1): Likewise.
20700 (type_contains_placeholder_1): Likewise.
20701 (build_common_tree_nodes): Likewise.
20702 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
20703 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
20704 (POINTER_BOUNDS_P): Likewise.
20705 (BOUNDED_TYPE_P): Likewise.
20706 (BOUNDED_P): Likewise.
20707 (CALL_WITH_BOUNDS_P): Likewise.
20708 (pointer_bounds_type_node): Likewise.
20709 * value-prof.c (gimple_ic): Likewise.
20710 * var-tracking.c (vt_add_function_parameters): Likewise.
20711 * varasm.c (make_decl_rtl): Likewise.
20712 (assemble_start_function): Likewise.
20713 (output_constant): Likewise.
20714 (maybe_assemble_visibility): Likewise.
20715 * varpool.c (ctor_for_folding): Likewise.
20716 * chkp-builtins.def: Remove.
20717 * ipa-chkp.c: Remove.
20718 * ipa-chkp.h: Remove.
20719 * rtl-chkp.c: Remove.
20720 * rtl-chkp.h: Remove.
20721 * tree-chkp-opt.c: Remove.
20722 * tree-chkp.c: Remove.
20723 * tree-chkp.h: Remove.
20725 2018-06-07 Carl Love <cel@us.ibm.com>
20727 * config/rs6000/vsx.md (vextract_fp_from_shorth,
20728 vextract_fp_from_shortl): Add BE support.
20730 2018-06-07 Paul Koning <ni1d@arrl.net>
20732 * compare-elim.c (try_merge_compare): Don't merge compare if
20733 address contains a side effect.
20734 (try_eliminate_compare): Likewise.
20736 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
20738 * config.gcc: Support "tremont".
20739 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
20740 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20742 * config/i386/i386.c (m_TREMONT): Define.
20743 (processor_target_table): Add "tremont".
20744 (PTA_TREMONT): Define.
20745 (ix86_lea_outperforms): Add TARGET_TREMONT.
20746 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
20747 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
20748 and M_INTEL_GOLDMONT_PLUS.
20749 (fold_builtin_cpu): Add "tremont".
20750 (ix86_add_stmt_cost): Add TARGET_TREMONT.
20751 (ix86_option_override_internal): Add "tremont".
20752 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
20753 (processor_type): Add PROCESSOR_TREMONT.
20754 * config/i386/x86-tune.def: Add m_TREMONT.
20755 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
20757 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
20759 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
20760 symbol defined for msp430i* devices to be lower case.
20762 2018-06-07 Richard Biener <rguenther@suse.de>
20764 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
20765 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
20766 Properly wrap signed arithmetic if overflow wraps.
20768 2018-06-07 Jakub Jelinek <jakub@redhat.com>
20770 PR tree-optimization/69615
20771 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
20772 of a cast from a same precision integral SSA_NAME in a bb dominated
20773 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
20774 cast to utype if rhs2 has already a compatible type.
20776 2018-06-07 Richard Biener <rguenther@suse.de>
20778 PR tree-optimization/85935
20779 * graphite-scop-detection.c (find_params_in_bb): Analyze
20780 condition operands with respect to the correct loop. Assert
20781 the analysis doesn't fail.
20783 2018-06-04 Carl Love <cel@us.ibm.com>
20785 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
20786 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
20787 as it is slightly cheaper.
20788 (first_match_or_eos_index_<mode>):
20789 Calculate index using natural element order.
20790 (first_match_index_<mode>):
20791 Calculate index using natural element order.
20792 (first_match_or_eos_index_<mode>):
20793 Calculate index using natural order.
20794 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
20795 for BE and LE modes.
20796 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
20797 P9V_BUILTIN_VCLZLSBB_V16QI.
20798 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
20801 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
20803 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
20804 indentation and line wrap for many prototypes. Add missing
20805 @smallexample directives around block of prototypes for vec_xl and
20808 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
20810 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
20811 track if we pass or return IEEE 128-bit floating point.
20812 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
20813 C++ mangling that is compatible with GCC 8.1.
20814 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
20815 (init_cumulative_args): Note if we pass or return IEEE 128-bit
20816 floating point types.
20817 (rs6000_function_arg_advance_1): Likewise.
20818 (rs6000_mangle_type): Optionally generate mangled names that match
20819 what GCC 8.1 generated for IEEE 128-bit floating point types.
20820 (rs6000_globalize_decl_name): If we have an external function that
20821 passes or returns IEEE 128-bit types, generate a weak reference
20822 from the mangled name used in GCC 8.1 to the current mangled
20824 (rs6000_init_builtins): Make __ibm128 use the long double type if
20825 long double is IBM extended double. Make __float128 use the long
20826 double type if long double is IEEE 128-bit.
20829 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
20830 macro for __ibm128 built-in functions.
20831 (PACK_IF): Add __ibm128 pack/unpack functions.
20832 (UNPACK_IF): Likewise.
20833 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
20834 enable long double built-in functions if long double is IEEE
20835 128-bit floating point.
20836 (rs6000_invalid_builtin): Update long double built-in function
20838 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
20839 functions, adjust the built-in function to use the long double
20840 built-in function if __ibm128 and long double are the same type.
20841 * doc/extend.texi (PowerPC builtins): Update documention for
20842 __builtin_{,un}pack_longdouble. Add documentation for
20843 __builtin_{,un}pack_ibm128.
20845 2018-06-06 Jim Wilson <jimw@sifive.com>
20847 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
20848 (struct machine_function): New field interrupt_mode.
20849 (riscv_handle_type_attribute): New function. Add forward declaration.
20850 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
20851 (riscv_expand_epilogue): Check interrupt_mode field.
20852 (riscv_set_current_function): Check interrupt attribute args and
20853 set interrupt_mode field.
20854 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
20855 (riscv_sret, riscv_uret): New.
20856 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
20857 new arguments to interrupt attribute.
20859 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
20862 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
20863 Don't handle -mcpu=power8 if -mpower9-vector is also used.
20865 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
20867 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
20868 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
20869 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
20870 several redundant entries.
20872 2018-06-06 David Malcolm <dmalcolm@redhat.com>
20874 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
20875 type from "rtx" to "rtx_insn *".
20876 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
20877 for local "call_insn", removing cast.
20878 (ix86_expand_call): Likewise, introducing a "call_insn" local.
20880 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
20882 PR tree-optimization/86066
20883 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
20884 for BIT_INSERT_EXPR stores.
20886 2018-06-06 Richard Biener <rguenther@suse.de>
20888 PR tree-optimization/86062
20889 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
20890 component refs ontop
20891 of to be offsetted base.
20893 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
20895 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
20896 to be static and remove check on interrupt attribute name.
20898 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
20900 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
20901 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
20903 2018-06-05 Steve Ellcey <sellcey@cavium.com>
20906 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
20908 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
20909 Remove second argument, change how error is called.
20910 (aarch64_layout_arg): Remove second argument from
20911 aarch64_err_no_fpadvsimd call.
20912 (aarch64_init_cumulative_args): Ditto.
20913 (aarch64_gimplify_va_arg_expr): Ditto.
20914 * config/aarch64/aarch64.md (mov<mode>): Ditto.
20916 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
20918 * config/i386/i386.md (simple_return_indirect_internal): New expander.
20919 (*simple_return_indirect_internal<mode>): Rename from
20920 simple_return_indirect_internal. Use W mode iterator.
20921 (rstorssp): New expander.
20922 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
20923 (clrssbsy): New expander.
20924 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
20926 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
20928 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
20930 (cmse_check_pointed_object): Likewise.
20932 2018-06-05 Martin Liska <mliska@suse.cz>
20934 PR gcov-profile/47618
20935 * doc/invoke.texi: Document how -fprofile-dir format
20938 2018-06-05 Richard Biener <rguenther@suse.de>
20940 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
20941 removal pretend DOM info isn't available so we do not update
20942 it and only remove edges, not dominated blocks. Actually free
20943 DOM info in case we removed something. Remove unreachable blocks.
20944 (mfb_keep_latches): Work with either DOM info or marked backedges.
20945 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
20946 first. Mark backedges if DOM info isn't available.
20947 (Re-)compute DOM info after cleanup_control_flow_pre.
20949 2018-06-05 Richard Biener <rguenther@suse.de>
20951 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
20952 (locus_discrim_hasher::hash): Adjust.
20953 (locus_discrim_hasher::equal): Likewise.
20954 (next_discriminator_for_locus): Work on line directly.
20955 (same_line_p): Pass in expanded locus1 as well.
20956 (assign_discriminators): Avoid redundant location expansions.
20958 2018-06-05 Richard Biener <rguenther@suse.de>
20960 PR tree-optimization/86046
20961 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
20962 if required after clearing TREE_ADDRESSABLE.
20964 2018-06-05 Richard Biener <rguenther@suse.de>
20966 PR tree-optimization/86047
20967 * tree-ssa-loop.c (for_each_index): Glob handling of all
20968 decls and constants and really handle all of them.
20970 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20973 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
20974 qualifier_void_pointer and qualifier_const_void_pointer.
20975 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
20976 (arm_init_builtins): Handle the above.
20977 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
20978 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
20979 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
20982 2018-06-05 Martin Liska <mliska@suse.cz>
20984 * auto-profile.c (read_autofdo_file): Do not use
20985 gcov_ctr_summary struct.
20986 (afdo_callsite_hot_enough_for_early_inline): Likewise.
20987 * coverage.c (struct counts_entry): Likewise.
20988 (read_counts_file): Read just single summary entry.
20989 (get_coverage_counts): Use gcov_summary struct.
20990 * coverage.h (get_coverage_counts): Likewise.
20991 * gcov-dump.c (dump_working_sets): Likewise.
20992 (tag_summary): Dump just single summary.
20993 * gcov-io.c (gcov_write_summary): Write just histogram
20995 (gcov_read_summary): Read just single summary.
20996 (compute_working_sets): Use gcov_summary struct.
20997 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
20998 of GCOV_COUNTERS_SUMMABLE.
20999 (GCOV_COUNTERS_SUMMABLE): Remove.
21000 (GCOV_FIRST_VALUE_COUNTER): Replace with
21001 GCOV_COUNTER_V_INTERVAL.
21002 (struct gcov_ctr_summary): Remove.
21003 (struct gcov_summary): Directly use fields of former
21005 (compute_working_sets): Use gcov_summary struct.
21006 * gcov.c (read_count_file): Do not use ctrs fields.
21007 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
21009 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
21011 * profile.c: Likewise.
21012 * profile.h: Likewise.
21014 2018-06-05 Martin Liska <mliska@suse.cz>
21016 PR gcov-profile/84846
21017 * gcov.c (output_lines): Print working directory only
21018 in intermediate format.
21020 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
21022 * config/s390/s390-builtin-types.def: Add void function type.
21023 * config/s390/s390-builtins.def: Use the function type for the
21026 2018-06-04 Jim Wilson <jimw@sifive.com>
21028 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
21030 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
21031 and maybe_eh_return. Change regno to unsigned int. Use new args to
21032 handle EH_RETURN_DATA_REGNO registers properly.
21033 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
21034 (riscv_expand_epilogue): Update comment. Change argument name and
21035 type. Update code to use new name and type. Pass new args to
21036 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
21038 * config/riscv/riscv.md (NORMAL_RETURN): New.
21039 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
21040 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
21041 (eh_return): Call gen_eh_return_internal and emit barrier.
21042 (eh_return_internal): Call riscv_expand_epilogue.
21044 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
21046 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
21047 bit_insertion field and declare can_be_merged_into method.
21048 (merged_store_group::can_be_merged_into): New method.
21049 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
21050 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
21051 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
21053 2018-06-04 Richard Biener <rguenther@suse.de>
21055 PR tree-optimization/85955
21056 * builtins.c (fold_builtin_sincos): Convert pointers to
21057 destination to appropriate type before dereferencing.
21059 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
21061 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
21063 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
21065 * expr.c (expand_expr_real_1): Force the operand into memory if
21066 its TYPE_MODE is BLKmode and if there is no integer mode for
21067 the number of bits being extracted.
21069 2018-06-04 Jakub Jelinek <jakub@redhat.com>
21073 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
21074 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
21076 2018-06-04 Richard Biener <rguenther@suse.de>
21078 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
21079 (cleanup_tree_cfg_noloop): ... single caller. Do
21080 start_recording_case_labels later.
21082 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
21084 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
21085 to _IMMINTRIN_H_INCLUDED.
21086 * config/i386/pconfigintrin.h: Ditto.
21087 * config/i386/waitpkgintrin.h: Ditto.
21088 * config/i386/immintrin.h: Add includes for sgxintrin.h,
21089 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
21090 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
21091 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
21092 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
21093 waitpkgintrin.h and cldemoteintrin.h.
21095 2018-06-04 Richard Biener <rguenther@suse.de>
21097 PR tree-optimization/86038
21098 * tracer.c (find_best_successor): Check probability for
21099 being initialized, bail out if not.
21101 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
21104 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
21105 of bits to ignore when comparing architectures.
21107 2018-06-04 Jakub Jelinek <jakub@redhat.com>
21109 PR tree-optimization/69615
21110 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
21111 maximum or minimum of the type, try to merge it also as if
21112 range1 is + [-, x - 1] or + [x + 1, -].
21115 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
21117 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
21119 PR tree-optimization/86034
21120 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
21121 the unsigned bitfield type in a bit insertion sequence if it does not
21122 have a larger precision than the bitfield size.
21123 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
21125 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
21127 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
21129 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
21131 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
21132 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
21133 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
21134 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
21136 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
21138 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
21139 Disable -fdelete-null-pointer-checks for ELF toolchain.
21141 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
21142 Kito Cheng <kito.cheng@gmail.com>
21144 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
21145 (nds32le-*-*, nds32be-*-*): Integrate checking process.
21146 (nds32*-*-*): Add glibc and uclibc conditions.
21147 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
21148 (TARGET_EXCEPT_UNWIND_INFO): Define.
21149 * config/nds32/elf.h: New file.
21150 * config/nds32/linux.h: New file.
21151 * config/nds32/nds32-elf.opt: New file.
21152 * config/nds32/nds32-linux.opt: New file.
21153 * config/nds32/nds32-fp-as-gp.c
21154 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
21155 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
21157 (nds32_asm_file_end): Ditto.
21158 (nds32_print_operand): Ditto.
21159 (nds32_insert_attributes): Ditto.
21160 (nds32_init_libfuncs): New function.
21161 (TARGET_HAVE_TLS): Define.
21162 (TARGET_INIT_LIBFUNCS): Define.
21163 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
21165 (TARGET_ELF): Apply different mcmodel setting.
21166 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
21167 been migrated into elf.h and linux.h files.
21168 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
21169 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
21170 (mcmodel): The content has been migrated into nds32-elf.opt and
21171 nds32-linux.opt files.
21172 * config/nds32/t-elf: New file.
21173 * config/nds32/t-linux: New file.
21175 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
21176 Shiva Chen <shiva0217@gmail.com>
21178 * config/nds32/constants.md (unspec_volatile_element): Add
21179 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
21180 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
21182 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
21183 (make_pass_nds32_fp_as_gp): Declare.
21184 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
21186 (nds32_asm_function_end_prologue): Remove unused asm output.
21187 (nds32_asm_function_begin_epilogue): Remove unused asm output.
21188 (nds32_asm_file_start): Output necessary fp_as_gp information.
21189 (nds32_option_override): Adjust register usage.
21190 (nds32_expand_prologue): Consider fp_as_gp situation.
21191 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
21192 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
21195 (simple_return): Ditto.
21196 (omit_fp_begin): Output special directive for fp_as_gp.
21197 (omit_fp_end): Output special directive for fp_as_gp.
21198 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
21199 mforbid-fp-as-gp): New options.
21201 2018-06-01 Mark Wielaard <mark@klomp.org>
21203 * dwarf2out.c (dwarf2out_finish): Remove generation of
21204 DW_AT_loclists_base.
21206 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
21208 * gimple-ssa-store-merging.c: Include gimple-fold.h.
21209 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
21210 (struct merged_store_group): Add bit_insertion field.
21211 (dump_char_array): Use standard hexadecimal format.
21212 (merged_store_group::merged_store_group): Set bit_insertion to false.
21213 (merged_store_group::apply_stores): Use optimal buffer size. Deal
21214 with BIT_INSERT_EXPR stores. Move up code updating the mask and
21215 also print the mask in the dump file.
21216 (pass_store_merging::gate): Minor tweak.
21217 (imm_store_chain_info::coalesce_immediate): Fix wrong association
21218 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
21219 stores with INTEGER_CST stores.
21220 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
21221 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
21222 and use it throughout. Generate bit insertion sequences if need be.
21223 (pass_store_merging::process_store): Remove redundant condition.
21224 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
21226 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
21228 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
21229 the 128-bit floating point types. Fix function comment.
21231 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21233 * config/aarch64/aarch64-simd.md
21234 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
21236 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
21239 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
21241 PR tree-optimization/85989
21242 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
21244 (backprop::intersect_uses): Check it when deciding whether this
21245 is a backedge reference.
21246 (backprop::process_block): Add each phi to m_visited_phis
21247 after visiting it, then clear it at the end.
21249 2018-06-01 Richard Biener <rguenther@suse.de>
21251 * tree-vectorizer.h (vect_dr_stmt): New function.
21252 (vect_get_load_cost): Adjust.
21253 (vect_get_store_cost): Likewise.
21254 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
21255 Use vect_dr_stmt instead of DR_SMTT.
21256 (vect_record_base_alignments): Likewise.
21257 (vect_calculate_target_alignment): Likewise.
21258 (vect_compute_data_ref_alignment): Likewise and make static.
21259 (vect_update_misalignment_for_peel): Likewise.
21260 (vect_verify_datarefs_alignment): Likewise.
21261 (vector_alignment_reachable_p): Likewise.
21262 (vect_get_data_access_cost): Likewise. Pass down
21263 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
21264 (vect_get_peeling_costs_all_drs): Likewise.
21265 (vect_peeling_hash_get_lowest_cost): Likewise.
21266 (vect_enhance_data_refs_alignment): Likewise.
21267 (vect_find_same_alignment_drs): Likewise.
21268 (vect_analyze_data_refs_alignment): Likewise.
21269 (vect_analyze_group_access_1): Likewise.
21270 (vect_analyze_group_access): Likewise.
21271 (vect_analyze_data_ref_access): Likewise.
21272 (vect_analyze_data_ref_accesses): Likewise.
21273 (vect_vfa_segment_size): Likewise.
21274 (vect_small_gap_p): Likewise.
21275 (vectorizable_with_step_bound_p): Likewise.
21276 (vect_prune_runtime_alias_test_list): Likewise.
21277 (vect_analyze_data_refs): Likewise.
21278 (vect_supportable_dr_alignment): Likewise.
21279 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
21280 (vect_gen_prolog_loop_niters): Likewise.
21281 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
21282 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
21284 (vect_recog_mask_conversion_pattern): Likewise.
21285 (vect_try_gather_scatter_pattern): Likewise.
21286 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
21287 to vect_get_store_cost.
21288 (vect_get_store_cost): Get stmt_info instead of DR.
21289 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
21290 (vect_get_load_cost): Get stmt_info instead of DR.
21292 2018-06-01 Richard Biener <rguenther@suse.de>
21294 PR middle-end/86017
21295 * gimple-fold.c (var_decl_component_p): Also allow offsetted
21296 vars wrapped in MEM_REFs.
21298 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
21300 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
21301 Fix subreg tests so that we only return a choice between
21302 GENERAL_REGS and FP_REGS if the original classes included both.
21304 2018-06-01 Richard Biener <rguenther@suse.de>
21307 * tree-ssa-structalias.c (get_function_part_constraint):
21308 Handle NULL fi->decl.
21309 (find_func_aliases_for_call): Properly handle indirect
21310 fi from direct call.
21311 (find_func_clobbers): Likewise.
21312 (ipa_pta_execute): Likewise.
21313 (create_variable_info_for): For functions that are ifunc_resolver
21314 resolve to a varinfo that contains the result of the resolver call.
21315 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
21318 2018-05-31 Michael Collison <michael.collison@arm.com>
21320 * config/aarch64/aarch64.md:
21321 (*fix_to_zero_extenddfdi2): New pattern.
21322 * gcc.target/aarch64/fix_extend1.c: New testcase.
21324 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
21326 PR middle-end/78809
21327 PR middle-end/83026
21328 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
21329 and BUILT_IN_STRNCMP_EQ.
21330 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
21331 BUILT_IN_STRNCMP_EQ.
21332 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
21333 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
21334 (gimple_fold_builtin): Likewise.
21335 * tree-ssa-strlen.c (compute_string_length): New function.
21336 (determine_min_obsize): New function.
21337 (handle_builtin_string_cmp): New function to handle calls to
21338 string compare functions.
21339 (strlen_optimize_stmt): Add handling to builtin string compare
21341 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
21342 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
21343 * tree.c (build_common_builtin_nodes): Add new defines of
21344 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
21346 2018-05-31 Jakub Jelinek <jakub@redhat.com>
21349 * bb-reorder.c (pass_partition_blocks::gate): Return false for
21350 functions with naked attribute.
21352 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
21354 * config/i386/sse.md (avx_vec_concat<mode>):
21355 Substitute concat_tg_mode mode attribute with xtg_mode.
21356 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
21357 (concat_tg_mode): Remove mode attribute.
21359 2018-05-31 Martin Sebor <msebor@redhat.com>
21362 * calls.c (alloc_max_size): Correct a logic error/typo.
21363 Treat excessive arguments as infinite. Warn for invalid arguments.
21364 * doc/invoke.texi (-Walloc-size-larger-than): Update.
21366 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
21369 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
21370 and movx for Haswell.
21372 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
21373 Cesar Philippidis <cesar@codesourcery.com>
21375 PR middle-end/85879
21376 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
21377 when emitting error on private/firstprivate reductions.
21378 * omp-low.c (lower_omp_target): Avoid reference-type processing
21379 on pointers for firstprivate clause.
21381 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
21383 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
21386 * config/aarch64/aarch64-simd.md
21387 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
21388 (aarch64_ld1_x3_<mode>): Likewise
21389 (aarch64_st1x2<VALLDIF:mode>): Likewise
21390 (aarch64_st1_x2_<mode>): Likewise
21391 (aarch64_st1x3<VALLDIF:mode>): Likewise
21392 (aarch64_st1_x3_<mode>): Likewise
21393 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
21394 (vld1_s8_x3): Likewise.
21395 (vld1_u16_x3): Likewise.
21396 (vld1_s16_x3): Likewise.
21397 (vld1_u32_x3): Likewise.
21398 (vld1_s32_x3): Likewise.
21399 (vld1_u64_x3): Likewise.
21400 (vld1_s64_x3): Likewise.
21401 (vld1_f16_x3): Likewise.
21402 (vld1_f32_x3): Likewise.
21403 (vld1_f64_x3): Likewise.
21404 (vld1_p8_x3): Likewise.
21405 (vld1_p16_x3): Likewise.
21406 (vld1_p64_x3): Likewise.
21407 (vld1q_u8_x3): Likewise.
21408 (vld1q_s8_x3): Likewise.
21409 (vld1q_u16_x3): Likewise.
21410 (vld1q_s16_x3): Likewise.
21411 (vld1q_u32_x3): Likewise.
21412 (vld1q_s32_x3): Likewise.
21413 (vld1q_u64_x3): Likewise.
21414 (vld1q_s64_x3): Likewise.
21415 (vld1q_f16_x3): Likewise.
21416 (vld1q_f32_x3): Likewise.
21417 (vld1q_f64_x3): Likewise.
21418 (vld1q_p8_x3): Likewise.
21419 (vld1q_p16_x3): Likewise.
21420 (vld1q_p64_x3): Likewise.
21421 (vst1_s64_x2): Likewise.
21422 (vst1_u64_x2): Likewise.
21423 (vst1_f64_x2): Likewise.
21424 (vst1_s8_x2): Likewise.
21425 (vst1_p8_x2): Likewise.
21426 (vst1_s16_x2): Likewise.
21427 (vst1_p16_x2): Likewise.
21428 (vst1_s32_x2): Likewise.
21429 (vst1_u8_x2): Likewise.
21430 (vst1_u16_x2): Likewise.
21431 (vst1_u32_x2): Likewise.
21432 (vst1_f16_x2): Likewise.
21433 (vst1_f32_x2): Likewise.
21434 (vst1_p64_x2): Likewise.
21435 (vst1q_s8_x2): Likewise.
21436 (vst1q_p8_x2): Likewise.
21437 (vst1q_s16_x2): Likewise.
21438 (vst1q_p16_x2): Likewise.
21439 (vst1q_s32_x2): Likewise.
21440 (vst1q_s64_x2): Likewise.
21441 (vst1q_u8_x2): Likewise.
21442 (vst1q_u16_x2): Likewise.
21443 (vst1q_u32_x2): Likewise.
21444 (vst1q_u64_x2): Likewise.
21445 (vst1q_f16_x2): Likewise.
21446 (vst1q_f32_x2): Likewise.
21447 (vst1q_f64_x2): Likewise.
21448 (vst1q_p64_x2): Likewise.
21449 (vst1_s64_x3): Likewise.
21450 (vst1_u64_x3): Likewise.
21451 (vst1_f64_x3): Likewise.
21452 (vst1_s8_x3): Likewise.
21453 (vst1_p8_x3): Likewise.
21454 (vst1_s16_x3): Likewise.
21455 (vst1_p16_x3): Likewise.
21456 (vst1_s32_x3): Likewise.
21457 (vst1_u8_x3): Likewise.
21458 (vst1_u16_x3): Likewise.
21459 (vst1_u32_x3): Likewise.
21460 (vst1_f16_x3): Likewise.
21461 (vst1_f32_x3): Likewise.
21462 (vst1_p64_x3): Likewise.
21463 (vst1q_s8_x3): Likewise.
21464 (vst1q_p8_x3): Likewise.
21465 (vst1q_s16_x3): Likewise.
21466 (vst1q_p16_x3): Likewise.
21467 (vst1q_s32_x3): Likewise.
21468 (vst1q_s64_x3): Likewise.
21469 (vst1q_u8_x3): Likewise.
21470 (vst1q_u16_x3): Likewise.
21471 (vst1q_u32_x3): Likewise.
21472 (vst1q_u64_x3): Likewise.
21473 (vst1q_f16_x3): Likewise.
21474 (vst1q_f32_x3): Likewise.
21475 (vst1q_f64_x3): Likewise.
21476 (vst1q_p64_x3): Likewise.
21478 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
21480 * config/msp430/msp430.c (msp430_output_labelref): Prepend
21481 user_label_prefix to name.
21483 * tree-core.h: Update comment about the format of NAME string
21484 passed to handler in attribute_spec.
21486 * config/msp430/msp430.md: Remove erroneous subreg expression from
21487 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
21488 zero_extend{q,h}isi2.
21490 2018-05-30 Borislav Petkov <bp@suse.de>
21492 * doc/extend.texi: Document some architecture specific
21493 constraints and sort entries.
21495 2018-05-30 Martin Sebor <msebor@redhat.com>
21497 PR middle-end/85369
21498 * builtins.c (expand_builtin_stpcpy_1): New function.
21499 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
21500 only if the former succeeds.
21502 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
21504 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
21507 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
21509 * doc/invoke.texi (-flinker-output): Document
21511 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
21513 * passes.c (ipa_write_summaries): Only modify statements if body
21515 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
21516 incrementally linking.
21517 (ipa_passes): Likewise.
21518 * lto-cgraph.c (lto_output_node): When incrementally linking do not
21519 pass down resolution info.
21520 * common.opt (flag_incremental_link): Update info.
21521 * gcc.c (plugin specs): Turn flinker-output=* to
21522 -plugin-opt=-linker-output-known
21523 * toplev.c (compile_file): Also cut compilation when doing incremental
21525 * flag-types. (enum lto_partition_model): Add
21526 LTO_LINKER_OUTPUT_NOLTOREL.
21527 (invoke.texi): Add -flinker-output docs.
21528 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
21529 link same way as WPA; do not stream in dead initializers.
21531 * dwarf2out.c (dwarf2out_die_ref_for_decl,
21532 darf2out_register_external_decl): Support incremental link.
21534 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
21536 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
21538 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
21540 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
21541 it down to simple_object_copy_lto_debug_sections.
21542 (run_gcc): Determine incremental LTO link time and configure
21543 lto1 into non-wpa mode, disable renaming of debug sections.
21545 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
21547 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
21548 descriptions of various incorrectly documented functions.
21550 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
21553 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
21554 address check not strict.
21556 2018-05-30 Richard Biener <rguenther@suse.de>
21558 PR tree-optimization/85964
21559 * tracer.c (better_p): Drop initialized count check, we only
21560 call the function with initialized counts now.
21561 (find_best_successor): Do find a best edge if one
21562 has uninitialized count.
21563 (find_best_predecessor): Likewise. Do BB frequency check only
21564 if count is initialized.
21566 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
21568 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
21569 (aarch64_ldrstr_offset_compare): New.
21570 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
21571 load/store orderings.
21572 (aarch64_gen_adjusted_ldpstp): Likewise.
21574 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
21576 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
21577 Check for subset of GENERAL_REGS and FP_REGS.
21578 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
21581 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
21583 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
21584 and wi::to_poly_offset. Add the current offset and then check
21585 whether the sum fits, rather than using an unchecked addition of
21586 a checked term. Check for a shwi rather than a uhwi.
21587 * expr.c (get_bit_range): Use tree_to_poly_uint64.
21588 (store_constructor): Use poly_int_tree_p.
21589 (expand_expr_real_1): Likewise.
21590 * function.c (assign_temp): Likewise.
21591 * fold-const.c (const_binop): Use poly_int_tree_p and
21592 wi::to_poly_offset.
21593 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
21595 * ipa-icf-gimple.c (func_checker::compare_operand): Use
21596 to_poly_offset for MEM offsets.
21597 * ipa-icf.c (sem_variable::equals): Likewise.
21598 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
21599 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
21600 wi::to_poly_offset for BIT_FIELD_REF offsets.
21601 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
21602 wi::to_poly_offset.
21603 * var-tracking.c (emit_note_insn_var_location): Use
21604 tree_to_poly_uint64.
21606 2018-05-29 Jim Wilson <jimw@sifive.com>
21608 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
21610 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
21613 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
21614 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
21616 (sse4_1_round<mode>2): Use nonimmediate_operand
21617 for operand 1 predicate.
21619 2018-05-29 Martin Sebor <msebor@redhat.com>
21620 Richard Biener <rguenther@suse.de>
21623 * calls.c (get_size_range): Call determine_value_range instead
21624 of get_value_range..
21625 * tree-vrp.h (determine_value_range): Declared new function.
21626 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
21628 2018-05-29 Richard Biener <rguenther@suse.de>
21630 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
21631 sure to use non-pattern stmts for get_earlier_stmt arguments.
21632 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
21633 called on pattern stmts.
21634 (get_later_stmt): Likewise.
21636 2018-05-29 Martin Liska <mliska@suse.cz>
21638 PR gcov-profile/85759
21639 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
21642 2018-05-29 Jakub Jelinek <jakub@redhat.com>
21644 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
21646 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
21650 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
21651 VEC_PACK_FLOAT_EXPR): New tree codes.
21652 * tree-pretty-print.c (op_code_prio): Handle
21653 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
21654 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
21655 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
21656 * tree-inline.c (estimate_operator_cost): Likewise.
21657 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
21658 * fold-const.c (const_binop): Likewise.
21659 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
21660 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
21661 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
21662 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
21663 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
21664 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
21665 * expr.c (expand_expr_real_2): Likewise.
21666 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
21667 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
21668 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
21670 * optabs.c (expand_widen_pattern_expr): For
21671 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
21672 sign from result type rather than operand's type.
21673 (expand_binop_directly): For vec_packu_float_optab and
21674 vec_packs_float_optab allow result type to be different from operand's
21676 * optabs-tree.c (optab_for_tree_code): Handle
21677 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
21678 VEC_PACK_FLOAT_EXPR. Formatting fixes.
21679 * tree-vect-generic.c (expand_vector_operations_1): Handle
21680 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
21681 VEC_PACK_FLOAT_EXPR.
21682 * tree-vect-stmts.c (supportable_widening_operation): Handle
21684 (supportable_narrowing_operation): Handle FLOAT_EXPR.
21685 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
21686 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
21687 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
21688 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
21690 (vec_pack<floatprefix>_float_<mode>): New expander.
21691 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
21693 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
21694 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
21695 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
21696 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
21697 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
21699 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
21700 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
21701 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
21702 VEC_PACK_FLOAT_EXPR): Document.
21704 2018-05-29 Richard Biener <rguenther@suse.de>
21706 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
21708 (stmt_vec_info_vec): Make pointer.
21709 (init_stmt_vec_info_vec): Remove.
21710 (free_stmt_vec_info_vec): Likewise.
21711 (set_stmt_vec_info_vec): New function.
21712 (free_stmt_vec_infos): Likewise.
21713 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
21714 (set_vinfo_for_stmt): Likewise.
21715 (get_earlier_stmt): Likewise.
21716 (get_later_stmt): Likewise.
21717 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
21718 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
21719 (vec_info::~vec_info): Free stmt_vec_infos.
21720 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
21721 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
21722 (pass_slp_vectorize::execute): Likewise.
21723 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
21724 (free_stmt_vec_info_vec): Likewise.
21725 (set_stmt_vec_info_vec): New function.
21726 (free_stmt_vec_infos): Likewise.
21727 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
21728 the global stmt_vec_info_vec.
21729 * tree-parloops.c (gather_scalar_reductions): Use
21730 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
21733 2018-05-29 Richard Biener <rguenther@suse.de>
21735 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
21737 2018-05-29 Martin Liska <mliska@suse.cz>
21738 David Malcolm <dmalcolm@redhat.com>
21740 * vec.c (test_reverse): New.
21741 (vec_c_tests): Add new test.
21742 * vec.h (vl_ptr>::reverse): New function.
21744 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
21746 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
21748 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
21751 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
21753 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
21755 2018-05-28 Richard Biener <rguenther@suse.de>
21757 PR tree-optimization/85933
21758 * tree-vect-data-refs.c (vect_record_base_alignments): Only
21759 look at stmts marked as vectorizable.
21761 2018-05-28 Richard Biener <rguenther@suse.de>
21763 PR tree-optimization/85934
21764 * tree-vect-generic.c (expand_vector_operations_1): Hoist
21765 vector boolean check before scalar optimization.
21767 2018-05-28 Jakub Jelinek <jakub@redhat.com>
21769 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
21772 2018-05-28 Mark Wielaard <mark@klomp.org>
21774 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
21775 if it is an expression containing a minus sign.
21777 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
21779 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
21781 2018-05-27 Paul Koning <ni1d@arrl.net>
21783 * config/pdp11/pdp11.md (truncsihi2): Remove.
21785 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
21786 Chung-Ju Wu <jasonwucj@gmail.com>
21788 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
21790 (unaligned_store_dw): Ditto.
21791 * config/nds32/nds32-memory-manipulation.c
21792 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
21793 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
21794 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
21795 (emit_setmem_word_loop): Rename to ...
21796 (emit_setmem_doubleword_loop): ... this.
21797 (nds32_gen_dup_4_byte_to_word_value): New function.
21798 (nds32_gen_dup_8_byte_to_double_word_value): New function.
21799 (nds32_expand_setmem_loop): Refine implementation.
21800 (nds32_expand_setmem_loop_v3m): Ditto.
21801 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
21804 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
21806 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
21808 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
21810 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
21811 (nds32_init_machine_status): Initialize machine->attr_naked_p and
21812 machine->attr_no_prologue_p.
21813 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
21814 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
21815 (nds32_expand_epilogue): Consider attr_naked_p.
21816 (nds32_expand_epilogue_v3pop): Likewise.
21817 (nds32_can_use_return_insn): Likewise.
21818 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
21819 attr_no_prologue_p fields.
21820 * config/nds32/nds32.opt (mret-in-naked-func): New option.
21822 2018-05-27 Jakub Jelinek <jakub@redhat.com>
21825 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
21827 * config/i386/sse.md
21828 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
21830 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
21832 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
21834 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
21836 (*<floatsuffix>floatv2div2sf2): Rename to ...
21837 (*float<floatunssuffix>v2div2sf2): ... this.
21838 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
21839 (float<floatunssuffix>v2div2sf2_mask): ... this.
21840 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
21841 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
21842 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
21844 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
21846 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
21848 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
21850 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
21852 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
21854 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
21855 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
21856 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
21857 gen_ufix_truncv8dfv8si2.
21858 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
21859 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
21860 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
21861 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
21862 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
21863 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
21864 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
21865 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
21867 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
21871 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
21873 2018-05-25 Jim Wilson <jimw@sifive.com>
21875 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
21876 * config/riscv/riscv.c (struct machine_function): Add
21877 interrupt_handler_p and attribute_checked_p fields.
21878 (riscv_attribute_table): Add interrupt.
21879 (riscv_interrupt_type_p): New.
21880 (riscv_save_reg_p): Save extra regs for interrupt handler.
21881 (riscv_use_save_libcall): Return false for interrupt handler.
21882 (riscv_first_stack_step): Add forward declaration.
21883 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
21884 for interrupt handler with large frame. Use it for saved reg list.
21885 (riscv_expand_prologue): Move flag_stack_usage_info support to
21886 eliminate duplication.
21887 (riscv_expand_epilogue): Generate mret for interrupt handler.
21888 (riscv_epilogue_uses): New.
21889 (riscv_can_use_return_insn): Return false for interrupt handler.
21890 (riscv_function_ok_for_sibcall): Likewise.
21891 (riscv_set_current_function): Add interrupt handler support.
21892 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
21893 * config/riscv/riscv.md (UNSPECV_MRET): New.
21895 (riscv_frflags, riscv_fsflags): Use tab after opcode.
21897 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
21899 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
21901 PR tree-optimization/85712
21902 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
21903 this candidate has already been replaced in-situ by a copy.
21905 2018-05-25 Jason Merrill <jason@redhat.com>
21907 PR c++/80485 - inline function non-zero address.
21908 * symtab.c (nonzero_address): Check DECL_COMDAT.
21910 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
21913 * config/alpha/alpha.md (ashlsi3): New insn pattern.
21914 (*ashlsi_se): Rename from *ashldi_se. Define as sign
21915 extension of SImode operation. Use const123_operand predicate.
21916 (*saddsi_1): Remove.
21917 (*saddl_se_1): Ditto.
21918 (*ssubsi_1): Ditto.
21919 (*ssubl_se_1): Ditto.
21920 * config/alpha/predicates.md (const123_operand): New predicate.
21921 * config/alpha/constraints.md (P): Use IN_RANGE.
21923 2018-05-25 Richard Biener <rguenther@suse.de>
21925 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
21927 (ref_maybe_used_by_stmt_p): Likewise.
21928 (stmt_may_clobber_ref_p): Likewise.
21929 (stmt_may_clobber_ref_p_1): Likewise.
21930 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
21932 (ref_maybe_used_by_stmt_p): Likewise.
21933 (stmt_may_clobber_ref_p): Likewise.
21934 (stmt_may_clobber_ref_p_1): Likewise.
21935 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
21936 the alias oracle to disambiguate DRs with stmts DR analysis
21938 (vect_analyze_data_refs): Do not give up on not analyzable
21939 DRs for BB vectorization. Remove code truncating the dataref
21942 2018-05-25 Jakub Jelinek <jakub@redhat.com>
21945 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
21946 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
21947 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
21949 2018-05-25 Richard Biener <rguenther@suse.de>
21951 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
21952 function, combining stmt data ref gathering and fatal analysis
21954 (vect_analyze_data_refs): Remove now redudnant code and simplify.
21955 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
21956 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
21957 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
21958 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
21960 2018-05-25 Bin Cheng <bin.cheng@arm.com>
21962 PR tree-optimization/85720
21963 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
21964 SCC if all partitions are builtins.
21965 (version_loop_by_alias_check): New parameter. Generate cancelable
21966 runtime alias check if all partitions are builtins.
21967 (distribute_loop): Update call to above function.
21969 2018-05-25 Bin Cheng <bin.cheng@arm.com>
21971 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
21972 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
21973 (parm_default_def_partition_arg): Ditto.
21974 (set_parm_default_def_partition): Ditto.
21975 (get_parm_default_def_partitions): Ditto and make it static.
21976 (get_undefined_value_partitions): Ditto and make it static.
21977 (remove_ssa_form): Refactor call to init_var_map here.
21978 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
21979 computation for loop region.
21980 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
21981 (register_default_def): Delete.
21982 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
21983 (parm_default_def_partition_arg): Ditto.
21984 (set_parm_default_def_partition): Ditto.
21985 (get_parm_default_def_partitions): Ditto and make it static.
21986 (get_undefined_value_partitions): Ditto and make it static.
21987 (coalesce_with_default, coalesce_with_default): Update comment.
21988 (create_coalesce_list_for_region): New func factored out from
21989 create_outofssa_var_map.
21990 (populate_coalesce_list_for_outofssa): New func factored out from
21991 create_outofssa_var_map and coalesce_ssa_name.
21992 (create_outofssa_var_map): Delete.
21993 (coalesce_ssa_name): Refactor to support live range computation.
21994 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
21995 (get_parm_default_def_partitions): Delete.
21996 (get_undefined_value_partitions): Ditto.
21997 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
21998 computation for loop region.
21999 (new_tree_live_info, loe_visit_block): Ditto.
22000 (live_worklist, set_var_live_on_entry): Ditto.
22001 (calculate_live_on_exit, verify_live_on_entry): Ditto.
22002 * tree-ssa-live.h (struct _var_map): New fields.
22003 (init_var_map): Change decl.
22004 (region_contains_p): New.
22006 2018-05-25 Bin Cheng <bin.cheng@arm.com>
22008 * tree-ssa-live.h (live_merge_and_clear): Delete.
22010 2018-05-25 Richard Biener <rguenther@suse.de>
22013 * tree-dump.c (dequeue_and_dump): Remove access to removed
22014 operand 2 of a SWITCH_EXPR.
22016 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
22018 * doc/sourcebuild.texi (vect_double_cond_arith): Include
22019 multiplication and division.
22020 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
22021 (cond_udiv@var{m}, cond_umod@var{m}): Document.
22022 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
22023 (cond_udiv_optab, cond_umod_optab): New optabs.
22024 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
22025 (IFN_COND_RDIV): New internal functions.
22026 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
22027 TRUNC_MOD_EXPR and RDIV_EXPR.
22028 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
22029 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
22031 (SVE_INT_BINARY): Include mult.
22032 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
22033 (optab, sve_int_op): Handle mult.
22034 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
22036 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
22037 for SVE_INT_BINARY_SD.
22039 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
22041 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
22042 (optab, sve_int_op): Handle div and udiv.
22043 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
22044 for SVE_INT_BINARY_SD.
22045 (*<optab><mode>3): New insn for the same.
22047 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
22049 * tree-vect-patterns.c: Include predict.h.
22050 (vect_recog_divmod_pattern): Restrict check for division support
22051 to when optimizing for size.
22053 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
22055 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
22056 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
22057 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
22058 (gimple_match_op::set_op): Likewise.
22059 (gimple_resimplify4): Declare.
22060 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
22061 (expr::gen_transform): Likewise.
22062 (decision_tree::gen): Generate a simplification routine for 4 operands.
22063 * gimple-match-head.c (gimple_simplify): Add an overload for
22064 4 operands. In the top-level function, handle up to 4 call
22065 arguments and call gimple_resimplify4.
22066 (gimple_resimplify4): New function.
22067 (build_call_internal): Pass a fourth operand.
22068 (maybe_push_to_seq): Likewise.
22069 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
22070 Fold VEC_COND_EXPRs of an operation and a default value into
22071 an IFN_COND_* function if possible.
22072 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
22074 (SVE_COND_FP_BINARY): Include them.
22075 (optab, sve_fp_op): Handle them.
22076 (SVE_INT_BINARY_REV): New code iterator.
22077 (SVE_COND_FP_BINARY_REV): New int iterator.
22078 (commutative): New int attribute.
22079 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
22081 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
22083 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
22084 (*cond_<optab><mode>): New patterns for reversed operands.
22086 2018-05-25 Richard Biener <rguenther@suse.de>
22088 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
22089 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
22090 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
22091 (STMT_VINFO_GROUPED_ACCESS): Adjust.
22092 * tree-vect-data-refs.c (everywhere): Adjust users.
22093 * tree-vect-loop.c (everywhere): Likewise.
22094 * tree-vect-slp.c (everywhere): Likewise.
22095 * tree-vect-stmts.c (everywhere): Likewise.
22096 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
22098 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22100 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
22102 (gcc_cv_as_section_exclude): ... this.
22103 Try Solaris as #exclude syntax.
22104 * configure: Regenerate.
22105 * config.in: Regenerate.
22106 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
22108 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
22109 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
22111 * varasm.c (default_elf_asm_named_section): Don't check if
22112 HAVE_GAS_SECTION_EXCLUDE is defined.
22114 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
22116 * doc/md.texi: Update the documentation of the cond_* optabs
22117 to mention the new final operand. Fix GET_MODE_NUNITS call.
22118 Describe the scalar case too.
22119 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
22120 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
22122 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
22123 (get_conditional_internal_fn): Update comment.
22124 * tree-vect-loop.c (vectorizable_reduction): Pass the original
22125 accumulator value as a final argument to conditional functions.
22126 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
22127 a define_expand and add an "else" operand. Assert for now that
22128 the else operand is equal to operand 2. Use SVE_INT_BINARY and
22129 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
22130 (*cond_<optab><mode>): New patterns.
22131 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
22132 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
22133 (UNSPEC_COND_EOR): Delete.
22134 (optab): Remove associated mappings.
22135 (SVE_INT_BINARY): New code iterator.
22136 (sve_int_op): Remove int attribute and add "minus" to the code
22138 (SVE_COND_INT_OP): Delete.
22139 (SVE_COND_FP_OP): Rename to...
22140 (SVE_COND_FP_BINARY): ...this.
22142 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
22144 * optabs.c (can_reuse_operands_p): New function.
22145 (maybe_legitimize_operands): Try to reuse the results for
22148 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
22150 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
22151 Add {q} suffix to insn mnemonic.
22153 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
22155 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
22156 (msp430_warn_func_return): New.
22158 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
22160 * fold-const.c (tree_nonzero_bits): New function.
22161 * fold-const.h (tree_nonzero_bits): Likewise.
22162 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
22163 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
22165 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
22169 * varasm.c (assemble_alias): Check ifunc_resolver only on
22172 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
22175 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
22176 when memory input operand is handled.
22178 2018-05-24 Luis Machado <luis.machado@linaro.org>
22180 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
22182 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
22184 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
22186 * match.pd: Delay FMA folds until after vectorization.
22188 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
22191 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
22192 address check not strict.
22194 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
22196 * gimple-match.h (gimple_match_op): New class.
22197 (mprts_hook): Replace parameters with a gimple_match_op *.
22198 (maybe_build_generic_op): Likewise.
22199 (gimple_simplified_result_is_gimple_val): Replace parameters with
22200 a const gimple_match_op *.
22201 (gimple_simplify): Replace code_helper * and tree * parameters with
22202 a gimple_match_op * parameter.
22203 (gimple_resimplify1): Replace code_helper *, tree and tree *
22204 parameters with a gimple_match_op * parameter.
22205 (gimple_resimplify2): Likewise.
22206 (gimple_resimplify3): Likewise.
22207 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
22208 parameters with a gimple_match_op * parameter.
22209 * gimple-match-head.c (gimple_simplify): Change prototypes of
22210 auto-generated functions to take a gimple_match_op * instead of
22211 separate code_helper * and tree * parameters. Make the same
22212 change in the top-level overload and update calls to the
22213 gimple_resimplify routines. Update calls to the auto-generated
22214 functions and to maybe_push_res_to_seq in the publicly-facing
22215 operation-specific gimple_simplify overloads.
22216 (gimple_match_op::MAX_NUM_OPS): Define.
22217 (gimple_resimplify1): Replace rcode and ops with a single res_op
22218 parameter. Update call to gimple_simplify.
22219 (gimple_resimplify2): Likewise.
22220 (gimple_resimplify3): Likewise.
22221 (mprts_hook): Replace parameters with a gimple_match_op *.
22222 (maybe_build_generic_op): Likewise.
22223 (build_call_internal): Replace type, nargs and ops with
22224 a gimple_match_op *.
22225 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
22226 with a single gimple_match_op *. Update calls to mprts_hook,
22227 build_call_internal and gimple_simplified_result_is_gimple_val.
22228 Factor out code that is common to the tree_code and combined_fn cases.
22229 * genmatch.c (expr::gen_transform): Replace tem_code and
22230 tem_ops with a gimple_match_op called tem_op. Update calls
22231 to the gimple_resimplify functions and maybe_push_res_to_seq.
22232 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
22233 res_ops. Update call to the gimple_resimplify functions.
22234 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
22235 (decision_tree::gen): Make the functions take a gimple_match_op *
22236 called res_op instead of separate res_code and res_ops parameters.
22237 Update call accordingly.
22238 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
22239 and ops with a single res_op parameter. Update calls to
22240 maybe_build_generic_op and maybe_push_res_to_seq.
22241 (fold_stmt_1): Update calls to gimple_simplify and
22242 replace_stmt_with_simplification.
22243 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
22244 and gimple_simplified_result_is_gimple_val.
22245 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
22247 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
22248 with a gimple_match_op *.
22249 (vn_nary_build_or_lookup): Likewise. Update call to
22250 vn_nary_build_or_lookup_1.
22251 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
22252 gimple_match_op *. Update calls to the gimple_resimplify routines
22253 and to gimple_simplified_result_is_gimple_val.
22254 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
22255 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
22256 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
22257 (visit_nary_op): Likewise.
22258 (visit_reference_op_load): Likewise.
22260 2018-05-23 Luis Machado <luis.machado@linaro.org>
22262 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
22263 modifier for printing the step amount.
22265 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
22268 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
22271 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
22273 * doc/sourcebuild.texi (Endianness): New subsubsection.
22275 2018-05-23 Luis Machado <luis.machado@linaro.org>
22277 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22278 <prefetch_dynamic_strides>: New const bool field.
22279 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22280 prefetch_dynamic_strides.
22281 (exynosm1_prefetch_tune): Likewise.
22282 (thunderxt88_prefetch_tune): Likewise.
22283 (thunderx_prefetch_tune): Likewise.
22284 (thunderx2t99_prefetch_tune): Likewise.
22285 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
22287 (aarch64_override_options_internal): Update to set
22288 PARAM_PREFETCH_DYNAMIC_STRIDES.
22289 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
22290 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
22291 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
22292 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
22293 prefetch-dynamic-strides setting.
22295 2018-05-23 Luis Machado <luis.machado@linaro.org>
22297 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22298 <minimum_stride>: New const int field.
22299 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22300 minimum_stride field defaulting to -1.
22301 (exynosm1_prefetch_tune): Likewise.
22302 (thunderxt88_prefetch_tune): Likewise.
22303 (thunderx_prefetch_tune): Likewise.
22304 (thunderx2t99_prefetch_tune): Likewise.
22305 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
22306 <default_opt_level>: Set to 3.
22307 (aarch64_override_options_internal): Update to set
22308 PARAM_PREFETCH_MINIMUM_STRIDE.
22309 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
22310 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
22311 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
22312 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
22313 stride is constant and is below the minimum stride threshold.
22315 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22317 * config/arm/arm-cpus.in (mode26): Delete.
22318 (armv4): Delete mode26 reference.
22319 * config/arm/arm.c (arm_configure_build_target): Delete use of
22322 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
22324 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
22326 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
22327 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
22329 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
22330 (floatunsdidf2): Ditto.
22332 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
22334 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
22335 (fixuns_trunc<mode>si2_avx512f): Ditto.
22336 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
22337 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
22338 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
22340 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
22342 PR rtl-optimization/79985
22343 * df-scan.c (df_insn_refs_collect): Remove special case for
22344 global registers and asm statements.
22346 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
22348 * extend.texi (Global Register Variables): Rewrite the bullet list.
22349 Note that the register is available for allocation. Note that access
22350 via inline asm must use constraints. Add note about async-signal
22351 handlers. Remove paragraph about automagic register selection.
22353 2018-05-23 Richard Biener <rguenther@suse.de>
22355 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
22356 of fixed offset from memset VN.
22358 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
22360 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
22361 first_interp field.
22362 (alloc_cand_and_find_basis): Initialize first_interp field.
22363 (slsr_process_mul): Modify first_interp field.
22364 (slsr_process_add): Likewise.
22365 (slsr_process_cast): Modify first_interp field for each new
22367 (slsr_process_copy): Likewise.
22368 (dump_candidate): Dump first_interp field.
22369 (replace_mult_candidate): Process all interpretations, not just
22371 (replace_rhs_if_not_dup): Likewise.
22372 (replace_one_candidate): Likewise.
22374 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
22376 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
22378 (aarch64_needs_frame_chain): New function.
22379 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
22381 2018-05-23 Sudakshina Das <sudi.das@arm.com>
22384 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
22385 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
22386 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
22387 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
22388 as true for strict-align.
22389 (aarch64_can_inline_p): Perform checks even when callee has no
22390 attributes to check for strict alignment.
22391 * doc/extend.texi (AArch64 Function Attributes): Document
22393 * doc/invoke.texi: (AArch64 Options): Likewise.
22395 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
22397 PR tree-optimization/85853
22398 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
22399 the handling of the root of the node to...
22400 (vect_slp_analyze_node_operations_1): ...this new function,
22401 and run the whole thing with the child nodes' def types
22402 set according to their SLP node's def type.
22404 2018-05-23 Richard Biener <rguenther@suse.de>
22406 PR middle-end/85874
22407 * tree-data-ref.c (create_runtime_alias_checks): Defer
22408 and ignore overflow warnings.
22410 2018-05-23 Yury Gribov <tetra2005@gmail.com>
22412 PR tree-optimization/85822
22413 * tree-vrp.c (is_masked_range_test): Fix handling of negative
22416 2018-05-23 Richard Biener <rguenther@suse.de>
22418 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
22419 memset constants via native_interpret_expr.
22421 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
22424 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
22426 (cgraph_node::create_alias): Likewise.
22427 (cgraph_node::get_availability): Check ifunc_resolver instead
22428 of looking up ifunc attribute.
22429 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
22430 * varasm.c (do_assemble_alias): Likewise.
22431 (assemble_alias): Likewise.
22432 (default_binds_local_p_3): Likewise.
22433 * cgraph.h (cgraph_node): Add ifunc_resolver.
22434 (cgraph_node::only_called_directly_or_aliased_p): Return false
22435 for IFUNC resolver.
22436 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
22438 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
22439 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
22440 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
22441 instead of looking up ifunc attribute.
22443 2018-05-22 Luis Machado <luis.machado@linaro.org>
22445 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
22447 2018-05-22 Martin Sebor <msebor@redhat.com>
22449 PR middle-end/85359
22450 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
22451 only when expasion succeeds.
22452 (expand_builtin_strcmp): Same.
22453 (expand_builtin_strncmp): Same.
22455 2018-05-22 Martin Sebor <msebor@redhat.com>
22457 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
22459 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
22460 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22462 * config/aarch64/aarch64-ldpstp.md: Replace uses of
22463 aarch64_mem_pair_operand with memory_operand and delete operand swapping
22465 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
22466 Add check for legitimate_address.
22467 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
22468 (aarch64_swap_ldrstr_operands): New.
22469 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
22472 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
22473 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22475 * config/aarch64/aarch64.md: New patterns to generate stp
22477 (store_pair_sw, store_pair_dw): New patterns to generate stp for
22478 single words and double words.
22479 (load_pair_sw, load_pair_dw): Likewise.
22480 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
22482 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
22484 * config/aarch64/aarch64-ldpstp.md: Modify peephole
22485 for different mode ldpstp and add peephole for merged zero stores.
22486 Likewise for loads.
22487 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
22489 (aarch64_gen_store_pair): Rename calls to match new patterns.
22490 (aarch64_gen_load_pair): Rename calls to match new patterns.
22491 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
22492 (load_pair<DREG:mode><DREG2:mode>): ... This.
22493 (store_pair<mode>): Rename to...
22494 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
22495 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
22496 New mode iterators.
22497 (V_INT_EQUIV): Handle SImode.
22498 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
22501 2018-05-22 Martin Sebor <msebor@redhat.com>
22504 * calls.c (maybe_warn_nonstring_arg): Use string length to set
22505 or ajust the presumed bound on an operation to avoid unnecessary
22508 2018-05-22 Martin Sebor <msebor@redhat.com>
22510 PR tree-optimization/85826
22511 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
22512 assuming that a DECL necesarily has a constant size.
22514 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
22516 PR middle-end/85862
22517 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
22519 2018-05-22 Richard Biener <rguenther@suse.de>
22521 PR tree-optimization/85834
22522 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
22523 non-constant and non-zero memset arguments.
22525 2018-05-22 Martin Liska <mliska@suse.cz>
22528 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
22530 2018-05-22 Richard Biener <rguenther@suse.de>
22532 PR tree-optimization/85863
22533 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
22534 comparisons when vectype is specified.
22535 (vectorizable_condition): Do not specify vectype for
22536 vect_is_simple_cond when SLP vectorizing.
22538 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
22541 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
22542 define __ibm128 as long double.
22543 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
22544 as a distinct type when IEEE 128-bit support is enabled.
22545 (init_float128_ieee): Fix up conversions between IFmode and IEEE
22546 128-bit types to use the correct functions.
22547 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
22548 convert between 128-bit floating point types that have different
22549 modes but the same representation, instead of using gen_lowpart to
22551 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
22553 (IFKF_reg): New attributes to give the register constraints for
22555 (extend<mode>tf2_internal): New insns to mark an explicit
22556 conversion between 128-bit floating point types that have a
22557 different mode but share the same representation.
22559 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
22561 PR tree-optimization/85814
22562 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
22563 a null return from get_strinfo when unsharing the next
22564 strinfo in the chain.
22566 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
22569 * varasm.c (weak_finish): Clean up weak_decls.
22571 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22573 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
22574 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
22575 UNSPEC_UADALP values.
22576 * config/aarch64/iterators.md (ABAL): New int iterator.
22579 (sur): Add mappings for the above.
22580 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
22582 (aarch64_<sur>abal<mode>_4): Likewise.
22583 (aarch64_<sur>adalp<mode>_3): Likewise.
22584 (<sur>sadv16qi): New define_expand.
22586 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
22588 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
22589 (*movdf_internal): Ditto.
22590 (*rcpsf2_sse): Ditto.
22591 (*rsqrtsf2_sse): Ditto.
22592 (*sqrt<mode>2_sse): Ditto.
22594 2018-05-21 Tamar Christina <tamar.christina@arm.com>
22596 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
22598 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
22599 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
22600 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
22601 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
22603 * config/aarch64/arm_neon.h: Likewise.
22604 * config/aarch64/iterators.md (VQ_I): New.
22606 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
22608 * config.gcc: Add arc/t-multilib-linux to tmake_file for
22610 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
22613 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
22615 * config/nds32/constraints.md (S): New constraint.
22616 * config/nds32/nds32.md (call_internal): Use constraint S.
22617 (call_value_internal): Likewise.
22618 (sibcall_internal): Likewise.
22619 (sibcall_value_internal): Likewise.
22621 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
22622 Chung-Ju Wu <jasonwucj@gmail.com>
22624 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
22625 into consideration.
22627 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
22628 Chung-Ju Wu <jasonwucj@gmail.com>
22630 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
22631 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
22632 (nds32_rtx_costs_impl): Simplify.
22633 (nds32_address_cost_impl): Simplify.
22634 (nds32_init_rtx_costs): New function.
22635 (nds32_rtx_costs_speed_prefer): Likewise.
22636 (nds32_rtx_costs_size_prefer): Likewise.
22637 (nds32_address_cost_speed_prefer): Likewise.
22638 (nds32_address_cost_speed_fwprop): Likewise.
22639 (nds32_address_cost_size_prefer): Likewise.
22640 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
22641 * config/nds32/nds32.c (nds32_option_override): Use
22642 nds32_init_rtx_costs function.
22644 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
22646 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
22647 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
22648 (TARGET_PIPELINE_N8): Likewise.
22649 (TARGET_PIPELINE_N10): Likewise.
22650 (TARGET_PIPELINE_N13): Likewise.
22651 (TARGET_PIPELINE_GRAYWOLF): Likewise.
22653 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
22655 * config/nds32/nds32-fpu.md: Update copyright year.
22657 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22659 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
22661 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22663 * config/nds32/nds32.c
22664 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
22665 * config/nds32/nds32.opt (minline-asm-r15): New option.
22667 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22669 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
22671 * config/nds32/nds32.md (abssi2): New pattern.
22673 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
22675 * config/i386/i386.md (rex64namesuffix): New mode attribute.
22676 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
22677 Merge insn pattern from sse_cvtsi2ss<round_name> and
22678 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
22679 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
22680 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
22681 using SWI48 mode iterator.
22682 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
22683 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
22684 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
22685 pattern from sse_cvttss2si<round_saeonly_name>
22686 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
22687 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
22688 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
22689 using SWI48 mode iterator.
22690 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
22691 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
22692 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
22693 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
22694 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
22695 using SWI48 mode iterator.
22696 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
22697 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
22698 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
22699 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
22700 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
22701 SWI48 mode iterator.
22702 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
22703 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
22704 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
22705 pattern from sse_cvttsd2si<round_saeonly_name>
22706 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
22708 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22710 * config/nds32/nds32-md-auxiliary.c
22711 (nds32_valid_smw_lwm_base_p): Refine.
22712 (nds32_output_smw_single_word): Refine.
22713 (nds32_output_smw_double_word): New.
22714 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
22716 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22718 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
22719 (nds32_output_stack_pop): Refine.
22720 (nds32_expand_unaligned_load): Refine.
22721 (nds32_expand_unaligned_store): Refine.
22723 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22724 Chung-Ju Wu <jasonwucj@gmail.com>
22726 * config/nds32/constants.md: Add TP_REGNUM constant.
22727 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
22728 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
22730 * config/nds32/nds32-doubleword.md: Consider flag_pic.
22731 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
22732 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
22733 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
22734 and PIC code generation.
22735 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
22737 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
22739 * config/nds32/nds32.md: Support TLS and PIC.
22740 * config/nds32/nds32.c: Support TLS and PIC.
22741 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
22742 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
22745 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22747 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
22748 mode with E_ prefix.
22750 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22751 Chung-Ju Wu <jasonwucj@gmail.com>
22753 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
22754 * config/nds32/nds32-md-auxiliary.c
22755 (symbolic_reference_mentioned_p): New.
22756 (nds32_legitimize_ict_address): New.
22757 (nds32_expand_ict_move): New.
22758 (nds32_indirect_call_referenced_p): New.
22759 (nds32_symbol_binds_local_p): Delete.
22760 (nds32_long_call_p): Modify.
22761 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
22762 * config/nds32/nds32-protos.h
22763 (symbolic_reference_mentioned_p): Declare.
22764 (nds32_legitimize_ict_address): Declare.
22765 (nds32_expand_ict_move): Declare.
22766 (nds32_indirect_call_referenced_p): Declare.
22767 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
22768 (nds32_relax_group): Use nds32_ict_const_p as condition.
22769 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
22770 (nds32_asm_file_start): Output ict_model directive in asm code.
22771 (nds32_legitimate_address_p): Consider indirect call.
22772 (nds32_print_operand): Consider indirect call.
22773 (nds32_print_operand_address): Consider indirect call.
22774 (nds32_insert_attributes): Handle "indirect_call" attribute.
22775 (TARGET_LEGITIMATE_ADDRESS_P): Define.
22776 (TARGET_LEGITIMATE_CONSTANT_P): Define.
22777 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
22778 (TARGET_DELEGITIMIZE_ADDRESS): Define.
22779 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
22780 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
22781 (TARGET_ICT_MODEL_SMALL): Define.
22782 (TARGET_ICT_MODEL_LARGE): Define.
22783 * config/nds32/nds32.md (movsi): Consider ict model.
22784 (call, call_value): Consider ict model.
22785 (sibcall, sibcall_value): Consider ict model.
22786 * config/nds32/nds32.opt (mict-model): New option.
22787 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
22790 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
22791 Monk Chiang <sh.chiang04@gmail.com>
22792 Jim Wilson <jimw@sifive.com>
22794 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
22795 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
22796 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
22797 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
22798 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
22799 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
22800 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
22801 compute save_libcall_adjustment properly.
22802 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
22803 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
22804 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
22805 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
22806 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
22807 (ABI_SPEC): Handle mabi=ilp32e.
22808 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
22809 (RVE): Add RVE mask.
22810 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
22811 <-march>: Add rv32e as an example.
22813 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
22816 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
22817 (intra_create_variable_infos): Handle C++ constructors.
22819 2018-05-18 Martin Liska <mliska@suse.cz>
22821 * passes.def: Remove a redundant pass.
22823 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
22826 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
22828 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22830 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
22832 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
22834 (armv2, armv2a, armv3, armv3m): Delete architectures.
22835 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
22836 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
22837 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
22839 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
22840 (*mulsidi3adddi): Likewise.
22841 (mulsidi3): Likewise.
22842 (*mulsidi3_nov6): Likewise.
22843 (umulsidi3): Likewise.
22844 (umulsidi3_nov6): Likewise.
22845 (umaddsidi4): Likewise.
22846 (*umulsidi3adddi): Likewise.
22847 (smulsi3_highpart): Likewise.
22848 (*smulsi3_highpart_nov6): Likewise.
22849 (umulsi3_highpart): Likewise.
22850 (*umulsi3_highpart_nov6): Likewise.
22851 * config/arm/arm.h (arm_arch3m): Delete.
22852 * config/arm/arm.c (arm_arch3m): Delete.
22853 (arm_option_override_internal): Update armv3-related comment.
22854 (arm_configure_build_target): Delete use of isa_bit_mode32.
22855 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
22856 (arm_rtx_costs_internal): Delete check of arm_arch3m.
22857 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
22858 (mulsa3): Likewise.
22859 (mulusa3): Likewise.
22860 * config/arm/arm-protos.h (arm_arch3m): Delete.
22861 * config/arm/arm-tables.opt: Regenerate.
22862 * config/arm/arm-tune.md: Likewise.
22863 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
22864 deleted architectures.
22866 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22868 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
22869 (armv5t, armv5te): New features.
22870 (ARMv5, ARMv5e): Delete fgroups.
22871 (ARMv5t, ARMv5te): Adjust for above changes.
22872 (ARMv6m): Likewise.
22873 (armv5, armv5e): Delete arches.
22874 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
22876 (*call_reg_arm): Likewise.
22877 (*call_value_reg_armv5): Likewise.
22878 (*call_value_reg_arm): Likewise.
22879 (*call_symbol): Likewise.
22880 (*call_value_symbol): Likewise.
22881 (*sibcall_insn): Likewise.
22882 (*sibcall_value_insn): Likewise.
22883 (clzsi2): Likewise.
22884 (prefetch): Likewise.
22885 (define_split and define_peephole2 dependent on arm_arch5):
22887 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
22889 (TARGET_ARM_QBIT): Likewise.
22890 (TARGET_DSP_MULTIPLY): Likewise.
22891 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
22892 (arm_arch5, arm_arch5e): Delete.
22893 (arm_arch5t, arm_arch5te): Declare.
22894 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
22895 (arm_arch5t): Declare.
22896 (arm_option_reconfigure_globals): Update for the above.
22897 (arm_options_perform_arch_sanity_checks): Update comment, replace
22898 use of arm_arch5 with arm_arch5t.
22899 (use_return_insn): Likewise.
22900 (arm_emit_call_insn): Likewise.
22901 (output_return_instruction): Likewise.
22902 (arm_final_prescan_insn): Likewise.
22903 (arm_coproc_builtin_available): Likewise.
22904 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
22905 arm_arch5e with arm_arch5t and arm_arch5te.
22906 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
22907 (arm_arch5t, arm_arch5te): Declare.
22908 * config/arm/arm-tables.opt: Regenerate.
22909 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
22910 * config/arm/t-multilib: Likewise.
22911 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
22912 instead of arm_arch5.
22913 (*call_reg_thumb1): Likewise.
22914 (*call_value_reg_thumb1_v5): Likewise.
22915 (*call_value_reg_thumb1): Likewise.
22916 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
22918 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
22920 2018-05-18 Martin Liska <mliska@suse.cz>
22922 PR gcov-profile/84846
22923 * doc/gcov.texi: Document -t option of gcov tool.
22925 2018-05-18 Martin Liska <mliska@suse.cz>
22927 PR gcov-profile/84846
22928 * gcov.c (print_usage): Add new -t option.
22929 (process_args): Handle the option.
22930 (generate_results): Use stdout as output when requested by
22933 2018-05-18 Martin Liska <mliska@suse.cz>
22935 PR gcov-profile/84846
22936 * coverage.c (coverage_init): Write PWD to .gcno file.
22937 * doc/gcov.texi: Document how working directory is printed.
22938 * gcov-dump.c (dump_gcov_file): Print PWD.
22939 * gcov.c (output_intermediate_file): Likewise.
22940 (read_graph_file): Read PWD string.
22941 (output_lines): Print PWD.
22943 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22945 PR middle-end/85817
22946 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
22947 for retval and return false if all args to phi are zero.
22949 2018-05-18 Richard Biener <rguenther@suse.de>
22951 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
22953 (evrp_dom_walker::before_dom_children): Call it.
22955 2018-05-18 Richard Biener <rguenther@suse.de>
22957 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
22958 results when processing array refs with variable index.
22960 2018-05-18 Toon Moene <toon@moene.org>
22962 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
22963 directly after that of -floop-interchange. Indicate that both
22964 options are enabled by default when specifying -O3.
22966 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22968 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
22969 iterator. Delete separate integer-mode vec_set<mode> expander.
22970 (aarch64_simd_vec_setv2di): Delete.
22971 (vec_setv2di): Delete.
22972 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
22973 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
22974 the "w, r" alternative.
22976 2018-05-18 Martin Liska <mliska@suse.cz>
22978 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
22979 * tree-pass.h (make_pass_lower_switch_O0): New function.
22980 * tree-switch-conversion.c (node_has_low_bound): Remove.
22981 (node_has_high_bound): Likewise.
22982 (node_is_bounded): Likewise.
22983 (class pass_lower_switch): Make it a template type and create
22985 (pass_lower_switch::execute): Add template argument.
22986 (make_pass_lower_switch): New function.
22987 (make_pass_lower_switch_O0): New function.
22988 (do_jump_if_equal): Remove.
22989 (emit_case_nodes): Simplify to just handle all 3 cases and leave
22990 all the hard work to tree optimization passes.
22992 2018-05-18 Martin Liska <mliska@suse.cz>
22994 * dbgcnt.c (limit_low): Renamed from limit.
22995 (limit_high): New variable.
22996 (dbg_cnt_is_enabled): Check for upper limit.
22997 (dbg_cnt): Adjust dumping.
22998 (dbg_cnt_set_limit_by_index): Add new argument for high
23000 (dbg_cnt_set_limit_by_name): Likewise.
23001 (dbg_cnt_process_single_pair): Parse new format.
23002 (dbg_cnt_process_opt): Use strtok.
23003 (dbg_cnt_list_all_counters): Remove 'value' and add
23005 * doc/invoke.texi: Document changes.
23007 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
23009 * doc/sourcebuild.texi (scalar_all_fma): Document.
23010 * tree.def (FMA_EXPR): Delete.
23011 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
23012 * internal-fn.c (ternary_direct): New macro.
23013 (expand_ternary_optab_fn): Likewise.
23014 (direct_ternary_optab_supported_p): Likewise.
23015 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
23016 * builtins.c (fold_builtin_fma): Delete.
23017 (fold_builtin_3): Don't call it.
23018 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
23019 * expr.c (expand_expr_real_2): Likewise.
23020 * fold-const.c (operand_equal_p): Likewise.
23021 (fold_ternary_loc): Likewise.
23022 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
23023 * gimple.c (DEFTREECODE): Likewise.
23024 * gimplify.c (gimplify_expr): Likewise.
23025 * optabs-tree.c (optab_for_tree_code): Likewise.
23026 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
23027 * tree-eh.c (operation_could_trap_p): Likewise.
23028 (stmt_could_throw_1_p): Likewise.
23029 * tree-inline.c (estimate_operator_cost): Likewise.
23030 * tree-pretty-print.c (dump_generic_node): Likewise.
23031 (op_code_prio): Likewise.
23032 * tree-ssa-loop-im.c (stmt_cost): Likewise.
23033 * tree-ssa-operands.c (get_expr_operands): Likewise.
23034 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
23035 * fold-const-call.h (fold_fma): Delete.
23036 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
23037 CFN_FNMA and CFN_FNMS.
23038 (fold_fma): Delete.
23039 * genmatch.c (combined_fn): New enum.
23040 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
23041 (commutative_op): New function.
23042 (commutate): Use it. Handle more than 2 operands.
23043 (dt_operand::gen_gimple_expr): Use commutative_op.
23044 (parser::parse_expr): Allow :c to be used with non-binary
23045 operators if the commutative operand is known.
23046 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
23047 CFN_FMS, CFN_FNMA and CFN_FNMS.
23048 (backprop::process_assign_use): Remove FMA_EXPR handling.
23049 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
23050 (gen_hsa_fma): New function.
23051 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
23052 IFN_FNMA and IFN_FNMS.
23053 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
23054 * gimple-fold.h (follow_all_ssa_edges): Declare.
23055 * gimple-fold.c (follow_all_ssa_edges): New function.
23056 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
23057 gimple_build interface and use follow_all_ssa_edges to fold the result.
23058 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
23059 instead of checking for optabs directly.
23060 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
23061 rather than FMA_EXPRs.
23062 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
23063 call to IFN_FMA instead of an FMA_EXPR.
23065 2018-05-17 Jim Wilson <jimw@sifive.com>
23067 * expr.c (do_tablejump): When converting index to Pmode, if we have a
23068 sign extended promoted subreg, and the range does not have the sign bit
23069 set, then do a sign extend.
23071 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
23072 test, check for sign extended subreg and/or constant operands, and
23073 do a sign extend in that case.
23075 2018-05-17 Steve Ellcey <sellcey@cavium.com>
23077 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
23078 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
23080 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
23081 Change logics_shift_reg to logics_shift_imm.
23082 (thunderx2t99_fp_loadpair_basic): Delete.
23083 (thunderx2t99_fp_storepair_basic): Delete.
23084 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
23085 (thunderx2t99_asimd_polynomial): Delete.
23086 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
23087 and neon_fp_mul_d_scalar_q.
23088 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
23089 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
23090 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
23091 (thunderx2t99_asimd_lut): Add missing tbl types.
23092 (thunderx2t99_asimd_ext): Delete.
23093 (thunderx2t99_asimd_load1_1_mult): Delete.
23094 (thunderx2t99_asimd_load1_2_mult): Delete.
23095 (thunderx2t99_asimd_load1_ldp): New.
23096 (thunderx2t99_asimd_load1): New.
23097 (thunderx2t99_asimd_load2): Add missing *load2* types.
23098 (thunderx2t99_asimd_load3): New.
23099 (thunderx2t99_asimd_load4): New.
23100 (thunderx2t99_asimd_store1_1_mult): Delete.
23101 (thunderx2t99_asimd_store1_2_mult): Delete.
23102 (thunderx2t99_asimd_store2_mult): Delete.
23103 (thunderx2t99_asimd_store2_onelane): Delete.
23104 (thunderx2t99_asimd_store_stp): New.
23105 (thunderx2t99_asimd_store1): New.
23106 (thunderx2t99_asimd_store2): New.
23107 (thunderx2t99_asimd_store3): New.
23108 (thunderx2t99_asimd_store4): New.
23110 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
23112 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
23113 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
23115 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
23116 Segher Boessenkool <segher@kernel.crashing.org>
23119 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
23122 2018-05-17 Richard Biener <rguenther@suse.de>
23124 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
23125 for pruning loop and prune defs feeding only already visited PHIs.
23127 2018-05-17 Richard Biener <rguenther@suse.de>
23129 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
23131 2018-05-17 Bin Cheng <bin.cheng@arm.com>
23132 Richard Biener <rguenther@suse.de>
23134 PR tree-optimization/85793
23135 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
23136 for VMAT_ELEMENTWISE.
23138 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
23140 * internal-fn.h (lookup_internal_fn): Declare
23141 * internal-fn.c (lookup_internal_fn): New function.
23142 * gimple.c (gimple_build_call_from_tree): Handle calls to
23143 internal functions.
23144 * gimple-pretty-print.c (dump_gimple_call): Print "." before
23145 internal function names.
23146 * tree-pretty-print.c (dump_generic_node): Likewise.
23147 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
23149 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
23151 * gimple-fold.h (gimple_build): Make the function forms take
23152 combined_fn rather than built_in_function.
23153 (gimple_simplify): Likewise.
23154 * gimple-match-head.c (gimple_simplify): Likewise.
23155 * gimple-fold.c (gimple_build): Likewise.
23156 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
23157 rather than gimple_build_call_internal.
23158 (get_initial_defs_for_reduction): Likewise.
23159 (vect_create_epilog_for_reduction): Likewise.
23160 (vectorizable_live_operation): Likewise.
23162 2018-05-17 Martin Liska <mliska@suse.cz>
23164 * gimple-ssa-sprintf.c (format_directive): Do not use
23165 space in between 'G_' and '('.
23167 2018-05-17 Jakub Jelinek <jakub@redhat.com>
23170 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
23171 even if the mask is not all ones.
23174 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
23176 (ix86_gimple_fold_builtin): Likewise.
23179 * config/i386/i386.c: Include tree-vector-builder.h.
23180 (ix86_vector_shift_count): New function.
23181 (ix86_fold_builtin): Fold shift builtins by scalar count.
23182 (ix86_gimple_fold_builtin): Likewise.
23184 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
23185 _mm512_setzero): New intrinsics.
23187 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
23188 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23190 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
23191 code generation for cases where splatting a value is not useful.
23192 * simplify-rtx.c (simplify_ternary_operation): Simplify
23193 vec_merge across a vec_duplicate and a paradoxical subreg forming
23194 a vector mode to a vec_concat.
23196 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
23198 * config.gcc: Support "goldmont-plus".
23199 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
23201 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23202 PROCESSOR_GOLDMONT_PLUS.
23203 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
23204 (processor_target_table): Add "goldmont-plus".
23205 (PTA_GOLDMONT_PLUS): Define.
23206 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
23207 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
23208 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
23209 (fold_builtin_cpu): Add "goldmont-plus".
23210 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
23211 (ix86_option_override_internal): Add "goldmont-plus".
23212 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
23213 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
23214 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
23215 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
23217 2018-05-17 Richard Biener <rguenther@suse.de>
23219 PR tree-optimization/85757
23220 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
23221 remove defs that only feed that PHI from further processing.
23223 2018-05-16 Jim Wilson <jimw@sifive.com>
23225 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
23227 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
23229 2018-05-16 Mark Wielaard <mark@klomp.org>
23231 * dwarf2out.c (count_index_strings): New function.
23232 (output_indirect_strings): Call count_index_strings and generate
23233 header for dwarf_version >= 5.
23235 2018-05-16 Mark Wielaard <mark@klomp.org>
23237 * dwarf2out.c (dwarf_FORM): New function.
23238 (set_indirect_string): Use dwarf_FORM.
23239 (reset_indirect_string): Likewise.
23240 (size_of_die): Likewise.
23241 (value_format): Likewise.
23242 (output_die): Likewise.
23243 (add_skeleton_AT_string): Likewise.
23244 (output_macinfo_op): Likewise.
23245 (index_string): Likewise.
23246 (output_index_string_offset): Likewise.
23247 (output_index_string): Likewise.
23248 (count_index_strings): Likewise.
23250 2018-05-16 Carl Love <cel@us.ibm.com>
23252 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
23253 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
23255 2018-05-16 Martin Jambor <mjambor@suse.cz>
23257 * ipa-prop.c (ipa_free_all_edge_args): Remove.
23258 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
23260 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
23262 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
23263 (fnma<mode>4): Likewise.
23264 (fms<mode>4): Likewise.
23265 (fnms<mode>4): Likewise.
23266 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
23267 (aarch64_fnma<mode>4): Likewise.
23268 (aarch64_fms<mode>4): Likewise.
23269 (aarch64_fnms<mode>4): Likewise.
23270 (aarch64_fnmadd<mode>4): Likewise.
23272 2018-05-16 Jason Merrill <jason@redhat.com>
23274 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
23276 2018-05-16 Richard Biener <rguenther@suse.de>
23278 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
23279 (dump_stmt_cost): Declare.
23280 (add_stmt_cost): Dump cost we add.
23281 (add_stmt_costs): New function.
23282 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
23283 No longer exported.
23284 (vect_analyze_stmt): Adjust prototype.
23285 (vectorizable_condition): Likewise.
23286 (vectorizable_live_operation): Likewise.
23287 (vectorizable_reduction): Likewise.
23288 (vectorizable_induction): Likewise.
23289 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
23290 cost vector to pass to vectorizable_ and record afterwards.
23291 (vect_model_reduction_cost): Take cost vector argument and adjust.
23292 (vect_model_induction_cost): Likewise.
23293 (vectorizable_reduction): Likewise.
23294 (vectorizable_induction): Likewise.
23295 (vectorizable_live_operation): Likewise.
23296 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
23297 SLP_TREE_NUMBER_OF_VEC_STMTS.
23298 (vect_analyze_slp_cost_1): Remove.
23299 (vect_analyze_slp_cost): Likewise.
23300 (vect_slp_analyze_node_operations): Take visited args and
23301 a target cost vector. Avoid processing already visited stmt sets.
23302 (vect_slp_analyze_operations): Use a local cost vector to gather
23303 costs and register those of non-discarded instances.
23304 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
23305 (vect_schedule_slp_instance): Remove copying of
23306 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
23308 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
23309 adding cost. Record cost entry location.
23310 (vect_prologue_cost_for_slp_op): Function to compute cost of
23311 a constant or invariant generated for SLP vect in the prologue,
23312 split out from vect_analyze_slp_cost_1.
23313 (vect_model_simple_cost): Make static. Adjust for SLP costing.
23314 (vect_model_promotion_demotion_cost): Likewise.
23315 (vect_model_store_cost): Likewise, make static.
23316 (vect_model_load_cost): Likewise.
23317 (vectorizable_bswap): Add cost vector arg and adjust.
23318 (vectorizable_call): Likewise.
23319 (vectorizable_simd_clone_call): Likewise.
23320 (vectorizable_conversion): Likewise.
23321 (vectorizable_assignment): Likewise.
23322 (vectorizable_shift): Likewise.
23323 (vectorizable_operation): Likewise.
23324 (vectorizable_store): Likewise.
23325 (vectorizable_load): Likewise.
23326 (vectorizable_condition): Likewise.
23327 (vectorizable_comparison): Likewise.
23328 (can_vectorize_live_stmts): Likewise.
23329 (vect_analyze_stmt): Likewise.
23330 (vect_transform_stmt): Adjust calls to vectorizable_*.
23331 * tree-vectorizer.c: Include gimple-pretty-print.h.
23332 (dump_stmt_cost): New function.
23334 2018-05-16 Richard Biener <rguenther@suse.de>
23336 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
23337 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
23338 * tree-ssa-dse.c: Include tree-ssa-loop.h.
23339 (check_name): New callback.
23340 (dse_classify_store): Track cycles via a visited bitmap of PHI
23341 defs and simplify handling of in-loop and across loop dead stores
23342 and properly fail for loop-variant refs. Handle byte-tracking with
23343 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
23346 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
23348 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
23349 (vect_get_mask_type_for_stmt): Likewise.
23350 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
23352 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
23353 to determine the statement's vector type and the vector type that
23354 should be used for calculating nunits. Deal with cases in which
23355 the type has to be deferred.
23356 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
23357 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
23358 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
23359 (vect_determine_vf_for_stmt): New functions, split out from...
23360 (vect_determine_vectorization_factor): ...here.
23361 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
23362 (vect_get_mask_type_for_stmt): New functions, split out from
23363 vect_determine_vectorization_factor.
23365 2018-05-16 Richard Biener <rguenther@suse.de>
23367 * tree-cfg.c (verify_gimple_assign_ternary): Properly
23368 verify the [VEC_]COND_EXPR embedded comparison.
23370 2018-05-15 Martin Sebor <msebor@redhat.com>
23372 PR tree-optimization/85753
23373 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
23374 RECORD_TYPE in addition to ARRAY_TYPE.
23376 2018-05-15 Martin Sebor <msebor@redhat.com>
23378 PR middle-end/85643
23379 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
23381 2018-05-15 Richard Biener <rguenther@suse.de>
23383 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
23384 add by_clobber_p one. Change algorithm to collect all defs
23385 representing uses we need to walk and try reducing them to
23386 a single one before failing.
23387 (dse_dom_walker::dse_optimize_stmt): Adjust.
23389 2018-05-13 Mark Wielaard <mark@klomp.org>
23391 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
23392 (size_of_loc_descr): Likewise.
23393 (output_loc_operands): Likewise.
23394 (output_loc_operands_raw): Likewise.
23395 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
23396 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
23397 (hash_loc_operands): Likewise.
23398 (compare_loc_operands): Likewise.
23400 2018-05-14 Mark Wielaard <mark@klomp.org>
23402 * dwarf2out.c (count_index_addrs): New function.
23403 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
23405 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23407 PR tree-optimization/83648
23408 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
23409 return value as malloc candidate.
23411 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23414 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
23415 param as true in call to suggest_attribute.
23417 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
23419 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
23420 -mreadonly-in-sdata.
23422 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23424 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
23426 (aarch64_crypto_aesd_fused): Likewise.
23428 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
23430 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
23431 (movsi_aarch64): Likewise.
23432 (load_pairsi): Likewise.
23433 (load_pairdi): Likewise.
23434 (store_pairsi): Likewise.
23435 (store_pairdi): Likewise.
23436 (load_pairsf): Likewise.
23437 (load_pairdf): Likewise.
23438 (store_pairsf): Likewise.
23439 (store_pairdf): Likewise.
23440 (zero_extend): Likewise.
23441 (trunc): Swap alternatives.
23442 (fcvt_target): Add '?' to prefer w over r.
23444 2018-05-14 Jakub Jelinek <jakub@redhat.com>
23447 * config/i386/i386.md: Disallow non-commutative arithmetics in
23448 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
23449 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
23450 in the peephole2 before it.
23452 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
23454 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
23455 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
23456 (ix86_handle_option): Handle -mcldemote.
23457 * config.gcc: New header.
23458 * config/i386/cldemoteintrin.h: New file.
23459 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
23460 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
23462 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23463 OPTION_MASK_ISA_CLDEMOTE.
23464 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
23465 (ix86_valid_target_attribute_inner_p): Ditto.
23466 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
23467 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
23468 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
23469 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
23470 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
23472 * config/i386/i386.opt: Add -mcldemote.
23473 * config/i386/x86intrin.h: New header.
23474 * doc/invoke.texi: Add -mcldemote.
23476 2018-05-14 Richard Biener <rguenther@suse.de>
23478 * doc/match-and-simplify.texi: Adjust :s documentation.
23480 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
23482 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
23483 intended memcpy size.
23484 (REORDER_45): Likewise.
23486 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
23488 * sort.cc: New file.
23489 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
23490 * vec.c (qsort_chk): Use gcc_qsort.
23491 * Makefile.in (OBJS-libcommon): Add sort.o.
23492 (build/sort.o): New target. Use it...
23493 (BUILD_RTL): ... here, and...
23494 (build/gencfn-macros): ... here, and...
23495 (build/genmatch): ... here.
23497 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
23498 Chung-Ju Wu <jasonwucj@gmail.com>
23500 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
23501 * config/nds32/nds32-graywolf.md: New file.
23502 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
23503 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
23505 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
23506 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
23507 * config/nds32/nds32.md (pipeline_model): Add graywolf.
23508 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
23509 * config/nds32/pipelines.md: Include n15 settings.
23511 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
23512 Chung-Ju Wu <jasonwucj@gmail.com>
23514 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
23515 * config/nds32/nds32-n13.md: New file.
23516 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
23517 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
23519 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
23520 * config/nds32/nds32.md (pipeline_model): Add n13.
23521 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
23522 * config/nds32/pipelines.md: Include n13 settings.
23524 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
23525 Chung-Ju Wu <jasonwucj@gmail.com>
23527 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
23528 * config/nds32/nds32-n10.md: New file.
23529 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
23530 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
23532 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
23533 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
23534 * config/nds32/nds32.md (pipeline_model): Add n10.
23535 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
23536 * config/nds32/pipelines.md: Include n10 settings.
23538 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
23539 Kito Cheng <kito.cheng@gmail.com>
23540 Chung-Ju Wu <jasonwucj@gmail.com>
23542 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
23543 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
23544 Add enum values for DSP extension instructions.
23545 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
23547 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
23548 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
23549 New code iterators.
23550 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
23551 * config/nds32/nds32-dspext.md: New file for DSP implementation.
23552 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
23553 * config/nds32/nds32-intrinsic.md: Likewise.
23554 * config/nds32/nds32_intrinsic.h: Likewise.
23555 * config/nds32/nds32-md-auxiliary.c: Likewise.
23556 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
23557 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
23558 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
23559 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
23560 * config/nds32/nds32-protos.h: New declarations for DSP extension.
23561 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
23562 TYPE_DMAC in switch statement.
23563 * config/nds32/nds32.c: New checking and implementation for DSP
23564 extension instructions.
23565 * config/nds32/nds32.h: Likewise.
23566 * config/nds32/nds32.md: Likewise.
23567 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
23568 * config/nds32/predicates.md: Implement new predicates for DSP
23571 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
23573 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
23574 Reformat alternatives and attributes so it is easier to identify
23575 which constraints/attributes go with which instruction.
23576 (mov<mode>_hardfloat32, FMOVE64): Likewise.
23577 (mov<mode>_softfloat32, FMOVE64): Likewise.
23578 (mov<mode>_hardfloat64, FMOVE64): Likewise.
23579 (mov<mode>_softfloat64, FMOVE64): Likewise.
23581 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
23583 * doc/extend.texi (PowerPC Built-in Functions): Rename this
23585 (Basic PowerPC Built-in Functions): The new name of the
23586 subsection previously known as "PowerPC Built-in Functions".
23587 (Basic PowerPC Built-in Functions Available on all Configurations):
23589 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
23590 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
23591 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
23592 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
23594 2018-05-11 Martin Jambor <mjambor@suse.cz>
23597 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
23600 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
23603 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
23605 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
23607 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
23608 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
23609 (ix86_handle_option): Handle -mwaitpkg.
23610 * config.gcc: New header.
23611 * config/i386/cpuid.h (bit_WAITPKG): New bit.
23612 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
23613 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
23615 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23616 OPTION_MASK_ISA_WAITPKG.
23617 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
23618 (ix86_option_override_internal): Add PTA_WAITPKG.
23619 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
23620 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
23621 IX86_BUILTIN_TPAUSE.
23622 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
23623 __builtin_ia32_umwait and __builtin_ia32_tpause.
23624 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
23625 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
23626 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
23627 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
23628 UNSPECV_TPAUSE): New.
23629 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
23630 * config/i386/i386.opt: Add -mwaitpkg.
23631 * config/i386/waitpkgintrin.h: New file.
23632 * config/i386/x86intrin.h: New header.
23633 * doc/invoke.texi: Add -mwaitpkg.
23635 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
23638 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
23640 (cortex-m0): Use armv6s-m isa.
23641 (cortex-m0plus): Likewise.
23642 (cortex-m1): Likewise.
23643 (cortex-m0.small-multiply): Likewise.
23644 (cortex-m0plus.small-multiply): Likewise.
23645 (cortex-m1.small-multiply): Likewise.
23647 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
23648 Jakub Jelinek <jakub@redhat.com>
23650 PR tree-optimization/85692
23651 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
23652 source permute as well.
23654 2018-05-11 Martin Liska <mliska@suse.cz>
23657 * doc/extend.texi: Document LLVM style format for no_sanitize
23660 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23662 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
23663 mode_supports_vsx_dform_quad to mode_supports_dq_form.
23664 (mode_supports_vsx_dform_quad): Likewise.
23665 (mode_supports_vmx_dform): Move these functions to be next to the
23666 other mode_supports functions.
23667 (mode_supports_dq_form): Likewise.
23668 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
23669 mode_supports_dq_form.
23670 (reg_offset_addressing_ok_p): Likewise.
23671 (offsettable_ok_by_alignment): Likewise.
23672 (rs6000_legitimate_offset_address_p): Likewise.
23673 (legitimate_lo_sum_address_p): Likewise.
23674 (rs6000_legitimize_address): Likewise.
23675 (rs6000_legitimize_reload_address): Likewise.
23676 (rs6000_secondary_reload_inner): Likewise.
23677 (rs6000_preferred_reload_class): Likewise.
23678 (rs6000_output_move_128bit): Likewise.
23680 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
23682 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
23683 Generate SImode target register for null target.
23684 <case IX86_BUILTIN_XGETBV>: Ditto.
23685 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
23686 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
23688 2018-05-10 Carl Love <cel@us.ibm.com>
23690 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
23691 dcbtt and dcbtstt if operands[2] is 0.
23693 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
23696 * config/i386/sse.md (usadv64qi): New expander.
23698 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
23700 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
23701 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
23702 -maltivec=be support.
23703 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
23704 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
23705 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
23706 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
23707 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
23708 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
23709 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
23710 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
23711 altivec_vsumsws): Adjust.
23712 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
23713 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
23714 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
23716 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
23717 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
23718 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
23719 (altivec_lve<VI_char>x): Delete expand.
23720 (*altivec_lve<VI_char>x_internal): Rename to...
23721 (altivec_lve<VI_char>x): ... this.
23722 (altivec_lvxl_<mode>): Delete expand.
23723 (*altivec_lvxl_<mode>_internal): Rename to ...
23724 (altivec_lvxl_<mode>): ... this.
23725 (altivec_stvxl_<mode>): Delete expand.
23726 (*altivec_stvxl_<mode>_internal): Rename to ...
23727 (altivec_stvxl_<mode>): ... this.
23728 (altivec_stve<VI_char>x): Delete expand.
23729 (*altivec_stve<VI_char>x_internal): Rename to ...
23730 (altivec_stve<VI_char>x): ... this.
23731 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
23732 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
23733 reduc_plus_scal_<mode>): Adjust.
23734 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
23736 (rs6000_cpu_cpp_builtins): Adjust.
23737 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
23738 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
23739 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
23740 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
23741 -maltivec=be support.
23742 (rs6000_split_vec_extract_var): Adjust.
23743 (rs6000_split_v4si_init): Adjust.
23744 (swap_selector_for_mode): Delete.
23745 (altivec_expand_lvx_be, altivec_expand_stvx_be,
23746 altivec_expand_stvex_be): Delete.
23747 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
23748 -maltivec=be support.
23749 (rs6000_gimple_fold_builtin): Ditto.
23750 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
23752 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
23753 (TARGET_DIRECT_MOVE_64BIT): Adjust.
23754 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
23755 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
23756 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
23757 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
23758 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
23759 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
23760 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
23761 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
23762 anonymous split): Adjust.
23763 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
23764 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
23766 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
23768 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
23769 when --with-gxx-include-dir is also specified.
23770 * configure: Regenerate.
23772 2018-05-09 Jim Wilson <jimw@sifive.com>
23775 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
23776 * config/riscv/t-withmultilib: New.
23777 * config/riscv/withmultilib.h: New.
23778 * doc/install.texi: Document RISC-V --with-multilib-list support.
23780 2018-05-09 Richard Biener <rguenther@suse.de>
23782 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
23784 (vect_bb_vectorization_profitable_p): Adjust. Compute
23785 actual scalar cost using the cost vector and the add_stmt_cost
23788 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
23790 PR rtl-optimization/85645
23791 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
23792 in the REG_CFA_REGISTER note for LR, don't leave it empty.
23794 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
23796 PR rtl-optimization/85645
23797 * shrink-wrap.c (spread_components): Return a boolean saying if
23798 anything was changed.
23799 (try_shrink_wrapping_separate): Iterate spread_components until
23800 nothing changes anymore.
23802 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
23804 PR rtl-optimization/85645
23805 * regrename.c (build_def_use): Also kill the chains that include the
23806 destination of a REG_CFA_REGISTER note.
23808 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
23810 PR rtl-optimization/85645
23811 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
23812 insn that has a REG_CFA_REGISTER note.
23814 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
23816 * cfgexpand.c (expand_clobber): New function.
23817 (expand_gimple_stmt_1): Use it.
23818 * tree-vect-stmts.c (vect_clobber_variable): New function,
23820 (vectorizable_simd_clone_call): ...here.
23821 (vectorizable_store): Emit a clobber either side of an
23822 IFN_STORE_LANES sequence.
23823 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
23825 2018-05-09 Tom de Vries <tom@codesourcery.com>
23828 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
23829 (define_insn "trap_if_false"): Add exit after trap.
23831 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
23833 PR rtl-optimization/85638
23834 * bb-reorder.c: Include common/common-target.h.
23835 (create_forwarder_block): New function extracted from...
23836 (fix_up_crossing_landing_pad): ...here. Rename into...
23837 (dw2_fix_up_crossing_landing_pad): ...this.
23838 (sjlj_fix_up_crossing_landing_pad): New function.
23839 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
23840 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
23841 from both partitions and exit the loop after one iteration.
23843 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
23846 * doc/extend.texi (PowerPC Built-in Functions): Rename this
23848 (Basic PowerPC Built-in Functions): The new name of the
23849 subsection previously known as "PowerPC Built-in Functions".
23850 (Basic PowerPC Built-in Functions Available on all Configurations):
23852 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
23854 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
23856 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
23858 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
23861 2018-05-08 Jim Wilson <jimw@sifive.com>
23863 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
23864 (LD_EMUL_SUFFIX): New.
23865 (LINK_SPEC): Use it.
23867 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
23869 * doc/extend.texi (PowerPC Built-in Functions): Rename this
23871 (Basic PowerPC Built-in Functions): The new name of the
23872 subsection previously known as "PowerPC Built-in Functions".
23873 (Basic PowerPC Built-in Functions Available on all Configurations):
23875 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
23877 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
23879 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
23881 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
23884 2018-05-08 Jakub Jelinek <jakub@redhat.com>
23887 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
23888 after cmpelim optimization.
23890 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
23892 * config.gcc: Support "goldmont".
23893 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
23894 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23895 PROCESSOR_GOLDMONT.
23896 * config/i386/i386.c (m_GOLDMONT): Define.
23897 (processor_target_table): Add "goldmont".
23898 (PTA_GOLDMONT): Define.
23899 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
23900 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
23901 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
23902 (fold_builtin_cpu): Add "goldmont".
23903 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
23904 (ix86_option_override_internal): Add "goldmont".
23905 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
23906 (processor_type): Add PROCESSOR_GOLDMONT.
23907 * config/i386/i386.md: Add CPU "glm".
23908 * config/i386/glm.md: New file.
23909 * config/i386/x86-tune.def: Add m_GOLDMONT.
23910 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
23912 2018-05-08 Jakub Jelinek <jakub@redhat.com>
23915 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
23917 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
23918 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
23919 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
23922 * config/i386/i386.c (ix86_fold_builtin): Handle
23923 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
23926 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
23927 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
23929 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
23932 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
23933 (check_arch): Likewise.
23934 (check_fpu): Return the result rather than printing it.
23935 (end arch): Fix operator precedence.
23936 (end cpu): Likewise.
23937 (END): Print the result from check_fpu.
23939 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
23940 Alan Hayward <alan.hayward@arm.com>
23941 David Sherwood <david.sherwood@arm.com>
23943 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
23944 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
23945 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
23946 (*fcmuo<mode>_and): New patterns.
23948 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
23950 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
23951 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
23952 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
23953 (cmp_op, sve_imm_con): New code attributes.
23954 (SVE_COND_INT_CMP, imm_con): Delete.
23955 (cmp_op): Remove above unspecs from int attribute.
23956 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
23958 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
23959 comparison-specific unspecs.
23960 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
23961 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
23962 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
23963 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
23964 (*vec_fcm<cmp_op><mode>): Rename to...
23965 (*fcm<cmp_op><mode>): ...this and adjust likewise.
23966 (*vec_fcmuo<mode>): Rename to...
23967 (*fcmuo<mode>): ...this and adjust likewise.
23968 (*pred_fcm<cmp_op><mode>): New pattern.
23969 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
23970 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
23972 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
23974 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
23975 (aarch64_emit_sve_predicated_cond): New function.
23976 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
23977 (aarch64_emit_unspec_cond_or): Replace with...
23978 (aarch64_emit_sve_or_conds): ...this new function. Use
23979 aarch64_emit_sve_ptrue_op for the individual comparisons and
23980 aarch64_emit_binop to OR them together.
23981 (aarch64_emit_inverted_unspec_cond): Replace with...
23982 (aarch64_emit_sve_inverted_cond): ...this new function. Use
23983 aarch64_emit_sve_ptrue_op for the comparison and
23984 aarch64_emit_unop to invert the result.
23985 (aarch64_expand_sve_vec_cmp_float): Update after the above
23986 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
23988 2018-05-07 Nathan Sidwell <nathan@acm.org>
23990 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
23991 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
23992 (Backwards Compatibility): Likewise.
23994 2018-05-07 Luis Machado <luis.machado@linaro.org>
23998 2018-05-07 Luis Machado <luis.machado@linaro.org>
24000 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
24001 <prefetch_dynamic_strides>: New const bool field.
24002 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
24003 prefetch_dynamic_strides.
24004 (exynosm1_prefetch_tune): Likewise.
24005 (thunderxt88_prefetch_tune): Likewise.
24006 (thunderx_prefetch_tune): Likewise.
24007 (thunderx2t99_prefetch_tune): Likewise.
24008 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
24010 (aarch64_override_options_internal): Update to set
24011 PARAM_PREFETCH_DYNAMIC_STRIDES.
24012 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
24013 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
24014 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
24015 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
24016 prefetch-dynamic-strides setting.
24018 2018-05-07 Luis Machado <luis.machado@linaro.org>
24020 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
24021 <minimum_stride>: New const int field.
24022 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
24023 minimum_stride field.
24024 (exynosm1_prefetch_tune): Likewise.
24025 (thunderxt88_prefetch_tune): Likewise.
24026 (thunderx_prefetch_tune): Likewise.
24027 (thunderx2t99_prefetch_tune): Likewise.
24028 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
24029 (aarch64_override_options_internal): Update to set
24030 PARAM_PREFETCH_MINIMUM_STRIDE.
24031 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
24032 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
24033 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
24034 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
24035 stride is constant and is below the minimum stride threshold.
24037 2018-05-07 Luis Machado <luis.machado@linaro.org>
24039 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
24042 2018-05-07 Luis Machado <luis.machado@linaro.org>
24044 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
24045 <prefetch_dynamic_strides>: New const bool field.
24046 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
24047 prefetch_dynamic_strides.
24048 (exynosm1_prefetch_tune): Likewise.
24049 (thunderxt88_prefetch_tune): Likewise.
24050 (thunderx_prefetch_tune): Likewise.
24051 (thunderx2t99_prefetch_tune): Likewise.
24052 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
24054 (aarch64_override_options_internal): Update to set
24055 PARAM_PREFETCH_DYNAMIC_STRIDES.
24056 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
24057 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
24058 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
24059 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
24060 prefetch-dynamic-strides setting.
24062 2018-05-07 Luis Machado <luis.machado@linaro.org>
24064 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
24065 <minimum_stride>: New const int field.
24066 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
24067 minimum_stride field.
24068 (exynosm1_prefetch_tune): Likewise.
24069 (thunderxt88_prefetch_tune): Likewise.
24070 (thunderx_prefetch_tune): Likewise.
24071 (thunderx2t99_prefetch_tune): Likewise.
24072 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
24073 (aarch64_override_options_internal): Update to set
24074 PARAM_PREFETCH_MINIMUM_STRIDE.
24075 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
24076 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
24077 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
24078 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
24079 stride is constant and is below the minimum stride threshold.
24081 2018-05-06 Jakub Jelinek <jakub@redhat.com>
24084 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
24085 the type is addressable. Don't force op into register if it has
24088 2018-05-05 Roland McGrath <mcgrathr@google.com>
24091 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
24092 any section for which we don't know a specific type it should have,
24093 regardless of name. Previously this was done only for the exact
24094 names ".init_array", ".fini_array", and ".preinit_array".
24095 (default_elf_asm_named_section): Add comment about
24096 relationship with default_section_type_flags and SECTION_NOTYPE.
24097 (get_section): Don't consider it a type conflict if one side has
24098 SECTION_NOTYPE and the other doesn't, as long as neither has the
24099 SECTION_BSS et al used in the default_section_type_flags logic.
24101 2018-05-05 Tom de Vries <tom@codesourcery.com>
24104 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
24105 (workaround_barsyncs): New function.
24106 (nvptx_reorg): Use workaround_barsyncs.
24107 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
24108 (define_expand "nvptx_membar_cta"): New define_expand.
24109 (define_insn "*nvptx_membar_cta"): New insn.
24111 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
24113 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
24114 To improve optimization opportunities.
24115 * builtin-types.def: The new needed builtin types for the above.
24117 2018-05-04 Richard Biener <rguenther@suse.de>
24119 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
24120 * gimple-ssa-store-merging.c
24121 (imm_store_chain_info::output_merged_store): Remove redundant create,
24122 release split_store vector contents on failure.
24123 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
24124 scalar stmt vector on cache hit.
24126 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
24128 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
24130 * config.gcc (powerpc-xilinx-eabi*): Remove.
24131 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
24133 (fusion_addis_mem_combo_load): Ditto.
24134 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
24136 (rs6000_cpu_cpp_builtins): Ditto.
24137 * config/rs6000/rs6000-linux.c
24138 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
24139 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
24140 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
24142 (rs6000_setup_reg_addr_masks): Ditto.
24143 (rs6000_init_hard_regno_mode_ok): Ditto.
24144 (rs6000_option_override_internal): Ditto.
24145 (legitimate_lo_sum_address_p): Ditto.
24146 (rs6000_legitimize_address): Ditto.
24147 (rs6000_legitimize_reload_address): Ditto.
24148 (rs6000_legitimate_address_p): Ditto.
24149 (abi_v4_pass_in_fpr): Ditto.
24150 (setup_incoming_varargs): Ditto.
24151 (rs6000_gimplify_va_arg): Ditto.
24152 (rs6000_split_multireg_move): Ditto.
24153 (rs6000_savres_strategy): Ditto.
24154 (rs6000_emit_prologue_components): Ditto.
24155 (rs6000_emit_epilogue_components): Ditto.
24156 (rs6000_emit_prologue): Ditto.
24157 (rs6000_emit_epilogue): Ditto.
24158 (rs6000_elf_file_end): Ditto.
24159 (rs6000_function_value): Ditto.
24160 (rs6000_libcall_value): Ditto.
24161 * config/rs6000/rs6000.h: Ditto.
24162 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
24163 (TARGET_MINMAX): ... this. New.
24164 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
24165 * config/rs6000/rs6000.md: Remove Xilinx FP support.
24166 (*movsi_internal1_single): Delete.
24167 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
24168 mfpu=, mxilinx-fpu): Delete.
24169 * config/rs6000/singlefp.h: Delete.
24170 * config/rs6000/sysv4.h: Remove Xilinx FP support.
24171 * config/rs6000/t-rs6000: Ditto.
24172 * config/rs6000/t-xilinx: Delete.
24173 * config/rs6000/titan.md: Adjust for fp_type removal.
24174 * config/rs6000/vsx.md: Remove Xilinx FP support.
24175 (VStype_simple): Delete.
24176 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
24177 * config/rs6000/xfpu.h: Delete.
24178 * config/rs6000/xfpu.md: Delete.
24179 * config/rs6000/xilinx.h: Delete.
24180 * config/rs6000/xilinx.opt: Delete.
24181 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
24182 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
24184 2018-05-04 Tom de Vries <tom@codesourcery.com>
24187 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
24190 2018-05-04 Richard Biener <rguenther@suse.de>
24192 PR middle-end/85627
24193 * tree-complex.c (update_complex_assignment): We are always in SSA form.
24194 (expand_complex_div_wide): Likewise.
24195 (expand_complex_operations_1): Likewise.
24196 (expand_complex_libcall): Preserve EH info of the original stmt.
24197 (tree_lower_complex): Handle removed blocks.
24198 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
24199 on complex multiplication and division libcall builtins.
24201 2018-05-04 Richard Biener <rguenther@suse.de>
24203 PR middle-end/85574
24204 * fold-const.c (negate_expr_p): Restrict negation of operand
24205 zero of a division to when we know that can happen without
24207 (fold_negate_expr_1): Likewise.
24209 2018-05-04 Jakub Jelinek <jakub@redhat.com>
24212 * real.h (real_nextafter): Declare.
24213 * real.c (real_nextafter): New function.
24214 * fold-const-call.c (fold_const_nextafter): New function.
24215 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
24216 CASE_CFN_NEXTTOWARD.
24217 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
24218 even when arg1_mode is different from arg0_mode.
24220 2018-05-03 Nathan Sidwell <nathan@acm.org>
24222 * doc/extend.texi (Deprecated Features): Remove
24223 -ffriend-injection.
24224 (Backwards Compatibility): Likewise.
24225 * doc/invoke.texi (C++ Language Options): Likewise.
24226 (C++ Dialect Options): Likewise.
24228 2018-05-03 Jakub Jelinek <jakub@redhat.com>
24231 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
24232 _mm512_mask_mullox_epi64): New intrinsics.
24234 2018-05-03 Tom de Vries <tom@codesourcery.com>
24237 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
24238 dump files): Add offload-tree.
24240 2018-05-03 Richard Biener <rguenther@suse.de>
24242 PR tree-optimization/85615
24243 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
24244 to loops not nested in BBs loop father to avoid creating multi-entry
24247 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24249 PR tree-optimization/70291
24250 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
24251 arguments. Change return type to tree. Emit libcall as a new
24252 statement rather than replacing existing one when inplace_p is true.
24253 (expand_complex_multiplication_components): New function.
24254 (expand_complex_multiplication): Expand floating-point complex
24255 multiplication using the above.
24256 (expand_complex_division): Rename inner_type parameter to type.
24257 Update expand_complex_libcall call-site.
24258 (expand_complex_operations_1): Update expand_complex_multiplication
24259 and expand_complex_division call-sites.
24261 2018-05-02 Jakub Jelinek <jakub@redhat.com>
24264 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
24265 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
24266 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
24267 the highest significant bit of the shift count mask is clear. In
24268 check whether and[sq]i3 is needed verify that all significant bits
24269 of the shift count other than the highest are set.
24271 2018-05-02 Tom de Vries <tom@codesourcery.com>
24274 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
24275 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
24276 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
24277 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
24278 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
24279 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
24280 __builtin_goacc_parlevel_size.
24282 2018-05-02 Richard Biener <rguenther@suse.de>
24284 PR tree-optimization/85597
24285 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
24286 do not use split vect_get_vec_defs call but call vect_get_slp_defs
24289 2018-05-02 Tom de Vries <tom@codesourcery.com>
24292 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
24293 dump files): Add ltrans-tree.
24295 2018-05-02 Tom de Vries <tom@codesourcery.com>
24298 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
24299 dump files): Add wpa-ipa.
24301 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
24303 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
24304 powerpc*-*-linux*paired* target.
24305 * config/rs6000/750cl.h: Delete.
24306 * config/rs6000/paired.h: Delete.
24307 * config/rs6000/paired.md: Delete.
24308 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
24310 * config/rs6000/rs6000-builtin.def: Remove paired float support.
24311 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
24312 comment. Remove paired float support.
24313 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
24314 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
24316 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
24317 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
24319 * config/rs6000/rs6000.c: Remove paired float support.
24320 (paired_expand_vector_init, paired_expand_vector_move,
24321 paired_emit_vector_compare, paired_emit_vector_cond_expr,
24322 (paired_expand_lv_builtin, paired_expand_stv_builtin,
24323 paired_expand_builtin, paired_expand_predicate_builtin,
24324 paired_init_builtins): Delete.
24325 * config/rs6000/rs6000.h: Remove paired float support.
24326 * config/rs6000/rs6000.md: Remove paired float support.
24327 (move_from_CR_ov_bit): Delete.
24328 * config/rs6000/rs6000.opt (mpaired): Delete.
24329 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
24330 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
24332 2018-05-02 Richard Biener <rguenther@suse.de>
24334 PR middle-end/85567
24335 * gimplify.c (gimplify_save_expr): When in SSA form allow
24336 SAVE_EXPRs to compute to SSA vars.
24338 2018-05-02 Jakub Jelinek <jakub@redhat.com>
24341 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
24342 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
24343 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
24344 clobber operands[2], instead use a new pseudo. Formatting fixes.
24346 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
24348 PR tree-optimization/85586
24349 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
24350 exit early for statements in the same group if the accesses are
24353 2018-05-02 Tom de Vries <tom@codesourcery.com>
24356 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
24359 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
24361 PR tree-optimization/85143
24362 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
24364 2018-05-01 Tom de Vries <tom@codesourcery.com>
24367 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
24368 not found" error message.
24370 2018-05-01 Tom de Vries <tom@codesourcery.com>
24373 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
24374 * vec.c (test_ordered_remove_if): New function.
24375 (vec_c_tests): Call test_ordered_remove_if.
24376 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
24377 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
24378 * tree-vect-patterns.c (vect_pattern_recog_1): Use
24379 VEC_ORDERED_REMOVE_IF.
24381 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24383 PR tree-optimization/82665
24384 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
24385 pointer subtraction where arguments come from a memchr call.
24387 2018-05-01 Jakub Jelinek <jakub@redhat.com>
24389 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
24390 --push-state --as-needed and --pop-state instead of --as-needed and
24391 --no-as-needed if ld supports it.
24392 * configure: Regenerated.
24395 * doc/install.texi2html: Replace _002d with - and _002a with * in
24396 generated html files using sed.
24398 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24401 * gcc-rich-location.c (blank_line_before_p): New function.
24402 (use_new_line): New function.
24403 (gcc_rich_location::add_fixit_insert_formatted): New function.
24404 * gcc-rich-location.h
24405 (gcc_rich_location::add_fixit_insert_formatted): New function.
24407 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24409 * selftest.c (assert_streq): Rename "expected" and "actual" to
24410 "val1" and "val2". Extend NULL-handling to cover both inputs
24411 symmetrically, while still requiring both to be non-NULL for a pass.
24412 * selftest.h (assert_streq): Rename "expected" and "actual" to
24414 (ASSERT_EQ): Likewise.
24415 (ASSERT_EQ_AT): Likewise.
24416 (ASSERT_KNOWN_EQ): Likewise.
24417 (ASSERT_KNOWN_EQ_AT): Likewise.
24418 (ASSERT_NE): Likewise.
24419 (ASSERT_MAYBE_NE): Likewise.
24420 (ASSERT_MAYBE_NE_AT): Likewise.
24421 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
24422 the assertion to pass.
24423 (ASSERT_STREQ_AT): Likewise.
24425 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
24427 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
24428 interaction with -pie.
24430 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24432 * selftest.h: Fix alphabetization of per-source-file selftest
24435 2018-04-30 Jason Merrill <jason@redhat.com>
24437 PR c++/61982 - dead stores to destroyed objects.
24438 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
24441 2018-04-30 Jason Merrill <jason@redhat.com>
24443 * tree.c (build_clobber): New.
24444 * tree.h: Declare it.
24445 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
24447 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24449 * diagnostic-show-locus.c (layout::layout): Update for
24450 location_get_source_line returning a char_span.
24451 (struct char_span): Move to input.h.
24452 (struct correction): Update for fields in char_span becoming
24454 (struct source_line): Update for location_get_source_line
24455 returning a char_span.
24456 (layout::print_line): Likewise.
24457 * edit-context.c (edited_file::print_content): Likewise.
24458 (edited_file::print_diff_hunk): Likewise.
24459 (edited_file::print_run_of_changed_lines): Likewise.
24460 (edited_file::get_num_lines): Likewise.
24461 (edited_line::edited_line): Likewise.
24462 * final.c (asm_show_source): Likewise.
24463 * input.c (location_get_source_line): Convert return type
24464 from const char * to char_span, losing the final "line_len"
24466 (dump_location_info): Update for the above.
24467 (get_substring_ranges_for_loc): Likewise. Use a char_span
24468 when handling the literal within the line.
24469 (test_reading_source_line): Update for location_get_source_line
24470 returning a char_span.
24471 * input.h (class char_span): Move here from
24472 diagnostic-show-locus.c, converting from a struct to a class.
24473 Make data members private.
24474 (char_span::operator bool): New.
24475 (char_span::length): New.
24476 (char_span::get_buffer): New.
24477 (char_span::operator[]): New.
24478 (char_span::subspan): Make const.
24479 (char_span::xstrdup): New.
24480 (location_get_source_line): Convert return type from const char *
24481 to char_span, losing the final "line_size" param.
24483 2018-04-30 Jan Hubicka <jh@suse.cz>
24485 * lto-wrapper.c (ltrans_priorities): New static var.
24486 (cmp_priority): New.
24487 (run_gcc): Read priorities and if doing parallel build order
24488 the Makefile by them.
24490 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24492 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
24494 2018-04-30 Richard Biener <rguenther@suse.de>
24496 * tree-cfg.c (verify_address): Remove base argument, add
24497 flag whether to check TREE_ADDRESSABLE and do that.
24498 (verify_expr): Remove.
24499 (verify_types_in_gimple_reference): Add pieces from verify_expr.
24500 (verify_gimple_assign_single): Likewise.
24501 (verify_gimple_switch): Likewise.
24502 (verify_expr_location_1): Dereference tp once. Add (disabled)
24503 piece from verify_expr.
24504 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
24506 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
24508 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
24510 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
24512 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
24513 (small_data_pattern): Likewise.
24514 (arc_rewrite_small_data): Likewise.
24515 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
24516 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
24517 (get_symbol_alignment): New function.
24518 (legitimate_small_data_address_p): Likewise.
24519 (legitimate_scaled_address): Update, call
24520 legitimate_small_data_address_p.
24521 (output_sdata): New static variable.
24522 (arc_print_operand): Update how we handle small data operands.
24523 (arc_print_operand_address): Likewise.
24524 (arc_legitimate_address_p): Update, use
24525 legitimate_small_data_address_p.
24526 (arc_rewrite_small_data_p): Remove.
24527 (arc_rewrite_small_data_1): Likewise.
24528 (arc_rewrite_small_data): Likewise.
24529 (small_data_pattern): Likewise.
24530 (compact_sda_memory_operand): Update to use
24531 legitimate_small_data_address_p and get_symbol_alignment.
24532 (prepare_move_operands): Don't rewite sdata pattern.
24533 (prepare_extend_operands): Remove.
24534 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
24536 (zero_extendqisi2): Likewise.
24537 (zero_extendhisi2): Likewise.
24538 (extendqihi2): Likewise.
24539 (extendqisi2): Likewise.
24540 (extendhisi2): Likewise.
24541 (addsi3): Likewise.
24542 (subsi3): Likewise.
24543 (andsi3): Likewise.
24544 * config/arc/constraints.md (Usd): Change it to memory constraint.
24546 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
24548 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
24549 as source of std instructions.
24550 * config/arc/arc.md (movsi_insn): Update pattern predicate to
24551 allow 6-bit constants as source for store instructions.
24552 (movdi_insn): Update instruction pattern to allow 6-bit constants
24553 as source for store instructions.
24555 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
24557 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
24559 2018-04-30 Nathan Sidwell <nathan@acm.org>
24560 Sandra Loosemore <sandra@codesourcery.com>
24562 * dumpfile.c (dump_open): Allow '-' for stdout.
24563 * doc/invoke.texi (Developer Options): Document dump filename
24564 determination early. Document stdin/stdout selection.
24566 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
24568 Microblaze Target: PIC data text relative
24570 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
24571 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
24573 * config/microblaze/microblaze.h (microblaze_constant_address_p):
24574 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
24575 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
24576 New addressing mode for data-text relative position indepenedent code.
24577 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
24578 'ADDRESS_SYMBOLIC_TXT_REL'.
24579 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
24580 (microblaze_legitimate_pic_operand): Exclude function calls from
24581 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
24582 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
24584 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
24585 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
24586 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
24587 for 'address + offset'.
24588 (microblaze_expand_prologue): Add new function prologue call for
24590 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
24591 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
24592 table in case of TARGET_PIC_DATA_TEXT_REL.
24593 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
24594 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
24595 Add new macros 'UNSPEC_TEXT',
24596 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
24597 + exclude function calls from 'UNSPEC_PLT' in case of data text
24599 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
24600 new target hook for generating address diff vector tables in case of
24602 * doc/tm.texi : Regenerate.
24603 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
24604 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
24605 of addr diff vector generation.
24606 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
24607 target hook definition.
24608 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
24609 Add default function for generate_pic_addr_diff_vec -> flag_pic.
24610 * doc/invoke.texi (Add new pic option): Add new microblaze pic
24611 option for data text relative.
24613 2018-04-30 Richard Biener <rguenther@suse.de>
24615 * tree-chrec.h (evolution_function_is_constant_p): Remove
24617 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
24619 2018-04-30 Richard Biener <rguenther@suse.de>
24622 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
24624 2018-04-30 Richard Biener <rguenther@suse.de>
24626 PR tree-optimization/28364
24627 PR tree-optimization/85275
24628 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
24629 copying first exit test.
24631 2018-04-28 Mark Wielaard <mark@klomp.org>
24633 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
24634 dwarf_version >= 5.
24635 (dwarf_AT): Handle DW_AT_addr_base.
24636 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
24638 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
24641 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
24642 (*ashl<dwi>3_doubleword_mask_1): Ditto.
24643 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
24644 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
24646 2018-04-28 Richard Biener <rguenther@suse.de>
24648 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
24649 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
24650 to reflect use. Only add interesting stmts.
24652 2018-04-27 Martin Jambor <mjambor@suse.cz>
24655 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
24656 the jump function allows for passing through aggregate values.
24658 2018-04-27 David Malcolm <dmalcolm@redhat.com>
24660 * input.h (in_system_header_at): Convert from macro to inline
24662 (from_macro_expansion_at): Likewise.
24663 (from_macro_definition_at): Likewise.
24665 2018-04-27 Jeff Law <law@redhat.com>
24667 * config.gcc: Mark tile* targets as deprecated/obsolete.
24669 2018-04-27 Richard Biener <rguenther@suse.de>
24671 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
24674 2018-04-27 Richard Biener <rguenther@suse.de>
24676 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
24678 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
24680 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
24681 with Yd constraint. Set "preferred_for_speed" attribute from
24682 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
24683 with Yd constraint.
24684 (*movdi_internal): Ditto.
24685 (movti_interunit splitters): Remove
24686 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
24687 (movdi_interunit splitters): Ditto.
24688 * config/i386/constraints.md (Ye): Remove.
24689 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
24691 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24694 * config/aarch64/constraints.md (Usg): Limit to 31.
24695 (Usj): Limit to 63.
24697 2018-04-27 Jakub Jelinek <jakub@redhat.com>
24699 PR tree-optimization/85529
24700 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
24701 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
24702 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
24703 zero extension or masking of the MSB bit.
24704 (optimize_range_tests): Add FIRST_BB argument, pass it through
24705 to optimize_range_tests_var_bound.
24706 (maybe_optimize_range_tests, reassociate_bb): Adjust
24707 optimize_range_tests callers.
24709 2018-04-26 Richard Biener <rguenther@suse.de>
24710 Jakub Jelinek <jakub@redhat.com>
24712 * cgraph.h (symbol_table): Just declare debug method here.
24713 * symtab.c (symbol_table::debug): Define.
24715 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
24717 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
24719 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
24721 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
24722 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
24723 (*movdi_internal): Substitute Yi and Yj constraint with x
24724 and Ym and Yn constraint with y constraint. Update "isa"
24725 attribute and set "preferred_for_speed" attribute from
24726 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
24727 (*movsi_internal): Ditto.
24728 (*movdf_internal): Ditto.
24729 (*movsf_internal): Ditto.
24730 (*zero_extendsidi2): Ditto.
24731 * config/i386/sse.md (vec_set<mode>_0): Ditto.
24732 (sse2_loadld): Ditto.
24733 (*vec_extract<ssevecmodelower>_0): Ditto.
24734 (*vec_extractv4si_0_zext_sse4): Ditto.
24735 (vec_concatv2di): Ditto.
24736 (*vec_dup<mode>): Ditto.
24737 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
24738 * config/i386/constraints.md (Yi): Remove.
24743 2018-04-26 Nathan Sidwell <nathan@acm.org>
24745 * dumpfile.c (dump_open): New.
24746 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
24747 (dump_finish): Detect stdio/stderr by value not name.
24749 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
24751 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
24753 2018-04-26 Tom de Vries <tom@codesourcery.com>
24756 * config/nvptx/nvptx.c (verify_neutering_jumps)
24757 (verify_neutering_labels): New function
24758 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
24760 2018-04-26 Tom de Vries <tom@codesourcery.com>
24763 * config/nvptx/nvptx.c (needs_neutering_p): New function.
24764 (nvptx_single): Use needs_neutering_p to skip over insns that do not
24767 2018-04-26 Richard Biener <rguenther@suse.de>
24768 Tom de Vries <tom@codesourcery.com>
24771 * lto-streamer-out.c (output_function): Fixup loops if required to match
24772 discovery done in the reader.
24774 2018-04-26 Richard Biener <rguenther@suse.de>
24776 PR tree-optimization/85116
24777 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
24778 have a loop exit from the single latch predecessor. Remove
24779 case of header with just condition.
24780 (ch_base::copy_headers): Exclude infinite loops from any
24782 (pass_ch::execute): Record exits.
24784 2018-04-26 Richard Biener <rguenther@suse.de>
24786 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
24787 prologue cost vector and pass it to vect_get_load_cost.
24788 (vect_get_peeling_costs_all_drs): Likewise.
24789 (vect_peeling_hash_get_lowest_cost): Likewise.
24790 (vect_enhance_data_refs_alignment): Likewise.
24792 2018-04-26 Richard Biener <rguenther@suse.de>
24794 PR middle-end/85450
24795 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
24796 checking of integer<->pointer conversions.
24797 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
24798 sign-/zero-extending pointer types.
24799 (expand_omp_for_static_chunk): Likewise.
24801 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
24802 Jean Lee <xiaoyur347@gmail.com>
24804 * config/mips/mips.c (mips_asan_shadow_offset): New function.
24805 (TARGET_ASAN_SHADOW_OFFSET): Define.
24806 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
24807 true for -fsanitize=address.
24809 2018-04-25 Mark Wielaard <mark@klomp.org>
24811 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
24814 2018-04-25 Jakub Jelinek <jakub@redhat.com>
24816 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
24817 than "alu", remove explicit "memory" and "imm_disp" attributes.
24818 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
24820 PR middle-end/85414
24821 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
24822 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
24823 gen_lowpart_no_emit.
24825 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
24828 * config/i386/i386.c (ix86_expand_builtin): Change memory
24829 operand to XI, extend p0 to Pmode.
24830 * config/i386/i386.md: Change unspec volatile and operand
24831 1 mode to XI, change operand 0 mode to P.
24833 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
24835 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
24836 GET_MODE_MASK before any checking.
24837 (nds32_can_use_bset_p): Likewise.
24838 (nds32_can_use_btgl_p): Likewise.
24840 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
24842 * config/nds32/nds32-doubleword.md: New define_split pattern for
24843 illegal register number.
24845 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
24847 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
24849 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
24851 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
24853 2018-04-25 Richard Biener <rguenther@suse.de>
24855 * lto-streamer.h (LTO_major_version): Bump to 8.
24857 2018-04-25 Jakub Jelinek <jakub@redhat.com>
24859 * BASE-VER: Set to 9.0.0.
24861 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
24863 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
24864 in __abskf2 and __powikf2.
24866 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24869 * config/aarch64/constraints.md (Usg, Usj): New constraints.
24870 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
24871 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
24872 Use the above on operand 2. Reindent.
24873 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
24875 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
24878 * common/config/i386/i386-common.c (ix86_handle_option): Don't
24880 * config/i386/i386.opt (mcet): Removed.
24881 * doc/install.texi: Remove -mcet documentation.
24882 * doc/invoke.texi: Likewise.
24884 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
24887 * doc/install.texi: Remove -mcet from bootstrap-cet.
24889 2018-04-24 Jakub Jelinek <jakub@redhat.com>
24892 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
24893 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
24897 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
24898 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
24899 containing a CONST_VECTOR.
24901 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
24903 * doc/install.texi: Update newlib dependency for nvptx.
24905 2018-04-24 Jakub Jelinek <jakub@redhat.com>
24908 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
24909 instead of INTVAL when shifting x left.
24911 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
24913 PR tree-optimization/85478
24914 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
24915 vect_grouped_store_supported for single element vectors.
24917 2018-04-24 Richard Biener <rguenther@suse.de>
24920 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
24921 load cost increase to the case of non-constant step.
24923 2018-04-24 Jakub Jelinek <jakub@redhat.com>
24926 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
24927 destination if any_malformed_asm.
24929 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
24931 PR middle-end/85496
24932 * expr.c (store_field): In the bitfield case, if the value comes from
24933 a function call and is returned in registers by means of a PARALLEL,
24934 do not change the mode of the temporary unless BLKmode and VOIDmode.
24936 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
24938 PR rtl-optimization/85423
24939 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
24940 dependencies to debug insns when the previous insn is non-debug.
24942 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
24944 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
24945 enums into a single definition.
24946 (fls): Fix predicates and printing.
24949 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
24951 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
24952 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
24953 and short u6 immediate.
24954 (check_if_valid_sleep_operand): Remove.
24955 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
24957 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
24959 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
24960 flag_always_save_lp condition.
24961 * config/nds32/nds32.opt (malways-save-lp): New option.
24963 2018-04-22 Shiva Chen <shiva0217@gmail.com>
24965 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
24966 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
24967 * config/nds32/nds32.h
24968 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
24969 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
24971 2018-04-22 Shiva Chen <shiva0217@gmail.com>
24973 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
24974 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
24976 2018-04-22 Shiva Chen <shiva0217@gmail.com>
24977 Chung-Ju Wu <jasonwucj@gmail.com>
24979 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
24981 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
24982 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
24984 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
24986 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
24988 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
24990 * config/nds32/nds32-protos.h (nds32_data_alignment,
24991 nds32_local_alignment): Declare.
24992 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
24993 nds32_local_alignment): New functions.
24994 (TARGET_CONSTANT_ALIGNMENT): Define.
24995 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
24997 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
24999 * config/nds32/nds32.c
25000 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
25001 (TARGET_MODES_TIEABLE_P): Likewise.
25003 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
25005 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
25006 level Ofast and Og.
25008 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
25009 Chung-Ju Wu <jasonwucj@gmail.com>
25011 * config/nds32/constants.md (unspec_volatile_element): Add enum values
25012 for unaligned access.
25013 * config/nds32/nds32-intrinsic.c: Implementation of expanding
25015 * config/nds32/nds32-intrinsic.md: Likewise.
25016 * config/nds32/nds32_intrinsic.h: Likewise.
25017 * config/nds32/nds32.h (nds32_builtins): Likewise.
25018 * config/nds32/nds32.opt (munaligned-access): New option.
25019 * config/nds32/nds32.c (nds32_asm_file_start): Display
25020 flag_unaligned_access status.
25022 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
25024 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
25025 -mno-relax is present.
25026 * config/riscv/linux.h (LINK_SPEC): Ditto.
25028 2018-04-20 Martin Sebor <msebor@redhat.com>
25031 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
25033 (gimple_fold_builtin_stxcpy_chk): Same.
25034 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
25036 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
25039 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
25040 __powikf2 when long double is IEEE 128-bit.
25042 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
25044 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
25045 step to make sure stack always aligned.
25047 2018-04-20 Carl Love <cel@us.ibm.com>
25050 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
25051 size check for arg0.
25053 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
25054 Tom de Vries <tom@codesourcery.com>
25057 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
25058 Emit insns for calls too.
25059 (nvptx_find_par): Always look for worker-level predecessor insn.
25060 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
25062 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
25063 (nvptx_process_pars): Propagate frames for calls.
25065 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
25068 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
25070 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
25071 (ix86_handle_option): Don't handle OPT_mibt.
25072 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
25074 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
25076 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
25077 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
25078 (ix86_target_macros): Define __CET__ with flag_cf_protection
25079 for -fcf-protection.
25080 * config/i386/i386.c (isa2_opts): Remove -mibt.
25081 * config/i386/i386.h (TARGET_IBT): Removed.
25082 (TARGET_IBT_P): Likewise.
25083 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
25084 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
25085 * config/i386/i386.opt (mcet): Update help message.
25086 (mshstk): Likewise.
25088 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
25089 -mcet as an alias for -mshstk.
25091 2018-04-20 Richard Biener <rguenther@suse.de>
25093 PR middle-end/85475
25094 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
25095 complexity by forcing a single use of the multiply operand.
25097 2018-04-20 Martin Jambor <mjambor@suse.cz>
25100 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
25101 recursion dependency to only apply to non-clones.
25103 2018-04-20 Martin Jambor <mjambor@suse.cz>
25106 * ipa-cp.c (create_specialized_node): Check that clones of
25107 self-recursive edges exist during IPA-CP.
25109 2018-04-19 Toon Moene <toon@moene.org>
25111 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
25114 2018-04-19 Jakub Jelinek <jakub@redhat.com>
25116 PR tree-optimization/85467
25117 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
25118 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
25119 VECTOR_CST element to type.
25121 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
25124 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
25125 * config/i386/i386.md (builtin_setjmp_setup): Removed.
25126 (builtin_longjmp): Likewise.
25127 (save_stack_nonlocal): New pattern.
25128 (restore_stack_nonlocal): Likewise.
25130 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
25133 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
25134 Replace ASM_OUTPUT_LABEL with fprintf.
25136 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
25139 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
25140 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
25141 * config/i386/i386-c.c (ix86_target_macros_internal): Also
25142 define __IBT__ and __SHSTK__ for -fcf-protection.
25143 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
25145 (ix86_trampoline_init): Likewise.
25146 (x86_output_mi_thunk): Likewise.
25147 (ix86_notrack_prefixed_insn_p): Likewise.
25148 (ix86_option_override_internal): Don't disallow -fcf-protection.
25149 * config/i386/i386.md (rdssp<mode>): Also enable for
25151 (incssp<mode>): Likewise.
25152 (nop_endbr): Likewise.
25153 * config/i386/i386.opt (mcet): Change help message to built-in
25156 (mshstk): Likewise.
25157 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
25158 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
25159 enable CET built-in functions.
25161 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
25163 * common/config/i386/i386-common.c
25164 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
25165 OPTION_MASK_ISA_MOVDIRI_UNSET,
25166 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
25167 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
25168 * config.gcc (movdirintrin.h): New header.
25169 * config/i386/cpuid.h (bit_MOVDIRI,
25170 bit_MOVDIR64B): New bits.
25171 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
25173 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
25174 (VOID, PVOID, PCVOID)): New function types.
25175 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
25176 __builtin_ia32_directstoreu_u64,
25177 __builtin_ia32_movdir64b): New builtins.
25178 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
25179 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
25181 (ix86_valid_target_attribute_inner_p): Ditto.
25182 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
25183 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
25184 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
25185 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
25186 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
25187 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
25188 (movdiri<mode>, movdir64b_<mode>): New.
25189 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
25190 * config/i386/immintrin.h: Include movdirintrin.h.
25191 * config/i386/movdirintrin.h: New file.
25192 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
25194 2018-04-19 Richard Biener <rguenther@suse.de>
25196 PR middle-end/85455
25197 * cfg.c (clear_bb_flags): When loop state says we have
25198 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
25200 2018-04-19 Richard Biener <rguenther@suse.de>
25202 PR tree-optimization/84737
25203 * tree-vect-data-refs.c (vect_copy_ref_info): New function
25204 copying restrict info.
25205 (vect_setup_realignment): Use it.
25206 * tree-vectorizer.h (vect_copy_ref_info): Declare.
25207 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
25208 the first DR to all generated stores.
25209 (vectorizable_load): Likewise for loads.
25211 2018-04-19 Jakub Jelinek <jakub@redhat.com>
25213 PR tree-optimization/85446
25214 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
25215 the integral and pointer types to have the same precision.
25217 * doc/install.texi: Document --disable-cet being the default and
25220 2018-04-18 Martin Liska <mliska@suse.cz>
25222 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
25225 2018-04-18 Martin Liska <mliska@suse.cz>
25228 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
25231 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
25232 arguments if they are comparable.
25234 2018-04-18 Martin Liska <mliska@suse.cz>
25237 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
25240 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
25243 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
25246 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
25247 ENDBR after calling __morestack.
25249 2018-04-18 David Malcolm <dmalcolm@redhat.com>
25252 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
25253 by using gcc_base_ver to generate a gcc_driver_version, and use
25254 it when generating GCC_DRIVER_NAME.
25255 * configure: Regenerate.
25257 2018-04-18 Jakub Jelinek <jakub@redhat.com>
25260 * config.gcc: Obsolete powerpc*-*-*spe*.
25262 2018-04-17 Jakub Jelinek <jakub@redhat.com>
25265 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
25266 (stabstr_D): Change type of unum from unsigned int to
25267 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
25270 2018-04-17 Jim Wilson <jimw@sifive.com>
25273 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
25274 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
25275 Set arg_pointer_offset after using pretend_args_size.
25277 2018-04-17 Jakub Jelinek <jakub@redhat.com>
25279 PR rtl-optimization/85431
25280 * dse.c (record_store): Ignore zero width stores.
25283 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
25284 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
25285 __builtin_stack_restore rather than after it.
25286 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
25287 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
25288 argument instead of virtual_dynamic_stack_rtx.
25290 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
25292 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
25294 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
25295 Add note to error message to explain internal mapping of overloaded
25296 built-in function name to non-overloaded built-in function name.
25297 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
25300 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
25303 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
25304 where the inputs overlap with the output.
25306 2018-04-17 Jakub Jelinek <jakub@redhat.com>
25308 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
25309 (=v, v) alternative and explicit "memory" attribute.
25310 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
25311 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
25313 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
25314 "sselog1" type instead of "sselog".
25315 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
25316 "sselog". Remove explicit "memory" attribute.
25317 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
25318 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
25320 (vec_extract_hi_v32hi): Merge all alternatives into one, use
25321 "sselog1" type instead of "sselog". Remove explicit "memory"
25323 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
25324 use "sselog1" type instead of "sselog". Remove explicit "memory"
25326 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
25327 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
25329 (vec_extract_hi_v64qi): Merge all alternatives into one, use
25330 "sselog1" type instead of "sselog". Remove explicit "memory"
25332 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
25333 use "sselog1" type instead of "sselog". Remove explicit "memory"
25337 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
25339 PR middle-end/85414
25340 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
25343 2018-04-17 Martin Jambor <mjambor@suse.cz>
25346 * ipa-cp.c (create_specialized_node): Call
25347 expand_all_artificial_thunks if necessary.
25349 2018-04-17 Martin Liska <mliska@suse.cz>
25352 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
25353 in message, remote space in between '_G' and '('.
25355 2018-04-17 Jakub Jelinek <jakub@redhat.com>
25358 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
25359 avx512f_vmcmp<mode>3<round_saeonly_name>,
25360 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
25361 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
25362 avx512f_rndscale<mode><round_saeonly_name>,
25363 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
25364 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
25365 Use %<iptr>2 instead of %2 for -masm=intel.
25366 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
25367 avx512f_vcvttss2usi<round_saeonly_name>,
25368 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
25370 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
25371 avx512f_vcvttsd2usi<round_saeonly_name>,
25372 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
25373 Use %q1 instead of %1 for -masm=intel.
25374 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
25375 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
25376 of %3 for -masm=intel.
25377 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
25379 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
25381 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
25383 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
25384 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
25386 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
25388 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
25389 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
25390 %g1 and one with %0 and %1.
25391 (avx512er_vmrcp28<mode><round_saeonly_name>,
25392 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
25393 %1 for -masm=intel.
25394 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
25395 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
25396 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
25397 of %0 and %{%4%} for -masm=intel.
25398 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
25399 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
25400 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
25401 order of %0 and %{%5%}%{z%} for -masm=intel.
25403 2018-04-17 Jan Hubicka <jh@suse.cz>
25406 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
25408 2018-04-17 Martin Liska <mliska@suse.cz>
25411 * multiple_target.c (create_dispatcher_calls): Set apostrophes
25412 for target_clone error message. Make default implementation
25413 clone to be a local declaration.
25414 (separate_attrs): Add new argument and check for an empty
25416 (expand_target_clones): Handle it.
25417 (ipa_target_clone): Make redirection just for target_clones
25420 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
25421 Tom de Vries <tom@codesourcery.com>
25423 PR middle-end/84955
25424 * omp-expand.c (expand_oacc_for): Add dummy false branch for
25425 tiled basic blocks without omp continue statements.
25427 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
25430 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
25431 vec_extract expression as having side effects to make sure it gets
25434 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
25437 * config/i386/i386.c (get_builtin_code_for_version): Check
25440 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
25443 * config.gcc: Support "skylake".
25444 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
25446 * config/i386/i386.c (m_SKYLAKE): Define.
25447 (processor_target_table): Add "skylake".
25448 (ix86_option_override_internal): Add "skylake".
25449 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
25450 PROCESSOR_CANNONLAKE.
25451 (get_builtin_code_for_version): Fix priority for
25452 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
25453 PROCESSOR_SKYLAKE-AVX512.
25454 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
25455 (processor_type): Add PROCESSOR_SKYLAKE.
25457 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
25458 Jason Merrill <jason@redhat.com>
25461 * convert.c (convert_to_integer_1): Use direct recursion for
25462 enumeral types and types with a precision less than the number
25463 of bits in their mode.
25465 2018-04-16 Julia Koval <julia.koval@intel.com>
25468 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
25469 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
25471 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
25474 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
25475 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
25476 and -mno-direct-move.
25478 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
25481 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
25482 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
25483 Ensure negative shifts result in {0}.
25485 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
25487 PR rtl-optimization/79916
25488 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
25489 regs (if any) to define how to gnerate SD moves when LRA is in
25492 2018-04-13 Jakub Jelinek <jakub@redhat.com>
25494 PR rtl-optimization/85393
25495 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
25496 * except.c (expand_dw2_landing_pad_for_region): Make static.
25497 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
25498 a label and unconditional jump to old_bb, rather than
25499 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
25502 PR rtl-optimization/85376
25503 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
25504 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
25505 instead of a specific value.
25507 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
25508 Bin Cheng <bin.cheng@arm.com>
25510 PR tree-optimization/82965
25511 PR tree-optimization/83991
25512 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
25513 by_profile_only parameter.
25514 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
25515 information if the loop was predicted to iterate too many times.
25516 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
25518 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
25521 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
25524 2018-04-13 Martin Liska <mliska@suse.cz>
25525 Jakub Jelinek <jakub@redhat.com>
25527 PR middle-end/81657
25528 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
25529 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
25530 * builtins.c (expand_builtin_memory_copy_args): Use
25531 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
25532 handle dest_addr == pc_rtx.
25534 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
25537 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
25538 asked to not generate direct moves.
25539 (fix_trunc<mode>si2_stfiwx): Similar.
25540 (fix_trunc<mode>si2_internal): Similar.
25542 2018-04-12 Jakub Jelinek <jakub@redhat.com>
25545 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
25546 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
25547 lookup if dest in some wider mode is known to be const0_rtx and
25548 if so, record permanent equivalence for it to be ZERO_EXTEND of
25549 the narrower mode destination.
25551 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
25553 * lto-streamer-out.c (output_function): Revert 259346.
25554 * omp-expand.c (expand_oacc_for): Likewise.
25556 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
25558 PR rtl-optimization/85354
25559 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
25560 * sel-sched.c (sel_global_init): ... here.
25562 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
25565 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
25566 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
25567 mode for PE-COFF targets.
25568 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
25569 (i386_pe_asm_lto_end): Likewise.
25570 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
25571 (TARGET_ASM_LTO_END): Likewise.
25572 * config/i386/winnt.c (saved_debug_info_level): New static variable.
25573 (i386_pe_asm_lto_start): New function.
25574 (i386_pe_asm_lto_end): Likewise.
25576 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
25577 Richard Biener <rguenther@suse.de>
25579 PR middle-end/84955
25580 * lto-streamer-out.c (output_function): Fix CFG loop state before
25582 * omp-expand.c (expand_oacc_for): Handle calls to internal
25583 functions like regular functions.
25585 2018-04-12 Richard Biener <rguenther@suse.de>
25588 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
25589 for the early LTO debug to properly generate references to it
25590 during DIE emission. Do not re-use that for the skeleton for
25592 (dwarf2out_early_finish): Likewise.
25594 2018-04-12 Jakub Jelinek <jakub@redhat.com>
25597 * config/i386/sse.md
25598 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
25599 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
25600 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
25601 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
25602 and output is a reg, avoid creating invalid lowpart subreg, but
25603 instead split into a 512-bit move. Don't split if not AVX512VL,
25604 input is xmm16+ reg and output is a mem.
25605 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
25606 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
25607 xmm16+ reg and output is a mem.
25609 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25611 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
25612 also for flag_dwarf2_cfi_asm.
25614 2018-04-12 Jakub Jelinek <jakub@redhat.com>
25616 PR rtl-optimization/85342
25617 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
25618 a bool scalar var inside of the loop instead. Don't try to update
25619 recog_data.operand after failed apply_change_group.
25621 2018-04-12 Tom de Vries <tom@codesourcery.com>
25624 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
25625 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
25626 array with flexible array member as array without given dimension.
25627 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
25628 argument for undefined param to true.
25630 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
25633 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
25634 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
25635 from PowerPC section.
25636 * config/rs6000/sysv4.opt (mcall-): Improve help text.
25637 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
25638 help text that is too long.
25639 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
25640 help text that is too long.
25641 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
25642 help text that is too long.
25644 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
25646 * config/alpha/alpha.md (stack_probe_internal): Rename
25647 from "probe_stack". Update all callers.
25649 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
25651 PR rtl-optimization/84566
25652 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
25653 sched_macro_fuse_insns.
25655 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
25658 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
25659 (compute_block_dependences): ... from here.
25661 2018-04-11 Jakub Jelinek <jakub@redhat.com>
25663 PR tree-optimization/85331
25664 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
25665 from int to HOST_WIDE_INT.
25667 2018-04-11 Martin Jambor <mjambor@suse.cz>
25670 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
25671 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
25672 not the same as the source val.
25673 (cgraph_edge_brings_value_p): New parameter.
25674 (gather_edges_for_value): Pass destination value to
25675 cgraph_edge_brings_value_p.
25676 (perhaps_add_new_callers): Likewise.
25677 (get_info_about_necessary_edges): Likewise and exclude values brought
25678 only by self-recursive edges.
25679 (create_specialized_node): Redirect only clones of self-calling edges.
25680 (+self_recursive_pass_through_p): New function.
25681 (find_more_scalar_values_for_callers_subset): Use it.
25682 (find_aggregate_values_for_callers_subset): Likewise.
25683 (known_aggs_to_agg_replacement_list): Removed.
25684 (decide_whether_version_node): Re-calculate known constants for all
25685 remaining context clones.
25687 2018-04-11 Richard Biener <rguenther@suse.de>
25690 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
25691 from early DWARF output.
25692 (dwarf2out_early_finish): Output line info unconditionally into
25693 early DWARF and add reference to it.
25695 2018-04-11 Jakub Jelinek <jakub@redhat.com>
25698 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
25699 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
25700 other than V2DFmode using iptr mode attribute.
25701 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
25703 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
25705 PR rtl-optimization/84659
25706 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
25708 2018-04-11 Jakub Jelinek <jakub@redhat.com>
25711 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
25713 (output_loc_list): Pass address of a dummy size variable even in the
25714 locview handling loop.
25715 (index_location_lists): Add comment on why skip_loc_list_entry can't
25718 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
25721 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
25724 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
25727 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
25728 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
25729 and -mstring-compare-inline-limit.
25731 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
25734 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
25735 for stack clash protection in a register whenever we need it to be in
25738 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
25740 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
25741 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
25743 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
25746 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
25748 (mlong-double-): Ditto.
25749 * config/rs6000/sysv4.opt (msdata=): Ditto.
25750 (mtls-size=): Ditto.
25752 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
25754 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
25755 erroneous entries for
25756 "vector int vec_ldl (int, long int *)", and
25757 "vector unsigned int vec_ldl (int, unsigned long int *)".
25758 Add comments and entries for
25759 "vector bool char vec_ldl (int, bool char *)",
25760 "vector bool short vec_ldl (int, bool short *)",
25761 "vector bool int vec_ldl (int, bool int *)",
25762 "vector bool long long vec_ldl (int, bool long long *)",
25763 "vector pixel vec_ldl (int, pixel *)",
25764 "vector long long vec_ldl (int, long long *)",
25765 "vector unsigned long long vec_ldl (int, unsigned long long *)".
25766 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
25767 type tree bool_long_long_type_node and correct definition of
25768 bool_V2DI_type_node to make reference to this new type tree.
25769 (rs6000_mangle_type): Replace erroneous reference to
25770 bool_long_type_node with bool_long_long_type_node.
25771 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
25772 comments to emphasize sign distinctions for char and int types and
25773 replace RS6000_BTI_bool_long constant with
25774 RS6000_BTI_bool_long_long constant. Also add comment to restrict
25775 use of RS6000_BTI_pixel.
25776 (bool_long_type_node): Remove this macro definition.
25777 (bool_long_long_type_node): New macro definition
25779 2018-04-10 Jakub Jelinek <jakub@redhat.com>
25781 PR rtl-optimization/85300
25782 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
25783 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
25784 simplify_unary_operation fails.
25786 2018-04-10 Martin Liska <mliska@suse.cz>
25788 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
25789 cgraph_edge and ipa_ref.
25791 2018-04-10 Jakub Jelinek <jakub@redhat.com>
25795 * config/i386/sse.md
25796 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
25797 computation of the VEC_MERGE selector from mask.
25798 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
25799 Fix decoding of the VEC_MERGE selector into mask.
25801 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
25803 PR tree-optimization/85286
25804 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
25806 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
25808 * final.c (final_1): Set insn_last_address as well as
25809 insn_current_address.
25811 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25814 * explow.c (emit_stack_probe): Call validize_mem on memory location
25815 before passing it to gen_probe_stack. Create address operand and
25816 legitimize it for the probe_stack_address case.
25818 2018-04-09 Jan Hubicka <jh@suse.cz>
25821 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
25822 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
25823 * tree.c (free_lang_data_in_type): Fix handling of binfos;
25825 (free_lang_data): Rebuild type inheritance graph.
25827 2018-04-09 Martin Sebor <msebor@redhat.com>
25829 * invoke.texi (-finline-small-functions): Mention other optimization
25831 (-findirect-inlining, -fpartial-inlining): Same.
25832 (-finline-functions-called-once): Same.
25833 (-freorder-blocks-and-partition): Same.
25835 2018-04-09 Jan Hubicka <jh@suse.cz>
25838 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
25839 jumps; choose last target that matches the criteria (i.e.
25840 no partition changes for non-crossing jumps).
25841 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
25842 support for redirecting crossing jumps to non-crossing.
25844 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
25846 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
25847 also for naked functions.
25849 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
25851 * config/arc/arc.md (add_shift): New pattern.
25852 (add_shift2): Likewise.
25853 (sub_shift): Likewise.
25854 (sub_shift_cmp0_noout): Likewise.
25855 (compare_si_ashiftsi): Likewise.
25856 (xbfu_cmp0_noout): New combine pattern.
25857 (xbfu_cmp0"): Likewise.
25858 (movsi_set_cc_insn): Place the predicable variant first.
25859 (commutative_binary_cmp0_noout): Remove clobber.
25860 (commutative_binary_cmp0): New pattern.
25861 (noncommutative_binary_cmp0): Likewise.
25862 (noncommutative_binary_cmp0_noout): Likewise.
25863 (noncommutative_binary_comparison_result_used): Removed.
25864 (rsub_cmp0): New pattern.
25865 (rsub_cmp0_noout): Likewise.
25866 (extzvsi): Changed, keep only meaningful variants.
25867 (SQH, SEZ): New iterators.
25868 (SQH_postfix): New mode attribute.
25869 (SEZ_prefix): New code attribute.
25870 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
25871 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
25872 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
25873 of numerical value.
25874 (noncommutative_operator): Check the availability of barrel
25877 2018-04-09 Richard Biener <rguenther@suse.de>
25879 PR tree-optimization/85284
25880 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
25881 Only use the niter constraining form of simple_iv when the exit
25882 is always executed.
25884 2018-04-09 Tom de Vries <tom@codesourcery.com>
25887 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
25888 (define_expand "*memory_barrier"): New define_expand.
25889 (define_insn "memory_barrier"): New insn.
25891 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
25893 PR rtl-optimization/80463
25894 PR rtl-optimization/83972
25895 PR rtl-optimization/83480
25897 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
25898 correct producer for the insn.
25899 (tidy_control_flow): Fixup seqnos in case of debug insns.
25901 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
25903 PR rtl-optimization/83913
25905 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
25906 different sched-times when merging exprs.
25908 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
25910 PR rtl-optimization/83962
25912 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
25913 tidy_fallthru_edge and tidy_control_flow.
25915 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
25917 PR rtl-optimization/83530
25919 * sel-sched.c (force_next_insn): New global variable.
25920 (remove_insn_for_debug): When force_next_insn is true, also leave only
25921 next insn in the ready list.
25922 (sel_sched_region): When the region wasn't scheduled, make another pass
25923 over it with force_next_insn set to 1.
25925 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
25927 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
25929 * config/nds32/constants.md (unspec_volatile_element): Add enum values
25930 for interrupt control.
25931 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
25932 functions for interrupt control.
25933 * config/nds32/nds32-intrinsic.md: Likewise.
25934 * config/nds32/nds32_intrinsic.h: Likewise.
25935 * config/nds32/nds32.h (nds32_builtins): Likewise.
25937 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
25939 * config/nds32/nds32.c (nds32_init_machine_status,
25940 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
25941 strict_aligned_p field.
25942 (nds32_expand_to_rtl_hook): New function.
25943 (TARGET_EXPAND_TO_RTL_HOOK): Define.
25944 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
25946 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
25947 Chung-Ju Wu <jasonwucj@gmail.com>
25949 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
25950 * config/nds32/nds32-n7.md: New file.
25951 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
25952 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
25954 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
25955 * config/nds32/nds32.md (pipeline_model): Add n7.
25956 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
25957 * config/nds32/pipelines.md: Include n7 settings.
25959 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
25960 Chung-Ju Wu <jasonwucj@gmail.com>
25962 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
25963 * config/nds32/nds32-e8.md: New file.
25964 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
25965 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
25967 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
25968 * config/nds32/nds32.md (pipeline_model): Add e8.
25969 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
25970 * config/nds32/pipelines.md: Include e8 settings.
25972 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
25973 Chung-Ju Wu <jasonwucj@gmail.com>
25975 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
25976 * config/nds32/nds32-n8.md: New file.
25977 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
25978 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
25980 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
25981 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
25982 * config/nds32/nds32.md (pipeline_model): Add n8.
25983 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
25984 * config/nds32/pipelines.md: Include n8 settings.
25986 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
25987 Chung-Ju Wu <jasonwucj@gmail.com>
25989 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
25990 * config/nds32/nds32-n9-2r1w.md: New file.
25991 * config/nds32/nds32-n9-3r2w.md: New file.
25992 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
25993 nds32_register_ports): New or modify for cpu n9.
25994 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
25996 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
25997 * config/nds32/nds32-utils.c: New file.
25998 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
25999 TARGET_MUL_SLOW): Define.
26000 * config/nds32/nds32.md (pipeline_model): New attribute.
26001 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
26002 New options that support cpu n9.
26003 * config/nds32/pipelines.md: Include n9 settings.
26004 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
26006 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
26008 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
26009 information if necessary.
26010 (output_cond_branch_compare_zero): Likewise.
26011 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
26012 (nds32_target_alignment): Refine for alignment.
26013 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
26014 (FUNCTION_BOUNDARY): Modify.
26015 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
26017 * config/nds32/nds32.opt (malways-align, malign-functions): New.
26019 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
26021 * config/nds32/constants.md (unspec_volatile_element): Add values for
26022 TLB operation and data prefetch.
26023 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
26024 functions for TLB operation and data prefetch.
26025 * config/nds32/nds32-intrinsic.md: Likewise.
26026 * config/nds32/nds32_intrinsic.h: Likewise.
26027 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
26028 (nds32_print_operand): Likewise.
26029 * config/nds32/nds32.h (nds32_builtins): Likewise.
26031 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
26032 Andrew Pinski <pinsika@gcc.gnu.org>
26034 PR middle-end/82976
26035 * match.pd: Use constant_boolean_node of correct type instead of
26036 boolean_true_node or boolean_false_node for simplifying
26037 pointer comparisons to zero.
26039 2018-04-07 Jakub Jelinek <jakub@redhat.com>
26041 PR tree-optimization/80021
26042 * tree.c (verify_type_variant): Make error call in verify_variant_match
26043 translatable and remove final full stop.
26045 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
26047 * config/nds32/constants.md (unspec_volatile_element): Add
26048 UNSPEC_VOLATILE_EH_RETURN.
26049 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
26050 nds32_output_stack_pop): Support dwarf exception handling process.
26051 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
26052 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
26053 exception handling process.
26054 (nds32_compute_stack_frame): Likewise.
26055 (nds32_return_addr_rtx): Likewise.
26056 (nds32_initial_elimination_offset): Likewise.
26057 (nds32_expand_prologue): Likewise.
26058 (nds32_expand_epilogue): Likewise.
26059 (nds32_dynamic_chain_address): New function.
26060 * config/nds32/nds32.h (machine_function): Add fields for dwarf
26061 exception handling.
26062 (DYNAMIC_CHAIN_ADDRESS): Define.
26063 (EH_RETURN_DATA_REGNO): Define.
26064 (EH_RETURN_STACKADJ_RTX): Define.
26065 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
26066 patterns for dwarf exception handling.
26068 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
26070 * config/nds32/nds32.h: Clean up obsolete macros.
26072 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
26074 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
26075 Add enum values for particular instructions.
26076 * config/nds32/nds32-intrinsic.c: Implementation of expanding
26077 particular intrinsic functions.
26078 * config/nds32/nds32-intrinsic.md: Likewise.
26079 * config/nds32/nds32_intrinsic.h: Likewise.
26080 * config/nds32/nds32.h (nds32_builtins): Likewise.
26081 * config/nds32/nds32.md (type): Add pbsad and pbsada.
26082 (btst, ave): New patterns for particular instructions.
26084 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
26086 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
26087 Add enum values for atomic load/store and memory sync.
26088 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
26090 * config/nds32/nds32-intrinsic.md: Likewise.
26091 * config/nds32/nds32_intrinsic.h: Likewise.
26092 * config/nds32/nds32.h (nds32_builtins): Likewise.
26094 2018-04-07 Jakub Jelinek <jakub@redhat.com>
26096 PR tree-optimization/85257
26097 * fold-const.c (native_encode_vector): If not all elts could fit
26098 and off is -1, return 0 rather than offset.
26099 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
26100 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
26101 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
26102 adjust buffer in native_interpret_expr call.
26104 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
26106 * config/nds32/constants.md (unspec_volatile_element): Add cache
26107 control enum values.
26108 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
26109 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
26110 * config/nds32/nds32.c (nds32_cctl_names): New.
26111 (nds32_print_operand): Handle cache control register names.
26112 * config/nds32/nds32.h (nds32_builtins): New enum values.
26113 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
26115 * config/nds32/nds32.md (type): Add mmu.
26116 * config/nds32/pipelines.md (simple_insn): Add mmu.
26118 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
26120 * config/nds32/nds32.md (type): Remove call.
26121 * config/nds32/pipelines.md (simple_insn): Likewise.
26123 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
26125 * config/nds32/constants.md (unspec_volatile_element): Add
26126 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
26127 UNSPEC_VOLATILE_FMFCFG.
26128 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
26129 description for fmfcfg and fmfcsr.
26130 (bdesc_1arg): Add fmtcsr.
26131 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
26132 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
26133 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
26134 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
26135 unspec_fmfcfg): New patterns.
26136 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
26137 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
26138 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
26139 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
26140 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
26141 __nds32__fmfcfg): Define.
26143 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
26145 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
26146 intrinsic register names.
26147 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
26148 intrinsic register enum values and macros.
26150 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
26152 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
26153 for load/store addressing form.
26154 (nds32_print_operand_address): Likewise.
26156 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
26159 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
26160 based on LABEL_REF. Remove useless assertion.
26161 (pic_address_needs_scratch): Fix formatting.
26162 (sparc_legitimize_pic_address): Minor tweaks.
26163 (sparc_delegitimize_address): Adjust assertion accordingly.
26164 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
26165 into symbolic_operand.
26166 (movsi_high_pic_label_ref): Likewise.
26167 (movsi_lo_sum_pic_label_ref): Likewise.
26168 (movdi_pic_label_ref): Likewise.
26169 (movdi_high_pic_label_ref): Likewise.
26170 (movdi_lo_sum_pic_label_ref): Likewise.
26172 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
26174 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
26175 custom LIB_SPEC setup.
26177 2018-04-06 Ruslan Bukin <br@bsdpad.com>
26178 Kito Cheng <kito.cheng@gmail.com>
26180 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
26181 * config/riscv/freebsd.h: New.
26183 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
26185 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
26186 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
26189 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
26190 Kito Cheng <kito.cheng@gmail.com>
26192 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
26193 nds32_output_call, nds32_symbol_binds_local_p): New functions.
26194 * config/nds32/nds32-protos.h (nds32_output_call,
26195 nds32_output_return): Declare.
26196 * config/nds32/nds32.md: Refine all the call and return patterns.
26198 2018-04-06 Jakub Jelinek <jakub@redhat.com>
26201 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
26202 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
26204 PR rtl-optimization/84872
26205 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
26206 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
26207 EDGE_CROSSING edge.
26209 2018-04-06 Tamar Christina <tamar.christina@arm.com>
26211 * expr.c (copy_blkmode_to_reg): Revert 254862.
26212 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
26214 2018-04-06 Richard Biener <rguenther@suse.de>
26216 PR middle-end/85244
26217 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
26218 after seeing a component reference with an adjacent field. Treat
26219 refs to arrays at struct end of external decls similar to
26220 refs to unconstrained commons.
26222 2018-04-06 Jakub Jelinek <jakub@redhat.com>
26225 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
26226 look through SAVE_EXPRs with non-side-effects argument. Adjust
26228 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
26231 2018-04-06 Richard Biener <rguenther@suse.de>
26233 PR middle-end/85180
26234 * alias.c (find_base_term): New wrapper around find_base_term
26235 unwinding CSELIB_VAL_PTR changes.
26236 (find_base_term): Do not restore CSELIB_VAL_PTR during the
26239 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26241 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
26243 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
26244 constant definitions.
26245 ("nop"): lr 0,0 -> nopr r0
26246 ("nop_lr0", "nop_lr1"): New insn definitions.
26248 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
26250 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
26251 NDS32_V3PUSH_AVAILABLE_P macro.
26253 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
26254 Chung-Ju Wu <jasonwucj@gmail.com>
26256 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
26257 (nds32*-*-*): Add float and fpu_config into supported_defaults.
26258 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
26259 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
26260 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
26261 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
26262 * config/nds32/constraints.md: New constraints and checking for hard
26263 float configuration.
26264 * config/nds32/iterators.md: New mode iterator and attribute for hard
26265 float configuration.
26266 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
26268 * config/nds32/nds32-fpu.md: New file.
26269 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
26270 deal with hard float code generation.
26271 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
26273 (abi_type, float_reg_number): New enum type.
26274 * config/nds32/nds32-predicates.c: New predicates for hard float.
26275 * config/nds32/nds32-protos.h: Declare functions for hard float.
26276 * config/nds32/nds32.c: Implementation for hard float configuration.
26277 * config/nds32/nds32.h: Definitions for hard float configuration.
26278 * config/nds32/nds32.md: Include hard float machine description and
26279 modify patterns for hard float configuration.
26280 * config/nds32/nds32.opt: New options for hard float configuration.
26281 * config/nds32/predicates.md: New predicates for hard float
26284 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
26286 * common/config/nds32/nds32-common.c
26287 (nds32_option_optimization_table): Enable -mreleax-hint by default.
26289 2018-04-05 Jakub Jelinek <jakub@redhat.com>
26291 PR middle-end/85195
26292 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
26293 CONSTRUCTOR_ELT (ctor, ...)->value.
26295 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
26298 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
26300 2018-04-05 Tom de Vries <tom@codesourcery.com>
26303 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
26306 2018-04-05 Shiva Chen <shiva0217@gmail.com>
26307 Kito Cheng <kito.cheng@gmail.com>
26309 * config/nds32/constraints.md (U33): Fine-tune checking condition.
26310 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
26311 * config/nds32/nds32.h (nds32_16bit_address_type): Add
26312 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
26314 2018-04-05 Shiva Chen <shiva0217@gmail.com>
26315 Kito Cheng <kito.cheng@gmail.com>
26317 * config/nds32/constraints.md (Ufe): New memory constraint.
26318 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
26319 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
26320 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
26322 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
26323 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
26325 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26327 * config/nds32/nds32.md: Use optimize_size in the condition for
26328 alu-shift instructions.
26330 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26332 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
26334 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26336 * config/nds32/nds32.md (negsi2): Refine pattern.
26338 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
26339 Chung-Ju Wu <jasonwucj@gmail.com>
26341 * config/nds32/iterators.md (shift_rotate): New code iterator.
26342 (shift): New code attribute.
26343 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
26344 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
26345 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
26346 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
26347 bit-wise operations.
26348 (andsi3, *andsi3): Ditto.
26349 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
26350 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
26351 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
26352 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
26353 nds32_ior_operand, nds32_xor_operand): New predicates.
26355 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26357 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
26358 (addsi3, subsi3): ... this.
26360 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26362 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
26364 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26366 * config/nds32/nds32.md: Adjust indention.
26368 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
26370 * config/nds32/nds32.md (feature): New attribute.
26372 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26374 * config/nds32/nds32.md (subtype): New attribute.
26376 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
26379 * config/arm/arm-builtins.c (arm_expand_builtin): Change
26380 expansion to perform a bitwise AND of the argument followed by a
26381 boolean negation of the result.
26383 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
26385 PR rtl-optimization/84878
26386 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
26387 the basic block. Assert the use reference is not artificial and that
26388 it has an associated insn.
26390 2018-04-04 Michael Matz <matz@suse.de>
26392 * builtins.c (compute_objsize): Pass correct operand
26393 to array_at_struct_end_p.
26395 2018-04-04 Richard Biener <rguenther@suse.de>
26398 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
26399 from contexts for DINFO_LEVEL_TERSE and below.
26401 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
26403 * config/nds32/nds32-doubleword.md (move_<mode>): Require
26404 resiter_operand condition.
26405 * config/nds32/nds32.md (*move<mode>): Ditto.
26407 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
26408 Monk Chiang <sh.chiang04@gmail.com>
26410 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
26412 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
26414 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
26416 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
26417 Kito Cheng <kito.cheng@gmail.com>
26419 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
26420 nds32_cond_code_str, output_cond_branch,
26421 output_cond_branch_compare_zero, nds32_expand_cbranch,
26422 nds32_expand_cstore, nds32_expand_movcc,
26423 nds32_output_cbranchsi4_equality_zero,
26424 nds32_output_cbranchsi4_equality_reg,
26425 nds32_output_cbranchsi4_equality_reg_or_const_int,
26426 nds32_output_cbranchsi4_greater_less_zero: New functions.
26427 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
26428 nds32_expand_cstore, nds32_expand_movcc,
26429 nds32_output_cbranchsi4_equality_zero,
26430 nds32_output_cbranchsi4_equality_reg,
26431 nds32_output_cbranchsi4_equality_reg_or_const_int,
26432 nds32_output_cbranchsi4_greater_less_zero): Declare.
26433 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
26434 nds32_rimm11s_operand): New predicates.
26435 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
26436 * config/nds32/nds32.md: Rewrite all the branch and conditional move
26439 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
26441 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
26442 * config/nds32/nds32.md: Ditto.
26443 * config/nds32/pipelines.md: Ditto.
26445 2018-04-04 Richard Biener <rguenther@suse.de>
26447 PR tree-optimization/85168
26448 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
26449 propagating abnormals.
26451 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
26453 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
26455 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
26456 Kito Cheng <kito.cheng@gmail.com>
26458 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
26459 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
26460 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
26461 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
26462 * config/nds32/nds32.md (sibcall_internal): New.
26463 (sibcall_register): Remove.
26464 (sibcall_immediate): Remove.
26465 (sibcall_value_internal): New.
26466 (sibcall_value_register): Remove.
26467 (sibcall_value_immediate): Remove.
26468 * config/nds32/predicates.md (nds32_general_register_operand): New.
26469 (nds32_call_address_operand): New.
26471 2018-04-03 Jakub Jelinek <jakub@redhat.com>
26473 PR rtl-optimization/85167
26474 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
26475 bb_defs if *split_p, instead preinitialize it to NULL.
26477 PR tree-optimization/85156
26478 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
26479 evaluating the argument multiple times.
26481 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
26483 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
26485 (_mm_cvtpd_ps): Likewise.
26486 (_mm_cvttpd_epi32): Likewise.
26487 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
26488 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
26489 vector, pixel, and bool following altivec.h include.
26491 2018-04-03 Martin Sebor <msebor@redhat.com>
26493 * doc/extend.texi (Common Function Attributes): Clarify.
26494 (const attribute): Likewise.
26495 (pure attribute): Likewise.
26497 2018-04-03 Jakub Jelinek <jakub@redhat.com>
26500 * config/i386/i386.c (ix86_expand_vector_set): Use
26501 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
26503 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
26505 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
26506 instructions when changing rounding bits to preserve precision bits
26507 in the x87 control word.
26509 2018-04-03 Martin Liska <mliska@suse.cz>
26511 PR tree-optimization/82491
26512 * rtl.h (strip_offset_and_add): Replace += suboffset with
26513 poly_uint64 () + suboffset.
26515 2018-03-29 Martin Liska <mliska@suse.cz>
26516 Martin Jambor <mjambor@suse.cz>
26519 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
26520 param_type is not an integral or pointer type.
26522 2018-04-03 Richard Biener <rguenther@suse.de>
26524 * sese.h (recompute_all_dominators): Remove.
26526 2018-04-02 Martin Sebor <msebor@redhat.com>
26528 * doc/invoke.texi (-Wrestrict): Fix typos.
26530 2018-04-02 Jim Wilson <jimw@sifive.com>
26532 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
26533 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
26534 (<optab>di3, <optab>si3_extend): Likewise.
26535 (<optab>si3_mask, <optab>si3_mask_1): New.
26536 (<optab>di3_mask, <optab>di3_mask_1): New.
26537 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
26538 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
26539 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
26541 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
26543 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
26546 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
26548 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
26549 (nds32_canonicalize_comparison): New function.
26551 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
26552 Kito Cheng <kito.cheng@gmail.com>
26553 Kuan-Lin Chen <kuanlinchentw@gmail.com>
26555 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
26556 * config/nds32/constants.md (unspec_volatile_element): Add
26557 UNSPEC_VOLATILE_RELAX_GROUP.
26558 * config/nds32/nds32-relax-opt.c: New file.
26559 * config/nds32/nds32-predicates.c
26560 (nds32_symbol_load_store_p): New function.
26561 * config/nds32/nds32-protos.h
26562 (nds32_symbol_load_store_p): Declare function.
26563 (make_pass_nds32_relax_opt): Declare new rtl pass function.
26564 * config/nds32/nds32.c
26565 (nds32_register_pass): New function to register pass.
26566 (nds32_register_passes): New function to register passes.
26567 * config/nds32/nds32.md (relax_group): New pattern.
26568 * config/nds32/nds32.opt (mrelax-hint): New option.
26569 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
26571 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
26573 * config/nds32/t-nds32: Modify files dependency.
26575 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
26577 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
26578 (PROFILE_HOOK): Define its implementation.
26580 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
26582 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
26583 type and 32-bit size.
26585 2018-04-01 Jakub Jelinek <jakub@redhat.com>
26587 PR middle-end/85090
26588 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
26589 (V_128_256): New mode iterator.
26590 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
26591 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
26592 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
26594 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
26595 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
26597 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
26600 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
26601 NaN inputs correctly.
26603 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
26606 * config/rs6000/vsx.md (??r): New mode attribute.
26607 (*vsx_mov<mode>_64bit): Use it.
26608 (*vsx_mov<mode>_32bit): Likewise.
26610 2018-03-30 Martin Sebor <msebor@redhat.com>
26612 PR tree-optimization/84818
26613 * builtins.c (check_access): Use warning_n.
26615 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26618 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
26620 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
26623 2018-03-30 Julia Koval <julia.koval@intel.com>
26626 * x86-tune.def (movx, partial_reg_dependency): Enable for
26629 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
26631 PR inline-asm/84985
26632 * lra-constraints.c (process_alt_operands): Move setting
26633 this_alternative_matches below.
26635 2018-03-29 Martin Liska <mliska@suse.cz>
26638 * doc/invoke.texi: Document how LTO works with debug info.
26639 Describe auto-load support of binutils. Mention 'x86-64'
26640 as valid option value of -march option.
26642 2018-03-29 Jakub Jelinek <jakub@redhat.com>
26644 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
26647 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
26648 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
26649 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
26652 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
26655 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
26656 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
26657 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
26658 for RS6000_BTM_POWERPC64.
26659 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
26660 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
26661 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
26664 (DIVDEU): Likewise.
26666 2018-03-28 Carl Love <cel@us.ibm.com>
26669 2017-09-27 Carl Love <cel@us.ibm.com>
26671 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
26672 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
26673 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
26676 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26678 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
26679 instead of __vector bool.
26680 (_mm_max_pu8): Likewise.
26681 (_mm_min_pi16): Likewise.
26683 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
26686 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
26687 (DIVWEUO): Likewise.
26688 (DIVDEO): Likewise.
26689 (DIVDEUO): Likewise.
26690 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
26691 DIVWEUO and DIVDEUO.
26692 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
26693 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
26694 (div_extend): Likewise.
26695 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
26697 (__builtin_divweuo): Likewise.
26698 (__builtin_divdeo): Likewise.
26699 (__builtin_divdeuo): Likewise.
26701 2018-03-28 Jakub Jelinek <jakub@redhat.com>
26704 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
26705 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
26707 PR tree-optimization/82004
26708 * gimple-match-head.c (optimize_pow_to_exp): New function.
26709 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
26710 Don't fold to exp if optimize_pow_to_exp is false.
26712 2018-03-28 Martin Liska <mliska@suse.cz>
26715 * calls.c (initialize_argument_information): Fix trailing space.
26716 * common.opt: Fix typo and provide better explanation for
26717 -fsanitize-coverage option.
26718 * config/i386/i386.opt: Fix typo.
26720 2018-03-28 Jakub Jelinek <jakub@redhat.com>
26721 Martin Liska <mliska@suse.cz>
26724 * gimplify.c (asan_poison_variable): Don't do the check for
26725 gimplify_omp_ctxp here.
26726 (gimplify_decl_expr): Do it here.
26727 (gimplify_target_expr): Likewise.
26729 2018-03-28 Martin Liska <mliska@suse.cz>
26732 * config/i386/i386.c (ix86_function_arg_advance): Do not call
26733 chkp_type_bounds_count if MPX is not enabled.
26735 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
26737 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
26739 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
26742 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
26743 function to create the function decl for complex long double
26744 multiply and divide for -mabi=ieeelongdouble.
26745 (init_float128_ieee): Call it.
26747 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
26750 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
26751 -fcf-protection=branch -mibt.
26752 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
26754 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
26757 * config/arm/arm.c (arm_valid_symbolic_address): Handle
26758 arm_word_relocations.
26760 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
26763 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
26764 extern array declarations.
26766 2018-03-27 Richard Biener <rguenther@suse.de>
26768 PR middle-end/84067
26769 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
26770 explicit single_use checks.
26772 2018-03-27 Richard Biener <rguenther@suse.de>
26774 PR tree-optimization/85082
26775 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
26778 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
26780 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
26781 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
26782 Turn on fasynchronous-unwind-tables and funwind-tables.
26784 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
26787 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
26788 (*bmi_blsr_<mode>_ccz): Ditto.
26790 2018-03-26 Tom de Vries <tom@codesourcery.com>
26792 PR tree-optimization/85063
26793 * omp-general.c (offloading_function_p): New function. Factor out
26795 * omp-offload.c (pass_omp_target_link::gate): ... here.
26796 * omp-general.h (offloading_function_p): Declare.
26797 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
26798 with attribute omp declare target for offloading functions.
26800 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
26802 PR tree-optimization/84005
26803 * tree-data-ref.h (get_base_for_alignment): Declare.
26804 * tree-data-ref.c (get_base_for_alignment_1): New function.
26805 (get_base_for_alignment): Likewise.
26806 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
26807 get_base_for_alignment to find a suitable base object, instead
26808 of always using drb->base_address.
26810 2018-03-23 Jakub Jelinek <jakub@redhat.com>
26812 PR inline-asm/85022
26813 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
26814 known size by default.
26816 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
26818 PR inline-asm/85030
26819 * lra-constraints.c (process_alt_operands): Don't match BLKmode
26820 and non BLKmode operands.
26822 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26825 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
26826 Clean up attributes.
26828 2018-03-23 Richard Biener <rguenther@suse.de>
26831 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
26832 we are going to emit early debug for LTO.
26834 2018-03-23 Jakub Jelinek <jakub@redhat.com>
26836 PR inline-asm/85034
26837 * function.c (match_asm_constraints_1): Don't optimize if input
26838 doesn't satisfy general_operand predicate for output's mode.
26840 PR inline-asm/85022
26841 * alias.c (write_dependence_p): Don't require for x_canonicalized
26842 non-VOIDmode if x has VOIDmode.
26845 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
26846 just don't try to optimize it rather than assert it never happens.
26848 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
26850 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
26851 macro expansions for definition of ST_INTERNAL_<mode> and
26852 LD_INTERNAL_<mode> builtins.
26853 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
26855 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
26857 (altivec_expand_st_builtin): Likewise.
26858 (altivec_expand_builtin): Remove calls to deleted functions.
26859 (rs6000_address_for_altivec): Delete this function.
26860 * config/rs6000/vector.md: Remove expands for
26861 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
26863 2018-03-22 Sudakshina Das <sudi.das@arm.com>
26866 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
26867 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
26868 re-computing once computed.
26869 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
26870 (arm_init_machine_status): Initialize
26871 machine->static_chain_stack_bytes.
26873 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
26876 * doc/extend.texi: Add four new prototypes for vec_ld.
26877 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
26878 definitions for more logical presentation.
26879 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
26880 entries for V1TI variants of __builtin_altivec_ld builtin.
26881 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
26882 handling of V1TI variant of LVX icode pattern.
26883 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
26884 (rs6000_gimple_fold_builtin): Likewise.
26885 (altivec_init_builtins): Add code to define
26886 __builtin_altivec_lvx_v1ti function.
26888 2018-03-22 Jakub Jelinek <jakub@redhat.com>
26890 PR inline-asm/84941
26891 * function.c (match_asm_constraints_1): Don't do the optimization
26892 if input isn't a REG, SUBREG, MEM or constant.
26894 2018-03-22 Tom de Vries <tom@codesourcery.com>
26896 PR tree-optimization/84956
26897 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
26898 bb_has_abnormal_pred.
26900 2018-03-22 Jakub Jelinek <jakub@redhat.com>
26903 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
26904 DECL_INITIAL (decl) to decl at the end.
26905 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
26906 adjust the comment.
26908 2018-03-21 Joseph Myers <joseph@codesourcery.com>
26910 * doc/extend.texi (__builtin_tgmath): Document when complex
26911 integer types are treated as _Complex _Float64.
26913 2018-03-21 Tom de Vries <tom@codesourcery.com>
26915 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
26917 2018-03-21 Jakub Jelinek <jakub@redhat.com>
26919 PR tree-optimization/84960
26920 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
26921 if it is ENTRY block, move them into single succ of ENTRY in that case.
26923 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
26925 PR tree-optimization/84811
26926 * poly-int.h (poly_span_traits): Remove the T3 parameter and
26927 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
26928 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
26929 (known_subrange_p): Update accordingly. Cast each value involved
26930 in the size comparison, rather than casting the result of the
26933 2018-03-21 Jakub Jelinek <jakub@redhat.com>
26935 PR tree-optimization/84982
26936 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
26937 by flipping the least significant bit rather than all bits from
26938 bitpos to bitpos + bitsize - 1.
26940 2018-03-21 Nathan Sidwell <nathan@acm.org>
26942 * doc/extend.texi (Deprecated Features): Remove mention of
26943 long-deleted deprecations.
26945 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26948 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
26949 * configure: Regenerate.
26951 2018-03-21 Tom de Vries <tom@codesourcery.com>
26953 PR tree-optimization/83126
26954 * tree-parloops.c (num_phis): New function.
26955 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
26957 2018-03-21 Nathan Sidwell <nathan@acm.org>
26959 * doc/extend.texi (Deprecated Features): Update deprecated flags,
26960 mention anon-struct/union members and trailing attributes.
26962 2018-03-21 Bin Cheng <bin.cheng@arm.com>
26964 PR tree-optimization/84969
26965 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
26966 builtin memset partitions if they set different rhs values.
26968 2018-03-21 Jakub Jelinek <jakub@redhat.com>
26970 PR rtl-optimization/84989
26971 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
26972 VEC_DUPLICATE with scalar result mode.
26974 2018-03-21 Martin Liska <mliska@suse.cz>
26977 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
26978 not intended return statement.
26980 2018-03-21 Martin Liska <mliska@suse.cz>
26983 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
26984 (chkp_find_bound_slots_1): Limit number of iterations.
26986 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
26989 * Minor grammar fixes for x86 options.
26991 2018-03-20 Jakub Jelinek <jakub@redhat.com>
26994 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
26995 holding REG_CFA_RESTORE notes, instead turn them into a USE.
26997 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
27000 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
27001 (altivec_lvx_<mode>_1op): Likewise.
27002 (altivec_stvx_<mode>_2op): Likewise.
27003 (altivec_stvx_<mode>_1op): Likewise.
27004 (altivec_lvx_<VM2:mode>): New define_expand.
27005 (altivec_stvx_<VM2:mode>): Likewise.
27006 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
27007 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
27008 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
27009 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
27010 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
27011 (rs6000_gen_lvx): Likewise.
27012 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
27013 (altivec_expand_stv_builtin): Likewise.
27014 (altivec_expand_builtin): Likewise.
27015 * config/rs6000/vector.md: Likewise.
27017 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27020 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
27023 2018-03-20 Richard Biener <rguenther@suse.de>
27026 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
27027 sign-conversions as zero, fall back to standard scalar_stmt
27030 2018-03-20 Martin Liska <mliska@suse.cz>
27033 * predict.c (rebuild_frequencies): Handle case when we have
27034 PROFILE_ABSENT, but flag_guess_branch_prob is false.
27036 2018-03-20 Jakub Jelinek <jakub@redhat.com>
27039 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
27040 flag_section_anchors.
27041 * varasm.c (use_blocks_for_decl_p): Remove hack for
27042 dw2_force_const_mem.
27045 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
27047 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
27048 be created, use lowpart_subreg of operands[0] rather than operands[0]
27050 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
27051 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
27052 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
27053 and n constraint instead of aarch64_shift_imm_di and Usd.
27054 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
27055 (*aarch64_<optab>_reg_minus<mode>3): ... this.
27057 2018-03-20 Sudakshina Das <sudi.das@arm.com>
27060 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
27061 to favor GPR over NEON registers.
27062 (<shift>di3_neon): Likewise.
27064 2018-03-20 Tom de Vries <tom@codesourcery.com>
27067 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
27068 (nvptx_process_pars): Emit bar.sync asap and alap.
27070 2018-03-20 Tom de Vries <tom@codesourcery.com>
27073 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
27074 seen_label if seen_label is already set.
27076 2018-03-20 Jakub Jelinek <jakub@redhat.com>
27079 * config/i386/i386.c (fold_builtin_cpu): For features above 31
27080 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
27081 Use 1U instead of 1. Formatting fixes.
27084 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
27085 instead of TREE_TYPE (s1) for the return value.
27087 2018-03-19 Jakub Jelinek <jakub@redhat.com>
27089 PR tree-optimization/84946
27090 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
27091 bitsize + bitsize in poly_uint64 rather than poly_int64.
27094 * dwarf2asm.c: Include fold-const.c.
27095 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
27096 of decl rather than decl itself.
27098 PR rtl-optimization/84643
27099 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
27101 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
27104 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
27105 calling assemble_variable.
27107 2018-03-19 Sudakshina Das <sudi.das@arm.com>
27110 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
27111 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
27113 2018-03-19 Jim Wilson <jimw@sifive.com>
27116 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
27117 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
27118 (riscv_first_stack_step): Likewise.
27119 (riscv_option_override): Use STACK_BOUNDARY instead of
27120 MIN_STACK_BOUNDARY.
27121 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
27122 MIN_STACK_BOUNDARY.
27123 (BIGGEST_ALIGNMENT): Set to 128.
27124 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
27125 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
27128 2018-03-19 Richard Biener <rguenther@suse.de>
27130 PR tree-optimization/84933
27131 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
27132 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
27134 2018-03-19 Richard Biener <rguenther@suse.de>
27136 PR tree-optimization/84859
27137 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
27138 (cond_if_else_store_replacement): Perform sinking operation on
27139 single-store BBs regardless of MAX_STORES_TO_SINK setting.
27140 Generalize what a BB with a single eligible store is.
27142 2018-03-19 Richard Biener <rguenther@suse.de>
27144 PR tree-optimization/84929
27145 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
27146 chrec_is_positive against non-chrec arg.
27148 2018-03-19 Tamar Christina <tamar.christina@arm.com>
27151 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
27153 2018-03-18 Martin Liska <mliska@suse.cz>
27155 PR rtl-optimization/84635
27156 * regrename.c (build_def_use): Use matches_mode only when
27159 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
27161 PR tree-optimization/84913
27162 * tree-vect-loop.c (vectorizable_reduction): Don't try to
27163 vectorize chains of COND_EXPRs.
27165 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
27167 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
27169 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
27171 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
27173 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
27175 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
27177 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
27178 Kito Cheng <kito.cheng@gmail.com>
27180 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
27181 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
27182 (nds32_adjust_reg_alloc_order): New function.
27183 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
27185 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
27187 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
27188 nds32_print_operand, nds32_print_operand_address): Use
27189 HOST_WIDE_INT_PRINT_DEC instead.
27191 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
27193 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
27195 2018-03-17 Jakub Jelinek <jakub@redhat.com>
27198 * config/i386/i386.c (initial_ix86_tune_features,
27199 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
27200 unsigned long long.
27201 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
27202 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
27203 rather than 1u << ix86_tune. Formatting fix.
27204 (ix86_option_override_internal): Change ix86_arch_mask from
27205 unsigned int to unsigned HOST_WIDE_INT, initialize to
27206 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
27207 (ix86_function_specific_restore): Likewise.
27209 2018-03-16 Jakub Jelinek <jakub@redhat.com>
27212 * postreload.c (reload_combine_recognize_pattern): Perform
27213 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
27214 truncate_int_for_mode the result for the destination's mode.
27217 * hsa-gen.c (mem_type_for_type): Fix comment typo.
27218 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
27220 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
27223 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
27226 * lra-assigns.c (lra_split_hard_reg_for): Don't use
27227 regno_allocno_class_array and sorted_pseudos.
27228 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
27229 insns where regno is used.
27231 2018-03-16 Martin Liska <mliska@suse.cz>
27234 * multiple_target.c (create_dispatcher_calls): Redirect
27235 reference in the symbol table.
27237 2018-03-16 Martin Liska <mliska@suse.cz>
27240 * multiple_target.c (create_dispatcher_calls): Redirect also
27243 2018-03-16 Jakub Jelinek <jakub@redhat.com>
27247 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
27248 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
27249 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
27251 2018-03-16 Julia Koval <julia.koval@intel.com>
27253 * doc/invoke.texi (Skylake Server): Add CLWB.
27254 Cannonlake): Remove CLWB.
27256 2018-03-16 Jakub Jelinek <jakub@redhat.com>
27258 PR tree-optimization/84841
27259 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
27261 (FLOAT_ONE_CONST_TYPE): Define.
27262 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
27263 (sort_by_operand_rank): Put entries with higher constant_type last
27264 rather than first to match comments.
27266 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
27268 * config/nios2/nios2.md (movsi_internal): Fix thinko in
27271 2018-03-15 Jakub Jelinek <jakub@redhat.com>
27274 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
27275 check and use address of target always.
27277 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
27280 * config/i386/i386.c (indirect_thunk_needed): Update comments.
27281 (indirect_thunk_bnd_needed): Likewise.
27282 (indirect_thunks_used): Likewise.
27283 (indirect_thunks_bnd_used): Likewise.
27284 (indirect_return_needed): New.
27285 (indirect_return_bnd_needed): Likewise.
27286 (output_indirect_thunk_function): Add a bool argument for
27288 (output_indirect_thunk_function): Don't generate alias for
27289 function return thunk.
27290 (ix86_code_end): Call output_indirect_thunk_function to generate
27291 function return thunks.
27292 (ix86_output_function_return): Set indirect_return_bnd_needed
27293 and indirect_return_needed instead of indirect_thunk_bnd_needed
27294 and indirect_thunk_needed.
27296 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
27298 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
27299 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
27300 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
27302 2018-03-15 David Malcolm <dmalcolm@redhat.com>
27303 Paul Hua <paul.hua.gm@gmail.com>
27306 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
27308 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
27310 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
27311 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
27312 resp. SFmode cases.
27314 2018-03-15 Tamar Christina <tamar.christina@arm.com>
27317 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
27318 instead of GET_MODE_SIZE when comparing Units.
27320 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
27323 * varasm.c (hash_section): Return an unchangeble hash value
27324 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
27325 Return !aarch64_can_use_per_function_literal_pools_p ().
27327 2018-03-15 Jakub Jelinek <jakub@redhat.com>
27330 * optabs.c (emit_conditional_move): Pass address of cmode's copy
27331 rather than address of cmode as last argument to prepare_cmp_insn.
27333 2018-03-15 Julia Koval <julia.koval@intel.com>
27335 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
27336 F_AVX512VNNI, F_AVX512BITALG): New.
27338 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
27341 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
27342 insn for floating-point loads and stores.
27344 2018-03-14 Carl Love <cel@us.ibm.com>
27346 * config/rs6000/rs6000-c.c: Add macro definitions for
27347 ALTIVEC_BUILTIN_VEC_PERMXOR.
27348 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
27349 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
27350 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
27351 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
27353 * config/doc/extend.texi: Add prototypes for vec_permxor.
27355 2018-03-14 David Malcolm <dmalcolm@redhat.com>
27358 * diagnostic-show-locus.c (class layout_point): Convert m_line
27359 from int to linenum_type.
27360 (line_span::comparator): Use linenum "compare" function when
27361 comparing line numbers.
27362 (test_line_span): New function.
27363 (layout_range::contains_point): Convert param "row" from int to
27365 (layout_range::intersects_line_p): Likewise.
27366 (layout::will_show_line_p): Likewise.
27367 (layout::print_source_line): Likewise.
27368 (layout::should_print_annotation_line_p): Likewise.
27369 (layout::print_annotation_line): Likewise.
27370 (layout::print_leading_fixits): Likewise.
27371 (layout::annotation_line_showed_range_p): Likewise.
27372 (struct line_corrections): Likewise for field m_row.
27373 (line_corrections::line_corrections): Likewise for param "row".
27374 (layout::print_trailing_fixits): Likewise.
27375 (layout::get_state_at_point): Likewise.
27376 (layout::get_x_bound_for_row): Likewise.
27377 (layout::print_line): Likewise.
27378 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
27379 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
27380 * input.c (selftest::test_linenum_comparisons): New function.
27381 (selftest::input_c_tests): Call it.
27382 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
27383 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
27384 * selftest.h (ASSERT_GT): New macro.
27385 (ASSERT_GT_AT): New macro.
27386 (ASSERT_LT): New macro.
27387 (ASSERT_LT_AT): New macro.
27389 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
27391 PR rtl-optimization/84780
27392 * combine.c (distribute_links): Don't make a link based on pc_rtx.
27394 2018-03-14 Martin Liska <mliska@suse.cz>
27396 * tree.c (record_node_allocation_statistics): Use
27397 get_stats_node_kind.
27398 (get_stats_node_kind): New function extracted from
27399 record_node_allocation_statistics.
27400 (free_node): Use get_stats_node_kind.
27402 2018-03-14 Richard Biener <rguenther@suse.de>
27404 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
27405 that the value-set of ANTIC_IN doesn't grow.
27408 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
27410 (BB_VISITED_WITH_VISITED_SUCCS): New define.
27411 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
27413 2018-03-14 Julia Koval <julia.koval@intel.com>
27415 * config.gcc (icelake-client, icelake-server): New.
27417 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
27418 (initial_ix86_arch_features): Ditto.
27419 (PTA_SKYLAKE): Add SGX.
27420 (PTA_ICELAKE): Remove.
27421 (PTA_ICELAKE_CLIENT): New.
27422 (PTA_ICELAKE_SERVER): New.
27423 (ix86_option_override_internal): Split up icelake on icelake client and
27425 (get_builtin_code_for_version): Ditto.
27426 (fold_builtin_cpu): Ditto.
27427 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
27428 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
27429 * config/i386/i386.h (processor_type): Ditto.
27430 * doc/invoke.texi: Ditto.
27432 2018-03-14 Jakub Jelinek <jakub@redhat.com>
27435 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
27436 INTEGER_CST offset, add it together with bitpos / 8 and
27437 sign extend based on POINTER_SIZE.
27441 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
27444 * config/i386/constraints.md (Yc): New register constraint.
27445 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
27446 Use Yc constraint for alternative 2 of operand 0. Remove
27447 preferred_for_speed attribute.
27449 2018-03-14 Richard Biener <rguenther@suse.de>
27451 PR tree-optimization/84830
27452 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
27453 with the old one to avoid oscillations.
27455 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
27458 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
27460 (assign_by_spills): Return a flag of reload assignment failure.
27461 Do not process the reload assignment failures. Do not spill other
27462 reload pseudos if they has the same reg class. Update n if
27464 (lra_assign): Add a return arg. Set up from the result of
27465 assign_by_spills call.
27466 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
27467 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
27468 usage_insns if it is not NULL.
27469 (spill_hard_reg_in_range): New function.
27470 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
27471 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
27472 function prototypes.
27473 (lra_assign): Change prototype.
27474 * lra.c (lra): Add code to deal with fails by splitting hard reg
27477 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
27479 * config/riscv/riscv.opt (mrelax): New option.
27480 * config/riscv/riscv.c (riscv_file_start): Emit ".option
27481 "norelax" when riscv_mrelax is disabled.
27482 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
27484 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27487 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
27488 reassociation for int modes.
27490 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
27492 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
27493 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
27495 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
27496 * config/aarch64/aarch64-sve.md
27497 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
27498 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
27499 (*extend<mode><Vwide>2): Rename to...
27500 (aarch64_sve_extend<mode><Vwide>2): ...this.
27501 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
27502 renaming the old pattern to...
27503 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
27505 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
27506 define_expand, renaming the old pattern to...
27507 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
27508 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
27509 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
27510 account when deciding which SVE instruction the optab should use.
27511 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
27513 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
27515 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
27516 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
27517 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
27518 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
27519 (tlsdesc_small_<mode>): Turn a define_expand and use
27520 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
27521 (tlsdesc_small_advsimd_<mode>): ...this.
27522 (tlsdesc_small_sve_<mode>): New pattern.
27524 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
27526 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
27527 (UNSPEC_UMUL_HIGHPART): New constants.
27528 (MUL_HIGHPART): New int iteraor.
27529 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
27530 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
27532 (*<su>mul<mode>3_highpart): New define_insn.
27534 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
27537 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
27540 2018-03-13 Martin Liska <mliska@suse.cz>
27543 * (sem_item_optimizer::sem_item_optimizer): Initialize new
27545 (sem_item_optimizer::~sem_item_optimizer): Release it.
27546 (sem_item_optimizer::merge_classes): Register variable aliases.
27547 (sem_item_optimizer::fixup_pt_set): New function.
27548 (sem_item_optimizer::fixup_points_to_sets): Likewise.
27549 * ipa-icf.h: Declare new variables and functions.
27551 2018-03-13 Jakub Jelinek <jakub@redhat.com>
27553 PR middle-end/84834
27554 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
27555 integer_pow2p@2 and test integer_pow2p in condition.
27556 (A < 0 ? C : 0): Similarly for @1.
27558 PR middle-end/84831
27559 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
27560 characters starting at p contain '\0' character, don't look beyond
27564 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
27565 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
27568 * reg-stack.c (change_stack): Change update_end var from int to
27569 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
27570 also call set_block_for_insn on the newly added insns and rescan.
27573 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
27574 on the last operand.
27577 * tree.c (stabilize_reference_1): Return save_expr (e) for
27578 STATEMENT_LIST even if it doesn't have side-effects.
27580 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
27582 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
27584 2018-03-12 Renlin Li <renlin.li@arm.com>
27586 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
27587 aarch64_output_scalar_simd_mov_immediate.
27589 2018-03-12 Martin Sebor <msebor@redhat.com>
27591 PR tree-optimization/83456
27592 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
27593 for perfectly overlapping calls to memcpy.
27594 (gimple_fold_builtin_memory_chk): Same.
27595 (gimple_fold_builtin_strcpy): Handle no-warning.
27596 (gimple_fold_builtin_stxcpy_chk): Same.
27597 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
27599 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
27601 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
27602 parameter. Use it for SFmode.
27603 (rs6000_function_arg_advance_1): Adjust.
27604 (rs6000_function_arg): Adjust.
27605 (rs6000_gimplify_va_arg): Pass false for that new parameter.
27607 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
27609 PR rtl-optimization/84169
27610 PR rtl-optimization/84780
27611 * combine.c (can_combine_p): Check for a 2-insn combination whether
27612 the destination register is used between the two insns, too.
27614 2018-03-12 Richard Biener <rguenther@suse.de>
27616 PR tree-optimization/84803
27617 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
27618 for refs DR analysis didn't process.
27620 2018-03-12 Richard Biener <rguenther@suse.de>
27622 PR tree-optimization/84777
27623 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
27624 force-vectorize loops ignore whether we are optimizing for size.
27626 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
27628 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
27629 (TARGET_MD_ASM_ADJUST): Define.
27631 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
27632 Kito Cheng <kito.cheng@gmail.com>
27633 Chung-Ju Wu <jasonwucj@gmail.com>
27635 * config/nds32/nds32.c (nds32_compute_stack_frame,
27636 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
27637 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
27638 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
27639 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
27640 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
27641 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
27642 * config/nds32/nds32.md (prologue, epilogue): Use macro
27643 NDS32_V3PUSH_AVAILABLE_P to do checking.
27645 2018-03-11 Jakub Jelinek <jakub@redhat.com>
27648 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
27649 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
27650 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
27651 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
27652 addition of most attributes on !orig_type_die or the attribute not
27653 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
27655 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
27656 Chung-Ju Wu <jasonwucj@gmail.com>
27658 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
27659 __NDS32_VH__ macro.
27660 * config/nds32/nds32.opt (mvh): New option.
27662 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
27663 Chung-Ju Wu <jasonwucj@gmail.com>
27665 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
27667 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
27668 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
27671 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
27672 Chung-Ju Wu <jasonwucj@gmail.com>
27674 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
27676 * config/nds32/nds32-multiple.md (strlensi): New pattern.
27677 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
27679 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
27680 Kito Cheng <kito.cheng@gmail.com>
27681 Chung-Ju Wu <jasonwucj@gmail.com>
27683 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
27684 UNSPEC_FFMISM and UNSPEC_FLMISM.
27685 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
27686 for ffb, ffmism and flmism.
27687 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
27688 (unspec_ffmism): Ditto.
27689 (unspec_flmism): Ditto.
27690 (nds32_expand_builtin_impl): Check if string extension is available.
27691 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
27692 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
27694 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
27697 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
27700 * lra-assigns.c (assign_by_spills): Return a flag of reload
27701 assignment failure. Do not process the reload assignment
27702 failures. Do not spill other reload pseudos if they has the same
27704 (lra_assign): Add a return arg. Set up from the result of
27705 assign_by_spills call.
27706 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
27707 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
27708 usage_insns if it is not NULL.
27709 (spill_hard_reg_in_range): New function.
27710 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
27711 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
27712 function prototypes.
27713 (lra_assign): Change prototype.
27714 * lra.c (lra): Add code to deal with fails by splitting hard reg
27717 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
27720 * config/i386/i386.opt: Replace Enforcment with Enforcement.
27722 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
27725 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
27726 (dw_val_node): Add val_symbolic_view.
27727 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
27728 (symview_upper_bound): New.
27729 (new_line_info_table): Initialize symviews_since_reset.
27730 (dwarf2out_source_line): Count symviews_since_reset and set
27731 symview_upper_bound.
27732 (dw_val_equal_p): Handle symview.
27733 (add_AT_symview): New.
27734 (print_dw_val): Handle symview.
27735 (attr_checksum, attr_checksum_ordered): Likewise.
27736 (same_dw_val_p, size_of_die): Likewise.
27737 (value_format, output_die): Likewise.
27738 (add_high_low_attributes): Use add_AT_symview for entry_view.
27739 (dwarf2out_finish): Reset symview_upper_bound, clear
27742 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
27745 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
27746 Add strict argument and use it.
27747 (rs6000_split_multireg_move): Update for new strict argument.
27748 (mem_operand_gpr): Disallow all non-offsettable addresses.
27749 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
27751 2018-03-09 Jakub Jelinek <jakub@redhat.com>
27754 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
27755 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
27756 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
27759 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
27760 decl, use remap_type if we want to use the type.
27762 2018-03-09 Martin Sebor <msebor@redhat.com>
27764 PR tree-optimization/84526
27765 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
27767 (builtin_access::generic_overlap): Be prepared to handle non-array
27770 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
27772 PR rtl-optimization/84682
27773 * lra-constraints.c (process_address_1): Check is_address flag
27774 for address constraints.
27775 (process_alt_operands): Likewise.
27776 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
27777 preprocess_constraints.
27778 * recog.h (preprocess_constraints): Add oploc parameter.
27780 * recog.c (preprocess_constraints): Test address_operand for
27781 CT_ADDRESS constraints.
27783 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
27786 * lra-assigns.c (assign_by_spills): Return a flag of reload
27787 assignment failure. Do not process the reload assignment
27788 failures. Do not spill other reload pseudos if they has the same
27790 (lra_assign): Add a return arg. Set up from the result of
27791 assign_by_spills call.
27792 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
27793 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
27794 usage_insns if it is not NULL.
27795 (spill_hard_reg_in_range): New function.
27796 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
27797 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
27798 function prototypes.
27799 (lra_assign): Change prototype.
27800 * lra.c (lra): Add code to deal with fails by splitting hard reg
27803 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27806 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
27807 Accept complain bool parameter. Only emit errors if it is true.
27808 (arm_parse_cpu_option_name): Likewise.
27809 (arm_target_thumb_only): Adjust callers of the above.
27810 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
27811 prototype to take a default true bool parameter.
27812 (arm_parse_arch_option_name): Likewise.
27814 2018-03-09 David Malcolm <dmalcolm@redhat.com>
27815 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
27819 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
27820 * configure: Regenerate.
27821 * configure.ac ("linker --version-script option"): New.
27822 ("linker soname option"): New.
27824 2018-03-09 Richard Biener <rguenther@suse.de>
27826 PR tree-optimization/84775
27827 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
27828 immediate uses of predicate stmts and mark them modified.
27831 PR tree-optimization/84178
27832 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
27834 (version_loop_for_if_conversion): Delay update_ssa call.
27835 (tree_if_conversion): Delay update_ssa until after predicate
27838 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
27841 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
27842 when the function accesses prior frames.
27844 2018-03-08 Jakub Jelinek <jakub@redhat.com>
27847 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
27848 gen_llsym, otherwise call maybe_gen_llsym.
27850 PR inline-asm/84742
27851 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
27852 has ',' character inside of it.
27854 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27857 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
27858 as clobbering CC_REGNUM.
27860 2018-03-08 Richard Biener <rguenther@suse.de>
27862 PR middle-end/84552
27863 * tree-scalar-evolution.c: Include tree-into-ssa.h.
27864 (follow_copies_to_constant): Do not follow SSA names registered
27867 2018-03-08 Richard Biener <rguenther@suse.de>
27869 PR tree-optimization/84178
27870 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
27872 (version_loop_for_if_conversion): Delay update_ssa call.
27873 (tree_if_conversion): Delay update_ssa until after predicate
27876 2018-03-08 David Malcolm <dmalcolm@redhat.com>
27878 PR tree-optimization/84178
27879 * tree-if-conv.c (release_bb_predicate): Remove the
27880 the assertion that the stmts have NULL use_ops.
27881 Discard the statements, asserting that they haven't
27882 yet been added to a BB.
27884 2018-03-08 Richard Biener <rguenther@suse.de>
27886 PR tree-optimization/84746
27887 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
27888 (phi_translate): Pass in destination ANTIC_OUT set.
27889 (phi_translate_1): Likewise. For a simplified result lookup
27890 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
27891 (phi_translate_set): Adjust.
27892 (do_pre_regular_insertion): Likewise.
27893 (do_pre_partial_partial_insertion): Likewise.
27895 2018-03-08 Martin Liska <mliska@suse.cz>
27897 PR gcov-profile/84735
27898 * doc/gcov.texi: Document usage of profile files.
27899 * gcov-io.h: Document changes in the format.
27901 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
27905 * dwarf2out.c (struct dw_line_info_table): Update comments for
27907 (FORCE_RESET_NEXT_VIEW): New.
27908 (FORCE_RESETTING_VIEW_P): New.
27909 (RESETTING_VIEW_P): Check for -1 too.
27910 (ZERO_VIEW_P): Likewise.
27911 (new_line_info_table): Force-reset next view.
27912 (dwarf2out_begin_function): Likewise.
27913 (dwarf2out_source_line): Simplify zero_view_p initialization.
27914 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
27915 view directly. Omit view when omitting .loc at line 0.
27917 2018-03-08 Jakub Jelinek <jakub@redhat.com>
27919 PR tree-optimization/84740
27920 * tree-switch-conversion.c (process_switch): Call build_constructors
27921 only if info.phi_count is non-zero.
27923 PR tree-optimization/84739
27924 * tree-tailcall.c (find_tail_calls): Check call arguments against
27925 DECL_ARGUMENTS (current_function_decl) rather than
27926 DECL_ARGUMENTS (func) when checking for tail recursion.
27928 2018-03-07 Jakub Jelinek <jakub@redhat.com>
27930 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
27931 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
27932 Volker Reichelt's entry and add entries for people that perform
27933 GCC fuzzy testing and report numerous bugs.
27935 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
27938 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
27939 readonly data in sdata, if that is disabled.
27940 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
27941 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
27942 -mreadonly-in-sdata option.
27944 2018-03-07 Martin Sebor <msebor@redhat.com>
27946 PR tree-optimization/84468
27947 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
27948 basic block when looking for nul assignment.
27950 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
27953 * except.h (output_function_exception_table): Adjust prototype.
27954 * except.c (output_function_exception_table): Remove FNNAME parameter
27955 and add SECTION parameter. Ouput one part of the table at a time.
27956 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
27957 the first part of the exception table and emit unwind directives.
27958 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
27959 (i386_pe_seh_cold_init): Likewise.
27960 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
27961 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
27962 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
27963 (ix86_output_call_insn): Emit a nop in one more case for SEH.
27964 * config/i386/winnt.c: Include except.h.
27965 (struct seh_frame_state): Add reg_offset, after_prologue and
27966 in_cold_section fields.
27967 (i386_pe_seh_end_prologue): Set seh->after_prologue.
27968 (i386_pe_seh_cold_init): New function.
27969 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
27970 to seh->in_cold_section.
27971 (seh_emit_push): Record the offset of the push.
27972 (seh_emit_save): Record the offet of the save.
27973 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
27974 Test seh->after_prologue to disregard the epilogue.
27975 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
27976 (i386_pe_end_cold_function): New function.
27978 2018-03-07 Jakub Jelinek <jakub@redhat.com>
27981 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
27982 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
27985 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
27987 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
27988 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
27990 PR middle-end/84723
27991 * multiple_target.c: Include tree-inline.h and intl.h.
27992 (expand_target_clones): Diagnose and fail if node->definition and
27993 !tree_versionable_function_p (node->decl).
27995 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
27997 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
27999 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
28000 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
28001 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
28003 2018-03-06 Jakub Jelinek <jakub@redhat.com>
28006 * combine.c (try_combine): Use reg_or_subregno instead of handling
28007 just paradoxical SUBREGs and REGs.
28009 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
28011 * config/arc/arc.c (arc_finalize_pic): Remove function.
28012 (arc_must_save_register): We use single base PIC register, remove
28013 checks to save/restore the PIC register.
28014 (arc_expand_prologue): Likewise.
28015 * config/arc/arc-protos.h (arc_set_default_type_attributes):
28017 (arc_verify_short): Likewise.
28018 (arc_attr_type): Likewise.
28019 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
28020 (walk_stores): Likewise.
28021 (arc_address_cost): Make it static.
28022 (arc_verify_short): Likewise.
28023 (branch_dest): Likewise.
28024 (arc_attr_type): Likewise.
28025 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
28026 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
28027 (arc_final_prescan_insn): Remove inserting the nops due to
28028 hardware hazards. It is done in reorg step.
28029 (insn_length_variant_t): Remove.
28030 (insn_length_parameters_t): Likewise.
28031 (arc_insn_length_parameters): Likewise.
28032 (arc_get_insn_variants): Likewise.
28033 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
28035 2018-03-06 Jakub Jelinek <jakub@redhat.com>
28037 PR inline-asm/84683
28038 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
28041 PR tree-optimization/84687
28042 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
28044 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
28046 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28048 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
28049 Rename to ppc_speculation_barrier.
28050 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
28051 __builtin_ppc_speculation_barrier.
28053 2018-03-05 Jakub Jelinek <jakub@redhat.com>
28056 * combine.c (combine_simplify_rtx): Don't try to simplify if
28057 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
28060 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
28062 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
28063 to 32 bytes when compiling for POWER9.
28065 2018-03-05 Jakub Jelinek <jakub@redhat.com>
28068 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
28069 regparm >= 3 with no arg reg available also for calls with
28070 flag_force_indirect_call. Pass decl to ix86_function_regparm.
28073 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
28075 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
28077 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
28080 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
28082 2018-03-05 Richard Biener <rguenther@suse.de>
28084 PR tree-optimization/84486
28085 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
28086 When inserting a __builtin_assume_aligned call set the LHS
28087 SSA name alignment info accordingly.
28089 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
28091 PR tree-optimization/84114
28092 * config/aarch64/aarch64.c (aarch64_reassociation_width)
28093 Avoid reassociation of FLOAT_MODE addition.
28095 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
28097 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
28098 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
28099 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
28100 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
28101 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
28102 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
28103 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
28105 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
28106 __builtin_ia32_wbinvd): New builtins.
28107 (SPECIAL_ARGS2): New.
28108 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
28109 (SPECIAL_ARGS2): New.
28110 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
28111 (ix86_valid_target_attribute_inner_p): Ditto.
28112 (ix86_init_mmx_sse_builtins): Add special_args2.
28113 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
28114 TARGET_WBNOINVD_P): New.
28115 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
28116 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
28117 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
28118 * config/i386/immintrin.h (_wbinvd): New intrinsic.
28119 * config/i386/pconfigintrin.h: New file.
28120 * config/i386/wbnoinvdintrin.h: Ditto.
28121 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
28123 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
28125 2018-03-05 Richard Biener <rguenther@suse.de>
28127 PR tree-optimization/84670
28128 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
28130 (BB_VISITED_WITH_VISITED_SUCCS): New define.
28131 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
28132 (compute_antic_aux): Only assert the number of values in ANTIC_IN
28133 doesn't grow if all successors (recursively) were visited at least
28136 2018-03-05 Richard Biener <rguenther@suse.de>
28138 PR tree-optimization/84650
28139 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
28140 if executed in the loop pipeline.
28142 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
28144 * doc/configfiles.texi (Configuration Files): Move info about
28145 conditionalizing $target-protos.h to...
28146 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
28147 differs from $target-protos.h.
28149 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
28150 Chung-Ju Wu <jasonwucj@gmail.com>
28152 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
28153 * config/nds32/nds32-multiple.md (setmemsi): Define.
28154 * config/nds32/nds32-memory-manipulation.c
28155 (nds32_gen_dup_4_byte_to_word_value): New.
28156 (emit_setmem_word_loop): New.
28157 (emit_setmem_byte_loop): New.
28158 (nds32_expand_setmem_loop): New.
28159 (nds32_expand_setmem_loop_v3m): New.
28160 (nds32_expand_setmem_unroll): New.
28161 (nds32_expand_setmem): New.
28163 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
28164 Chung-Ju Wu <jasonwucj@gmail.com>
28166 * config/nds32/nds32-memory-manipulation.c
28167 (nds32_emit_load_store): New.
28168 (nds32_emit_post_inc_load_store): New.
28169 (nds32_emit_mem_move): New.
28170 (nds32_emit_mem_move_block): New.
28171 (nds32_expand_movmemsi_loop_unknown_size): New.
28172 (nds32_expand_movmemsi_loop_known_size): New.
28173 (nds32_expand_movmemsi_loop): New.
28174 (nds32_expand_movmemsi_unroll): New.
28175 (nds32_expand_movmemqi): Rename ...
28176 (nds32_expand_movmemsi): ... to this.
28177 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
28178 (movmemsi): ... to this.
28179 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
28180 (nds32_expand_movmemsi): ... to this.
28182 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
28183 Monk Chiang <sh.chiang04@gmail.com>
28184 Chung-Ju Wu <jasonwucj@gmail.com>
28186 * config/nds32/nds32-protos.h
28187 (nds32_expand_load_multiple): New arguments.
28188 (nds32_expand_store_multiple): Ditto.
28189 (nds32_valid_multiple_load_store): Rename ...
28190 (nds32_valid_multiple_load_store_p): ... to this.
28191 * config/nds32/nds32-memory-manipulation.c
28192 (nds32_expand_load_multiple): Refine implementation.
28193 (nds32_expand_store_multiple): Ditto.
28194 * config/nds32/nds32-multiple.md
28195 (load_multiple): Update nds32_expand_load_multiple interface.
28196 (store_multiple): Update nds32_expand_store_multiple interface.
28197 * config/nds32/nds32-predicates.c
28198 (nds32_valid_multiple_load_store): Rename ...
28199 (nds32_valid_multiple_load_store_p): ... to this and refine
28201 * config/nds32/predicates.md
28202 (nds32_load_multiple_and_update_address_operation): New predicate.
28203 (nds32_store_multiple_and_update_address_operation): New predicate.
28205 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
28206 Chung-Ju Wu <jasonwucj@gmail.com>
28208 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
28209 (combo): New attribute.
28210 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
28212 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
28214 * config/nds32/nds32.opt: Change -mcmodel= default value.
28216 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
28217 Monk Chiang <sh.chiang04@gmail.com>
28218 Chung-Ju Wu <jasonwucj@gmail.com>
28220 * config/nds32/constants.md (unspec_element): New enum.
28221 * config/nds32/constraints.md (Umw): New constraint.
28222 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
28223 * config/nds32/nds32-intrinsic.md: Likewise.
28224 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
28225 (nds32_valid_smw_lwm_base_p): New.
28226 (nds32_output_smw_single_word): New.
28227 (nds32_output_lmw_single_word): New.
28228 (nds32_expand_unaligned_load): New.
28229 (nds32_expand_unaligned_store): New.
28230 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
28231 (nds32_output_smw_single_word): Declare.
28232 (nds32_output_lmw_single_word): Declare.
28233 (nds32_expand_unaligned_load): Declare.
28234 (nds32_expand_unaligned_store): Declare.
28235 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
28236 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
28237 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
28238 NDS32_BUILTIN_UASTORE_DW.
28239 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
28242 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
28243 Kito Cheng <kito.cheng@gmail.com>
28244 Chung-Ju Wu <jasonwucj@gmail.com>
28246 * config/nds32/nds32-intrinsic.c
28247 (nds32_expand_builtin_null_ftype_reg): Delete.
28248 (nds32_expand_builtin_reg_ftype_imm): Ditto.
28249 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
28250 (nds32_read_argument): New.
28251 (nds32_legitimize_target): Ditto.
28252 (nds32_legitimize_argument): Ditto.
28253 (nds32_check_constant_argument): Ditto.
28254 (nds32_expand_unop_builtin): Ditto.
28255 (nds32_expand_unopimm_builtin): Ditto.
28256 (nds32_expand_binop_builtin): Ditto.
28257 (nds32_builtin_decl_impl): Ditto.
28258 (builtin_description): Ditto.
28259 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
28260 (nds32_init_builtins_impl): Ditto.
28261 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
28262 (nds32_builtin_decl): New.
28263 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
28264 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
28266 2018-03-02 Jeff Law <law@redhat.com>
28268 * reorg.c (stop_search_p): Handle DEBUG_INSN.
28269 (redundant_insn, fill_simple_delay_slots): Likewise.
28270 (fill_slots_from_thread): Likewise.
28271 * resource.c (mark_referenced_resources): Likewise.
28272 (mark_set_resources, find_dead_or_set_registers): Likewise.
28274 2018-03-02 Jakub Jelinek <jakub@redhat.com>
28276 * substring-locations.h (format_warning_va): Formatting fix for
28277 ATTRIBUTE_GCC_DIAG.
28278 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
28280 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
28281 * substring-locations.c: Include intl.h.
28282 (format_warning_va): Turned into small wrapper around
28283 format_warning_n_va, renamed to ...
28284 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
28285 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
28287 (format_warning_at_substring_n): New function.
28288 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
28289 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
28290 format_warning_at_substring with just a shorter name instead of
28291 const function pointer.
28292 (fmtwarn_n): New function.
28293 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
28294 appropriate, get rid of all the fmtstr temporaries, move conditionals
28295 with G_() wrapped string literals directly into fmtwarn arguments,
28296 cast dir.len to (int), formatting fixes.
28298 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
28300 * doc/invoke.texi: Remove "Cilk Plus" references.
28302 2018-03-02 Jakub Jelinek <jakub@redhat.com>
28303 Richard Biener <rguenther@suse.de>
28306 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
28307 for error or warning attributes if CALL_FROM_THUNK_P is set.
28310 2018-03-02 Jakub Jelinek <jakub@redhat.com>
28313 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
28314 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
28317 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
28318 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
28320 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
28321 instead of -1U in last predictors element's probability member.
28323 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
28326 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
28327 arguments if they are comparable.
28329 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
28331 PR tree-optimization/84634
28332 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
28333 masks and masked_loop_p with a single loop_masks, making sure it's
28334 null for bb vectorization.
28336 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
28338 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
28339 (vect_analyze_data_ref_access): Use loop->safe_len rather than
28340 loop->force_vectorize to check whether there is no alias.
28342 2018-03-02 Jakub Jelinek <jakub@redhat.com>
28345 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
28347 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
28349 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
28350 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
28351 instead of a loop around prev_real_insn.
28352 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
28355 PR inline-asm/84625
28356 * config/i386/i386.c (ix86_print_operand): Use conditional
28357 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
28360 2018-03-02 Richard Biener <rguenther@suse.de>
28362 PR tree-optimization/84427
28363 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
28364 (bitmap_set_subtract_values): Rewrite to handle multiple
28367 (prune_clobbered_mems): Likewise.
28368 (phi_translate): Take edge instead of pred/phiblock.
28369 (phi_translate_1): Likewise.
28370 (phi_translate_set): Likewise. Insert all translated
28371 exprs for a value into the set, keeping possibly multiple
28372 expressions per value.
28373 (compute_antic_aux): Adjust for phi_translate changes.
28374 When intersecting union the expressions and prune those
28375 not in the final value set, keeping possibly multiple
28376 expressions per value. Do not use value-insertion
28377 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
28378 all expressions. Add verification that the value-sets
28379 only shrink during iteration.
28380 (compute_partial_antic_aux): Adjust for the phi_translate changes.
28381 (do_pre_regular_insertion): Likewise.
28382 (do_pre_partial_partial_insertion): Likewise.
28384 2018-03-02 Richard Biener <rguenther@suse.de>
28387 * config/darwin.c (saved_debug_info_level): New static global.
28388 (darwin_asm_lto_start): Disable debug info generation for LTO out.
28389 (darwin_asm_lto_end): Restore debug info generation settings.
28391 2018-03-01 Martin Liska <mliska@suse.cz>
28394 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
28395 volatile arguments.
28397 2018-03-01 Richard Biener <rguenther@suse.de>
28400 * dwarf2out.c (gen_variable_die): Properly handle late VLA
28401 type annotation with LTO when debug was disabled at compile-time.
28403 2018-03-01 Matthew Fortune <mfortune@gmail.com>
28405 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
28407 (mips_final_postscan_insn): Likewise.
28409 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
28411 PR rtl-optimization/84528
28412 * alias.c (init_alias_target): Add commentary.
28413 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
28414 a unique base value if the frame pointer is not eliminated
28415 to the stack pointer.
28417 2018-03-01 Tom de Vries <tom@codesourcery.com>
28419 PR rtl-optimization/83327
28420 * lra-int.h (hard_regs_spilled_into): Declare.
28421 * lra.c (hard_regs_spilled_into): Define.
28422 (init_reg_info): Init hard_regs_spilled_into.
28423 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
28424 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
28425 (process_bb_lives): Handle hard_regs_spilled_into.
28426 (lra_create_live_ranges_1): Before doing liveness propagation, clear
28427 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
28429 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
28431 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
28432 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
28433 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
28434 * config/rs6000/aix72.h: New file.
28436 2018-02-28 Jakub Jelinek <jakub@redhat.com>
28438 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
28439 instead of warning_at with conditional singular and plural messages
28443 * stor-layout.c (update_alignment_for_field): For
28444 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
28445 && !DECL_PACKED (field), do the alignment update, just use
28446 only desired_align instead of MAX (type_align, desired_align)
28448 (place_field): Don't do known_align < desired_align handling
28449 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
28450 is non-NULL, instead do it after rli->prev_field handling and
28451 only if not within a bitfield word. For DECL_PACKED (field)
28452 use type_align of BITS_PER_UNIT.
28454 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
28456 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
28457 superfluous parentheses and trailing spaces.
28459 2018-02-28 Richard Biener <rguenther@suse.de>
28461 PR tree-optimization/84584
28462 * graphite-scop-detection.c (scop_detection::add_scop): Discard
28463 SCoPs with fake exit edge.
28465 2018-02-28 Martin Liska <mliska@suse.cz>
28468 * timevar.c (timer::print): Fix format to properly print 100%
28471 2018-02-28 Richard Biener <rguenther@suse.de>
28473 PR middle-end/84607
28474 * genmatch.c (capture_info::walk_match): Do not mark
28475 captured expressions without operands as expr_p given
28476 they act more like predicates and should be subject to
28477 "lost tail" side-effect preserving.
28479 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
28481 PR rtl-optimization/81611
28482 * auto-inc-dec.c (attempt_change): Move dead note from
28483 mem_insn if it's the next use of regno
28484 (find_address): Take address use of reg holding
28485 non-incremented value. Add parm to limit search to the named
28487 (merge_in_block): Attempt to use a mem insn that is the next
28488 use of the original regno.
28490 2018-02-27 Martin Sebor <msebor@redhat.com>
28493 * doc/invoke.texi (-Wmissing-attributes): New option.
28494 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
28496 2018-02-27 Martin Sebor <msebor@redhat.com>
28498 PR translation/84207
28499 * diagnostic-core.h (warning_n, error_n, inform_n): Change
28500 n argument to unsigned HOST_WIDE_INT.
28501 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
28502 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
28503 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
28504 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
28506 2018-02-27 Richard Biener <rguenther@suse.de>
28508 PR tree-optimization/84512
28509 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
28510 Do not use the estimate returned from record_stmt_cost for
28511 the scalar iteration cost but sum properly using add_stmt_cost.
28513 2018-02-27 Richard Biener <rguenther@suse.de>
28515 PR tree-optimization/84466
28516 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
28517 Adjust last change to less strictly validate use operands.
28519 2018-02-27 Martin Liska <mliska@suse.cz>
28521 PR gcov-profile/84548
28522 * gcov.c (process_file): Allow partial overlap and consider it
28523 also as group functions.
28524 (output_lines): Properly calculate range of lines for a group.
28526 2018-02-27 Martin Liska <mliska@suse.cz>
28528 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
28529 'ggc' suffixes. Change first column width.
28530 (timer::print): Fix formatting of the column.
28532 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
28534 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
28535 preserve inline entry blocks for the sake of debug inline
28536 entry point markers alone.
28537 (remove_unused_locals): Suggest in comments a better place to
28538 force the preservation of inline entry blocks that are
28539 otherwise unused, but do not preserve them.
28541 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
28543 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
28545 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
28548 * config/i386/constraints.md (Bs): Replace
28549 ix86_indirect_branch_register with
28550 TARGET_INDIRECT_BRANCH_REGISTER.
28552 * config/i386/i386.md (indirect_jump): Likewise.
28553 (tablejump): Likewise.
28554 (*sibcall_memory): Likewise.
28555 (*sibcall_value_memory): Likewise.
28556 Peepholes of indirect call and jump via memory: Likewise.
28557 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
28558 (*sibcall_value_GOT_32): Likewise.
28559 * config/i386/predicates.md (indirect_branch_operand): Likewise.
28560 (GOT_memory_operand): Likewise.
28561 (call_insn_operand): Likewise.
28562 (sibcall_insn_operand): Likewise.
28563 (GOT32_symbol_operand): Likewise.
28564 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
28566 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
28568 PR rtl-optimization/83496
28569 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
28570 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
28571 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
28572 redundant insn, if any.
28573 (relax_delay_slots): Likewise.
28574 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
28576 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
28578 PR tree-optimization/83965
28579 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
28580 that grouped statements are part of a reduction chain. Return
28581 true if the statement is not marked as a reduction itself but
28582 is part of a group.
28583 (vect_recog_dot_prod_pattern): Don't check whether the statement
28584 is part of a group here.
28585 (vect_recog_sad_pattern): Likewise.
28586 (vect_recog_widen_sum_pattern): Likewise.
28588 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
28591 * final.c (rest_of_clean_state): Also look for calls inside sequences.
28593 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
28596 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
28598 (ix86_output_indirect_function_return): New prototype.
28599 (ix86_split_simple_return_pop_internal): Likewise.
28600 * config/i386/i386.c (indirect_return_via_cx): New.
28601 (indirect_return_via_cx_bnd): Likewise.
28602 (indirect_thunk_name): Handle return va CX_REG.
28603 (output_indirect_thunk_function): Create alias for
28604 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
28605 (ix86_output_indirect_jmp): Remove the bool argument.
28606 (ix86_output_indirect_function_return): New function.
28607 (ix86_split_simple_return_pop_internal): Likewise.
28608 * config/i386/i386.md (*indirect_jump): Don't pass false
28609 to ix86_output_indirect_jmp.
28610 (*tablejump_1): Likewise.
28611 (simple_return_pop_internal): Change it to define_insn_and_split.
28612 Call ix86_split_simple_return_pop_internal to split it for
28613 -mfunction-return=.
28614 (simple_return_indirect_internal): Call
28615 ix86_output_indirect_function_return instead of
28616 ix86_output_indirect_jmp.
28618 2018-02-26 Jakub Jelinek <jakub@redhat.com>
28621 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
28622 memset and value initialization afterwards.
28624 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
28626 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
28628 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
28631 * common/config/aarch64/aarch64-common.c
28632 (aarch_option_optimization_table[]): Switch
28633 off fomit-frame-pointer
28635 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
28636 Chung-Ju Wu <jasonwucj@gmail.com>
28638 * config/nds32/nds32-multiple.md (load_multiple): Disallow
28640 (store_multiple): Ditto.
28642 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
28644 * config.gcc: Add --with-cpu support for nds32 target.
28645 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
28646 * config/nds32/nds32.opt: Add -mcpu= option.
28648 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
28650 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
28651 isel=yes): Warn for these deprecated options.
28653 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
28655 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
28656 ISA_2_5_MASKS_EMBEDDED.
28658 2018-02-23 Jakub Jelinek <jakub@redhat.com>
28660 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
28661 p->max as pointers rather than using iterative_hash_expr.
28663 2018-02-23 Carl Love <cel@us.ibm.com>
28665 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
28666 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
28668 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
28669 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
28670 P8V_BUILTIN_VEC_VUNSIGNED2.
28672 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
28675 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
28676 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
28678 * lra-constraints.c (curr_insn_transform): Set up
28679 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
28681 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
28682 * lra-eliminations.c (spill_pseudos): Ditto.
28683 (process_insn_for_elimination): Ditto.
28684 * lra-lives.c (reg_early_clobber_p): Use the new macros.
28685 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
28686 LRA_NON_CLOBBERED_ALT.
28688 2018-02-22 Martin Sebor <msebor@redhat.com>
28690 PR tree-optimization/84480
28691 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
28692 to maybe_diag_stxncpy_trunc. Call it.
28693 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
28694 from gimple_fold_builtin_strcpy. Print inlining stack.
28695 (handle_builtin_stxncpy): Print inlining stack.
28696 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
28698 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
28701 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
28702 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
28703 and -fcheck-pointer-bounds are used together.
28704 (indirect_thunk_prefix): New enum.
28705 (indirect_thunk_need_prefix): New function.
28706 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
28707 "_nt" instead of "_bnd" for NOTRACK prefix.
28708 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
28709 (output_indirect_thunk_function): Likewise.
28711 (ix86_code_end): Update output_indirect_thunk_function calls.
28712 (ix86_output_indirect_branch_via_reg): Replace
28713 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
28714 (ix86_output_indirect_branch_via_push): Likewise.
28715 (ix86_output_function_return): Likewise.
28716 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
28717 incompatible with -fcf-protection=branch and
28718 -fcheck-pointer-bounds.
28720 2018-02-22 Steve Ellcey <sellcey@cavium.com>
28723 * config/aarch64/aarch64.c (aarch64_print_address_internal):
28724 Change gcc_assert call to output_operand_lossage.
28726 2018-02-22 Steve Ellcey <sellcey@cavium.com>
28728 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
28730 2018-02-22 DJ Delorie <dj@redhat.com>
28731 Sebastian Perta <sebastian.perta@renesas.com>
28732 Oleg Endo <olegendo@gcc.gnu.org>
28734 * config/rx/rx.c (rx_rtx_costs): New function.
28735 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
28737 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
28739 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
28741 2018-02-22 Martin Liska <mliska@suse.cz>
28744 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
28745 Add "native" as a possible value.
28747 2018-02-22 Martin Liska <mliska@suse.cz>
28750 * config/i386/i386.c (ix86_option_override_internal):
28751 Add "native" as a possible value for -march and -mtune.
28753 2018-02-22 Jakub Jelinek <jakub@redhat.com>
28756 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
28757 to all type variants.
28759 PR tree-optimization/84503
28760 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
28761 width as info->bitpos + info->bitsize - start.
28762 (merged_store_group::merge_overlapping): Simplify width computation.
28763 (check_no_overlap): New function.
28764 (imm_store_chain_info::try_coalesce_bswap): Compute expected
28765 start + width and last_order of the group, fail if check_no_overlap
28767 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
28768 to group if check_no_overlap fails.
28770 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
28772 * config/rs6000/altivec.md: Delete contraint arguments to
28773 define_expand, define_split, and define_peephole2, and in
28774 define_insn_and_split if always unused.
28775 * config/rs6000/darwin.md: Ditto.
28776 * config/rs6000/dfp.md: Ditto.
28777 * config/rs6000/rs6000.md: Ditto.
28778 * config/rs6000/sync.md: Ditto.
28779 * config/rs6000/vector.md: Ditto.
28780 * config/rs6000/vsx.md: Ditto.
28782 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
28784 * config/rs6000/altivec.md: Write output control strings as braced
28785 blocks instead of double-quoted strings.
28786 * config/rs6000/darwin.md: Ditto.
28787 * config/rs6000/rs6000.md: Ditto.
28788 * config/rs6000/vector.md: Ditto.
28789 * config/rs6000/vsx.md: Ditto.
28791 2018-02-21 Jason Merrill <jason@redhat.com>
28793 PR c++/84314 - ICE with templates and fastcall attribute.
28794 * attribs.c (build_type_attribute_qual_variant): Remove assert.
28796 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
28798 * ipa-cp.c (determine_versionability): Fix comment typos.
28800 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
28803 * ipa-cp.c (determine_versionability): Do not version functions caling
28806 2018-02-21 Martin Liska <mliska@suse.cz>
28809 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
28810 Add "native" as a possible value.
28811 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
28812 the macro when native cpu detection is available.
28814 2018-02-21 Martin Liska <mliska@suse.cz>
28817 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
28818 Add "native" as a possible value.
28819 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
28820 when native cpu detection is available.
28822 2018-02-21 Jakub Jelinek <jakub@redhat.com>
28823 Martin Sebor <msebor@redhat.com>
28825 PR tree-optimization/84478
28826 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
28828 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
28829 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
28830 support which is conservatively correct, for 2 only stay conservative
28831 for maxlen. Formatting and comment capitalization fixes. Add STRICT
28832 argument to the 2 argument get_range_strlen, adjust 6 arg
28833 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
28835 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
28836 (gimple_fold_builtin_strlen): Pass true as last argument to
28839 2018-02-20 Martin Sebor <msebor@redhat.com>
28841 PR middle-end/84095
28842 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
28843 (builtin_memref::set_base_and_offset): Same. Handle inner references.
28844 (builtin_memref::builtin_memref): Factor out parts into
28845 set_base_and_offset and call it.
28847 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
28849 PR middle-end/84406
28850 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
28851 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
28852 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
28853 search at the associated MODE_INT.
28855 2018-02-20 Jeff Law <law@redhat.com>
28857 PR middle-end/82123
28858 PR tree-optimization/81592
28859 PR middle-end/79257
28860 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
28861 for range data rather than using global data.
28862 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
28863 range data rather than using global data.
28864 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
28865 pass it to children as needed.
28866 (struct directive::fmtresult): Similarly.
28867 (struct directive::set_width): Similarly.
28868 (struct directive::set_precision): Similarly.
28869 (format_integer, format_directive, parse_directive): Similarly.
28870 (format_none): Accept unnamed vr_values parameter.
28871 (format_percent, format_floating, format_character): Similarly.
28872 (format_string, format_plain): Similarly.
28873 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
28874 the EVRP range analyzer for range data rather than using global data.
28875 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
28876 gimple-ssa-evrp-analyze.h
28877 (class sprintf_dom_walker): Add after_dom_children member function.
28878 Add evrp_range_analyzer member.
28879 (sprintf_dom_walker::before_dom_children): Call into the EVRP
28880 range analyzer as needed.
28881 (sprintf_dom_walker::after_dom_children): New member function.
28882 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
28884 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
28885 (evrp_range_analyzer::pop_to_marker): Likewise.
28887 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
28889 PR tree-optimization/84419
28890 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
28891 with the required type if its current type is compatible but
28894 2018-02-20 Jakub Jelinek <jakub@redhat.com>
28896 PR middle-end/82004
28897 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
28898 after vectorization.
28900 2018-02-20 Martin Liska <mliska@suse.cz>
28903 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
28904 possible values if we don't have a hint.
28906 2018-02-20 Martin Liska <mliska@suse.cz>
28910 * final.c (shorten_branches): Build align_tab array with one
28912 * opts.c (finish_options): Add alignment option limit check.
28913 (MAX_CODE_ALIGN): Likewise.
28914 (MAX_CODE_ALIGN_VALUE): Likewise.
28915 * doc/invoke.texi: Document maximum allowed option value for
28916 all -falign-* options.
28918 2018-02-19 Jakub Jelinek <jakub@redhat.com>
28921 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
28922 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
28923 * var-tracking.c (emit_note_insn_var_location): Remove all references
28924 to NOTE_INSN_CALL_ARG_LOCATION.
28925 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
28926 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
28927 Use copy_rtx_if_shared.
28928 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
28929 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
28930 (dwarf2out_var_location): Remove handling of
28931 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
28933 * final.c (final_scan_insn): Remove all references to
28934 NOTE_INSN_CALL_ARG_LOCATION.
28935 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
28936 before dumping final insns.
28937 * except.c (emit_note_eh_region_end): Remove all references to
28938 NOTE_INSN_CALL_ARG_LOCATION.
28939 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
28940 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
28941 * config/arc/arc.c (hwloop_optimize): Likewise.
28942 * config/arm/arm.c (create_fix_barrier): Likewise.
28943 * config/s390/s390.c (s390_chunkify_start): Likewise.
28944 * config/sh/sh.c (find_barrier): Likewise.
28945 * config/i386/i386.c (rest_of_insert_endbranch,
28946 ix86_seh_fixup_eh_fallthru): Likewise.
28947 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
28948 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
28949 * config/frv/frv.c (frv_function_prologue): Likewise.
28950 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
28952 (note_outside_basic_block_p): Remove all references to
28953 NOTE_INSN_CALL_ARG_LOCATION.
28954 * gengtype.c (adjust_field_rtx_def): Likewise.
28955 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
28957 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
28958 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
28961 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
28964 PR tree-optimization/84452
28965 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
28966 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
28969 2018-02-19 Martin Liska <mliska@suse.cz>
28972 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
28974 2018-02-19 Martin Liska <mliska@suse.cz>
28975 Richard Sandiford <richard.sandiford@linaro.org>
28977 PR tree-optimization/82491
28978 * gimple-fold.c (get_base_constructor): Make earlier bail out
28981 2018-02-19 Carl Love <cel@us.ibm.com>
28983 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
28984 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
28986 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
28987 P8V_BUILTIN_VEC_NEG.
28989 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
28991 * config/rl78/rl78.md (movdf): New define expand.
28993 2018-02-19 Martin Liska <mliska@suse.cz>
28996 * doc/invoke.texi: Fix typo.
28997 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
28999 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
29001 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
29002 handle rs6000_single_float and rs6000_double_float specially for
29005 2018-02-16 Jeff Law <law@redhat.com>
29007 * config/rx/rx.c (add_pop_cfi_notes): New function.;
29008 (pop_regs): Use it.
29010 2018-02-16 Jakub Jelinek <jakub@redhat.com>
29013 * ipa-inline.c (inline_small_functions): Fix a typo.
29015 2018-02-16 Nathan Sidwell <nathan@acm.org>
29017 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
29019 2018-02-16 Carl Love <cel@us.ibm.com>
29021 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
29022 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
29023 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
29024 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
29025 expansion to P8V_BUILTIN_VEC_FLOAT2.
29027 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
29029 PR rtl-optimization/70023
29030 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
29031 src_regno into account.
29033 2018-02-16 Carl Love <cel@us.ibm.com>
29035 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
29036 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
29037 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
29038 * config/rs6000/rs6000.c: Remove case statements for
29039 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
29040 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
29041 and P9V_BUILTIN_VEC_VINSERT4B.
29042 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
29043 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
29044 * config/rs6000/vsx.md:
29045 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
29048 2018-02-16 Carl Love <cel@us.ibm.com>
29050 * config/rs6000/altivec.h: Add builtin names vec_extract4b
29052 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
29054 * config/rs6000/rs6000-c.c: Add the definitions for
29055 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
29056 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
29057 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
29058 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
29059 definition for insert4b and define insn *insert3b_internal.
29060 * doc/extend.texi: Add documentation for vec_extract4b.
29062 2018-02-16 Nathan Sidwell <nathan@acm.org>
29064 * doc/extend.texi (Backwards Compatibility): Mention friend
29065 injection. Note for-scope is deprecated.
29066 * doc/invoke.texi (-ffriend-injection): Deprecate.
29068 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
29070 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
29071 that moved to I2, also allow destinations that are a paradoxical
29072 subreg (instead of a normal reg).
29074 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
29077 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
29080 2018-02-16 Richard Biener <rguenther@suse.de>
29082 PR tree-optimization/84037
29083 PR tree-optimization/84016
29085 * config/i386/i386.c (ix86_builtin_vectorization_cost):
29086 Adjust vec_construct for the fact we need additional higher latency
29087 128bit inserts for AVX256 and AVX512 vector builds.
29088 (ix86_add_stmt_cost): Scale vector construction cost for
29091 2018-02-16 Richard Biener <rguenther@suse.de>
29093 PR tree-optimization/84417
29094 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
29095 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
29096 (non_rewritable_lvalue_p): Likewise, use poly-ints.
29098 2018-02-16 Martin Liska <mliska@suse.cz>
29101 * internal-fn.def (ASAN_CHECK): Set proper flags.
29102 (ASAN_MARK): Likewise.
29104 2018-02-16 Julia Koval <julia.koval@intel.com>
29106 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
29107 from PTA_CANNONLAKE.
29109 2018-02-16 Jakub Jelinek <jakub@redhat.com>
29112 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
29113 Use ++iter rather than iter++ for std::list iterators.
29114 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
29115 defer deleting them until all nodes in the forest are processed. Do
29116 free even leaf nodes. Change to_process into auto_vec.
29119 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
29120 * vec.h (vec_default_construct): Use memset instead of placement new
29121 if BROKEN_VALUE_INITIALIZATION is defined.
29122 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
29123 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
29126 PR rtl-optimization/83723
29127 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
29128 * lra.c (lra_substitute_pseudo): Likewise. If true, use
29129 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
29131 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
29133 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
29135 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
29137 PR rtl-optimization/81443
29138 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
29139 from inner REGs to paradoxical SUBREGs.
29141 2018-02-16 Richard Biener <rguenther@suse.de>
29143 PR tree-optimization/84399
29144 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
29145 For operands we can analyze at their definition make sure we can
29146 analyze them at each use as well.
29148 2018-02-16 Richard Biener <rguenther@suse.de>
29150 PR tree-optimization/84190
29151 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
29152 volatile accesses if the decl isn't volatile.
29154 2018-02-15 Jason Merrill <jason@redhat.com>
29156 PR c++/84314 - ICE with templates and fastcall attribute.
29157 * attribs.c (build_type_attribute_qual_variant): Don't clobber
29158 TYPE_CANONICAL on an existing type.
29160 2018-02-15 Jakub Jelinek <jakub@redhat.com>
29162 PR tree-optimization/84383
29163 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
29164 dstoff nor call operand_equal_p if dstbase is NULL.
29166 PR tree-optimization/84334
29167 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
29168 also a CONSTANT_CLASS_P, punt.
29170 2018-02-14 Jim Wilson <jimw@sifive.com>
29172 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
29173 first SMALL_OPERAND check. New local min_second_step. Move assert
29174 to where locals are set. Add TARGET_RVC support.
29175 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
29177 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
29179 * doc/invoke.texi: Correct -Wformat-overflow code sample.
29181 2018-02-14 Martin Sebor <msebor@redhat.com>
29183 PR tree-optimization/83698
29184 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
29185 arrays constrain the offset range to their bounds.
29186 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
29187 (builtin_access::overlap): Avoid setting the size of overlap if it's
29189 (maybe_diag_overlap): Also consider arrays when deciding what values
29190 of offsets to include in diagnostics.
29192 2018-02-14 Martin Sebor <msebor@redhat.com>
29195 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
29196 that correspond to the kind of a declaration.
29198 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
29201 * config/pa/pa.md: Load address of PIC label using the linkage table
29202 if the label is nonlocal.
29204 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
29206 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
29207 warning message if user requests -maltivec=be.
29208 * doc/invoke.texi: Document deprecation of -maltivec=be.
29210 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
29213 * config/rs6000/rs6000-c.c: Update definitions for
29214 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
29215 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
29217 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
29220 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
29221 add _get_ssp intrinsics. Remove argument from
29222 __builtin_ia32_rdssp[d|q].
29223 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
29224 * config/i386/i386-builtin.def: Remove argument from
29225 __builtin_ia32_rdssp[d|q].
29226 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
29227 ix86_expand_special_args_builtin for _rdssp[d|q].
29228 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
29229 Clear register before usage.
29230 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
29231 Add documentation for new _get_ssp and _inc_ssp intrinsics.
29233 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
29235 PR tree-optimization/84357
29236 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
29237 operand 1 of an ARRAY_REF too.
29239 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
29242 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
29243 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
29245 (set_of_reg): New struct.
29246 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
29247 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
29248 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
29250 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
29251 Split into bitclr, bitset, bitinvert patterns if appropriate.
29252 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
29253 use rx_fuse_in_memory_bitop.
29254 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
29255 to named insn, correct maximum insn length.
29257 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
29260 * machmode.def: Define a complex mode for PARTIAL_INT.
29261 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
29263 * doc/rtl.texi: Document CSPImode.
29264 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
29266 (msp430_hard_regno_nregs_with_padding): Likewise.
29268 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
29271 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
29273 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
29275 PR rtl-optimization/84169
29276 * combine.c (try_combine): New variable split_i2i3. Set it to true if
29277 we generated a parallel as new i3 and we split that to new i2 and i3
29278 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
29279 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
29280 those to i2, not i1. Partially rewrite this scan code.
29282 2018-02-13 Jakub Jelinek <jakub@redhat.com>
29285 * stor-layout.c (place_field): For variable length fields, adjust
29286 offset_align afterwards not just based on the field's alignment,
29287 but also on the size.
29289 PR middle-end/84309
29290 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
29291 of exps and logs in the use_exp2 case.
29293 2018-02-13 Jeff Law <law@redhat.com>
29295 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
29296 entry for "vector".
29298 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
29301 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
29305 * common.opt (gas-loc-support, gas-locview-support): New.
29306 (ginline-points, ginternal-reset-location-views): New.
29307 * doc/invoke.texi: Document them. Use @itemx where intended.
29308 (gvariable-location-views): Adjust.
29309 * target.def (reset_location_view): New.
29310 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
29311 (TARGET_RESET_LOCATION_VIEW): New.
29312 * doc/tm.texi: Rebuilt.
29313 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
29314 (dwarf2out_default_as_locview_support): New.
29315 (output_asm_line_debug_info): Use option variables.
29316 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
29317 (output_loc_list): Likewise.
29318 (add_high_low_attributes): Check option variables.
29319 Don't output entry view attribute in strict mode.
29320 (gen_inlined_subroutine_die): Check option variables.
29321 (dwarf2out_inline_entry): Likewise.
29322 (init_sections_and_labels): Likewise.
29323 (dwarf2out_early_finish): Likewise.
29324 (maybe_reset_location_view): New, from...
29325 (dwarf2out_var_location): ... here. Call it.
29326 * debug.h (dwarf2out_default_as_loc_support): Declare.
29327 (dwarf2out_default_as_locview_support): Declare.
29328 * hooks.c (hook_int_rtx_insn_0): New.
29329 * hooks.h (hook_int_rtx_insn_0): Declare.
29330 * toplev.c (process_options): Take -gas-loc-support and
29331 -gas-locview-support from dwarf2out. Enable
29332 -gvariable-location-views by default only with locview
29333 assembler support. Enable -ginternal-reset-location-views by
29334 default only if the target defines the corresponding hook.
29335 Enable -ginline-points by default if location views are
29336 enabled; force it disabled if statement frontiers are
29338 * tree-inline.c (expand_call_inline): Check option variables.
29339 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
29341 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
29343 PR tree-optimization/84321
29344 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
29345 handling. Also check whether the anti-range contains any values
29346 that satisfy the mask; switch to a VR_RANGE if not.
29348 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
29351 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
29353 2018-02-13 Martin Jambor <mjambor@suse.cz>
29356 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
29357 of call statements, also set location of a load to a temporary.
29359 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
29361 * config/rl78/rl78.c (add_vector_labels): New function.
29362 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
29363 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
29364 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
29365 which checks that no arguments are passed.
29366 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
29367 * doc/extend.texi: Documentation for the new attribute.
29369 2018-02-13 Andreas Schwab <schwab@suse.de>
29371 * config/riscv/linux.h (CPP_SPEC): Define.
29373 2018-02-13 Jakub Jelinek <jakub@redhat.com>
29376 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
29377 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
29378 OPTION_MASK_ISA_AES as first argument to def_builtin_const
29379 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
29380 instead of OPTION_MASK_ISA_PCLMUL as first argument to
29381 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
29382 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
29383 temporarily for AES and PCLMUL builtins.
29385 PR tree-optimization/84339
29386 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
29387 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
29390 PR middle-end/84309
29391 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
29392 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
29393 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
29395 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
29397 * omp-simd-clone.h: New file.
29398 * omp-simd-clone.c: Include omp-simd-clone.h.
29399 (expand_simd_clones): No longer static.
29400 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
29401 cgraph.h and omp-simd-clone.h.
29402 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
29403 (vect_recog_widen_shift_pattern): Formatting fix.
29404 (vect_pattern_recog_1): Don't check optab for calls.
29407 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
29408 operands[2] into a REG before using gen_lowpart on it.
29410 2018-02-12 Jeff Law <law@redhat.com>
29413 * config/sh/sh.c (find_barrier): Consider a sibling call
29416 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
29417 successfully back substituting a reg.
29419 2018-02-12 Richard Biener <rguenther@suse.de>
29421 PR tree-optimization/84037
29422 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
29423 parameter, move visited init to caller.
29424 (vect_slp_analyze_operations): Separate cost from validity
29425 check, initialize visited once for all instances.
29426 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
29428 * tree-vect-stmts.c (vect_model_simple_cost): Make early
29430 (vect_model_promotion_demotion_cost): Likewise.
29431 (vectorizable_bswap): Guard cost modeling with !slp_node
29432 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
29434 (vectorizable_call): Likewise.
29435 (vectorizable_conversion): Likewise.
29436 (vectorizable_assignment): Likewise.
29437 (vectorizable_shift): Likewise.
29438 (vectorizable_operation): Likewise.
29439 (vectorizable_store): Likewise.
29440 (vectorizable_load): Likewise.
29441 (vectorizable_condition): Likewise.
29442 (vectorizable_comparison): Likewise.
29444 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
29447 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
29448 (ASAN_MARK): Fix fnspec to account for return value, change pointer
29449 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
29451 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
29453 PR middle-end/83665
29454 * params.def (inline-min-speedup): Increase from 8 to 15.
29455 (max-inline-insns-auto): Decrease from 40 to 30.
29456 * ipa-split.c (consider_split): Add some buffer for function to
29457 be considered inlining candidate.
29458 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
29461 2018-02-12 Richard Biener <rguenther@suse.de>
29463 PR tree-optimization/84037
29464 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
29465 matched stmts if we cannot swap the non-matched ones.
29467 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
29469 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
29470 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
29471 _mm_maskz_scalef_round_ss): New intrinsics.
29472 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
29473 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
29474 __builtin_ia32_scalefss_round): Remove.
29475 (__builtin_ia32_scalefsd_mask_round,
29476 __builtin_ia32_scalefss_mask_round): New intrinsics.
29477 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
29478 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
29479 ((match_operand:VF_128 2 "<round_nimm_predicate>"
29480 "<round_constraint>")): Changed to ...
29481 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
29482 "<round_scalar_constraint>")): ... this.
29483 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
29484 %0, %1, %2<round_op3>}"): Changed to ...
29485 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
29486 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
29487 %2<round_scalar_mask_op3>}"): ... this.
29488 * config/i386/subst.md (round_scalar_nimm_predicate): New.
29490 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
29492 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
29493 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
29494 (_mm_maskz_sqrt_round_ss): New intrinsics.
29495 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
29496 (__builtin_ia32_sqrtsd_mask_round)
29497 (__builtin_ia32_sqrtss_mask_round): New builtins.
29498 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
29499 (__builtin_ia32_sqrtss_round): Remove.
29500 (__builtin_ia32_sqrtsd_mask_round)
29501 (__builtin_ia32_sqrtss_mask_round): New builtins.
29502 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
29503 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
29504 ((match_operand:VF_128 1 "vector_operand"
29505 "xBm,<round_constraint>")): Changed to ...
29506 ((match_operand:VF_128 1 "vector_operand"
29507 "xBm,<round_scalar_constraint>")): ... this.
29508 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
29509 %0, %2, %<iptr>1<round_op3>}): Changed to ...
29510 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
29511 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
29512 %<iptr>1<round_scalar_mask_op3>}): ... this.
29513 ((set_attr "prefix" "<round_prefix>")): Changed to ...
29514 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
29516 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
29519 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
29520 Cast vec_cmpeq result to correct type.
29521 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
29522 Cast vec_cmpgt result to correct type.
29524 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
29526 * final.c (final_scan_insn_1): Renamed from...
29527 (final_scan_insn): ... this. New wrapper, to recover
29528 seen from the outermost call in recursive ones.
29529 * config/sparc/sparc.c (output_return): Drop seen from call.
29530 (output_sibcall): Likewise.
29531 * config/visium/visium.c (output_branch): Likewise.
29533 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
29535 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
29538 2018-02-10 Alan Modra <amodra@gmail.com>
29541 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
29542 Specify LR as an input.
29544 2018-02-10 Jakub Jelinek <jakub@redhat.com>
29547 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
29548 remove_member_access_dummy_vars): New functions.
29549 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
29550 lower_omp_1, execute_lower_omp): Use them.
29552 PR rtl-optimization/84308
29553 * shrink-wrap.c (spread_components): Release todo vector.
29555 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
29557 PR rtl-optimization/57193
29558 * ira-color.c (struct allocno_color_data): Add member
29559 conflict_allocno_hard_prefs.
29560 (update_conflict_allocno_hard_prefs): New.
29561 (bucket_allocno_compare_func): Add a preference based on
29562 conflict_allocno_hard_prefs.
29563 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
29564 (color_allocnos): Remove a dead code. Initiate
29565 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
29567 2018-02-09 Jakub Jelinek <jakub@redhat.com>
29570 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
29571 constraint from =wa to wa. Avoid a subreg on the output operand,
29572 instead use a pseudo and subreg it in a move.
29573 (p9_xxbrd_<mode>): Changed to ...
29574 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
29575 (p9_xxbrd_v2df): New expander.
29576 (p9_xxbrw_<mode>): Changed to ...
29577 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
29578 (p9_xxbrw_v4sf): New expander.
29580 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
29582 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
29584 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
29587 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
29588 multiply in 32-bit mode.
29589 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
29590 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
29593 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
29595 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
29596 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
29597 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
29598 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
29600 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
29603 * dwarf2out.c (is_trivial_indirect_ref): New function.
29604 (dwarf2out_late_global_decl): Do not generate a location
29605 attribute for variables that have a non-trivial DECL_VALUE_EXPR
29606 and that are not defined in the current unit.
29608 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
29610 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
29611 instead of a libcall for UNORDERED.
29613 2018-02-09 Tamar Christina <tamar.christina@arm.com>
29616 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
29617 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
29619 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
29622 * config/s390/s390.c (s390_set_current_function): Invoke
29623 s390_indirect_branch_settings also if fndecl didn't change.
29625 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
29627 * config/rs6000/rs6000.md (blockage): Set length to zero.
29629 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
29631 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
29633 2018-02-09 Jakub Jelinek <jakub@redhat.com>
29636 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
29637 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
29641 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
29642 PARALLEL incoming that failed vt_get_decl_and_offset check.
29644 PR middle-end/84237
29645 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
29646 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
29648 (get_variable_section): For decls in named .bss* sections pass true as
29649 second argument to bss_initializer_p.
29651 2018-02-09 Marek Polacek <polacek@redhat.com>
29652 Jakub Jelinek <jakub@redhat.com>
29655 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
29656 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
29657 Sync some changes from cxx_fold_indirect_ref.
29659 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
29661 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
29663 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
29664 (BLOCK_INLINE_ENTRY_LABEL): New.
29665 (dwarf2out_var_location): Disregard inline entry markers.
29666 (inline_entry_data): New struct.
29667 (inline_entry_data_hasher): New hashtable type.
29668 (inline_entry_data_hasher::hash): New.
29669 (inline_entry_data_hasher::equal): New.
29670 (inline_entry_data_table): New variable.
29671 (add_high_low_attributes): Add DW_AT_entry_pc and
29672 DW_AT_GNU_entry_view attributes if a pending entry is found
29673 in inline_entry_data_table. Add old entry_pc attribute only
29674 if debug nonbinding markers are disabled.
29675 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
29676 markers are enabled.
29677 (block_within_block_p, dwarf2out_inline_entry): New.
29678 (dwarf2out_finish): Check that no entries remained in
29679 inline_entry_data_table.
29680 * final.c (reemit_insn_block_notes): Handle inline entry notes.
29681 (final_scan_insn, notice_source_line): Likewise.
29682 (rest_of_clean_state): Skip inline entry markers.
29683 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
29685 * gimple.c (gimple_build_debug_inline_entry): New.
29686 * gimple.h (enum gimple_debug_subcode): Add
29687 GIMPLE_DEBUG_INLINE_ENTRY.
29688 (gimple_build_debug_inline_entry): Declare.
29689 (gimple_debug_inline_entry_p): New.
29690 (gimple_debug_nonbind_marker_p): Adjust.
29691 * insn-notes.def (INLINE_ENTRY): New.
29692 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
29693 inline entry marker notes.
29694 (print_insn): Likewise.
29695 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
29696 (INSN_DEBUG_MARKER_KIND): Likewise.
29697 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
29698 * tree-inline.c (expand_call_inline): Build and insert
29699 debug_inline_entry stmt.
29700 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
29701 inline entry blocks early, if nonbind markers are enabled.
29702 (dump_scope_block): Dump fragment info.
29703 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
29704 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
29705 (gimple_build_debug_inline_entry): New.
29706 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
29707 Enable/disable inline entry points too.
29708 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
29709 (DEBUG_INSN): Describe inline entry markers.
29711 * common.opt (gvariable-location-views): New.
29712 (gvariable-location-views=incompat5): New.
29713 * config.in: Rebuilt.
29714 * configure: Rebuilt.
29715 * configure.ac: Test assembler for view support.
29716 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
29717 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
29718 * dwarf2out.c (var_loc_view): New typedef.
29719 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
29720 (dwarf2out_locviews_in_attribute): New.
29721 (dwarf2out_locviews_in_loclist): New.
29722 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
29723 (enum dw_line_info_opcode): Add LI_adv_address.
29724 (struct dw_line_info_table): Add view.
29725 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
29726 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
29727 (zero_view_p): New variable.
29728 (ZERO_VIEW_P): New macro.
29729 (output_asm_line_debug_info): New.
29730 (struct var_loc_node): Add view.
29731 (add_AT_view_list, AT_loc_list): New.
29732 (add_var_loc_to_decl): Add view param. Test it against last.
29733 (new_loc_list): Add view params. Record them.
29734 (AT_loc_list_ptr): Handle loc and view lists.
29735 (view_list_to_loc_list_val_node): New.
29736 (print_dw_val): Handle dw_val_class_view_list.
29737 (size_of_die): Likewise.
29738 (value_format): Likewise.
29739 (loc_list_has_views): New.
29740 (gen_llsym): Set vl_symbol too.
29741 (maybe_gen_llsym, skip_loc_list_entry): New.
29742 (dwarf2out_maybe_output_loclist_view_pair): New.
29743 (output_loc_list): Output view list or entries too.
29744 (output_view_list_offset): New.
29745 (output_die): Handle dw_val_class_view_list.
29746 (output_dwarf_version): New.
29747 (output_compilation_unit_header): Use it.
29748 (output_skeleton_debug_sections): Likewise.
29749 (output_rnglists, output_line_info): Likewise.
29750 (output_pubnames, output_aranges): Update version comments.
29751 (output_one_line_info_table): Output view numbers in asm comments.
29752 (dw_loc_list): Determine current endview, pass it to new_loc_list.
29753 Call maybe_gen_llsym.
29754 (loc_list_from_tree_1): Adjust.
29755 (add_AT_location_description): Create view list attribute if
29756 needed, check it's absent otherwise.
29757 (convert_cfa_to_fb_loc_list): Adjust.
29758 (maybe_emit_file): Call output_asm_line_debug_info for test.
29759 (dwarf2out_var_location): Reset views as needed. Precompute
29760 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
29761 attribute. Set view.
29762 (new_line_info_table): Reset next view.
29763 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
29764 (dwarf2out_source_line): Likewise. Output view resets and labels to
29765 the assembler, or select appropriate line info opcodes.
29766 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
29767 (optimize_string_length): Catch it. Adjust.
29768 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
29769 dw_val_class_view_list, and remove it if no longer needed.
29770 (hash_loc_list): Hash view numbers.
29771 (loc_list_hasher::equal): Compare them.
29772 (optimize_location_lists): Check whether a view list symbol is
29773 needed, and whether the locview attribute is present, and
29774 whether they match. Remove the locview attribute if no longer
29776 (index_location_lists): Call skip_loc_list_entry for test.
29777 (dwarf2out_finish): Call output_asm_line_debug_info for test.
29778 Use output_dwarf_version.
29779 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
29780 (struct dw_val_node): Add val_view_list.
29781 * final.c (SEEN_NEXT_VIEW): New.
29782 (set_next_view_needed): New.
29783 (clear_next_view_needed): New.
29784 (maybe_output_next_view): New.
29785 (final_start_function): Rename to...
29786 (final_start_function_1): ... this. Take pointer to FIRST,
29787 add SEEN parameter. Emit param bindings in the initial view.
29788 (final_start_function): Reintroduce SEEN-less interface.
29789 (final): Rename to...
29790 (final_1): ... this. Take SEEN parameter. Output final pending
29791 next view at the end.
29792 (final): Reintroduce seen-less interface.
29793 (final_scan_insn): Output pending next view before switching
29794 sections or ending a block. Mark the next view as needed when
29795 outputting variable locations. Notify debug backend of section
29796 changes, and of location view changes.
29797 (rest_of_handle_final): Adjust.
29798 * toplev.c (process_options): Autodetect value for debug variable
29799 location views option. Warn on incompat5 without -gdwarf-5.
29800 * doc/invoke.texi (gvariable-location-views): New.
29801 (gvariable-location-views=incompat5): New.
29802 (gno-variable-location-views): New.
29804 2018-02-08 David Malcolm <dmalcolm@redhat.com>
29806 PR tree-optimization/84136
29807 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
29808 that the result of find_edge is non-NULL.
29810 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
29813 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
29814 storing integer register in SImode. Fix cost of 256 and 512
29815 byte aligned SSE register store.
29817 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
29819 * config/i386/i386.c (ix86_multiplication_cost): Fix
29820 multiplication cost for TARGET_AVX512DQ.
29822 2018-02-08 Marek Polacek <polacek@redhat.com>
29824 PR tree-optimization/84238
29825 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
29828 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
29830 PR tree-optimization/84265
29831 * tree-vect-stmts.c (vectorizable_store): Don't treat
29832 VMAT_CONTIGUOUS accesses as grouped.
29833 (vectorizable_load): Likewise.
29835 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
29837 PR tree-optimization/81635
29838 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
29839 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
29840 (test_round_for_mask): New functions.
29841 (wide_int_cc_tests): Call test_round_for_mask.
29842 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
29843 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
29844 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
29845 range returned by get_range_info.
29847 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
29850 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
29851 * symtab.c: Include builtins.h
29852 (symtab_node::output_to_lto_symbol_table_p): Move here
29853 from lto-streamer-out.c:output_symbol_p.
29854 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
29855 (output_symbol_p): Move all logic to symtab.c
29856 (produce_symtab): Update.
29858 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
29860 * config/s390/s390-opts.h (enum indirect_branch): Define.
29861 * config/s390/s390-protos.h (s390_return_addr_from_memory)
29862 (s390_indirect_branch_via_thunk)
29863 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
29864 (enum s390_indirect_branch_type): Define.
29865 * config/s390/s390.c (struct s390_frame_layout, struct
29866 machine_function): Remove.
29867 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
29868 (indirect_branch_table_label_no, indirect_branch_table_name):
29870 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
29871 (enum s390_indirect_branch_option): Define.
29872 (s390_return_addr_from_memory): New function.
29873 (s390_handle_string_attribute): New function.
29874 (s390_attribute_table): Add new attribute handler.
29875 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
29876 (s390_indirect_branch_via_thunk): New function.
29877 (s390_indirect_branch_via_inline_thunk): New function.
29878 (s390_function_ok_for_sibcall): When jumping via thunk disallow
29879 sibling call optimization for non z10 compiles.
29880 (s390_emit_call): Force indirect branch target to be a single
29881 register. Add r1 clobber for non-z10 compiles.
29882 (s390_emit_epilogue): Emit return jump via return_use expander.
29883 (s390_reorg): Handle JUMP_INSNs as execute targets.
29884 (s390_option_override_internal): Perform validity checks for the
29885 new command line options.
29886 (s390_indirect_branch_attrvalue): New function.
29887 (s390_indirect_branch_settings): New function.
29888 (s390_set_current_function): Invoke s390_indirect_branch_settings.
29889 (s390_output_indirect_thunk_function): New function.
29890 (s390_code_end): Implement target hook.
29891 (s390_case_values_threshold): Implement target hook.
29892 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
29894 * config/s390/s390.h (struct s390_frame_layout)
29895 (struct machine_function): Move here from s390.c.
29896 (TARGET_INDIRECT_BRANCH_NOBP_RET)
29897 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
29898 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
29899 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
29900 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
29901 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
29902 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
29903 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
29904 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
29905 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
29906 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
29907 (mnemonic attribute): Add values which aren't recognized
29909 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
29910 pattern for branch conversion. Fix mnemonic attribute.
29911 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
29912 indirect branch via thunk if requested.
29913 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
29914 ("*indirect_jump"): Disable for branch conversion using out of
29916 ("indirect_jump_via_thunk<mode>_z10")
29917 ("indirect_jump_via_thunk<mode>")
29918 ("indirect_jump_via_inlinethunk<mode>_z10")
29919 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
29920 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
29921 ("casesi_jump_via_inlinethunk<mode>_z10")
29922 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
29923 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
29924 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
29925 ("*indirect2_jump"): Disable for branch conversion.
29926 ("casesi_jump"): Turn into expander and expand patterns for branch
29928 ("return_use"): New expander.
29929 ("*return"): Emit return via thunk and rename it to ...
29930 ("*return<mode>"): ... this one.
29931 * config/s390/s390.opt: Add new options and and enum for the
29934 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
29936 * lra-constraints.c (match_reload): Unconditionally use
29937 gen_lowpart_SUBREG, rather than selecting between that
29938 and equivalent gen_rtx_SUBREG code.
29940 2018-02-08 Richard Biener <rguenther@suse.de>
29942 PR tree-optimization/84233
29943 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
29944 changed flag instead of boguously re-using phi_inserted.
29946 2018-02-08 Martin Jambor <mjambor@suse.cz>
29948 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
29949 static local variables.
29951 2018-02-08 Richard Biener <rguenther@suse.de>
29953 PR tree-optimization/84278
29954 * tree-vect-stmts.c (vectorizable_store): When looking for
29955 smaller vector types to perform grouped strided loads/stores
29956 make sure the mode is supported by the target.
29957 (vectorizable_load): Likewise.
29959 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
29961 * config/aarch64/aarch64.c (aarch64_components_for_bb):
29962 Increase LDP/STP opportunities by adding adjacent callee-saves.
29964 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
29966 PR rtl-optimization/84068
29967 PR rtl-optimization/83459
29968 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
29970 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
29972 PR tree-optimization/84224
29973 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
29974 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
29975 non-zero arguments.
29977 2018-02-07 Iain Sandoe <iain@codesourcery.com>
29980 * config/rs6000/altivec.md (*restore_world): Remove LR use.
29981 * config/rs6000/predicates.md (restore_world_operation): Adjust op
29982 count, remove one USE.
29984 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
29986 * doc/install.texi (Configuration): Document the
29987 --with-long-double-format={ibm,ieee} PowerPC configuration
29991 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
29992 Convert from define_expand to be define_insn_and_split. Rework
29993 float/double/_Float128 conversions to QI/HI/SImode to work with
29994 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
29995 conversions to QI/HImode types did a store and then a load to
29996 truncate the value. For conversions to VSX registers, don't split
29997 the insn, instead emit the code directly. Use the code iterator
29998 any_fix to combine signed and unsigned conversions.
29999 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
30000 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
30001 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
30002 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
30003 (fix_<mode>di2_hw): Likewise.
30004 (fixuns_<mode>di2_hw): Likewise.
30005 (fix_<mode>si2_hw): Likewise.
30006 (fixuns_<mode>si2_hw): Likewise.
30007 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
30008 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
30009 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
30010 fix<uns>_trunc<SFDF:mode>si2_p8.
30011 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
30012 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
30013 (fix<uns>_<mode>_mem): Likewise.
30014 (fctiw<u>z_<mode>_mem): Likewise.
30015 (fix<uns>_<mode>_mem): Likewise.
30016 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
30017 the register allocator from doing a direct move to the GPRs to do
30018 a store, and instead use the ISA 3.0 store byte/half-word from
30019 vector register instruction. For IEEE 128-bit floating point,
30020 also optimize stores of 32-bit ints.
30021 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
30023 2018-02-07 Alan Hayward <alan.hayward@arm.com>
30025 * genextract.c (push_pathstr_operand): New function to support
30027 (walk_rtx): Call push_pathstr_operand.
30028 (print_path): Support [a-zA-Z].
30030 2018-02-07 Richard Biener <rguenther@suse.de>
30032 PR tree-optimization/84037
30033 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
30034 (cse_and_gimplify_to_preheader): Declare.
30035 (vect_get_place_in_interleaving_chain): Likewise.
30036 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
30038 (_loop_vec_info::~_loop_vec_info): Delete it.
30039 (cse_and_gimplify_to_preheader): New function.
30040 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
30041 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
30042 (vectorizable_load): Likewise. For grouped stores always base
30043 the IV on the first element.
30044 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
30045 condition before gimplifying.
30047 2018-02-07 Jakub Jelinek <jakub@redhat.com>
30049 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
30050 *DIV_EXPR and *MOD_EXPR.
30052 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
30055 * config/i386/i386.c (ix86_option_override_internal): Mask out
30056 the CF_SET bit when checking -fcf-protection.
30058 2018-02-07 Tom de Vries <tom@codesourcery.com>
30061 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
30064 2018-02-07 Richard Biener <rguenther@suse.de>
30066 PR tree-optimization/84204
30067 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
30070 PR tree-optimization/84205
30071 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
30072 special-case isl_ast_op_zdiv_r.
30074 PR tree-optimization/84223
30075 * graphite-scop-detection.c (gather_bbs::before_dom_children):
30076 Only add conditions from within the region.
30077 (gather_bbs::after_dom_children): Adjust.
30079 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
30082 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
30083 * config/avr/avr.md: Only post-reload split REG-REG moves if
30084 either register is GENERAL_REG_P.
30086 2018-02-07 Jakub Jelinek <jakub@redhat.com>
30088 PR tree-optimization/84235
30089 * tree-ssa-scopedtables.c
30090 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
30091 if the subtraction is performed in floating point type where NaNs are
30092 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
30093 build 1. Formatting fix.
30095 2018-02-06 Jakub Jelinek <jakub@redhat.com>
30098 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
30099 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
30100 and skip it regardless of bb boundaries. Use CALL_P macro,
30101 don't test INSN_P (insn) together with CALL_P or JUMP_P check
30102 unnecessarily, formatting fix.
30104 2018-02-06 Michael Collison <michael.collison@arm.com>
30106 * config/arm/thumb2.md:
30107 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
30108 (*thumb_mov_notscc): Ditto.
30110 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
30113 * config/rs6000/rs6000.md (su code attribute): Use "u" for
30114 unsigned_fix, not "s".
30116 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30118 * configure.ac (gcc_fn_eh_frame_ro): New function.
30119 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
30120 correct .eh_frame permissions.
30121 * configure: Regenerate.
30123 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
30125 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
30126 irrelevant options.
30128 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30130 * config/rs6000/rs6000.c (rs6000_option_override_internal):
30131 Display warning message for -mno-speculate-indirect-jumps.
30133 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
30135 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
30137 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
30139 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
30141 PR tree-optimization/84225
30142 * tree-eh.c (find_trapping_overflow): Only call
30143 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
30145 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
30148 * config/i386/i386.c: Reimplement the check of possible options
30149 -mibt/-mshstk conbination. Change error messages.
30150 * doc/invoke.texi: Fix a typo: remove extra '='.
30152 2018-02-06 Marek Polacek <polacek@redhat.com>
30154 PR tree-optimization/84228
30155 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
30157 2018-02-06 Tamar Christina <tamar.christina@arm.com>
30160 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
30161 emitted arch directives.
30162 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
30163 __ARM_FEATURE_COPROC before changing architectures.
30165 2018-02-06 Richard Biener <rguenther@suse.de>
30167 * config/i386/i386.c (print_reg): Fix typo.
30168 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
30170 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
30172 * configure: Regenerate.
30174 2018-02-05 Martin Sebor <msebor@redhat.com>
30176 PR tree-optimization/83369
30177 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
30180 2018-02-05 Martin Liska <mliska@suse.cz>
30182 * doc/invoke.texi: Cherry-pick upstream r323995.
30184 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
30186 * ira.c (ira_init_register_move_cost): Adjust comment.
30188 2018-02-05 Martin Liska <mliska@suse.cz>
30190 PR gcov-profile/84137
30191 * doc/gcov.texi: Fix typo in documentation.
30193 2018-02-05 Martin Liska <mliska@suse.cz>
30195 PR gcov-profile/83879
30196 * doc/gcov.texi: Document necessity of --dynamic-list-data when
30197 using dlopen functionality.
30199 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
30201 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
30202 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
30203 _mm_maskz_range_ss, _mm_mask_range_round_ss,
30204 _mm_maskz_range_round_ss): New intrinsics.
30205 (__builtin_ia32_rangesd128_round)
30206 (__builtin_ia32_rangess128_round): Remove.
30207 (__builtin_ia32_rangesd128_mask_round,
30208 __builtin_ia32_rangess128_mask_round): New builtins.
30209 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
30210 __builtin_ia32_rangess128_round): Remove.
30211 (__builtin_ia32_rangesd128_mask_round,
30212 __builtin_ia32_rangess128_mask_round): New builtins.
30213 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
30214 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
30215 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
30216 "<round_saeonly_constraint>")): Changed to ...
30217 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
30218 "<round_saeonly_scalar_constraint>")): ... this.
30219 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
30220 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
30221 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
30222 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
30223 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
30225 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
30227 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
30229 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
30230 Remove all values except native, 8540 and 8548.
30232 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
30234 * config/i386/i386.c (ix86_output_function_return): Pass
30235 INVALID_REGNUM, instead of -1, as invalid register number to
30236 indirect_thunk_name and output_indirect_thunk.
30238 2018-02-02 Julia Koval <julia.koval@intel.com>
30240 * config.gcc: Add -march=icelake.
30241 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
30242 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
30243 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
30244 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
30245 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
30246 (processor_target_table): Add icelake.
30247 (ix86_option_override_internal): Handle new PTAs.
30248 (get_builtin_code_for_version): Handle icelake.
30249 (M_INTEL_COREI7_ICELAKE): New.
30250 (fold_builtin_cpu): Handle icelake.
30251 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
30252 * doc/invoke.texi: Add -march=icelake.
30254 2018-02-02 Julia Koval <julia.koval@intel.com>
30256 * config/i386/i386.c (ix86_option_override_internal): Change flags type
30257 to wide_int_bitmask.
30258 * wide-int-bitmask.h: New.
30260 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
30263 * config/i386/i386.md: Replace Pmode with word_mode in
30264 builtin_setjmp_setup and builtin_longjmp to support x32.
30266 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
30270 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
30272 (rs6000_supported_cpu_names): New static variable.
30273 (linux_cpu_translation_table): Likewise.
30274 (elf_platform) <cpu>: Define new static variable and use it.
30275 Translate kernel AT_PLATFORM name to canonical name if needed.
30276 Error if platform name is unknown.
30278 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
30281 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
30283 2018-02-01 Jeff Law <law@redhat.com>
30286 * config/i386/i386.c (release_scratch_register_on_entry): Add new
30287 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
30288 the scratch if RELEASE_VIA_POP is false.
30289 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
30290 If we have to save a temporary register, decrement SIZE appropriately.
30291 Pass new arguments to release_scratch_register_on_entry.
30292 (ix86_adjust_stack_and_probe): Likewise.
30293 (ix86_emit_probe_stack_range): Pass new arguments to
30294 release_scratch_register_on_entry.
30296 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
30298 PR rtl-optimization/84157
30299 * combine.c (change_zero_ext): Use REG_P predicate in
30300 front of HARD_REGISTER_P predicate.
30302 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
30304 * config/avr/avr.c (avr_option_override): Move disabling of
30305 -fdelete-null-pointer-checks to...
30306 * common/config/avr/avr-common.c (avr_option_optimization_table):
30309 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30311 PR tree-optimization/81635
30312 * tree-data-ref.c (split_constant_offset_1): For types that
30313 wrap on overflow, try to use range info to prove that wrapping
30316 2018-02-01 Renlin Li <renlin.li@arm.com>
30319 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
30320 TAILCALL_ADDR_REGS.
30321 (aarch64_register_move_cost): Likewise.
30322 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
30323 TAILCALL_ADDR_REGS.
30324 (REG_CLASS_NAMES): Likewise.
30325 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
30326 TAILCALL_ADDR_REGS. Remove IP registers.
30327 * config/aarch64/aarch64.md (Ucs): Update register constraint.
30329 2018-02-01 Richard Biener <rguenther@suse.de>
30331 * domwalk.h (dom_walker::dom_walker): Add additional constructor
30332 for specifying RPO order and allow NULL for that.
30333 * domwalk.c (dom_walker::dom_walker): Likewise.
30334 (dom_walker::walk): Handle NULL RPO order.
30335 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
30337 (rewrite_update_dom_walker): Likewise.
30338 (mark_def_dom_walker): Likewise.
30340 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30342 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
30343 (aarch64_maybe_expand_sve_subreg_move): Declare.
30344 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
30345 * config/aarch64/predicates.md (aarch64_any_register_operand): New
30347 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
30348 that are semantically a reverse operation.
30349 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
30350 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
30351 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
30353 (aarch64_can_change_mode_class): For big-endian, forbid changes
30354 between two SVE modes if they have different element sizes.
30356 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30358 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
30359 the TImode handling for big-endian targets.
30361 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30363 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
30364 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
30366 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
30367 Remove BSWAP handing for big-endian targets and use the form of
30368 LD1RQ appropariate for the mode.
30370 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30372 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
30373 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
30374 duplicated element.
30376 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30379 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
30380 check for operands that need to go through aarch64_sve_reload_be.
30382 2018-02-01 Jakub Jelinek <jakub@redhat.com>
30384 PR tree-optimization/81661
30385 PR tree-optimization/84117
30386 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
30387 * tree-eh.c: Include gimplify.h.
30388 (find_trapping_overflow, replace_trapping_overflow,
30389 rewrite_to_non_trapping_overflow): New functions.
30390 * tree-vect-loop.c: Include tree-eh.h.
30391 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
30392 * tree-data-ref.c: Include tree-eh.h.
30393 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
30395 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
30397 PR rtl-optimization/84123
30398 * combine.c (change_zero_ext): Check if hard register satisfies
30399 can_change_dest_mode before calling gen_lowpart_SUBREG.
30401 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
30404 * ira.c (ira_init_register_move_cost): Remove assert.
30406 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
30408 PR rtl-optimization/84071
30409 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
30410 * doc/tm.texi: Regenerate.
30412 2018-01-31 Richard Biener <rguenther@suse.de>
30414 PR tree-optimization/84132
30415 * tree-data-ref.c (analyze_miv_subscript): Properly
30416 check whether evolution_function_is_affine_multivariate_p
30417 before calling gcd_of_steps_may_divide_p.
30419 2018-01-31 Julia Koval <julia.koval@intel.com>
30422 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
30423 * config/i386/i386.md (rdpid_rex64) New.
30424 (rdpid): Make 32bit only.
30426 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
30429 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
30430 an IDENTIFIER_NODE for FUNCTION_TYPE's.
30432 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
30435 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
30437 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
30439 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
30441 PR rtl-optimization/84071
30442 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
30443 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
30445 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
30447 * config/arc/arc.c (arc_handle_aux_attribute): New function.
30448 (arc_attribute_table): Add 'aux' attribute.
30449 (arc_in_small_data_p): Consider aux like variables.
30450 (arc_is_aux_reg_p): New function.
30451 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
30452 (arc_get_aux_arg): New function.
30453 (prepare_move_operands): Handle aux-register access.
30454 (arc_handle_aux_attribute): New function.
30455 * doc/extend.texi (ARC Variable attributes): Add subsection.
30457 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
30459 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
30460 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
30461 (arc_attribute_table): Add 'uncached' attribute.
30462 (arc_print_operand): Print '.di' flag for uncached memory
30464 (arc_in_small_data_p): Do not consider for small data the uncached
30466 (arc_is_uncached_mem_p): New function.
30467 * config/arc/predicates.md (compact_store_memory_operand): Check
30468 for uncached memory accesses.
30469 (nonvol_nonimm_operand): Likewise.
30470 * doc/extend.texi (ARC Type Attribute): New subsection.
30472 2018-01-31 Jakub Jelinek <jakub@redhat.com>
30475 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
30476 falign-loops=): Add Optimization flag.
30478 2018-01-30 Jeff Law <law@redhat.com>
30481 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
30482 INT_REGISTERS_SAVED. Check it prior to calling
30483 get_scratch_register_on_entry.
30484 (ix86_adjust_stack_and_probe): Similarly.
30485 (ix86_emit_probe_stack_range): Similarly.
30486 (ix86_expand_prologue): Corresponding changes.
30488 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30491 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
30492 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
30494 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
30497 * lra-constraints.c (curr_insn_transform): Process AND in the
30500 2018-01-30 Jakub Jelinek <jakub@redhat.com>
30502 PR rtl-optimization/83986
30503 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
30504 dependence against last_pending_memory_flush in addition to
30505 pending_jump_insns.
30507 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
30509 PR tree-optimization/81611
30510 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
30513 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30516 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
30519 2018-01-30 Richard Biener <rguenther@suse.de>
30520 Jakub Jelinek <jakub@redhat.com>
30522 PR tree-optimization/84111
30523 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
30524 inner loops added during recursion, as they don't have up-to-date
30527 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
30530 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
30531 (can_inline_edge_by_limits_p): ... here.
30532 (can_early_inline_edge_p, check_callers,
30533 update_caller_keys, update_callee_keys, recursive_inlining,
30534 add_new_edges_to_heap, speculation_useful_p,
30535 inline_small_functions,
30536 inline_small_functions, flatten_function,
30537 inline_to_all_callers_1): Update.
30539 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
30541 * profile-count.c (profile_count::combine_with_ipa_count): Handle
30544 2018-01-30 Richard Biener <rguenther@suse.de>
30546 PR tree-optimization/83008
30547 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
30548 invariant and constant vector uses in stmts when they need
30549 more than one stmt.
30551 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30554 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
30555 * configure: Regenerate.
30557 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
30559 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
30561 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
30562 Use gen_rtx_REG rather than gen_lowpart.
30564 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
30566 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
30567 rather than 0 when creating partial subregs.
30569 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
30571 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
30574 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
30577 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
30578 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
30579 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
30580 flags. This restores the settings used before the 2017-07-24.
30581 Turning off pre increment/decrement/modify allows IVOPTS to
30582 optimize DF/SF loops where the index is an int.
30584 2018-01-29 Richard Biener <rguenther@suse.de>
30585 Kelvin Nilsen <kelvin@gcc.gnu.org>
30588 * tree-vect-stmts.c (vectorizable_call): Don't call
30589 targetm.vectorize_builtin_md_vectorized_function if callee is
30592 2018-01-22 Carl Love <cel@us.ibm.com>
30594 * doc/extend.tex: Fix typo in second arg in
30595 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
30597 2018-01-29 Richard Biener <rguenther@suse.de>
30599 PR tree-optimization/84086
30600 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
30601 (flush_ssaname_freelist): When SSA names were released reset
30602 the SCEV hash table.
30604 2018-01-29 Richard Biener <rguenther@suse.de>
30606 PR tree-optimization/84057
30607 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
30608 removed paths when removing edges.
30610 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
30612 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
30613 -mfunction-return=@var{choice}.
30615 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
30617 PR diagnostic/84034
30618 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
30619 Handle CR like TAB.
30620 (layout::print_source_line): Likewise.
30621 (test_get_line_width_without_trailing_whitespace): Add test cases.
30623 2018-01-27 Jakub Jelinek <jakub@redhat.com>
30625 PR middle-end/84040
30626 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
30629 2018-01-26 Jim Wilson <jimw@sifive.com>
30631 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
30633 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
30636 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30638 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
30639 and CMP + SUB-immediate -> SUBS.
30641 2018-01-26 Martin Sebor <msebor@redhat.com>
30643 PR tree-optimization/83896
30644 * tree-ssa-strlen.c (get_string_len): Rename...
30645 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
30646 Avoid assuming length is constant.
30647 (handle_char_store): Use HOST_WIDE_INT for string length.
30649 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
30652 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
30653 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
30655 2018-01-26 Richard Biener <rguenther@suse.de>
30657 PR rtl-optimization/84003
30658 * dse.c (record_store): Only record redundant stores when
30659 the earlier store aliases at least all accesses the later one does.
30661 2018-01-26 Jakub Jelinek <jakub@redhat.com>
30663 PR rtl-optimization/83985
30664 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
30665 REG_CFA_RESTORE insns.
30666 (delete_unmarked_insns): Don't ignore separate shrink wrapping
30667 REG_CFA_RESTORE insns here.
30670 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
30671 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
30673 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30675 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
30676 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
30677 (arc_init): Likewise.
30678 (arc_override_options): Likewise.
30679 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
30681 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
30683 * config/arc/arc.h (TARGET_DBNZ): Define.
30684 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
30685 properly set the tune attribute.
30686 (dbnz): Use TARGET_DBNZ guard.
30687 * config/arc/arc.opt (mtune): Add core3 option.
30689 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30691 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
30692 recognize new pic like addresses.
30693 (arc_delegitimize_address): Clean up.
30695 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30697 * config/arc/arc-arches.def: Option mrf16 valid for all
30699 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
30700 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
30701 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
30702 * config/arc/arc-tables.opt: Regenerate.
30703 * config/arc/arc.c (arc_conditional_register_usage): Handle
30704 reduced register file case.
30705 (arc_file_start): Set must have build attributes.
30706 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
30707 mrf16 option value.
30708 * config/arc/arc.opt (mrf16): Add new option.
30709 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
30710 * config/arc/genmultilib.awk: Handle new mrf16 option.
30711 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
30712 * config/arc/t-multilib: Regenerate.
30713 * doc/invoke.texi (ARC Options): Document mrf16 option.
30715 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30717 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
30718 * config/arc/arc.c (arc_handle_secure_attribute): New function.
30719 (arc_attribute_table): Add 'secure_call' attribute.
30720 (arc_print_operand): Print secure call operand.
30721 (arc_function_ok_for_sibcall): Don't optimize tail calls when
30723 (arc_is_secure_call_p): New function. * config/arc/arc.md
30724 (call_i): Add support for sjli instruction.
30725 (call_value_i): Likewise.
30726 * config/arc/constraints.md (Csc): New constraint.
30728 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30729 John Eric Martin <John.Martin@emmicro-us.com>
30731 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
30732 * config/arc/arc.c (_arc_jli_section): New struct.
30733 (arc_jli_section): New type.
30734 (rc_jli_sections): New static variable.
30735 (arc_handle_jli_attribute): New function.
30736 (arc_attribute_table): Add jli_always and jli_fixed attribute.
30737 (arc_file_end): New function.
30738 (TARGET_ASM_FILE_END): Define.
30739 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
30740 (arc_add_jli_section): New function.
30741 (jli_call_scan): Likewise.
30742 (arc_reorg): Call jli_call_scan.
30743 (arc_output_addsi): Remove 'S' from printing asm operand.
30744 (arc_is_jli_call_p): New function.
30745 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
30747 (movhi_insn): Likewise.
30748 (movsi_insn): Likewise.
30749 (movsi_set_cc_insn): Likewise.
30750 (loadqi_update): Likewise.
30751 (load_zeroextendqisi_update): Likewise.
30752 (load_signextendqisi_update): Likewise.
30753 (loadhi_update): Likewise.
30754 (load_zeroextendhisi_update): Likewise.
30755 (load_signextendhisi_update): Likewise.
30756 (loadsi_update): Likewise.
30757 (loadsf_update): Likewise.
30758 (movsicc_insn): Likewise.
30759 (bset_insn): Likewise.
30760 (bxor_insn): Likewise.
30761 (bclr_insn): Likewise.
30762 (bmsk_insn): Likewise.
30763 (bicsi3_insn): Likewise.
30764 (cmpsi_cc_c_insn): Likewise.
30765 (movsi_ne): Likewise.
30766 (movsi_cond_exec): Likewise.
30767 (clrsbsi2): Likewise.
30768 (norm_f): Likewise.
30778 (call_i): Remove 'S' asm letter, add jli instruction.
30779 (call_value_i): Likewise.
30780 * config/arc/arc.op (mjli-always): New option.
30781 * config/arc/constraints.md (Cji): New constraint.
30782 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
30784 (subsf3_fpx): Likewise.
30785 (mulsf3_fpx): Likewise.
30786 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
30788 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
30789 function attrbutes.
30790 * doc/invoke.texi (ARC): Document mjli-always option.
30792 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
30794 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
30795 avoid addition with 0 and use incw and decw where possible.
30797 2018-01-26 Richard Biener <rguenther@suse.de>
30799 PR tree-optimization/81082
30800 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
30801 association if it requires casting to unsigned.
30802 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
30803 from fold_plusminus_mult_expr to catch important cases late when
30804 range info is available.
30806 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30808 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
30809 * configure.ac (hidden_linkonce): New test.
30810 * configure: Regenerate.
30811 * config.in: Regenerate.
30813 2018-01-26 Julia Koval <julia.koval@intel.com>
30815 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
30816 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
30817 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
30818 _mm_mask_bitshuffle_epi64_mask): Fix type.
30819 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
30820 USI_FTYPE_V4DI_V4DI_USI): Remove.
30821 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
30822 __builtin_ia32_vpshufbitqmb256_mask,
30823 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
30824 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
30825 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
30827 2018-01-26 Alan Modra <amodra@gmail.com>
30830 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
30831 UNSPEC_VBPERMQ. Sort other unspecs.
30833 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
30835 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
30837 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
30839 PR middle-end/83055
30840 * predict.c (drop_profile): Do not push/pop cfun; update also
30842 (handle_missing_profiles): Fix logic looking for zero profiles.
30844 2018-01-25 Jakub Jelinek <jakub@redhat.com>
30846 PR middle-end/83977
30847 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
30848 on functions with #pragma omp declare simd or functions with simd
30850 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
30851 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
30852 Remove trailing \n from warning_at calls.
30854 2018-01-25 Tom de Vries <tom@codesourcery.com>
30857 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
30858 for neutered workers.
30860 2018-01-24 Joseph Myers <joseph@codesourcery.com>
30863 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
30864 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
30866 2018-01-24 Jeff Law <law@redhat.com>
30869 * i386.c (get_probe_interval): Move to earlier point.
30870 (ix86_compute_frame_layout): If -fstack-clash-protection and
30871 the frame is larger than the probe interval, then use pushes
30872 to save registers rather than reg->mem moves.
30873 (ix86_expand_prologue): Remove conditional for int_registers_saved
30876 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
30879 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
30880 min/max for never referenced object.
30882 2018-01-24 Jakub Jelinek <jakub@redhat.com>
30884 PR middle-end/83977
30885 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
30887 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
30888 attributes from DECL_ATTRIBUTES (decl) without affecting
30889 DECL_ATTRIBUTES (current_function_decl).
30890 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
30891 functions with non-NULL DECL_ABSTRACT_ORIGIN.
30893 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
30895 PR tree-optimization/83979
30896 * fold-const.c (fold_comparison): Use constant_boolean_node
30897 instead of boolean_{true,false}_node.
30899 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
30901 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
30904 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30906 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
30907 Simplify the clause that sets the length attribute.
30908 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
30909 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
30910 clause that sets the length attribute.
30911 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
30913 2018-01-24 Tom de Vries <tom@codesourcery.com>
30916 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
30917 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
30918 Add strict parameter.
30919 (prevent_branch_around_nothing): Insert dummy insn between branch to
30920 label and label with no ptx insn inbetween.
30921 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
30923 2018-01-24 Tom de Vries <tom@codesourcery.com>
30926 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
30927 for neutered threads in warp.
30928 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
30930 2018-01-24 Richard Biener <rguenther@suse.de>
30932 PR tree-optimization/83176
30933 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
30936 2018-01-24 Richard Biener <rguenther@suse.de>
30938 PR tree-optimization/82819
30939 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
30940 code generating pluses that are no-ops in the target precision.
30942 2018-01-24 Richard Biener <rguenther@suse.de>
30944 PR middle-end/84000
30945 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
30947 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
30949 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
30950 to merge probabilities.
30951 * predict.c (probably_never_executed): Also mark as cold functions
30952 with global 0 profile and guessed local profile.
30953 * profile-count.c (profile_probability::combine_with_count): New
30955 * profile-count.h (profile_probability::operator*,
30956 profile_probability::operator*=, profile_probability::operator/,
30957 profile_probability::operator/=): Reduce precision to adjusted
30958 and set value to guessed on contradictory divisions.
30959 (profile_probability::combine_with_freq): Remove.
30960 (profile_probability::combine_wiht_count): Declare.
30961 (profile_count::force_nonzero):: Set to adjusted.
30962 (profile_count::probability_in):: Set quality to adjusted.
30963 * tree-ssa-tail-merge.c (replace_block_by): Use
30964 combine_with_count.
30966 2018-01-23 Andrew Waterman <andrew@sifive.com>
30967 Jim Wilson <jimw@sifive.com>
30969 * config/riscv/riscv.c (riscv_stack_boundary): New.
30970 (riscv_option_override): Set riscv_stack_boundary. Handle
30971 riscv_preferred_stack_boundary_arg.
30972 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
30973 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
30974 (STACK_BOUNDARY): Set to riscv_stack_boundary.
30975 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
30976 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
30977 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
30979 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
30982 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
30983 of struct ix86_frame.
30984 (ix86_expand_epilogue): Likewise. Add a local variable for
30985 the reg_save_offset field in struct ix86_frame.
30987 2018-01-23 Bin Cheng <bin.cheng@arm.com>
30989 PR tree-optimization/82604
30990 * tree-loop-distribution.c (enum partition_kind): New enum item
30991 PKIND_PARTIAL_MEMSET.
30992 (partition_builtin_p): Support above new enum item.
30993 (generate_code_for_partition): Ditto.
30994 (compute_access_range): Differentiate cases that equality can be
30995 proven at all loops, the innermost loops or no loops.
30996 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
30997 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
30998 (finalize_partitions, distribute_loop): Don't fuse partition of
30999 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
31000 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
31001 parloop is enabled.
31003 2018-01-23 Martin Liska <mliska@suse.cz>
31005 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
31006 order to ignore the predictor.
31007 (PRED_POLYMORPHIC_CALL): Likewise.
31008 (PRED_RECURSIVE_CALL): Likewise.
31010 2018-01-23 Martin Liska <mliska@suse.cz>
31012 * tree-profile.c (tree_profiling): Print function header to
31013 aware reader which function we are working on.
31014 * value-prof.c (gimple_find_values_to_profile): Do not print
31015 not interesting value histograms.
31017 2018-01-23 Martin Liska <mliska@suse.cz>
31019 * profile-count.h (enum profile_quality): Add
31020 profile_uninitialized as the first value. Do not number values
31021 as they are zero based.
31022 (profile_count::verify): Update sanity check.
31023 (profile_probability::verify): Likewise.
31025 2018-01-23 Nathan Sidwell <nathan@acm.org>
31027 * doc/invoke.texi (ffor-scope): Deprecate.
31029 2018-01-23 David Malcolm <dmalcolm@redhat.com>
31031 PR tree-optimization/83510
31032 * domwalk.c (set_all_edges_as_executable): New function.
31033 (dom_walker::dom_walker): Convert bool param
31034 "skip_unreachable_blocks" to enum reachability. Move setup of
31035 edge flags to set_all_edges_as_executable and only do it when
31036 reachability is REACHABLE_BLOCKS.
31037 * domwalk.h (enum dom_walker::reachability): New enum.
31038 (dom_walker::dom_walker): Convert bool param
31039 "skip_unreachable_blocks" to enum reachability.
31040 (set_all_edges_as_executable): New decl.
31041 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
31042 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
31044 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
31045 but converting true to REACHABLE_BLOCKS.
31046 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
31048 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
31049 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
31050 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
31052 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
31053 if check_all_array_refs will be called.
31055 2018-01-23 David Malcolm <dmalcolm@redhat.com>
31057 * tree.c (selftest::test_location_wrappers): Add more test
31060 2018-01-23 David Malcolm <dmalcolm@redhat.com>
31062 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
31063 (selftest::test_bit_in_range): Likewise.
31065 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
31068 * doc/sourcebuild.texi (vect_float): Say that the selector
31069 only describes the situation when -funsafe-math-optimizations is on.
31070 (vect_float_strict): Document.
31072 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
31074 PR tree-optimization/83965
31075 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
31076 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
31077 instead of checking only for a reduction.
31078 (vect_recog_widen_sum_pattern): Likewise.
31080 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
31082 * predict.c (probably_never_executed): Only use precise profile info.
31083 (compute_function_frequency): Skip after inlining hack since we now
31084 have quality checking.
31086 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
31088 * profile-count.h (profile_probability::very_unlikely,
31089 profile_probability::unlikely, profile_probability::even): Set
31090 precision to guessed.
31092 2018-01-23 Richard Biener <rguenther@suse.de>
31094 PR tree-optimization/83963
31095 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
31096 Properly terminate dominator walk when crossing the exit edge not
31097 when visiting its source block.
31099 2018-01-23 Jakub Jelinek <jakub@redhat.com>
31102 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
31103 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
31105 2018-01-22 Jakub Jelinek <jakub@redhat.com>
31107 PR tree-optimization/83957
31108 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
31109 semicolon after for body surrounded by braces.
31111 PR tree-optimization/83081
31112 * profile-count.h (profile_probability::split): New method.
31113 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
31114 Use profile_probability::split.
31115 (do_compare_rtx_and_jump): Fix adjustment of probabilities
31116 when splitting a single conditional jump into 2.
31118 2018-01-22 David Malcolm <dmalcolm@redhat.com>
31120 PR tree-optimization/69452
31121 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
31124 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31126 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
31127 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
31128 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
31130 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31132 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
31134 * config/rl78/rl78.md (movdi): New define_expand.
31135 * config/rl78/rl78.c (rl78_split_movdi): New function.
31137 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
31140 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
31142 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
31143 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
31144 128-bit to produce an UNSPEC move to get the double word with the
31145 signbit and then a shift directly to do signbit.
31146 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
31147 implementation with a new version that just does either a direct
31148 move or a regular move. Move memory interface to separate insns.
31149 Move insns so they are next to the expander.
31150 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
31151 with signbit move. Split big and little endian case.
31152 (signbit<mode>2_dm_mem_le): Likewise.
31153 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
31154 (signbit<mode>2_dm2): Likewise.
31156 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31158 * config/rl78/rl78.md (anddi3): New define_expand.
31160 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31162 * config/rl78/rl78.md (umindi3): New define_expand.
31164 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31166 * config/rl78/rl78.md (smindi3): New define_expand.
31168 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31170 * config/rl78/rl78.md (smaxdi3): New define_expand.
31172 2018-01-22 Carl Love <cel@us.ibm.com>
31174 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
31175 LVX_V1TI): Add macro expansion.
31176 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
31177 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
31178 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
31179 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
31180 Change check to determine if the instruction is a byte reversing
31181 entry. Fix typo in comment.
31182 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
31183 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
31184 Add def_builtin calls for new builtins.
31185 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
31186 Add define_insn expansion.
31188 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31190 * config/rl78/rl78.md (umaxdi3): New define_expand.
31192 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31194 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
31195 for non-QImode registers.
31197 2018-01-22 Richard Biener <rguenther@suse.de>
31199 PR tree-optimization/83963
31200 * graphite-scop-detection.c (scop_detection::get_sese): Delay
31201 including the loop exit block.
31202 (scop_detection::merge_sese): Likewise.
31203 (scop_detection::add_scop): Do it here instead.
31205 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31207 * doc/sourcebuild.texi (arm_softfloat): Document.
31209 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
31212 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
31213 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
31214 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
31216 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31217 David Edelsohn <dje.gcc@gmail.com>
31220 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
31221 Change "crset eq" to "crset 2".
31222 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
31223 (*call_indirect_aix<mode>_nospec): Likewise.
31224 (*call_value_indirect_aix<mode>_nospec): Likewise.
31225 (*call_indirect_elfv2<mode>_nospec): Likewise.
31226 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
31227 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
31228 change assembly output from . to $.
31229 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
31230 (indirect_jump<mode>_nospec): Change assembly output from . to $.
31231 (*tablejump<mode>_internal1_nospec): Likewise.
31233 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
31236 * config/sh/sh_optimize_sett_clrt.cc:
31237 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
31239 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
31241 PR tree-optimization/83940
31242 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
31243 offset_dt to vect_constant_def rather than vect_unknown_def_type.
31244 (vect_check_load_store_mask): Add a mask_dt_out parameter and
31245 use it to pass back the definition type.
31246 (vect_check_store_rhs): Likewise rhs_dt_out.
31247 (vect_build_gather_load_calls): Add a mask_dt argument and use
31248 it instead of a call to vect_is_simple_use.
31249 (vectorizable_store): Update calls to vect_check_load_store_mask
31250 and vect_check_store_rhs. Use the dt returned by the latter instead
31251 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
31252 instead of calls to vect_is_simple_use. Pass the scalar rather
31253 than the vector operand to vect_is_simple_use when handling
31254 second and subsequent copies of an rhs value.
31255 (vectorizable_load): Update calls to vect_check_load_store_mask
31256 and vect_build_gather_load_calls. Use the cached mask_dt and
31257 gs_info.offset_dt instead of calls to vect_is_simple_use.
31259 2018-01-20 Jakub Jelinek <jakub@redhat.com>
31261 PR middle-end/83945
31262 * tree-emutls.c: Include gimplify.h.
31263 (lower_emutls_2): New function.
31264 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
31265 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
31266 it before further processing.
31269 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
31270 UINTVAL (trueop1) instead of INTVAL (op1).
31272 2018-01-19 Jakub Jelinek <jakub@redhat.com>
31276 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
31277 INCOMING_FRAME_SP_OFFSET if not defined.
31278 (scan_trace): Add ENTRY argument. If true and
31279 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
31280 emit a note to adjust the CFA offset.
31281 (create_cfi_notes): Adjust scan_trace callers.
31282 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
31283 INCOMING_FRAME_SP_OFFSET in the CIE.
31284 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
31285 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
31287 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
31288 * doc/tm.texi: Regenerated.
31290 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
31292 PR rtl-optimization/83147
31293 * lra-constraints.c (remove_inheritance_pseudos): Use
31294 lra_substitute_pseudo_within_insn.
31296 2018-01-19 Tom de Vries <tom@codesourcery.com>
31297 Cesar Philippidis <cesar@codesourcery.com>
31300 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
31302 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
31305 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
31306 spaces for function labels.
31308 2018-01-19 Martin Liska <mliska@suse.cz>
31310 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
31311 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
31312 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
31313 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
31314 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
31315 (PRED_CONST_RETURN): Change from 69 to 65.
31316 (PRED_NULL_RETURN): Change from 91 to 71.
31317 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
31318 (PRED_LOOP_GUARD): Change from 66 to 73.
31320 2018-01-19 Martin Liska <mliska@suse.cz>
31322 * predict.c (predict_insn_def): Add new assert.
31323 (struct branch_predictor): Change type to signed integer.
31324 (test_prediction_value_range): Amend test to cover
31325 PROB_UNINITIALIZED.
31326 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
31327 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
31328 (PRED_LOOP_ITERATIONS_MAX): Likewise.
31329 (PRED_LOOP_IV_COMPARE): Likewise.
31330 * predict.h (PROB_UNINITIALIZED): Define new constant.
31332 2018-01-19 Martin Liska <mliska@suse.cz>
31334 * predict.c (dump_prediction): Add new format for
31335 analyze_brprob.py script which is enabled with -details
31337 * profile-count.h (precise_p): New function.
31339 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
31341 PR tree-optimization/83922
31342 * tree-vect-loop.c (vect_verify_full_masking): Return false if
31343 there are no statements that need masking.
31344 (vect_active_double_reduction_p): New function.
31345 (vect_analyze_loop_operations): Use it when handling phis that
31346 are not in the loop header.
31348 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
31350 PR tree-optimization/83914
31351 * tree-vect-loop.c (vectorizable_induction): Don't convert
31352 init_expr or apply the peeling adjustment for inductions
31353 that are nested within the vectorized loop.
31355 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31357 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
31360 2018-01-18 Jakub Jelinek <jakub@redhat.com>
31364 * function.h (gimplify_parameters): Add gimple_seq * argument.
31365 * function.c: Include gimple.h and options.h.
31366 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
31367 for the added local temporaries if needed.
31368 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
31369 if there are any parameter cleanups, wrap whole body into a
31370 try/finally with the cleanups.
31372 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
31375 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
31376 Use GET_MODE_CLASS for scalar floating point.
31378 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
31382 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
31383 Fix call of call_cgraph_insertion_hooks.
31385 2018-01-18 Martin Sebor <msebor@redhat.com>
31387 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
31389 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
31392 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
31395 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
31398 * common.opt: (-ffile-prefix-map): New option.
31399 * opts.c (common_handle_option): Defer it.
31400 * opts-global.c (handle_common_deferred_options): Handle it.
31401 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
31402 * file-prefix-map.h: New file.
31403 (remap_debug_filename, add_debug_prefix_map): ...here.
31404 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
31405 * final.c (debug_prefix_map, add_debug_prefix_map
31406 remap_debug_filename): Move to...
31407 * file-prefix-map.c: New file.
31408 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
31409 generalize, get rid of alloca(), use strrchr() instead of strchr().
31410 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
31411 Implement in terms of add_prefix_map().
31412 (remap_macro_filename, remap_debug_filename): Implement in term of
31414 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
31415 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
31416 * dbxout.c: Include file-prefix-map.h.
31417 * varasm.c: Likewise.
31418 * vmsdbgout.c: Likewise.
31419 * xcoffout.c: Likewise.
31420 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
31421 * doc/cppopts.texi (-fmacro-prefix-map): Document.
31422 * doc/invoke.texi (-ffile-prefix-map): Document.
31423 (-fdebug-prefix-map): Update description.
31425 2018-01-18 Martin Liska <mliska@suse.cz>
31427 * config/i386/i386.c (indirect_thunk_name): Document that also
31429 (output_indirect_thunk): Document why both instructions
31430 (pause and lfence) are generated.
31432 2018-01-18 Richard Biener <rguenther@suse.de>
31434 PR tree-optimization/83887
31435 * graphite-scop-detection.c
31436 (scop_detection::get_nearest_dom_with_single_entry): Remove.
31437 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
31438 (scop_detection::merge_sese): Re-implement with a flood-fill
31439 algorithm that properly finds a SESE region if it exists.
31441 2018-01-18 Jakub Jelinek <jakub@redhat.com>
31444 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
31445 pointer_diff optimizations use view_convert instead of convert.
31447 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31449 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
31450 Generate different code for -mno-speculate-indirect-jumps.
31451 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
31452 (*call_indirect_aix<mode>): Disable for
31453 -mno-speculate-indirect-jumps.
31454 (*call_indirect_aix<mode>_nospec): New define_insn.
31455 (*call_value_indirect_aix<mode>): Disable for
31456 -mno-speculate-indirect-jumps.
31457 (*call_value_indirect_aix<mode>_nospec): New define_insn.
31458 (*sibcall_nonlocal_sysv<mode>): Generate different code for
31459 -mno-speculate-indirect-jumps.
31460 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
31462 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
31464 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
31465 long double type, set the flags for noting the default long double
31466 type, even if we don't pass or return a long double type.
31468 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
31471 * ipa-inline.c (flatten_function): Do not overwrite final inlining
31474 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
31476 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
31477 support for merge[hl].
31478 (fold_mergehl_helper): New helper function.
31479 (tree-vector-builder.h): New #include for tree_vector_builder usage.
31480 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
31481 (altivec_vmrglw_direct): Add xxmrglw insn.
31483 2018-01-17 Andrew Waterman <andrew@sifive.com>
31485 * config/riscv/riscv.c (riscv_conditional_register_usage): If
31486 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
31488 2018-01-17 David Malcolm <dmalcolm@redhat.com>
31491 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
31492 call the lto_location_cache before reading the
31493 DECL_SOURCE_LOCATION of the types.
31495 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
31496 Richard Sandiford <richard.sandiford@linaro.org>
31498 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
31499 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
31500 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
31501 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
31502 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
31504 * config/aarch64/constraints.md (aarch64_movti_operand):
31506 * config/aarch64/predicates.md (Uti): Add new constraint.
31508 2018-01-17 Carl Love <cel@us.ibm.com>
31510 * config/rs6000/vsx.md (define_expand xl_len_r,
31511 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
31512 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
31514 (define_expand, define_insn): Move the shift left from the
31515 define_insn to the define_expand for lxvl and stxvl instructions.
31516 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
31517 and XL_LEN_R definitions to PURE.
31519 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
31521 * config/i386/i386.c (indirect_thunk_name): Declare regno
31522 as unsigned int. Compare regno with INVALID_REGNUM.
31523 (output_indirect_thunk): Ditto.
31524 (output_indirect_thunk_function): Ditto.
31525 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
31526 in the call to output_indirect_thunk_function.
31528 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
31530 PR middle-end/83884
31531 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
31532 rather than the size of inner_type to determine the stack slot size
31533 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
31535 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
31538 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
31541 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
31543 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
31544 endian Linux systems to optionally enable multilibs for selecting
31545 the long double type if the user configured an explicit type.
31546 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
31547 have no long double multilibs if not defined.
31548 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
31549 warn if the user used -mabi={ieee,ibm}longdouble and we built
31550 multilibs for long double.
31551 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
31552 appropriate multilib option.
31553 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
31555 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
31556 for building long double multilibs.
31557 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
31559 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
31561 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
31564 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
31566 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
31569 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
31572 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
31575 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
31577 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
31578 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
31580 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
31582 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
31583 different rtl trees depending on TARGET_64BIT.
31584 (rs6000_gen_lvx): Likewise.
31586 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
31588 * config/visium/visium.md (nop): Tweak comment.
31589 (hazard_nop): Likewise.
31591 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31593 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
31594 -mspeculate-indirect-jumps.
31595 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
31596 for -mno-speculate-indirect-jumps.
31597 (*call_indirect_elfv2<mode>_nospec): New define_insn.
31598 (*call_value_indirect_elfv2<mode>): Disable for
31599 -mno-speculate-indirect-jumps.
31600 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
31601 (indirect_jump): Emit different RTL for
31602 -mno-speculate-indirect-jumps.
31603 (*indirect_jump<mode>): Disable for
31604 -mno-speculate-indirect-jumps.
31605 (*indirect_jump<mode>_nospec): New define_insn.
31606 (tablejump): Emit different RTL for
31607 -mno-speculate-indirect-jumps.
31608 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
31609 (tablejumpsi_nospec): New define_expand.
31610 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
31611 (tablejumpdi_nospec): New define_expand.
31612 (*tablejump<mode>_internal1): Disable for
31613 -mno-speculate-indirect-jumps.
31614 (*tablejump<mode>_internal1_nospec): New define_insn.
31615 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
31618 2018-01-16 Artyom Skrobov tyomitch@gmail.com
31620 * caller-save.c (insert_save): Drop unnecessary parameter. All
31623 2018-01-16 Jakub Jelinek <jakub@redhat.com>
31624 Richard Biener <rguenth@suse.de>
31627 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
31628 return early, inline manually is_gimple_sizepos. Make sure if we
31629 call gimplify_expr we don't end up with a gimple constant.
31630 * tree.c (variably_modified_type_p): Don't return true for
31631 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
31632 * gimplify.h (is_gimple_sizepos): Remove.
31634 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
31636 PR tree-optimization/83857
31637 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
31638 vectorizable_live_operation for pure SLP statements.
31639 (vectorizable_live_operation): Handle PHIs.
31641 2018-01-16 Richard Biener <rguenther@suse.de>
31643 PR tree-optimization/83867
31644 * tree-vect-stmts.c (vect_transform_stmt): Precompute
31645 nested_in_vect_loop_p since the scalar stmt may get invalidated.
31647 2018-01-16 Jakub Jelinek <jakub@redhat.com>
31650 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
31651 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
31652 If off is not INTEGER_CST, issue a may not be aligned warning
31653 rather than isn't aligned. Use isn%'t rather than isn't.
31654 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
31656 <case MULT_EXPR>: Improve the case when bottom and one of the
31657 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
31658 operand, in that case check if the other operand is multiple of
31659 bottom divided by the INTEGER_CST operand.
31661 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
31664 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
31665 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
31666 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
31667 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
31668 * config/pa/pa.c (pa_function_arg_advance): Likewise.
31669 (pa_function_arg, pa_arg_partial_bytes): Likewise.
31670 (pa_function_arg_size): New function.
31672 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
31674 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
31675 in a separate statement.
31677 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
31679 PR tree-optimization/83847
31680 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
31681 group gathers and scatters.
31683 2018-01-16 Jakub Jelinek <jakub@redhat.com>
31685 PR rtl-optimization/86620
31686 * params.def (max-sched-ready-insns): Bump minimum value to 1.
31688 PR rtl-optimization/83213
31689 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
31690 to last if both are JUMP_INSNs.
31692 PR tree-optimization/83843
31693 * gimple-ssa-store-merging.c
31694 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
31695 store_immediate_info for bswap/nop orig_stores.
31697 2018-01-15 Andrew Waterman <andrew@sifive.com>
31699 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
31701 <UDIV>: Increase cost if !TARGET_DIV.
31703 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
31705 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
31706 (define_attr "cr_logical_3op"): New.
31707 (cceq_ior_compare): Adjust.
31708 (cceq_ior_compare_complement): Adjust.
31709 (*cceq_rev_compare): Adjust.
31710 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
31711 (is_cracked_insn): Adjust.
31712 (insn_must_be_first_in_group): Adjust.
31713 * config/rs6000/40x.md: Adjust.
31714 * config/rs6000/440.md: Adjust.
31715 * config/rs6000/476.md: Adjust.
31716 * config/rs6000/601.md: Adjust.
31717 * config/rs6000/603.md: Adjust.
31718 * config/rs6000/6xx.md: Adjust.
31719 * config/rs6000/7450.md: Adjust.
31720 * config/rs6000/7xx.md: Adjust.
31721 * config/rs6000/8540.md: Adjust.
31722 * config/rs6000/cell.md: Adjust.
31723 * config/rs6000/e300c2c3.md: Adjust.
31724 * config/rs6000/e500mc.md: Adjust.
31725 * config/rs6000/e500mc64.md: Adjust.
31726 * config/rs6000/e5500.md: Adjust.
31727 * config/rs6000/e6500.md: Adjust.
31728 * config/rs6000/mpc.md: Adjust.
31729 * config/rs6000/power4.md: Adjust.
31730 * config/rs6000/power5.md: Adjust.
31731 * config/rs6000/power6.md: Adjust.
31732 * config/rs6000/power7.md: Adjust.
31733 * config/rs6000/power8.md: Adjust.
31734 * config/rs6000/power9.md: Adjust.
31735 * config/rs6000/rs64.md: Adjust.
31736 * config/rs6000/titan.md: Adjust.
31738 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31740 * config/i386/predicates.md (indirect_branch_operand): Rewrite
31741 ix86_indirect_branch_register logic.
31743 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31745 * config/i386/constraints.md (Bs): Update
31746 ix86_indirect_branch_register check. Don't check
31747 ix86_indirect_branch_register with GOT_memory_operand.
31749 * config/i386/predicates.md (GOT_memory_operand): Don't check
31750 ix86_indirect_branch_register here.
31751 (GOT32_symbol_operand): Likewise.
31753 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31755 * config/i386/predicates.md (constant_call_address_operand):
31756 Rewrite ix86_indirect_branch_register logic.
31757 (sibcall_insn_operand): Likewise.
31759 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31761 * config/i386/constraints.md (Bs): Replace
31762 ix86_indirect_branch_thunk_register with
31763 ix86_indirect_branch_register.
31765 * config/i386/i386.md (indirect_jump): Likewise.
31766 (tablejump): Likewise.
31767 (*sibcall_memory): Likewise.
31768 (*sibcall_value_memory): Likewise.
31769 Peepholes of indirect call and jump via memory: Likewise.
31770 * config/i386/i386.opt: Likewise.
31771 * config/i386/predicates.md (indirect_branch_operand): Likewise.
31772 (GOT_memory_operand): Likewise.
31773 (call_insn_operand): Likewise.
31774 (sibcall_insn_operand): Likewise.
31775 (GOT32_symbol_operand): Likewise.
31777 2018-01-15 Jakub Jelinek <jakub@redhat.com>
31779 PR middle-end/83837
31780 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
31781 type rather than type addr's type points to.
31782 (expand_omp_atomic_mutex): Likewise.
31783 (expand_omp_atomic): Likewise.
31785 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31788 * config/i386/i386.c (output_indirect_thunk_function): Use
31789 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
31790 for __x86_return_thunk.
31792 2018-01-15 Richard Biener <rguenther@suse.de>
31794 PR middle-end/83850
31795 * expmed.c (extract_bit_field_1): Fix typo.
31797 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31800 * config/arm/iterators.md (VF): New mode iterator.
31801 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
31802 Remove integer-related logic from pattern.
31803 (neon_vabd<mode>_3): Likewise.
31805 2018-01-15 Jakub Jelinek <jakub@redhat.com>
31807 PR middle-end/82694
31808 * common.opt (fstrict-overflow): No longer an alias.
31809 (fwrapv-pointer): New option.
31810 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
31811 also for pointer types based on flag_wrapv_pointer.
31812 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
31813 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
31814 opts->x_flag_wrapv got set.
31815 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
31816 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
31817 POINTER_TYPE_OVERFLOW_UNDEFINED.
31818 * match.pd: Likewise in address comparison pattern.
31819 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
31821 2018-01-15 Richard Biener <rguenther@suse.de>
31824 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
31825 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
31826 Reset type names to their identifier if their TYPE_DECL doesn't
31827 have linkage (and thus is used for ODR and devirt).
31828 (save_debug_info_for_decl): Remove.
31829 (save_debug_info_for_type): Likewise.
31830 (add_tree_to_fld_list): Adjust.
31831 * tree-pretty-print.c (dump_generic_node): Make dumping of
31832 type names more robust.
31834 2018-01-15 Richard Biener <rguenther@suse.de>
31836 * BASE-VER: Bump to 8.0.1.
31838 2018-01-14 Martin Sebor <msebor@redhat.com>
31841 * builtins.c (check_access): Avoid warning when the no-warning bit
31844 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
31846 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
31847 * ira-color (allocno_hard_regs_compare): Likewise.
31849 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
31852 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
31853 Use .pushsection/.popsection.
31855 2018-01-14 Martin Sebor <msebor@redhat.com>
31858 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
31860 2018-01-14 Jakub Jelinek <jakub@redhat.com>
31862 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
31863 entry from extra_headers.
31864 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
31865 extra_headers, make the list bitwise identical to the i?86-*-* one.
31867 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31869 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
31870 -mcmodel=large with -mindirect-branch=thunk,
31871 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
31872 -mfunction-return=thunk-extern.
31873 * doc/invoke.texi: Document -mcmodel=large is incompatible with
31874 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
31875 -mfunction-return=thunk and -mfunction-return=thunk-extern.
31877 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31879 * config/i386/i386.c (print_reg): Print the name of the full
31880 integer register without '%'.
31881 (ix86_print_operand): Handle 'V'.
31882 * doc/extend.texi: Document 'V' modifier.
31884 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31886 * config/i386/constraints.md (Bs): Disallow memory operand for
31887 -mindirect-branch-register.
31889 * config/i386/predicates.md (indirect_branch_operand): Likewise.
31890 (GOT_memory_operand): Likewise.
31891 (call_insn_operand): Likewise.
31892 (sibcall_insn_operand): Likewise.
31893 (GOT32_symbol_operand): Likewise.
31894 * config/i386/i386.md (indirect_jump): Call convert_memory_address
31895 for -mindirect-branch-register.
31896 (tablejump): Likewise.
31897 (*sibcall_memory): Likewise.
31898 (*sibcall_value_memory): Likewise.
31899 Disallow peepholes of indirect call and jump via memory for
31900 -mindirect-branch-register.
31901 (*call_pop): Replace m with Bw.
31902 (*call_value_pop): Likewise.
31903 (*sibcall_pop_memory): Replace m with Bs.
31904 * config/i386/i386.opt (mindirect-branch-register): New option.
31905 * doc/invoke.texi: Document -mindirect-branch-register option.
31907 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31909 * config/i386/i386-protos.h (ix86_output_function_return): New.
31910 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
31911 set function_return_type.
31912 (indirect_thunk_name): Add ret_p to indicate thunk for function
31914 (output_indirect_thunk_function): Pass false to
31915 indirect_thunk_name.
31916 (ix86_output_indirect_branch_via_reg): Likewise.
31917 (ix86_output_indirect_branch_via_push): Likewise.
31918 (output_indirect_thunk_function): Create alias for function
31919 return thunk if regno < 0.
31920 (ix86_output_function_return): New function.
31921 (ix86_handle_fndecl_attribute): Handle function_return.
31922 (ix86_attribute_table): Add function_return.
31923 * config/i386/i386.h (machine_function): Add
31924 function_return_type.
31925 * config/i386/i386.md (simple_return_internal): Use
31926 ix86_output_function_return.
31927 (simple_return_internal_long): Likewise.
31928 * config/i386/i386.opt (mfunction-return=): New option.
31929 (indirect_branch): Mention -mfunction-return=.
31930 * doc/extend.texi: Document function_return function attribute.
31931 * doc/invoke.texi: Document -mfunction-return= option.
31933 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31935 * config/i386/i386-opts.h (indirect_branch): New.
31936 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
31937 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
31938 with local indirect jump when converting indirect call and jump.
31939 (ix86_set_indirect_branch_type): New.
31940 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
31941 (indirectlabelno): New.
31942 (indirect_thunk_needed): Likewise.
31943 (indirect_thunk_bnd_needed): Likewise.
31944 (indirect_thunks_used): Likewise.
31945 (indirect_thunks_bnd_used): Likewise.
31946 (INDIRECT_LABEL): Likewise.
31947 (indirect_thunk_name): Likewise.
31948 (output_indirect_thunk): Likewise.
31949 (output_indirect_thunk_function): Likewise.
31950 (ix86_output_indirect_branch_via_reg): Likewise.
31951 (ix86_output_indirect_branch_via_push): Likewise.
31952 (ix86_output_indirect_branch): Likewise.
31953 (ix86_output_indirect_jmp): Likewise.
31954 (ix86_code_end): Call output_indirect_thunk_function if needed.
31955 (ix86_output_call_insn): Call ix86_output_indirect_branch if
31957 (ix86_handle_fndecl_attribute): Handle indirect_branch.
31958 (ix86_attribute_table): Add indirect_branch.
31959 * config/i386/i386.h (machine_function): Add indirect_branch_type
31960 and has_local_indirect_jump.
31961 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
31963 (tablejump): Likewise.
31964 (*indirect_jump): Use ix86_output_indirect_jmp.
31965 (*tablejump_1): Likewise.
31966 (simple_return_indirect_internal): Likewise.
31967 * config/i386/i386.opt (mindirect-branch=): New option.
31968 (indirect_branch): New.
31971 (thunk-inline): Likewise.
31972 (thunk-extern): Likewise.
31973 * doc/extend.texi: Document indirect_branch function attribute.
31974 * doc/invoke.texi: Document -mindirect-branch= option.
31976 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
31979 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
31981 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
31983 * ipa-inline.c (want_inline_small_function_p): Return false if
31984 inlining has already failed with CIF_FINAL_ERROR.
31985 (update_caller_keys): Call want_inline_small_function_p before
31987 (update_callee_keys): Likewise.
31989 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
31991 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
31993 (rs6000_quadword_masked_address_p): Likewise.
31994 (quad_aligned_load_p): Likewise.
31995 (quad_aligned_store_p): Likewise.
31996 (const_load_sequence_p): Add comment to describe the outer-most loop.
31997 (mimic_memory_attributes_and_flags): New function.
31998 (rs6000_gen_stvx): Likewise.
31999 (replace_swapped_aligned_store): Likewise.
32000 (rs6000_gen_lvx): Likewise.
32001 (replace_swapped_aligned_load): Likewise.
32002 (replace_swapped_load_constant): Capitalize argument name in
32003 comment describing this function.
32004 (rs6000_analyze_swaps): Add a third pass to search for vector loads
32005 and stores that access quad-word aligned addresses and replace
32006 with stvx or lvx instructions when appropriate.
32007 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
32008 New function prototype.
32009 (rs6000_quadword_masked_address_p): Likewise.
32010 (rs6000_gen_lvx): Likewise.
32011 (rs6000_gen_stvx): Likewise.
32012 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
32013 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
32014 when memory address is aligned.
32015 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
32016 this split to select lvx instruction when memory address is aligned.
32017 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
32018 instruction when memory address is aligned.
32019 (*vsx_le_perm_load_v16qi): Likewise.
32020 (four unnamed splitters): Modify to select the stvx instruction
32021 when memory is aligned.
32023 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
32025 * predict.c (determine_unlikely_bbs): Handle correctly BBs
32026 which appears in the queue multiple times.
32028 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32029 Alan Hayward <alan.hayward@arm.com>
32030 David Sherwood <david.sherwood@arm.com>
32032 * tree-vectorizer.h (vec_lower_bound): New structure.
32033 (_loop_vec_info): Add check_nonzero and lower_bounds.
32034 (LOOP_VINFO_CHECK_NONZERO): New macro.
32035 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
32036 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
32037 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
32038 fields. Make seg_len the distance travelled, not including the
32040 (dr_direction_indicator): Declare.
32041 (dr_zero_step_indicator): Likewise.
32042 (dr_known_forward_stride_p): Likewise.
32043 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
32045 (runtime_alias_check_p): Allow runtime alias checks with
32047 (operator ==): Compare access_size and align.
32048 (prune_runtime_alias_test_list): Rework for new distinction between
32049 the access_size and seg_len.
32050 (create_intersect_range_checks_index): Likewise. Cope with polynomial
32052 (get_segment_min_max): New function.
32053 (create_intersect_range_checks): Use it.
32054 (dr_step_indicator): New function.
32055 (dr_direction_indicator): Likewise.
32056 (dr_zero_step_indicator): Likewise.
32057 (dr_known_forward_stride_p): Likewise.
32058 * tree-loop-distribution.c (data_ref_segment_size): Return
32059 DR_STEP * (niters - 1).
32060 (compute_alias_check_pairs): Update call to the dr_with_seg_len
32062 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
32063 (vect_preserves_scalar_order_p): New function, split out from...
32064 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
32065 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
32066 (vect_vfa_access_size): New function.
32067 (vect_vfa_align): Likewise.
32068 (vect_compile_time_alias): Take access_size_a and access_b arguments.
32069 (dump_lower_bound): New function.
32070 (vect_check_lower_bound): Likewise.
32071 (vect_small_gap_p): Likewise.
32072 (vectorizable_with_step_bound_p): Likewise.
32073 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
32074 depencies if the vectorization factor is 1. Convert the checks
32075 for nonzero steps into checks on the bounds of DR_STEP. Try using
32076 a bunds check for variable steps if the minimum required step is
32077 relatively small. Update calls to the dr_with_seg_len
32078 constructor and to vect_compile_time_alias.
32079 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
32081 (vect_loop_versioning): Call it.
32082 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
32084 (vect_estimate_min_profitable_iters): Account for any bounds checks.
32086 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32087 Alan Hayward <alan.hayward@arm.com>
32088 David Sherwood <david.sherwood@arm.com>
32090 * doc/sourcebuild.texi (vect_scatter_store): Document.
32091 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
32093 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
32095 * genopinit.c (main): Add supports_vec_scatter_store and
32096 supports_vec_scatter_store_cached to target_optabs.
32097 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
32098 IFN_MASK_SCATTER_STORE.
32099 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
32101 * internal-fn.h (internal_store_fn_p): Declare.
32102 (internal_fn_stored_value_index): Likewise.
32103 * internal-fn.c (scatter_store_direct): New macro.
32104 (expand_scatter_store_optab_fn): New function.
32105 (direct_scatter_store_optab_supported_p): New macro.
32106 (internal_store_fn_p): New function.
32107 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
32108 IFN_MASK_SCATTER_STORE.
32109 (internal_fn_mask_index): Likewise.
32110 (internal_fn_stored_value_index): New function.
32111 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
32112 for scatter stores.
32113 * optabs-query.h (supports_vec_scatter_store_p): Declare.
32114 * optabs-query.c (supports_vec_scatter_store_p): New function.
32115 * tree-vectorizer.h (vect_get_store_rhs): Declare.
32116 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
32117 true for scatter stores.
32118 (vect_gather_scatter_fn_p): Handle scatter stores too.
32119 (vect_check_gather_scatter): Consider using scatter stores if
32120 supports_vec_scatter_store_p.
32121 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
32122 scatter stores too.
32123 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
32124 internal_fn_stored_value_index.
32125 (check_load_store_masking): Handle scatter stores too.
32126 (vect_get_store_rhs): Make public.
32127 (vectorizable_call): Use internal_store_fn_p.
32128 (vectorizable_store): Handle scatter store internal functions.
32129 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
32130 when deciding whether the end of the group has been reached.
32131 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
32132 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
32133 (mask_scatter_store<mode>): New insns.
32135 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32136 Alan Hayward <alan.hayward@arm.com>
32137 David Sherwood <david.sherwood@arm.com>
32139 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
32140 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
32141 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
32143 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
32144 Use vect_truncate_gather_scatter_offset if we can't treat the
32145 operation as a normal gather load or scatter store.
32146 (get_group_load_store_type): Take the gather_scatter_info
32147 as argument. Try using a gather load or scatter store for
32148 single-element groups.
32149 (get_load_store_type): Update calls to get_group_load_store_type
32150 and vect_use_strided_gather_scatters_p.
32152 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32153 Alan Hayward <alan.hayward@arm.com>
32154 David Sherwood <david.sherwood@arm.com>
32156 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
32157 optional tree argument.
32158 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
32160 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
32161 but continue to use the current value as a fallback.
32162 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
32163 to compare the updates.
32164 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
32165 (get_load_store_type): Use it when handling a strided access.
32166 (vect_get_strided_load_store_ops): New function.
32167 (vect_get_data_ptr_increment): Likewise.
32168 (vectorizable_load): Handle strided gather loads. Always pass
32169 a step to vect_create_data_ref_ptr and bump_vector_ptr.
32171 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32172 Alan Hayward <alan.hayward@arm.com>
32173 David Sherwood <david.sherwood@arm.com>
32175 * doc/md.texi (gather_load@var{m}): Document.
32176 (mask_gather_load@var{m}): Likewise.
32177 * genopinit.c (main): Add supports_vec_gather_load and
32178 supports_vec_gather_load_cached to target_optabs.
32179 * optabs-tree.c (init_tree_optimization_optabs): Use
32180 ggc_cleared_alloc to allocate target_optabs.
32181 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
32182 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
32184 * internal-fn.h (internal_load_fn_p): Declare.
32185 (internal_gather_scatter_fn_p): Likewise.
32186 (internal_fn_mask_index): Likewise.
32187 (internal_gather_scatter_fn_supported_p): Likewise.
32188 * internal-fn.c (gather_load_direct): New macro.
32189 (expand_gather_load_optab_fn): New function.
32190 (direct_gather_load_optab_supported_p): New macro.
32191 (direct_internal_fn_optab): New function.
32192 (internal_load_fn_p): Likewise.
32193 (internal_gather_scatter_fn_p): Likewise.
32194 (internal_fn_mask_index): Likewise.
32195 (internal_gather_scatter_fn_supported_p): Likewise.
32196 * optabs-query.c (supports_at_least_one_mode_p): New function.
32197 (supports_vec_gather_load_p): Likewise.
32198 * optabs-query.h (supports_vec_gather_load_p): Declare.
32199 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
32200 and memory_type field.
32201 (NUM_PATTERNS): Bump to 15.
32202 * tree-vect-data-refs.c: Include internal-fn.h.
32203 (vect_gather_scatter_fn_p): New function.
32204 (vect_describe_gather_scatter_call): Likewise.
32205 (vect_check_gather_scatter): Try using internal functions for
32206 gather loads. Recognize existing calls to a gather load function.
32207 (vect_analyze_data_refs): Consider using gather loads if
32208 supports_vec_gather_load_p.
32209 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
32210 (vect_get_gather_scatter_offset_type): Likewise.
32211 (vect_convert_mask_for_vectype): Likewise.
32212 (vect_add_conversion_to_patterm): Likewise.
32213 (vect_try_gather_scatter_pattern): Likewise.
32214 (vect_recog_gather_scatter_pattern): New pattern recognizer.
32215 (vect_vect_recog_func_ptrs): Add it.
32216 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
32217 internal_fn_mask_index and internal_gather_scatter_fn_p.
32218 (check_load_store_masking): Take the gather_scatter_info as an
32219 argument and handle gather loads.
32220 (vect_get_gather_scatter_ops): New function.
32221 (vectorizable_call): Check internal_load_fn_p.
32222 (vectorizable_load): Likewise. Handle gather load internal
32224 (vectorizable_store): Update call to check_load_store_masking.
32225 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
32226 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
32227 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
32228 (aarch64_gather_scale_operand_d): New predicates.
32229 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
32230 (mask_gather_load<mode>): New insns.
32232 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32233 Alan Hayward <alan.hayward@arm.com>
32234 David Sherwood <david.sherwood@arm.com>
32236 * optabs.def (fold_left_plus_optab): New optab.
32237 * doc/md.texi (fold_left_plus_@var{m}): Document.
32238 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
32239 * internal-fn.c (fold_left_direct): Define.
32240 (expand_fold_left_optab_fn): Likewise.
32241 (direct_fold_left_optab_supported_p): Likewise.
32242 * fold-const-call.c (fold_const_fold_left): New function.
32243 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
32244 * tree-parloops.c (valid_reduction_p): New function.
32245 (gather_scalar_reductions): Use it.
32246 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
32247 (vect_finish_replace_stmt): Declare.
32248 * tree-vect-loop.c (fold_left_reduction_fn): New function.
32249 (needs_fold_left_reduction_p): New function, split out from...
32250 (vect_is_simple_reduction): ...here. Accept reductions that
32251 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
32252 (vect_force_simple_reduction): Also store the reduction type in
32253 the assignment's STMT_VINFO_REDUC_TYPE.
32254 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
32255 (merge_with_identity): New function.
32256 (vect_expand_fold_left): Likewise.
32257 (vectorize_fold_left_reduction): Likewise.
32258 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
32259 scalar phi in place for it. Check for target support and reject
32260 cases that would reassociate the operation. Defer the transform
32261 phase to vectorize_fold_left_reduction.
32262 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
32263 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
32264 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
32266 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32268 * tree-if-conv.c (predicate_mem_writes): Remove redundant
32269 call to ifc_temp_var.
32271 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32272 Alan Hayward <alan.hayward@arm.com>
32273 David Sherwood <david.sherwood@arm.com>
32275 * target.def (legitimize_address_displacement): Take the original
32276 offset as a poly_int.
32277 * targhooks.h (default_legitimize_address_displacement): Update
32279 * targhooks.c (default_legitimize_address_displacement): Likewise.
32280 * doc/tm.texi: Regenerate.
32281 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
32282 as an argument, moving assert of ad->disp == ad->disp_term to...
32283 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
32284 Try calling targetm.legitimize_address_displacement before expanding
32285 the address rather than afterwards, and adjust for the new interface.
32286 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
32287 Match the new hook interface. Handle SVE addresses.
32288 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
32289 new hook interface.
32291 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32293 * Makefile.in (OBJS): Add early-remat.o.
32294 * target.def (select_early_remat_modes): New hook.
32295 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
32296 * doc/tm.texi: Regenerate.
32297 * targhooks.h (default_select_early_remat_modes): Declare.
32298 * targhooks.c (default_select_early_remat_modes): New function.
32299 * timevar.def (TV_EARLY_REMAT): New timevar.
32300 * passes.def (pass_early_remat): New pass.
32301 * tree-pass.h (make_pass_early_remat): Declare.
32302 * early-remat.c: New file.
32303 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
32305 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
32307 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32308 Alan Hayward <alan.hayward@arm.com>
32309 David Sherwood <david.sherwood@arm.com>
32311 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
32312 vfm1 with a bound_epilog parameter.
32313 (vect_do_peeling): Update calls accordingly, and move the prologue
32314 call earlier in the function. Treat the base bound_epilog as 0 for
32315 fully-masked loops and retain vf - 1 for other loops. Add 1 to
32316 this base when peeling for gaps.
32317 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
32318 with fully-masked loops.
32319 (vect_estimate_min_profitable_iters): Handle the single peeled
32320 iteration in that case.
32322 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32323 Alan Hayward <alan.hayward@arm.com>
32324 David Sherwood <david.sherwood@arm.com>
32326 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
32327 single-element interleaving even if the size is not a power of 2.
32328 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
32329 accesses for single-element interleaving if the group size is
32332 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32333 Alan Hayward <alan.hayward@arm.com>
32334 David Sherwood <david.sherwood@arm.com>
32336 * doc/md.texi (fold_extract_last_@var{m}): Document.
32337 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
32338 * optabs.def (fold_extract_last_optab): New optab.
32339 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
32340 * internal-fn.c (fold_extract_direct): New macro.
32341 (expand_fold_extract_optab_fn): Likewise.
32342 (direct_fold_extract_optab_supported_p): Likewise.
32343 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
32344 * tree-vect-loop.c (vect_model_reduction_cost): Handle
32345 EXTRACT_LAST_REDUCTION.
32346 (get_initial_def_for_reduction): Do not create an initial vector
32347 for EXTRACT_LAST_REDUCTION reductions.
32348 (vectorizable_reduction): Leave the scalar phi in place for
32349 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
32350 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
32351 epilogue code for EXTRACT_LAST_REDUCTION and defer the
32352 transform phase to vectorizable_condition.
32353 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
32355 (vect_finish_stmt_generation): ...here.
32356 (vect_finish_replace_stmt): New function.
32357 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
32358 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
32360 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
32362 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32363 Alan Hayward <alan.hayward@arm.com>
32364 David Sherwood <david.sherwood@arm.com>
32366 * doc/md.texi (extract_last_@var{m}): Document.
32367 * optabs.def (extract_last_optab): New optab.
32368 * internal-fn.def (EXTRACT_LAST): New internal function.
32369 * internal-fn.c (cond_unary_direct): New macro.
32370 (expand_cond_unary_optab_fn): Likewise.
32371 (direct_cond_unary_optab_supported_p): Likewise.
32372 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
32373 loops using EXTRACT_LAST.
32374 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
32375 (extract_last_<mode>): ...this optab.
32376 (vec_extract<mode><Vel>): Update accordingly.
32378 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32379 Alan Hayward <alan.hayward@arm.com>
32380 David Sherwood <david.sherwood@arm.com>
32382 * target.def (empty_mask_is_expensive): New hook.
32383 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
32384 * doc/tm.texi: Regenerate.
32385 * targhooks.h (default_empty_mask_is_expensive): Declare.
32386 * targhooks.c (default_empty_mask_is_expensive): New function.
32387 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
32388 if the target says that empty masks are expensive.
32389 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
32391 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
32393 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32394 Alan Hayward <alan.hayward@arm.com>
32395 David Sherwood <david.sherwood@arm.com>
32397 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
32398 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
32399 (vect_use_loop_mask_for_alignment_p): New function.
32400 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
32401 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
32402 niters_skip argument. Make sure that the first niters_skip elements
32403 of the first iteration are inactive.
32404 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
32405 Update call to vect_set_loop_masks_directly.
32406 (get_misalign_in_elems): New function, split out from...
32407 (vect_gen_prolog_loop_niters): ...here.
32408 (vect_update_init_of_dr): Take a code argument that specifies whether
32409 the adjustment should be added or subtracted.
32410 (vect_update_init_of_drs): Likewise.
32411 (vect_prepare_for_masked_peels): New function.
32412 (vect_do_peeling): Skip prologue peeling if we're using a mask
32413 instead. Update call to vect_update_inits_of_drs.
32414 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
32416 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
32417 alignment. Do not include the number of peeled iterations in
32418 the minimum threshold in that case.
32419 (vectorizable_induction): Adjust the start value down by
32420 LOOP_VINFO_MASK_SKIP_NITERS iterations.
32421 (vect_transform_loop): Call vect_prepare_for_masked_peels.
32422 Take the number of skipped iterations into account when calculating
32424 * tree-vect-stmts.c (vect_gen_while_not): New function.
32426 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32427 Alan Hayward <alan.hayward@arm.com>
32428 David Sherwood <david.sherwood@arm.com>
32430 * doc/sourcebuild.texi (vect_fully_masked): Document.
32431 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
32432 default value to 0.
32433 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
32435 (vect_analyze_loop_2): ...here. Don't check the vectorization
32436 factor against the number of loop iterations if the loop is
32439 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32440 Alan Hayward <alan.hayward@arm.com>
32441 David Sherwood <david.sherwood@arm.com>
32443 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
32444 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
32445 (dump_groups): Update accordingly.
32446 (iv_use::mem_type): New member variable.
32447 (address_p): New function.
32448 (record_use): Add a mem_type argument and initialize the new
32450 (record_group_use): Add a mem_type argument. Use address_p.
32451 Remove obsolete null checks of base_object. Update call to record_use.
32452 (find_interesting_uses_op): Update call to record_group_use.
32453 (find_interesting_uses_cond): Likewise.
32454 (find_interesting_uses_address): Likewise.
32455 (get_mem_type_for_internal_fn): New function.
32456 (find_address_like_use): Likewise.
32457 (find_interesting_uses_stmt): Try find_address_like_use before
32458 calling find_interesting_uses_op.
32459 (addr_offset_valid_p): Use the iv mem_type field as the type
32460 of the addressed memory.
32461 (add_autoinc_candidates): Likewise.
32462 (get_address_cost): Likewise.
32463 (split_small_address_groups_p): Use address_p.
32464 (split_address_groups): Likewise.
32465 (add_iv_candidate_for_use): Likewise.
32466 (autoinc_possible_for_pair): Likewise.
32467 (rewrite_groups): Likewise.
32468 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
32469 (determine_group_iv_cost): Update after split of USE_ADDRESS.
32470 (get_alias_ptr_type_for_ptr_address): New function.
32471 (rewrite_use_address): Rewrite address uses in calls that were
32472 identified by find_address_like_use.
32474 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32475 Alan Hayward <alan.hayward@arm.com>
32476 David Sherwood <david.sherwood@arm.com>
32478 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
32480 * gimple-expr.h (is_gimple_addressable: Likewise.
32481 * gimple-expr.c (is_gimple_address): Likewise.
32482 * internal-fn.c (expand_call_mem_ref): New function.
32483 (expand_mask_load_optab_fn): Use it.
32484 (expand_mask_store_optab_fn): Likewise.
32486 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32487 Alan Hayward <alan.hayward@arm.com>
32488 David Sherwood <david.sherwood@arm.com>
32490 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
32491 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
32492 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
32493 (cond_umax@var{mode}): Document.
32494 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
32495 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
32496 (cond_umin_optab, cond_umax_optab): New optabs.
32497 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
32498 (COND_IOR, COND_XOR): New internal functions.
32499 * internal-fn.h (get_conditional_internal_fn): Declare.
32500 * internal-fn.c (cond_binary_direct): New macro.
32501 (expand_cond_binary_optab_fn): Likewise.
32502 (direct_cond_binary_optab_supported_p): Likewise.
32503 (get_conditional_internal_fn): New function.
32504 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
32505 Cope with reduction statements that are vectorized as calls rather
32507 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
32508 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
32509 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
32510 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
32511 (UNSPEC_COND_EOR): New unspecs.
32512 (optab): Add mappings for them.
32513 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
32514 (sve_int_op, sve_fp_op): New int attributes.
32516 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32517 Alan Hayward <alan.hayward@arm.com>
32518 David Sherwood <david.sherwood@arm.com>
32520 * optabs.def (while_ult_optab): New optab.
32521 * doc/md.texi (while_ult@var{m}@var{n}): Document.
32522 * internal-fn.def (WHILE_ULT): New internal function.
32523 * internal-fn.h (direct_internal_fn_supported_p): New override
32524 that takes two types as argument.
32525 * internal-fn.c (while_direct): New macro.
32526 (expand_while_optab_fn): New function.
32527 (convert_optab_supported_p): Likewise.
32528 (direct_while_optab_supported_p): New macro.
32529 * wide-int.h (wi::udiv_ceil): New function.
32530 * tree-vectorizer.h (rgroup_masks): New structure.
32531 (vec_loop_masks): New typedef.
32532 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
32533 and fully_masked_p.
32534 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
32535 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
32536 (vect_max_vf): New function.
32537 (slpeel_make_loop_iterate_ntimes): Delete.
32538 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
32539 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
32540 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
32541 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
32542 internal-fn.h, stor-layout.h and optabs-query.h.
32543 (vect_set_loop_mask): New function.
32544 (add_preheader_seq): Likewise.
32545 (add_header_seq): Likewise.
32546 (interleave_supported_p): Likewise.
32547 (vect_maybe_permute_loop_masks): Likewise.
32548 (vect_set_loop_masks_directly): Likewise.
32549 (vect_set_loop_condition_masked): Likewise.
32550 (vect_set_loop_condition_unmasked): New function, split out from
32551 slpeel_make_loop_iterate_ntimes.
32552 (slpeel_make_loop_iterate_ntimes): Rename to..
32553 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
32554 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
32555 (vect_do_peeling): Update call accordingly.
32556 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
32558 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
32559 mask_compare_type, can_fully_mask_p and fully_masked_p.
32560 (release_vec_loop_masks): New function.
32561 (_loop_vec_info): Use it to free the loop masks.
32562 (can_produce_all_loop_masks_p): New function.
32563 (vect_get_max_nscalars_per_iter): Likewise.
32564 (vect_verify_full_masking): Likewise.
32565 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
32566 retries, and free the mask rgroups before retrying. Check loop-wide
32567 reasons for disallowing fully-masked loops. Make the final decision
32568 about whether use a fully-masked loop or not.
32569 (vect_estimate_min_profitable_iters): Do not assume that peeling
32570 for the number of iterations will be needed for fully-masked loops.
32571 (vectorizable_reduction): Disable fully-masked loops.
32572 (vectorizable_live_operation): Likewise.
32573 (vect_halve_mask_nunits): New function.
32574 (vect_double_mask_nunits): Likewise.
32575 (vect_record_loop_mask): Likewise.
32576 (vect_get_loop_mask): Likewise.
32577 (vect_transform_loop): Handle the case in which the final loop
32578 iteration might handle a partial vector. Call vect_set_loop_condition
32579 instead of slpeel_make_loop_iterate_ntimes.
32580 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
32581 (check_load_store_masking): New function.
32582 (prepare_load_store_mask): Likewise.
32583 (vectorizable_store): Handle fully-masked loops.
32584 (vectorizable_load): Likewise.
32585 (supportable_widening_operation): Use vect_halve_mask_nunits for
32587 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
32588 (vect_gen_while): New function.
32589 * config/aarch64/aarch64.md (umax<mode>3): New expander.
32590 (aarch64_uqdec<mode>): New insn.
32592 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32593 Alan Hayward <alan.hayward@arm.com>
32594 David Sherwood <david.sherwood@arm.com>
32596 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
32597 (reduc_xor_scal_optab): New optabs.
32598 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
32599 (reduc_xor_scal_@var{m}): Document.
32600 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
32601 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
32602 internal functions.
32603 * fold-const-call.c (fold_const_call): Handle them.
32604 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
32605 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
32606 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
32607 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
32608 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
32609 (UNSPEC_XORV): New unspecs.
32610 (optab): Add entries for them.
32611 (BITWISEV): New int iterator.
32612 (bit_reduc_op): New int attributes.
32614 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32615 Alan Hayward <alan.hayward@arm.com>
32616 David Sherwood <david.sherwood@arm.com>
32618 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
32619 * internal-fn.def (VEC_SHL_INSERT): New internal function.
32620 * optabs.def (vec_shl_insert_optab): New optab.
32621 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
32622 (duplicate_and_interleave): Likewise.
32623 * tree-vect-loop.c: Include internal-fn.h.
32624 (neutral_op_for_slp_reduction): New function, split out from
32625 get_initial_defs_for_reduction.
32626 (get_initial_def_for_reduction): Handle option 2 for variable-length
32627 vectors by loading the neutral value into a vector and then shifting
32628 the initial value into element 0.
32629 (get_initial_defs_for_reduction): Replace the code argument with
32630 the neutral value calculated by neutral_op_for_slp_reduction.
32631 Use gimple_build_vector for constant-length vectors.
32632 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
32633 but the first group_size elements have a neutral value.
32634 Use duplicate_and_interleave otherwise.
32635 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
32636 Update call to get_initial_defs_for_reduction. Handle SLP
32637 reductions for variable-length vectors by creating one vector
32638 result for each scalar result, with the elements associated
32639 with other scalar results stubbed out with the neutral value.
32640 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
32641 Require IFN_VEC_SHL_INSERT for double reductions on
32642 variable-length vectors, or SLP reductions that have
32643 a neutral value. Require can_duplicate_and_interleave_p
32644 support for variable-length unchained SLP reductions if there
32645 is no neutral value, such as for MIN/MAX reductions. Also require
32646 the number of vector elements to be a multiple of the number of
32647 SLP statements when doing variable-length unchained SLP reductions.
32648 Update call to vect_create_epilog_for_reduction.
32649 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
32650 and remove initial values.
32651 (duplicate_and_interleave): Make public.
32652 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
32653 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
32655 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32656 Alan Hayward <alan.hayward@arm.com>
32657 David Sherwood <david.sherwood@arm.com>
32659 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
32660 (can_duplicate_and_interleave_p): New function.
32661 (vect_get_and_check_slp_defs): Take the vector of statements
32662 rather than just the current one. Remove excess parentheses.
32663 Restriction rejectinon of vect_constant_def and vect_external_def
32664 for variable-length vectors to boolean types, or types for which
32665 can_duplicate_and_interleave_p is false.
32666 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
32667 (duplicate_and_interleave): New function.
32668 (vect_get_constant_vectors): Use gimple_build_vector for
32669 constant-length vectors and suitable variable-length constant
32670 vectors. Use duplicate_and_interleave for other variable-length
32671 vectors. Don't defer the update when inserting new statements.
32673 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32674 Alan Hayward <alan.hayward@arm.com>
32675 David Sherwood <david.sherwood@arm.com>
32677 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
32678 min_profitable_iters doesn't go negative.
32680 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32681 Alan Hayward <alan.hayward@arm.com>
32682 David Sherwood <david.sherwood@arm.com>
32684 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
32685 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
32686 * optabs.def (vec_mask_load_lanes_optab): New optab.
32687 (vec_mask_store_lanes_optab): Likewise.
32688 * internal-fn.def (MASK_LOAD_LANES): New internal function.
32689 (MASK_STORE_LANES): Likewise.
32690 * internal-fn.c (mask_load_lanes_direct): New macro.
32691 (mask_store_lanes_direct): Likewise.
32692 (expand_mask_load_optab_fn): Handle masked operations.
32693 (expand_mask_load_lanes_optab_fn): New macro.
32694 (expand_mask_store_optab_fn): Handle masked operations.
32695 (expand_mask_store_lanes_optab_fn): New macro.
32696 (direct_mask_load_lanes_optab_supported_p): Likewise.
32697 (direct_mask_store_lanes_optab_supported_p): Likewise.
32698 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
32700 (vect_load_lanes_supported): Likewise.
32701 * tree-vect-data-refs.c (strip_conversion): New function.
32702 (can_group_stmts_p): Likewise.
32703 (vect_analyze_data_ref_accesses): Use it instead of checking
32704 for a pair of assignments.
32705 (vect_store_lanes_supported): Take a masked_p parameter.
32706 (vect_load_lanes_supported): Likewise.
32707 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
32708 vect_store_lanes_supported and vect_load_lanes_supported.
32709 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
32710 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
32711 parameter. Don't allow gaps for masked accesses.
32712 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
32713 and vect_load_lanes_supported.
32714 (get_load_store_type): Take a masked_p parameter and update
32715 call to get_group_load_store_type.
32716 (vectorizable_store): Update call to get_load_store_type.
32717 Handle IFN_MASK_STORE_LANES.
32718 (vectorizable_load): Update call to get_load_store_type.
32719 Handle IFN_MASK_LOAD_LANES.
32721 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32722 Alan Hayward <alan.hayward@arm.com>
32723 David Sherwood <david.sherwood@arm.com>
32725 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
32727 * config/aarch64/aarch64-protos.h
32728 (aarch64_sve_struct_memory_operand_p): Declare.
32729 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
32730 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
32731 (VPRED, vpred): Handle SVE structure modes.
32732 * config/aarch64/constraints.md (Utx): New constraint.
32733 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
32734 (aarch64_sve_struct_nonimmediate_operand): New predicates.
32735 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
32736 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
32737 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
32738 structure modes. Split into pieces after RA.
32739 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
32740 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
32742 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
32743 SVE structure modes.
32744 (aarch64_classify_address): Likewise.
32745 (sizetochar): Move earlier in file.
32746 (aarch64_print_operand): Handle SVE register lists.
32747 (aarch64_array_mode): New function.
32748 (aarch64_sve_struct_memory_operand_p): Likewise.
32749 (TARGET_ARRAY_MODE): Redefine.
32751 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32752 Alan Hayward <alan.hayward@arm.com>
32753 David Sherwood <david.sherwood@arm.com>
32755 * target.def (array_mode): New target hook.
32756 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
32757 * doc/tm.texi: Regenerate.
32758 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
32759 * hooks.c (hook_optmode_mode_uhwi_none): New function.
32760 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
32761 targetm.array_mode.
32762 * stor-layout.c (mode_for_array): Likewise. Support polynomial
32765 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32766 Alan Hayward <alan.hayward@arm.com>
32767 David Sherwood <david.sherwood@arm.com>
32769 * fold-const.c (fold_binary_loc): Check the argument types
32770 rather than the result type when testing for a vector operation.
32772 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32774 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
32775 * doc/tm.texi: Regenerate.
32777 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32778 Alan Hayward <alan.hayward@arm.com>
32779 David Sherwood <david.sherwood@arm.com>
32781 * doc/invoke.texi (-msve-vector-bits=): Document new option.
32782 (sve): Document new AArch64 extension.
32783 * doc/md.texi (w): Extend the description of the AArch64
32784 constraint to include SVE vectors.
32785 (Upl, Upa): Document new AArch64 predicate constraints.
32786 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
32788 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
32789 (msve-vector-bits=): New option.
32790 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
32791 SVE when these are disabled.
32792 (sve): New extension.
32793 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
32794 modes. Adjust their number of units based on aarch64_sve_vg.
32795 (MAX_BITSIZE_MODE_ANY_MODE): Define.
32796 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
32797 aarch64_addr_query_type.
32798 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
32799 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
32800 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
32801 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
32802 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
32803 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
32804 (aarch64_simd_imm_zero_p): Delete.
32805 (aarch64_check_zero_based_sve_index_immediate): Declare.
32806 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
32807 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
32808 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
32809 (aarch64_sve_float_mul_immediate_p): Likewise.
32810 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
32811 rather than an rtx.
32812 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
32813 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
32814 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
32815 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
32816 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
32817 (aarch64_regmode_natural_size): Likewise.
32818 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
32819 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
32821 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
32822 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
32823 for VG and the SVE predicate registers.
32824 (V_ALIASES): Add a "z"-prefixed alias.
32825 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
32826 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
32827 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
32828 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
32829 (REG_CLASS_NAMES): Add entries for them.
32830 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
32831 and the predicate registers.
32832 (aarch64_sve_vg): Declare.
32833 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
32834 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
32835 (REGMODE_NATURAL_SIZE): Define.
32836 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
32838 * config/aarch64/aarch64.c: Include cfgrtl.h.
32839 (simd_immediate_info): Add a constructor for series vectors,
32840 and an associated step field.
32841 (aarch64_sve_vg): New variable.
32842 (aarch64_dbx_register_number): Handle VG and the predicate registers.
32843 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
32844 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
32845 (VEC_ANY_DATA, VEC_STRUCT): New constants.
32846 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
32847 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
32848 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
32849 (aarch64_get_mask_mode): New functions.
32850 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
32851 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
32852 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
32853 predicate modes and predicate registers. Explicitly restrict
32854 GPRs to modes of 16 bytes or smaller. Only allow FP registers
32855 to store a vector mode if it is recognized by
32856 aarch64_classify_vector_mode.
32857 (aarch64_regmode_natural_size): New function.
32858 (aarch64_hard_regno_caller_save_mode): Return the original mode
32860 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
32861 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
32862 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
32863 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
32865 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
32866 does not overlap dest if the function is frame-related. Handle
32868 (aarch64_split_add_offset): New function.
32869 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
32870 them aarch64_add_offset.
32871 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
32872 and update call to aarch64_sub_sp.
32873 (aarch64_add_cfa_expression): New function.
32874 (aarch64_expand_prologue): Pass extra temporary registers to the
32875 functions above. Handle the case in which we need to emit new
32876 DW_CFA_expressions for registers that were originally saved
32877 relative to the stack pointer, but now have to be expressed
32878 relative to the frame pointer.
32879 (aarch64_output_mi_thunk): Pass extra temporary registers to the
32881 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
32882 IP0 and IP1 values for SVE frames.
32883 (aarch64_expand_vec_series): New function.
32884 (aarch64_expand_sve_widened_duplicate): Likewise.
32885 (aarch64_expand_sve_const_vector): Likewise.
32886 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
32887 Handle SVE constants. Use emit_move_insn to move a force_const_mem
32888 into the register, rather than emitting a SET directly.
32889 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
32890 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
32891 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
32892 (offset_9bit_signed_scaled_p): New functions.
32893 (aarch64_replicate_bitmask_imm): New function.
32894 (aarch64_bitmask_imm): Use it.
32895 (aarch64_cannot_force_const_mem): Reject expressions involving
32896 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
32897 (aarch64_classify_index): Handle SVE indices, by requiring
32898 a plain register index with a scale that matches the element size.
32899 (aarch64_classify_address): Handle SVE addresses. Assert that
32900 the mode of the address is VOIDmode or an integer mode.
32901 Update call to aarch64_classify_symbol.
32902 (aarch64_classify_symbolic_expression): Update call to
32903 aarch64_classify_symbol.
32904 (aarch64_const_vec_all_in_range_p): New function.
32905 (aarch64_print_vector_float_operand): Likewise.
32906 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
32907 "vN" for FP registers with SVE modes. Handle (const ...) vectors
32908 and the FP immediates 1.0 and 0.5.
32909 (aarch64_print_address_internal): Handle SVE addresses.
32910 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
32911 (aarch64_regno_regclass): Handle predicate registers.
32912 (aarch64_secondary_reload): Handle big-endian reloads of SVE
32914 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
32915 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
32916 (aarch64_convert_sve_vector_bits): New function.
32917 (aarch64_override_options): Use it to handle -msve-vector-bits=.
32918 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
32919 rather than an rtx.
32920 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
32921 Handle SVE vector and predicate modes. Accept VL-based constants
32922 that need only one temporary register, and VL offsets that require
32923 no temporary registers.
32924 (aarch64_conditional_register_usage): Mark the predicate registers
32925 as fixed if SVE isn't available.
32926 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
32927 Return true for SVE vector and predicate modes.
32928 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
32929 rather than an unsigned int. Handle SVE modes.
32930 (aarch64_preferred_simd_mode): Update call accordingly. Handle
32932 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
32934 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
32935 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
32936 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
32937 (aarch64_sve_float_mul_immediate_p): New functions.
32938 (aarch64_sve_valid_immediate): New function.
32939 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
32940 Explicitly reject structure modes. Check for INDEX constants.
32941 Handle PTRUE and PFALSE constants.
32942 (aarch64_check_zero_based_sve_index_immediate): New function.
32943 (aarch64_simd_imm_zero_p): Delete.
32944 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
32945 vector modes. Accept constants in the range of CNT[BHWD].
32946 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
32947 ask for an Advanced SIMD mode.
32948 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
32949 (aarch64_simd_vector_alignment): Handle SVE predicates.
32950 (aarch64_vectorize_preferred_vector_alignment): New function.
32951 (aarch64_simd_vector_alignment_reachable): Use it instead of
32953 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
32954 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
32956 (MAX_VECT_LEN): Delete.
32957 (expand_vec_perm_d): Add a vec_flags field.
32958 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
32959 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
32960 (aarch64_evpc_ext): Don't apply a big-endian lane correction
32962 (aarch64_evpc_rev): Rename to...
32963 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
32964 (aarch64_evpc_rev_global): New function.
32965 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
32966 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
32968 (aarch64_evpc_sve_tbl): New function.
32969 (aarch64_expand_vec_perm_const_1): Update after rename of
32970 aarch64_evpc_rev. Handle SVE permutes too, trying
32971 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
32972 than aarch64_evpc_tbl.
32973 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
32974 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
32975 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
32976 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
32977 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
32978 (aarch64_expand_sve_vcond): New functions.
32979 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
32980 of aarch64_vector_mode_p.
32981 (aarch64_dwarf_poly_indeterminate_value): New function.
32982 (aarch64_compute_pressure_classes): Likewise.
32983 (aarch64_can_change_mode_class): Likewise.
32984 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
32985 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
32986 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
32987 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
32988 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
32989 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
32990 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
32991 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
32993 (Dn, Dl, Dr): Accept const as well as const_vector.
32994 (Dz): Likewise. Compare against CONST0_RTX.
32995 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
32996 of "vector" where appropriate.
32997 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
32998 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
32999 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
33000 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
33001 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
33002 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
33003 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
33004 (v_int_equiv): Extend to SVE modes.
33005 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
33007 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
33008 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
33009 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
33010 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
33011 (SVE_COND_FP_CMP): New int iterators.
33012 (perm_hilo): Handle the new unpack unspecs.
33013 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
33015 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
33016 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
33017 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
33018 (aarch64_equality_operator, aarch64_constant_vector_operand)
33019 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
33020 (aarch64_sve_nonimmediate_operand): Likewise.
33021 (aarch64_sve_general_operand): Likewise.
33022 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
33023 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
33024 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
33025 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
33026 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
33027 (aarch64_sve_float_arith_immediate): Likewise.
33028 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
33029 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
33030 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
33031 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
33032 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
33033 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
33034 (aarch64_sve_float_arith_operand): Likewise.
33035 (aarch64_sve_float_arith_with_sub_operand): Likewise.
33036 (aarch64_sve_float_mul_operand): Likewise.
33037 (aarch64_sve_vec_perm_operand): Likewise.
33038 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
33039 (aarch64_mov_operand): Accept const_poly_int and const_vector.
33040 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
33041 as well as const_vector.
33042 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
33043 in file. Use CONST0_RTX and CONSTM1_RTX.
33044 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
33045 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
33046 Use aarch64_simd_imm_zero.
33047 * config/aarch64/aarch64-sve.md: New file.
33048 * config/aarch64/aarch64.md: Include it.
33049 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
33050 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
33051 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
33052 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
33053 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
33054 (sve): New attribute.
33055 (enabled): Disable instructions with the sve attribute unless
33057 (movqi, movhi): Pass CONST_POLY_INT operaneds through
33058 aarch64_expand_mov_immediate.
33059 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
33060 CNT[BHSD] immediates.
33061 (movti): Split CONST_POLY_INT moves into two halves.
33062 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
33063 Split additions that need a temporary here if the destination
33064 is the stack pointer.
33065 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
33066 (*add<mode>3_poly_1): New instruction.
33067 (set_clobber_cc): New expander.
33069 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
33071 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
33072 parameter and use it instead of GET_MODE_SIZE (innermode). Use
33073 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
33074 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
33075 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
33076 Change innermode from fixed_mode_size to machine_mode.
33077 (simplify_subreg): Update call accordingly. Handle a constant-sized
33078 subreg of a variable-length CONST_VECTOR.
33080 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
33081 Alan Hayward <alan.hayward@arm.com>
33082 David Sherwood <david.sherwood@arm.com>
33084 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
33085 (add_offset_to_base): New function, split out from...
33086 (create_mem_ref): ...here. When handling a scale other than 1,
33087 check first whether the address is valid without the offset.
33088 Add it into the base if so, leaving the index and scale as-is.
33090 2018-01-12 Jakub Jelinek <jakub@redhat.com>
33093 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
33094 fold_for_warn before checking if arg2 is INTEGER_CST.
33096 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
33098 * config/rs6000/predicates.md (load_multiple_operation): Delete.
33099 (store_multiple_operation): Delete.
33100 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
33101 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
33102 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
33103 guarded by TARGET_STRING.
33104 (rs6000_output_load_multiple): Delete.
33105 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
33106 OPTION_MASK_STRING / TARGET_STRING handling.
33107 (print_operand) <'N', 'O'>: Add comment that these are unused now.
33108 (const rs6000_opt_masks) <"string">: Change mask to 0.
33109 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
33110 (MASK_STRING): Delete.
33111 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
33113 (load_multiple): Delete.
33120 (store_multiple): Delete.
33127 (movmemsi_8reg): Delete.
33128 (corresponding unnamed define_insn): Delete.
33129 (movmemsi_6reg): Delete.
33130 (corresponding unnamed define_insn): Delete.
33131 (movmemsi_4reg): Delete.
33132 (corresponding unnamed define_insn): Delete.
33133 (movmemsi_2reg): Delete.
33134 (corresponding unnamed define_insn): Delete.
33135 (movmemsi_1reg): Delete.
33136 (corresponding unnamed define_insn): Delete.
33137 * config/rs6000/rs6000.opt (mno-string): New.
33138 (mstring): Replace by deprecation warning stub.
33139 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
33141 2018-01-12 Jakub Jelinek <jakub@redhat.com>
33143 * regrename.c (regrename_do_replace): If replacing the same
33144 reg multiple times, try to reuse last created gen_raw_REG.
33147 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
33148 main to workaround a bug in GDB.
33150 2018-01-12 Tom de Vries <tom@codesourcery.com>
33153 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
33155 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
33157 PR rtl-optimization/80481
33158 * ira-color.c (get_cap_member): New function.
33159 (allocnos_conflict_by_live_ranges_p): Use it.
33160 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
33161 (setup_slot_coalesced_allocno_live_ranges): Ditto.
33163 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
33166 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
33167 (*saddl_se_1): Ditto.
33168 (*ssubsi_1): Ditto.
33169 (*ssubl_se_1): Ditto.
33171 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
33173 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
33174 rather than wi::to_widest for DR_INITs.
33175 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
33176 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
33177 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
33179 (vect_analyze_group_access_1): Note that here.
33181 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
33183 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
33184 polynomial type sizes.
33186 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
33188 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
33189 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
33190 (gimple_add_tmp_var): Likewise.
33192 2018-01-12 Martin Liska <mliska@suse.cz>
33194 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
33195 (gimple_alloc_sizes): Likewise.
33196 (dump_gimple_statistics): Use PRIu64 in printf format.
33197 * gimple.h: Change uint64_t to int.
33199 2018-01-12 Martin Liska <mliska@suse.cz>
33201 * tree-core.h: Use uint64_t instead of int.
33202 * tree.c (tree_node_counts): Likewise.
33203 (tree_node_sizes): Likewise.
33204 (dump_tree_statistics): Use PRIu64 in printf format.
33206 2018-01-12 Martin Liska <mliska@suse.cz>
33208 * Makefile.in: As qsort_chk is implemented in vec.c, add
33209 vec.o to linkage of gencfn-macros.
33210 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
33211 passing the info to record_node_allocation_statistics.
33212 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
33214 * ggc-common.c (struct ggc_usage): Add operator== and use
33215 it in operator< and compare function.
33216 * mem-stats.h (struct mem_usage): Likewise.
33217 * vec.c (struct vec_usage): Remove operator< and compare
33218 function. Can be simply inherited.
33220 2018-01-12 Martin Jambor <mjambor@suse.cz>
33223 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
33224 * tree-ssa-math-opts.c: Include domwalk.h.
33225 (convert_mult_to_fma_1): New function.
33226 (fma_transformation_info): New type.
33227 (fma_deferring_state): Likewise.
33228 (cancel_fma_deferring): New function.
33229 (result_of_phi): Likewise.
33230 (last_fma_candidate_feeds_initial_phi): Likewise.
33231 (convert_mult_to_fma): Added deferring logic, split actual
33232 transformation to convert_mult_to_fma_1.
33233 (math_opts_dom_walker): New type.
33234 (math_opts_dom_walker::after_dom_children): New method, body moved
33235 here from pass_optimize_widening_mul::execute, added deferring logic
33237 (pass_optimize_widening_mul::execute): Moved most of code to
33238 math_opts_dom_walker::after_dom_children.
33239 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
33240 * config/i386/i386.c (ix86_option_override_internal): Added
33241 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
33243 2018-01-12 Richard Biener <rguenther@suse.de>
33246 * dwarf2out.c (gen_variable_die): Do not reset old_die for
33247 inline instance vars.
33249 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
33252 * config/rx/rx.c (rx_is_restricted_memory_address):
33253 Handle SUBREG case.
33255 2018-01-12 Richard Biener <rguenther@suse.de>
33257 PR tree-optimization/80846
33258 * target.def (split_reduction): New target hook.
33259 * targhooks.c (default_split_reduction): New function.
33260 * targhooks.h (default_split_reduction): Declare.
33261 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
33262 target requests first reduce vectors by combining low and high
33264 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
33265 (get_vectype_for_scalar_type_and_size): Export.
33266 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
33267 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
33268 * doc/tm.texi: Regenerate.
33269 * config/i386/i386.c (ix86_split_reduction): Implement
33270 TARGET_VECTORIZE_SPLIT_REDUCTION.
33272 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
33275 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
33276 in PIC mode except for TARGET_VXWORKS_RTP.
33277 * config/sparc/sparc.c: Include cfgrtl.h.
33278 (TARGET_INIT_PIC_REG): Define.
33279 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
33280 (sparc_pic_register_p): New predicate.
33281 (sparc_legitimate_address_p): Use it.
33282 (sparc_legitimize_pic_address): Likewise.
33283 (sparc_delegitimize_address): Likewise.
33284 (sparc_mode_dependent_address_p): Likewise.
33285 (gen_load_pcrel_sym): Remove 4th parameter.
33286 (load_got_register): Adjust call to above. Remove obsolete stuff.
33287 (sparc_expand_prologue): Do not call load_got_register here.
33288 (sparc_flat_expand_prologue): Likewise.
33289 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
33290 (sparc_use_pseudo_pic_reg): New function.
33291 (sparc_init_pic_reg): Likewise.
33292 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
33293 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
33295 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
33297 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
33298 Add item for branch_cost.
33300 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
33302 PR rtl-optimization/83565
33303 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
33304 not extend the result to a larger mode for rotate operations.
33305 (num_sign_bit_copies1): Likewise.
33307 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
33310 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
33312 Use values-Xc.o for -pedantic.
33313 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
33315 2018-01-12 Martin Liska <mliska@suse.cz>
33318 * ipa-devirt.c (final_warning_record::grow_type_warnings):
33320 (possible_polymorphic_call_targets): Use it.
33321 (ipa_devirt): Likewise.
33323 2018-01-12 Martin Liska <mliska@suse.cz>
33325 * profile-count.h (enum profile_quality): Use 0 as invalid
33326 enum value of profile_quality.
33328 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
33330 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
33331 -mext-string options.
33333 2018-01-12 Richard Biener <rguenther@suse.de>
33335 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
33336 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
33337 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
33339 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
33341 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
33343 * configure.ac (--with-long-double-format): Add support for the
33344 configuration option to change the default long double format on
33346 * config.gcc (powerpc*-linux*-*): Likewise.
33347 * configure: Regenerate.
33348 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
33349 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
33350 used without modification.
33352 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
33354 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
33355 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
33356 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
33357 MISC_BUILTIN_SPEC_BARRIER.
33358 (rs6000_init_builtins): Likewise.
33359 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
33361 (speculation_barrier): New define_insn.
33362 * doc/extend.texi: Document __builtin_speculation_barrier.
33364 2018-01-11 Jakub Jelinek <jakub@redhat.com>
33367 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
33368 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
33369 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
33371 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
33372 integral modes instead of "ss" and "sd".
33373 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
33374 vectors with 32-bit and 64-bit elements.
33375 (vecdupssescalarmodesuffix): New mode attribute.
33376 (vec_dup<mode>): Use it.
33378 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
33381 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
33382 frame if argument is passed on stack.
33384 2018-01-11 Jakub Jelinek <jakub@redhat.com>
33387 * ree.c (combine_reaching_defs): Optimize also
33388 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
33389 reg2=any_extend(exp); reg1=reg2;, formatting fix.
33391 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
33393 PR middle-end/83189
33394 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
33396 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
33398 PR middle-end/83718
33399 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
33400 after they are computed.
33402 2018-01-11 Bin Cheng <bin.cheng@arm.com>
33404 PR tree-optimization/83695
33405 * gimple-loop-linterchange.cc
33406 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
33407 reset cached scev information after interchange.
33408 (pass_linterchange::execute): Remove call to scev_reset_htab.
33410 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
33412 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
33413 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
33414 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
33415 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
33416 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
33417 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
33418 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
33419 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
33420 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
33421 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
33422 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
33423 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
33424 (V_lane_reg): Likewise.
33425 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
33427 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
33428 (vfmal_lane_low<mode>_intrinsic,
33429 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
33430 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
33431 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
33432 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
33433 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
33434 vfmsl_lane_high<mode>_intrinsic): New define_insns.
33436 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
33438 * config/arm/arm-cpus.in (fp16fml): New feature.
33439 (ALL_SIMD): Add fp16fml.
33440 (armv8.2-a): Add fp16fml as an option.
33441 (armv8.3-a): Likewise.
33442 (armv8.4-a): Add fp16fml as part of fp16.
33443 * config/arm/arm.h (TARGET_FP16FML): Define.
33444 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
33446 * config/arm/arm-modes.def (V2HF): Define.
33447 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
33448 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
33449 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
33450 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
33451 vfmsl_low, vfmsl_high): New set of builtins.
33452 * config/arm/iterators.md (PLUSMINUS): New code iterator.
33453 (vfml_op): New code attribute.
33454 (VFMLHALVES): New int iterator.
33455 (VFML, VFMLSEL): New mode attributes.
33456 (V_reg): Define mapping for V2HF.
33457 (V_hi, V_lo): New mode attributes.
33458 (VF_constraint): Likewise.
33459 (vfml_half, vfml_half_selector): New int attributes.
33460 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
33462 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
33463 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
33465 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
33466 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
33467 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
33468 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
33470 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
33471 Document new effective target and option set.
33473 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
33475 * config/arm/arm-cpus.in (armv8_4): New feature.
33476 (ARMv8_4a): New fgroup.
33477 (armv8.4-a): New arch.
33478 * config/arm/arm-tables.opt: Regenerate.
33479 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
33480 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
33481 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
33482 Add matching rules for -march=armv8.4-a and extensions.
33483 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
33485 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
33488 * config/rx/rx.md (BW): New mode attribute.
33489 (sync_lock_test_and_setsi): Add mode suffix to insn output.
33491 2018-01-11 Richard Biener <rguenther@suse.de>
33493 PR tree-optimization/83435
33494 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
33495 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
33496 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
33498 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33499 Alan Hayward <alan.hayward@arm.com>
33500 David Sherwood <david.sherwood@arm.com>
33502 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
33504 (aarch64_classify_address): Initialize it. Track polynomial offsets.
33505 (aarch64_print_address_internal): Use it to check for a zero offset.
33507 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33508 Alan Hayward <alan.hayward@arm.com>
33509 David Sherwood <david.sherwood@arm.com>
33511 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
33512 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
33513 Return a poly_int64 rather than a HOST_WIDE_INT.
33514 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
33515 rather than a HOST_WIDE_INT.
33516 * config/aarch64/aarch64.h (aarch64_frame): Protect with
33517 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
33518 hard_fp_offset, frame_size, initial_adjust, callee_offset and
33519 final_offset from HOST_WIDE_INT to poly_int64.
33520 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
33521 to_constant when getting the number of units in an Advanced SIMD
33523 (aarch64_builtin_vectorized_function): Check for a constant number
33525 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
33527 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
33528 attribute instead of GET_MODE_NUNITS.
33529 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
33530 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
33531 GET_MODE_SIZE for fixed-size registers.
33532 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
33533 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
33534 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
33535 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
33536 (aarch64_print_operand, aarch64_print_address_internal)
33537 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
33538 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
33539 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
33540 Handle polynomial GET_MODE_SIZE.
33541 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
33542 wider than SImode without modification.
33543 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
33544 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
33545 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
33546 passing and returning SVE modes.
33547 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
33548 rather than GEN_INT.
33549 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
33550 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
33551 (aarch64_allocate_and_probe_stack_space): Likewise.
33552 (aarch64_layout_frame): Cope with polynomial offsets.
33553 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
33554 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
33555 polynomial offsets.
33556 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
33557 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
33558 poly_int64 rather than a HOST_WIDE_INT.
33559 (aarch64_get_separate_components, aarch64_process_components)
33560 (aarch64_expand_prologue, aarch64_expand_epilogue)
33561 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
33562 (aarch64_anchor_offset): New function, split out from...
33563 (aarch64_legitimize_address): ...here.
33564 (aarch64_builtin_vectorization_cost): Handle polynomial
33565 TYPE_VECTOR_SUBPARTS.
33566 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
33568 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
33569 number of elements from the PARALLEL rather than the mode.
33570 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
33571 rather than GET_MODE_BITSIZE.
33572 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
33573 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
33574 (aarch64_expand_vec_perm_const_1): Handle polynomial
33575 d->perm.length () and d->perm elements.
33576 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
33577 Apply to_constant to d->perm elements.
33578 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
33579 polynomial CONST_VECTOR_NUNITS.
33580 (aarch64_move_pointer): Take amount as a poly_int64 rather
33582 (aarch64_progress_pointer): Avoid temporary variable.
33583 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
33584 the mode attribute instead of GET_MODE.
33586 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33587 Alan Hayward <alan.hayward@arm.com>
33588 David Sherwood <david.sherwood@arm.com>
33590 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
33591 x exists before using it.
33592 (aarch64_add_constant_internal): Rename to...
33593 (aarch64_add_offset_1): ...this. Replace regnum with separate
33594 src and dest rtxes. Handle the case in which they're different,
33595 including when the offset is zero. Replace scratchreg with an rtx.
33596 Use 2 additions if there is no spare register into which we can
33597 move a 16-bit constant.
33598 (aarch64_add_constant): Delete.
33599 (aarch64_add_offset): Replace reg with separate src and dest
33600 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
33601 Use aarch64_add_offset_1.
33602 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
33603 an rtx rather than an int. Take the delta as a poly_int64
33604 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
33605 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
33606 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
33607 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
33608 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
33609 and aarch64_add_sp.
33610 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
33611 aarch64_add_constant.
33613 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33615 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
33616 Use scalar_float_mode.
33618 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33620 * config/aarch64/aarch64-simd.md
33621 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
33622 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
33623 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
33624 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
33625 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
33626 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
33627 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
33628 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
33629 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
33630 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
33632 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
33635 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
33636 targ_options->x_arm_arch_string is non NULL.
33638 2018-01-11 Tamar Christina <tamar.christina@arm.com>
33640 * config/aarch64/aarch64.h
33641 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
33643 2018-01-11 Sudakshina Das <sudi.das@arm.com>
33646 * expmed.c (emit_store_flag_force): Swap if const op0
33647 and change VOIDmode to mode of op0.
33649 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33651 PR rtl-optimization/83761
33652 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
33653 than bytes to mode_for_size.
33655 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
33657 PR middle-end/83189
33658 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
33659 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
33662 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
33664 PR middle-end/83575
33665 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
33666 when in layout mode.
33667 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
33668 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
33671 2018-01-10 Michael Collison <michael.collison@arm.com>
33673 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
33674 * config/aarch64/aarch64-option-extension.def: Add
33675 AARCH64_OPT_EXTENSION of 'fp16fml'.
33676 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
33677 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
33678 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
33679 * config/aarch64/constraints.md (Ui7): New constraint.
33680 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
33681 (VFMLA_SEL_W): Ditto.
33684 (VFMLA16_LOW): New int iterator.
33685 (VFMLA16_HIGH): Ditto.
33686 (UNSPEC_FMLAL): New unspec.
33687 (UNSPEC_FMLSL): Ditto.
33688 (UNSPEC_FMLAL2): Ditto.
33689 (UNSPEC_FMLSL2): Ditto.
33690 (f16mac): New code attribute.
33691 * config/aarch64/aarch64-simd-builtins.def
33692 (aarch64_fmlal_lowv2sf): Ditto.
33693 (aarch64_fmlsl_lowv2sf): Ditto.
33694 (aarch64_fmlalq_lowv4sf): Ditto.
33695 (aarch64_fmlslq_lowv4sf): Ditto.
33696 (aarch64_fmlal_highv2sf): Ditto.
33697 (aarch64_fmlsl_highv2sf): Ditto.
33698 (aarch64_fmlalq_highv4sf): Ditto.
33699 (aarch64_fmlslq_highv4sf): Ditto.
33700 (aarch64_fmlal_lane_lowv2sf): Ditto.
33701 (aarch64_fmlsl_lane_lowv2sf): Ditto.
33702 (aarch64_fmlal_laneq_lowv2sf): Ditto.
33703 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
33704 (aarch64_fmlalq_lane_lowv4sf): Ditto.
33705 (aarch64_fmlsl_lane_lowv4sf): Ditto.
33706 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
33707 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
33708 (aarch64_fmlal_lane_highv2sf): Ditto.
33709 (aarch64_fmlsl_lane_highv2sf): Ditto.
33710 (aarch64_fmlal_laneq_highv2sf): Ditto.
33711 (aarch64_fmlsl_laneq_highv2sf): Ditto.
33712 (aarch64_fmlalq_lane_highv4sf): Ditto.
33713 (aarch64_fmlsl_lane_highv4sf): Ditto.
33714 (aarch64_fmlalq_laneq_highv4sf): Ditto.
33715 (aarch64_fmlsl_laneq_highv4sf): Ditto.
33716 * config/aarch64/aarch64-simd.md:
33717 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
33718 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
33719 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
33720 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
33721 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
33722 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
33723 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
33724 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
33725 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
33726 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
33727 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
33728 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
33729 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
33730 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
33731 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
33732 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
33733 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
33734 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
33735 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
33736 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
33737 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
33738 (vfmlsl_low_u32): Ditto.
33739 (vfmlalq_low_u32): Ditto.
33740 (vfmlslq_low_u32): Ditto.
33741 (vfmlal_high_u32): Ditto.
33742 (vfmlsl_high_u32): Ditto.
33743 (vfmlalq_high_u32): Ditto.
33744 (vfmlslq_high_u32): Ditto.
33745 (vfmlal_lane_low_u32): Ditto.
33746 (vfmlsl_lane_low_u32): Ditto.
33747 (vfmlal_laneq_low_u32): Ditto.
33748 (vfmlsl_laneq_low_u32): Ditto.
33749 (vfmlalq_lane_low_u32): Ditto.
33750 (vfmlslq_lane_low_u32): Ditto.
33751 (vfmlalq_laneq_low_u32): Ditto.
33752 (vfmlslq_laneq_low_u32): Ditto.
33753 (vfmlal_lane_high_u32): Ditto.
33754 (vfmlsl_lane_high_u32): Ditto.
33755 (vfmlal_laneq_high_u32): Ditto.
33756 (vfmlsl_laneq_high_u32): Ditto.
33757 (vfmlalq_lane_high_u32): Ditto.
33758 (vfmlslq_lane_high_u32): Ditto.
33759 (vfmlalq_laneq_high_u32): Ditto.
33760 (vfmlslq_laneq_high_u32): Ditto.
33761 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
33762 (AARCH64_FL_FOR_ARCH8_4): New.
33763 (AARCH64_ISA_F16FML): New ISA flag.
33764 (TARGET_F16FML): New feature flag for fp16fml.
33765 (doc/invoke.texi): Document new fp16fml option.
33767 2018-01-10 Michael Collison <michael.collison@arm.com>
33769 * config/aarch64/aarch64-builtins.c:
33770 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
33771 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
33772 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
33773 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
33774 (AARCH64_ISA_SHA3): New ISA flag.
33775 (TARGET_SHA3): New feature flag for sha3.
33776 * config/aarch64/iterators.md (sha512_op): New int attribute.
33777 (CRYPTO_SHA512): New int iterator.
33778 (UNSPEC_SHA512H): New unspec.
33779 (UNSPEC_SHA512H2): Ditto.
33780 (UNSPEC_SHA512SU0): Ditto.
33781 (UNSPEC_SHA512SU1): Ditto.
33782 * config/aarch64/aarch64-simd-builtins.def
33783 (aarch64_crypto_sha512hqv2di): New builtin.
33784 (aarch64_crypto_sha512h2qv2di): Ditto.
33785 (aarch64_crypto_sha512su0qv2di): Ditto.
33786 (aarch64_crypto_sha512su1qv2di): Ditto.
33787 (aarch64_eor3qv8hi): Ditto.
33788 (aarch64_rax1qv2di): Ditto.
33789 (aarch64_xarqv2di): Ditto.
33790 (aarch64_bcaxqv8hi): Ditto.
33791 * config/aarch64/aarch64-simd.md:
33792 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
33793 (aarch64_crypto_sha512su0qv2di): Ditto.
33794 (aarch64_crypto_sha512su1qv2di): Ditto.
33795 (aarch64_eor3qv8hi): Ditto.
33796 (aarch64_rax1qv2di): Ditto.
33797 (aarch64_xarqv2di): Ditto.
33798 (aarch64_bcaxqv8hi): Ditto.
33799 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
33800 (vsha512h2q_u64): Ditto.
33801 (vsha512su0q_u64): Ditto.
33802 (vsha512su1q_u64): Ditto.
33803 (veor3q_u16): Ditto.
33804 (vrax1q_u64): Ditto.
33805 (vxarq_u64): Ditto.
33806 (vbcaxq_u16): Ditto.
33807 * config/arm/types.md (crypto_sha512): New type attribute.
33808 (crypto_sha3): Ditto.
33809 (doc/invoke.texi): Document new sha3 option.
33811 2018-01-10 Michael Collison <michael.collison@arm.com>
33813 * config/aarch64/aarch64-builtins.c:
33814 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
33815 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
33816 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
33817 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
33818 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
33819 (AARCH64_ISA_SM4): New ISA flag.
33820 (TARGET_SM4): New feature flag for sm4.
33821 * config/aarch64/aarch64-simd-builtins.def
33822 (aarch64_sm3ss1qv4si): Ditto.
33823 (aarch64_sm3tt1aq4si): Ditto.
33824 (aarch64_sm3tt1bq4si): Ditto.
33825 (aarch64_sm3tt2aq4si): Ditto.
33826 (aarch64_sm3tt2bq4si): Ditto.
33827 (aarch64_sm3partw1qv4si): Ditto.
33828 (aarch64_sm3partw2qv4si): Ditto.
33829 (aarch64_sm4eqv4si): Ditto.
33830 (aarch64_sm4ekeyqv4si): Ditto.
33831 * config/aarch64/aarch64-simd.md:
33832 (aarch64_sm3ss1qv4si): Ditto.
33833 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
33834 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
33835 (aarch64_sm4eqv4si): Ditto.
33836 (aarch64_sm4ekeyqv4si): Ditto.
33837 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
33838 (sm3part_op): Ditto.
33839 (CRYPTO_SM3TT): Ditto.
33840 (CRYPTO_SM3PART): Ditto.
33841 (UNSPEC_SM3SS1): New unspec.
33842 (UNSPEC_SM3TT1A): Ditto.
33843 (UNSPEC_SM3TT1B): Ditto.
33844 (UNSPEC_SM3TT2A): Ditto.
33845 (UNSPEC_SM3TT2B): Ditto.
33846 (UNSPEC_SM3PARTW1): Ditto.
33847 (UNSPEC_SM3PARTW2): Ditto.
33848 (UNSPEC_SM4E): Ditto.
33849 (UNSPEC_SM4EKEY): Ditto.
33850 * config/aarch64/constraints.md (Ui2): New constraint.
33851 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
33852 * config/arm/types.md (crypto_sm3): New type attribute.
33853 (crypto_sm4): Ditto.
33854 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
33855 (vsm3tt1aq_u32): Ditto.
33856 (vsm3tt1bq_u32): Ditto.
33857 (vsm3tt2aq_u32): Ditto.
33858 (vsm3tt2bq_u32): Ditto.
33859 (vsm3partw1q_u32): Ditto.
33860 (vsm3partw2q_u32): Ditto.
33861 (vsm4eq_u32): Ditto.
33862 (vsm4ekeyq_u32): Ditto.
33863 (doc/invoke.texi): Document new sm4 option.
33865 2018-01-10 Michael Collison <michael.collison@arm.com>
33867 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
33868 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
33869 (AARCH64_FL_FOR_ARCH8_4): New.
33870 (AARCH64_FL_V8_4): New flag.
33871 (doc/invoke.texi): Document new armv8.4-a option.
33873 2018-01-10 Michael Collison <michael.collison@arm.com>
33875 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
33876 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
33877 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
33878 * config/aarch64/aarch64-option-extension.def: Add
33879 AARCH64_OPT_EXTENSION of 'sha2'.
33880 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
33881 (crypto): Disable sha2 and aes if crypto disabled.
33882 (crypto): Enable aes and sha2 if enabled.
33883 (simd): Disable sha2 and aes if simd disabled.
33884 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
33886 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
33887 (TARGET_SHA2): New feature flag for sha2.
33888 (TARGET_AES): New feature flag for aes.
33889 * config/aarch64/aarch64-simd.md:
33890 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
33891 conditional on TARGET_AES.
33892 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
33893 (aarch64_crypto_sha1hsi): Make pattern conditional
33895 (aarch64_crypto_sha1hv4si): Ditto.
33896 (aarch64_be_crypto_sha1hv4si): Ditto.
33897 (aarch64_crypto_sha1su1v4si): Ditto.
33898 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
33899 (aarch64_crypto_sha1su0v4si): Ditto.
33900 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
33901 (aarch64_crypto_sha256su0v4si): Ditto.
33902 (aarch64_crypto_sha256su1v4si): Ditto.
33903 (doc/invoke.texi): Document new aes and sha2 options.
33905 2018-01-10 Martin Sebor <msebor@redhat.com>
33907 PR tree-optimization/83781
33908 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
33911 2018-01-11 Martin Sebor <msebor@gmail.com>
33912 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
33914 PR tree-optimization/83501
33915 PR tree-optimization/81703
33917 * tree-ssa-strlen.c (get_string_cst): Rename...
33918 (get_string_len): ...to this. Handle global constants.
33919 (handle_char_store): Adjust.
33921 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
33922 Jim Wilson <jimw@sifive.com>
33924 * config/riscv/riscv-protos.h (riscv_output_return): New.
33925 * config/riscv/riscv.c (struct machine_function): New naked_p field.
33926 (riscv_attribute_table, riscv_output_return),
33927 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
33928 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
33929 (riscv_compute_frame_info): Only compute frame->mask if not a naked
33931 (riscv_expand_prologue): Add early return for naked function.
33932 (riscv_expand_epilogue): Likewise.
33933 (riscv_function_ok_for_sibcall): Return false for naked function.
33934 (riscv_set_current_function): New.
33935 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
33936 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
33937 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
33938 * doc/extend.texi (RISC-V Function Attributes): New.
33940 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
33942 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
33943 check for 128-bit long double before checking TCmode.
33944 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
33945 128-bit long doubles before checking TFmode or TCmode.
33946 (FLOAT128_IBM_P): Likewise.
33948 2018-01-10 Martin Sebor <msebor@redhat.com>
33950 PR tree-optimization/83671
33951 * builtins.c (c_strlen): Unconditionally return zero for the empty
33953 Use -Warray-bounds for warnings.
33954 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
33955 for non-constant array indices with COMPONENT_REF, arrays of
33956 arrays, and pointers to arrays.
33957 (gimple_fold_builtin_strlen): Determine and set length range for
33958 non-constant character arrays.
33960 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
33962 PR middle-end/81897
33963 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
33966 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
33968 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
33970 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
33973 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
33974 VECTOR_MEM_ALTIVEC_OR_VSX_P.
33975 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
33976 indexed_or_indirect_operand predicate.
33977 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
33978 (*vsx_le_perm_load_v8hi): Likewise.
33979 (*vsx_le_perm_load_v16qi): Likewise.
33980 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
33981 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
33982 (*vsx_le_perm_store_v8hi): Likewise.
33983 (*vsx_le_perm_store_v16qi): Likewise.
33984 (eight unnamed splitters): Likewise.
33986 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
33988 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
33989 * config/rs6000/emmintrin.h: Likewise.
33990 * config/rs6000/mmintrin.h: Likewise.
33991 * config/rs6000/xmmintrin.h: Likewise.
33993 2018-01-10 David Malcolm <dmalcolm@redhat.com>
33996 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
33998 * tree.c (tree_nop_conversion): Return true for location wrapper
34000 (maybe_wrap_with_location): New function.
34001 (selftest::check_strip_nops): New function.
34002 (selftest::test_location_wrappers): New function.
34003 (selftest::tree_c_tests): Call it.
34004 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
34005 (maybe_wrap_with_location): New decl.
34006 (EXPR_LOCATION_WRAPPER_P): New macro.
34007 (location_wrapper_p): New inline function.
34008 (tree_strip_any_location_wrapper): New inline function.
34010 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
34013 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
34014 stack_realign_offset for the largest alignment of stack slot
34016 (ix86_find_max_used_stack_alignment): New function.
34017 (ix86_finalize_stack_frame_flags): Use it. Set
34018 max_used_stack_alignment if we don't realign stack.
34019 * config/i386/i386.h (machine_function): Add
34020 max_used_stack_alignment.
34022 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
34024 * config/arm/arm.opt (-mbranch-cost): New option.
34025 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
34028 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
34031 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
34032 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
34034 2018-01-10 Richard Biener <rguenther@suse.de>
34037 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
34038 early out so it also covers the case where we have a non-NULL
34041 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
34043 PR tree-optimization/83753
34044 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
34045 for non-strided grouped accesses if the number of elements is 1.
34047 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
34050 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
34051 * i386.h (TARGET_USE_GATHER): Define.
34052 * x86-tune.def (X86_TUNE_USE_GATHER): New.
34054 2018-01-10 Martin Liska <mliska@suse.cz>
34057 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
34058 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
34060 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
34061 CLEANUP_NO_PARTITIONING is not set.
34063 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
34065 * doc/rtl.texi: Remove documentation of (const ...) wrappers
34066 for vectors, as a partial revert of r254296.
34067 * rtl.h (const_vec_p): Delete.
34068 (const_vec_duplicate_p): Don't test for vector CONSTs.
34069 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
34070 * expmed.c (make_tree): Likewise.
34073 * common.md (E, F): Use CONSTANT_P instead of checking for
34075 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
34076 checking for CONST_VECTOR.
34078 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
34080 PR middle-end/83575
34081 * predict.c (force_edge_cold): Handle in more sane way edges
34082 with no prediction.
34084 2018-01-09 Carl Love <cel@us.ibm.com>
34086 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
34088 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
34089 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
34090 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
34091 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
34092 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
34093 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
34094 * config/rs6000/rs6000-protos.h: Add extern defition for
34095 rs6000_generate_float2_double_code.
34096 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
34098 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
34099 (float2_v2df): Add define_expand.
34101 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
34104 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
34105 op_mode in the force_to_mode call.
34107 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
34109 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
34110 instead of checking each element individually.
34111 (aarch64_evpc_uzp): Likewise.
34112 (aarch64_evpc_zip): Likewise.
34113 (aarch64_evpc_ext): Likewise.
34114 (aarch64_evpc_rev): Likewise.
34115 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
34116 instead of checking each element individually. Return true without
34118 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
34119 whether all selected elements come from the same input, instead of
34120 checking each element individually. Remove calls to gen_rtx_REG,
34121 start_sequence and end_sequence and instead assert that no rtl is
34124 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
34126 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
34127 order of HIGH and CONST checks.
34129 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
34131 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
34132 if the destination isn't an SSA_NAME.
34134 2018-01-09 Richard Biener <rguenther@suse.de>
34136 PR tree-optimization/83668
34137 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
34139 (canonicalize_loop_form): ... here, renamed from ...
34140 (canonicalize_loop_closed_ssa_form): ... this and amended to
34141 swap successor edges for loop exit blocks to make us use
34142 the RPO order we need for initial schedule generation.
34144 2018-01-09 Joseph Myers <joseph@codesourcery.com>
34146 PR tree-optimization/64811
34147 * match.pd: When optimizing comparisons with Inf, avoid
34148 introducing or losing exceptions from comparisons with NaN.
34150 2018-01-09 Martin Liska <mliska@suse.cz>
34153 * asan.c (shadow_mem_size): Add gcc_assert.
34155 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
34157 Don't save registers in main().
34160 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
34161 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
34162 * config/avr/avr.c (avr_set_current_function): Don't error if
34163 naked, OS_task or OS_main are specified at the same time.
34164 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
34166 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
34168 * common/config/avr/avr-common.c (avr_option_optimization_table):
34169 Switch on -mmain-is-OS_task for optimizing compilations.
34171 2018-01-09 Richard Biener <rguenther@suse.de>
34173 PR tree-optimization/83572
34174 * graphite.c: Include cfganal.h.
34175 (graphite_transform_loops): Connect infinite loops to exit
34176 and remove fake edges at the end.
34178 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
34180 * ipa-inline.c (edge_badness): Revert accidental checkin.
34182 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
34185 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
34186 symbols; not inline clones.
34188 2018-01-09 Jakub Jelinek <jakub@redhat.com>
34191 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
34192 hard registers. Formatting fixes.
34194 PR preprocessor/83722
34195 * gcc.c (try_generate_repro): Pass
34196 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
34197 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
34200 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
34201 Kito Cheng <kito.cheng@gmail.com>
34203 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
34204 (riscv_leaf_function_p): Delete.
34205 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
34207 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
34209 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
34211 (do_ifelse): New function.
34212 (do_isel): New function.
34213 (do_sub3): New function.
34214 (do_add3): New function.
34215 (do_load_mask_compare): New function.
34216 (do_overlap_load_compare): New function.
34217 (expand_compare_loop): New function.
34218 (expand_block_compare): Call expand_compare_loop() when appropriate.
34219 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
34220 option description.
34221 (-mblock-compare-inline-loop-limit): New option.
34223 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
34226 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
34227 Reverse order of second and third operands in first alternative.
34228 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
34229 of first and second elements in UNSPEC_VPERMR vector.
34230 (altivec_expand_vec_perm_le): Likewise.
34232 2018-01-08 Jeff Law <law@redhat.com>
34234 PR rtl-optimizatin/81308
34235 * tree-switch-conversion.c (cfg_altered): New file scoped static.
34236 (process_switch): If group_case_labels makes a change, then set
34238 (pass_convert_switch::execute): If a switch is converted, then
34239 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
34241 PR rtl-optimization/81308
34242 * recog.c (split_all_insns): Conditionally cleanup the CFG after
34245 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
34247 PR target/83663 - Revert r255946
34248 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
34249 generation for cases where splatting a value is not useful.
34250 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
34251 across a vec_duplicate and a paradoxical subreg forming a vector
34252 mode to a vec_concat.
34254 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
34256 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
34257 -march=armv8.3-a variants.
34258 * config/arm/t-multilib: Likewise.
34259 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
34261 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
34263 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
34265 (cceq_ior_compare_complement): Give it a name so I can use it, and
34266 change boolean_or_operator predicate to boolean_operator so it can
34267 be used to generate a crand.
34268 (eqne): New code iterator.
34269 (bd/bd_neg): New code_attrs.
34270 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
34271 a single define_insn.
34272 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
34273 decrement (bdnzt/bdnzf/bdzt/bdzf).
34274 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
34275 with the new names of the branch decrement patterns, and added the
34276 names of the branch decrement conditional patterns.
34278 2018-01-08 Richard Biener <rguenther@suse.de>
34280 PR tree-optimization/83563
34281 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
34284 2018-01-08 Richard Biener <rguenther@suse.de>
34286 PR middle-end/83713
34287 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
34289 2018-01-08 Richard Biener <rguenther@suse.de>
34291 PR tree-optimization/83685
34292 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
34293 references to abnormals.
34295 2018-01-08 Richard Biener <rguenther@suse.de>
34298 * dwarf2out.c (output_indirect_strings): Handle empty
34299 skeleton_debug_str_hash.
34300 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
34302 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
34304 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
34305 (emit_store_direct): Likewise.
34306 (arc_trampoline_adjust_address): Likewise.
34307 (arc_asm_trampoline_template): New function.
34308 (arc_initialize_trampoline): Use asm_trampoline_template.
34309 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
34310 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
34311 * config/arc/arc.md (flush_icache): Delete pattern.
34313 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
34315 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
34316 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
34319 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
34322 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
34323 by not USED_FOR_TARGET.
34324 (make_pass_resolve_sw_modes): Likewise.
34326 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
34328 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
34331 2018-01-08 Richard Biener <rguenther@suse.de>
34333 PR middle-end/83580
34334 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
34336 2018-01-08 Richard Biener <rguenther@suse.de>
34338 PR middle-end/83517
34339 * match.pd ((t * 2) / 2) -> t): Add missing :c.
34341 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
34343 PR middle-end/81897
34344 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
34345 basic blocks with a small number of successors.
34346 (convert_control_dep_chain_into_preds): Improve handling of
34348 (dump_predicates): Split apart into...
34349 (dump_pred_chain): ...here...
34350 (dump_pred_info): ...and here.
34351 (can_one_predicate_be_invalidated_p): Add debugging printfs.
34352 (can_chain_union_be_invalidated_p): Improve check for invalidation
34354 (uninit_uses_cannot_happen): Avoid unnecessary if
34355 convert_control_dep_chain_into_preds yielded nothing.
34357 2018-01-06 Martin Sebor <msebor@redhat.com>
34359 PR tree-optimization/83640
34360 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
34361 subtracting negative offset from size.
34362 (builtin_access::overlap): Adjust offset bounds of the access to fall
34363 within the size of the object if possible.
34365 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
34367 PR rtl-optimization/83699
34368 * expmed.c (extract_bit_field_1): Restrict the vector usage of
34369 extract_bit_field_as_subreg to cases in which the extracted
34370 value is also a vector.
34372 * lra-constraints.c (process_alt_operands): Test for the equivalence
34373 substitutions when detecting a possible reload cycle.
34375 2018-01-06 Jakub Jelinek <jakub@redhat.com>
34378 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
34379 by default if flag_selective_schedling{,2}. Formatting fixes.
34381 PR rtl-optimization/83682
34382 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
34383 if it has non-VECTOR_MODE element mode.
34384 (vec_duplicate_p): Likewise.
34386 PR middle-end/83694
34387 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
34388 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
34390 2018-01-05 Jakub Jelinek <jakub@redhat.com>
34393 * config/i386/i386-builtin.def
34394 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
34395 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
34396 Require also OPTION_MASK_ISA_AVX512F in addition to
34397 OPTION_MASK_ISA_GFNI.
34398 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
34399 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
34400 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
34401 to OPTION_MASK_ISA_GFNI.
34402 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
34403 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
34404 OPTION_MASK_ISA_AVX512BW.
34405 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
34406 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
34407 addition to OPTION_MASK_ISA_GFNI.
34408 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
34409 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
34410 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
34411 to OPTION_MASK_ISA_GFNI.
34412 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
34413 a requirement for all ISAs rather than any of them with a few
34415 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
34417 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
34418 bitmasks to be enabled with 3 exceptions, instead of requiring any
34419 enabled ISA with lots of exceptions.
34420 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
34421 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
34422 Change avx512bw in isa attribute to avx512f.
34423 * config/i386/sgxintrin.h: Add license boilerplate.
34424 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
34425 to __AVX512F__ and __AVX512VL to __AVX512VL__.
34426 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
34427 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
34429 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
34430 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
34431 temporarily sse2 rather than sse if not enabled already.
34434 * config/i386/sse.md (VI248_VLBW): Rename to ...
34435 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
34436 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
34437 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
34438 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
34439 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
34440 mode iterator instead of VI248_VLBW.
34442 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
34444 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
34445 (record_modified): Skip clobbers; add debug output.
34446 (param_change_prob): Use sreal frequencies.
34448 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
34450 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
34451 punt for user-aligned variables.
34453 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
34455 * tree-chrec.c (chrec_contains_symbols): Return true for
34458 2018-01-05 Sudakshina Das <sudi.das@arm.com>
34461 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
34462 of (x|y) == x for BICS pattern.
34464 2018-01-05 Jakub Jelinek <jakub@redhat.com>
34466 PR tree-optimization/83605
34467 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
34468 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
34471 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
34473 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
34474 * config/epiphany/rtems.h: New file.
34476 2018-01-04 Jakub Jelinek <jakub@redhat.com>
34477 Uros Bizjak <ubizjak@gmail.com>
34480 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
34481 QIreg_operand instead of register_operand predicate.
34482 * config/i386/i386.c (ix86_rop_should_change_byte_p,
34483 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
34484 comments instead of -fmitigate[-_]rop.
34486 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
34489 * cgraphunit.c (symbol_table::compile): Switch to text_section
34490 before calling assembly_start debug hook.
34491 * run-rtl-passes.c (run_rtl_passes): Likewise.
34494 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34496 * tree-vrp.c (extract_range_from_binary_expr_1): Check
34497 range_int_cst_p rather than !symbolic_range_p before calling
34498 extract_range_from_multiplicative_op_1.
34500 2018-01-04 Jeff Law <law@redhat.com>
34502 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
34503 redundant test in assertion.
34505 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34507 * doc/rtl.texi: Document machine_mode wrapper classes.
34509 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34511 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
34512 using tree_to_uhwi.
34514 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34516 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
34517 the VEC_PERM_EXPR fold to fail.
34519 2018-01-04 Jakub Jelinek <jakub@redhat.com>
34522 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
34523 to switched_sections.
34525 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34528 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
34529 test for d.testing.
34531 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
34534 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
34535 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
34537 2018-01-04 Jakub Jelinek <jakub@redhat.com>
34540 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
34541 is BLKmode and bitpos not zero or mode change is needed.
34543 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34546 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
34549 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
34552 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
34553 instead of MULT rtx. Update all corresponding splitters.
34554 (*saddl_se): Ditto.
34555 (*ssub<modesuffix>): Ditto.
34556 (*ssubl_se): Ditto.
34557 (*cmp_sadd_di): Update split patterns.
34558 (*cmp_sadd_si): Ditto.
34559 (*cmp_sadd_sidi): Ditto.
34560 (*cmp_ssub_di): Ditto.
34561 (*cmp_ssub_si): Ditto.
34562 (*cmp_ssub_sidi): Ditto.
34563 * config/alpha/predicates.md (const23_operand): New predicate.
34564 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
34565 Look for ASHIFT, not MULT inner operand.
34566 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
34568 2018-01-04 Martin Liska <mliska@suse.cz>
34570 PR gcov-profile/83669
34571 * gcov.c (output_intermediate_file): Add version to intermediate
34573 * doc/gcov.texi: Document new field 'version' in intermediate
34574 file format. Fix location of '-k' option of gcov command.
34576 2018-01-04 Martin Liska <mliska@suse.cz>
34579 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
34581 2018-01-04 Jakub Jelinek <jakub@redhat.com>
34583 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
34585 2018-01-03 Martin Sebor <msebor@redhat.com>
34587 PR tree-optimization/83655
34588 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
34589 checking calls with invalid arguments.
34591 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34593 * tree-vect-stmts.c (vect_get_store_rhs): New function.
34594 (vectorizable_mask_load_store): Delete.
34595 (vectorizable_call): Return false for masked loads and stores.
34596 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
34597 instead of gimple_assign_rhs1.
34598 (vectorizable_load): Handle IFN_MASK_LOAD.
34599 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
34601 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34603 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
34605 (vectorizable_mask_load_store): ...here.
34606 (vectorizable_load): ...and here.
34608 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34610 * tree-vect-stmts.c (vect_build_all_ones_mask)
34611 (vect_build_zero_merge_argument): New functions, split out from...
34612 (vectorizable_load): ...here.
34614 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34616 * tree-vect-stmts.c (vect_check_store_rhs): New function,
34618 (vectorizable_mask_load_store): ...here.
34619 (vectorizable_store): ...and here.
34621 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34623 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
34625 (vectorizable_mask_load_store): ...here.
34627 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34629 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
34630 (vect_model_store_cost): Take a vec_load_store_type instead of a
34632 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
34633 (vect_model_store_cost): Take a vec_load_store_type instead of a
34635 (vectorizable_mask_load_store): Update accordingly.
34636 (vectorizable_store): Likewise.
34637 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
34639 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34641 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
34642 IFN_MASK_LOAD calls here rather than...
34643 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
34645 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34646 Alan Hayward <alan.hayward@arm.com>
34647 David Sherwood <david.sherwood@arm.com>
34649 * expmed.c (extract_bit_field_1): For vector extracts,
34650 fall back to extract_bit_field_as_subreg if vec_extract
34653 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34654 Alan Hayward <alan.hayward@arm.com>
34655 David Sherwood <david.sherwood@arm.com>
34657 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
34658 they are variable or constant sized.
34659 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
34660 slots for constant-sized data.
34662 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34663 Alan Hayward <alan.hayward@arm.com>
34664 David Sherwood <david.sherwood@arm.com>
34666 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
34667 handling COND_EXPRs with boolean comparisons, try to find a better
34668 basis for the mask type than the boolean itself.
34670 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34672 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
34673 is calculated and how it can be overridden.
34674 * genmodes.c (max_bitsize_mode_any_mode): New variable.
34675 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
34677 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
34680 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34681 Alan Hayward <alan.hayward@arm.com>
34682 David Sherwood <david.sherwood@arm.com>
34684 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
34685 Remove the mode argument.
34686 (aarch64_simd_valid_immediate): Remove the mode and inverse
34688 * config/aarch64/iterators.md (bitsize): New iterator.
34689 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
34690 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
34691 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
34692 aarch64_simd_valid_immediate.
34693 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
34694 (aarch64_reg_or_bic_imm): Likewise.
34695 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
34696 with an insn_type enum and msl with a modifier_type enum.
34697 Replace element_width with a scalar_mode. Change the shift
34698 to unsigned int. Add constructors for scalar_float_mode and
34699 scalar_int_mode elements.
34700 (aarch64_vect_float_const_representable_p): Delete.
34701 (aarch64_can_const_movi_rtx_p)
34702 (aarch64_simd_scalar_immediate_valid_for_move)
34703 (aarch64_simd_make_constant): Update call to
34704 aarch64_simd_valid_immediate.
34705 (aarch64_advsimd_valid_immediate_hs): New function.
34706 (aarch64_advsimd_valid_immediate): Likewise.
34707 (aarch64_simd_valid_immediate): Remove mode and inverse
34708 arguments. Rewrite to use the above. Use const_vec_duplicate_p
34709 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
34710 and aarch64_float_const_representable_p on the result.
34711 (aarch64_output_simd_mov_immediate): Remove mode argument.
34712 Update call to aarch64_simd_valid_immediate and use of
34713 simd_immediate_info.
34714 (aarch64_output_scalar_simd_mov_immediate): Update call
34717 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34718 Alan Hayward <alan.hayward@arm.com>
34719 David Sherwood <david.sherwood@arm.com>
34721 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
34722 (mode_nunits): Likewise CONST_MODE_NUNITS.
34723 * machmode.def (ADJUST_NUNITS): Document.
34724 * genmodes.c (mode_data::need_nunits_adj): New field.
34725 (blank_mode): Update accordingly.
34726 (adj_nunits): New variable.
34727 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
34729 (emit_mode_size_inline): Set need_bytesize_adj for all modes
34730 listed in adj_nunits.
34731 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
34732 listed in adj_nunits. Don't emit case statements for such modes.
34733 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
34734 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
34735 nothing if adj_nunits is nonnull.
34736 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
34737 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
34738 (emit_mode_fbit): Update use of print_maybe_const_decl.
34739 (emit_move_size): Likewise. Treat the array as non-const
34741 (emit_mode_adjustments): Handle adj_nunits.
34743 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34745 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
34746 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
34747 (VECTOR_MODES): Use it.
34748 (make_vector_modes): Take the prefix as an argument.
34750 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34751 Alan Hayward <alan.hayward@arm.com>
34752 David Sherwood <david.sherwood@arm.com>
34754 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
34755 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
34756 for MODE_VECTOR_BOOL.
34757 * machmode.def (VECTOR_BOOL_MODE): Document.
34758 * genmodes.c (VECTOR_BOOL_MODE): New macro.
34759 (make_vector_bool_mode): New function.
34760 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
34762 * lto-streamer-in.c (lto_input_mode_table): Likewise.
34763 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
34765 * stor-layout.c (int_mode_for_mode): Likewise.
34766 * tree.c (build_vector_type_for_mode): Likewise.
34767 * varasm.c (output_constant_pool_2): Likewise.
34768 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
34769 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
34770 for MODE_VECTOR_BOOL.
34771 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
34772 of mode class checks.
34773 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
34774 instead of a list of mode class checks.
34775 (expand_vector_scalar_condition): Likewise.
34776 (type_for_widest_vector_mode): Handle BImode as an inner mode.
34778 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34779 Alan Hayward <alan.hayward@arm.com>
34780 David Sherwood <david.sherwood@arm.com>
34782 * machmode.h (mode_size): Change from unsigned short to
34784 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
34785 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
34786 or if measurement_type is not polynomial.
34787 (fixed_size_mode::includes_p): Check for constant-sized modes.
34788 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
34789 return a poly_uint16 rather than an unsigned short.
34790 (emit_mode_size): Change the type of mode_size from unsigned short
34791 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
34792 (emit_mode_adjustments): Cope with polynomial vector sizes.
34793 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
34795 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
34797 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
34798 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
34799 * caller-save.c (setup_save_areas): Likewise.
34800 (replace_reg_with_saved_mem): Likewise.
34801 * calls.c (emit_library_call_value_1): Likewise.
34802 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
34803 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
34804 (gen_lowpart_for_combine): Likewise.
34805 * convert.c (convert_to_integer_1): Likewise.
34806 * cse.c (equiv_constant, cse_insn): Likewise.
34807 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
34808 (cselib_subst_to_values): Likewise.
34809 * dce.c (word_dce_process_block): Likewise.
34810 * df-problems.c (df_word_lr_mark_ref): Likewise.
34811 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
34812 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
34813 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
34814 (rtl_for_decl_location): Likewise.
34815 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
34816 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
34817 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
34818 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
34819 (expand_expr_real_1): Likewise.
34820 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
34821 (pad_below): Likewise.
34822 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
34823 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
34824 * ira.c (get_subreg_tracking_sizes): Likewise.
34825 * ira-build.c (ira_create_allocno_objects): Likewise.
34826 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
34827 (ira_sort_regnos_for_alter_reg): Likewise.
34828 * ira-costs.c (record_operand_costs): Likewise.
34829 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
34830 (resolve_simple_move): Likewise.
34831 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
34832 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
34833 (lra_constraints): Likewise.
34834 (CONST_POOL_OK_P): Reject variable-sized modes.
34835 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
34836 (add_pseudo_to_slot, lra_spill): Likewise.
34837 * omp-low.c (omp_clause_aligned_alignment): Likewise.
34838 * optabs-query.c (get_best_extraction_insn): Likewise.
34839 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
34840 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
34841 (expand_mult_highpart, valid_multiword_target_p): Likewise.
34842 * recog.c (offsettable_address_addr_space_p): Likewise.
34843 * regcprop.c (maybe_mode_change): Likewise.
34844 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
34845 * regrename.c (build_def_use): Likewise.
34846 * regstat.c (dump_reg_info): Likewise.
34847 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
34848 (find_reloads, find_reloads_subreg_address): Likewise.
34849 * reload1.c (eliminate_regs_1): Likewise.
34850 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
34851 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
34852 (simplify_binary_operation_1, simplify_subreg): Likewise.
34853 * targhooks.c (default_function_arg_padding): Likewise.
34854 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
34855 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
34856 (verify_gimple_assign_ternary): Likewise.
34857 * tree-inline.c (estimate_move_cost): Likewise.
34858 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
34859 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
34860 (get_address_cost_ainc): Likewise.
34861 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
34862 (vect_supportable_dr_alignment): Likewise.
34863 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
34864 (vectorizable_reduction): Likewise.
34865 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
34866 (vectorizable_operation, vectorizable_load): Likewise.
34867 * tree.c (build_same_sized_truth_vector_type): Likewise.
34868 * valtrack.c (cleanup_auto_inc_dec): Likewise.
34869 * var-tracking.c (emit_note_insn_var_location): Likewise.
34870 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
34871 (ADDR_VEC_ALIGN): Likewise.
34873 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34874 Alan Hayward <alan.hayward@arm.com>
34875 David Sherwood <david.sherwood@arm.com>
34877 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
34879 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
34880 or if measurement_type is polynomial.
34881 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
34882 * combine.c (make_extraction): Likewise.
34883 * dse.c (find_shift_sequence): Likewise.
34884 * dwarf2out.c (mem_loc_descriptor): Likewise.
34885 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
34886 (extract_bit_field, extract_low_bits): Likewise.
34887 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
34888 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
34889 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
34890 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
34891 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
34892 * reload.c (find_reloads): Likewise.
34893 * reload1.c (alter_reg): Likewise.
34894 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
34895 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
34896 * tree-if-conv.c (predicate_mem_writes): Likewise.
34897 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
34898 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
34899 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
34900 * valtrack.c (dead_debug_insert_temp): Likewise.
34901 * varasm.c (mergeable_constant_section): Likewise.
34902 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
34904 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34905 Alan Hayward <alan.hayward@arm.com>
34906 David Sherwood <david.sherwood@arm.com>
34908 * expr.c (expand_assignment): Cope with polynomial mode sizes
34909 when assigning to a CONCAT.
34911 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34912 Alan Hayward <alan.hayward@arm.com>
34913 David Sherwood <david.sherwood@arm.com>
34915 * machmode.h (mode_precision): Change from unsigned short to
34917 (mode_to_precision): Return a poly_uint16 rather than an unsigned
34919 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
34920 or if measurement_type is not polynomial.
34921 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
34922 in which the mode is already known to be a scalar_int_mode.
34923 * genmodes.c (emit_mode_precision): Change the type of mode_precision
34924 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
34926 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
34927 for GET_MODE_PRECISION.
34928 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
34929 for GET_MODE_PRECISION.
34930 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
34932 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
34933 (expand_field_assignment, make_extraction): Likewise.
34934 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
34935 (get_last_value): Likewise.
34936 * convert.c (convert_to_integer_1): Likewise.
34937 * cse.c (cse_insn): Likewise.
34938 * expr.c (expand_expr_real_1): Likewise.
34939 * lra-constraints.c (simplify_operand_subreg): Likewise.
34940 * optabs-query.c (can_atomic_load_p): Likewise.
34941 * optabs.c (expand_atomic_load): Likewise.
34942 (expand_atomic_store): Likewise.
34943 * ree.c (combine_reaching_defs): Likewise.
34944 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
34945 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
34946 * tree.h (type_has_mode_precision_p): Likewise.
34947 * ubsan.c (instrument_si_overflow): Likewise.
34949 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34950 Alan Hayward <alan.hayward@arm.com>
34951 David Sherwood <david.sherwood@arm.com>
34953 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
34954 polynomial numbers of units.
34955 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
34956 (valid_vector_subparts_p): New function.
34957 (build_vector_type): Remove temporary shim and take the number
34958 of units as a poly_uint64 rather than an int.
34959 (build_opaque_vector_type): Take the number of units as a
34960 poly_uint64 rather than an int.
34961 * tree.c (build_vector_from_ctor): Handle polynomial
34962 TYPE_VECTOR_SUBPARTS.
34963 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
34964 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
34965 (build_vector_from_val): If the number of units is variable,
34966 use build_vec_duplicate_cst for constant operands and
34967 VEC_DUPLICATE_EXPR otherwise.
34968 (make_vector_type): Remove temporary is_constant ().
34969 (build_vector_type, build_opaque_vector_type): Take the number of
34970 units as a poly_uint64 rather than an int.
34971 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
34973 * cfgexpand.c (expand_debug_expr): Likewise.
34974 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
34975 (store_constructor, expand_expr_real_1): Likewise.
34976 (const_scalar_mask_from_tree): Likewise.
34977 * fold-const-call.c (fold_const_reduction): Likewise.
34978 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
34979 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
34980 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
34981 (fold_relational_const): Likewise.
34982 (native_interpret_vector): Likewise. Change the size from an
34983 int to an unsigned int.
34984 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
34985 TYPE_VECTOR_SUBPARTS.
34986 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
34987 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
34988 duplicating a non-constant operand into a variable-length vector.
34989 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
34990 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
34991 * ipa-icf.c (sem_variable::equals): Likewise.
34992 * match.pd: Likewise.
34993 * omp-simd-clone.c (simd_clone_subparts): Likewise.
34994 * print-tree.c (print_node): Likewise.
34995 * stor-layout.c (layout_type): Likewise.
34996 * targhooks.c (default_builtin_vectorization_cost): Likewise.
34997 * tree-cfg.c (verify_gimple_comparison): Likewise.
34998 (verify_gimple_assign_binary): Likewise.
34999 (verify_gimple_assign_ternary): Likewise.
35000 (verify_gimple_assign_single): Likewise.
35001 * tree-pretty-print.c (dump_generic_node): Likewise.
35002 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
35003 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
35004 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
35005 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
35006 (vect_shift_permute_load_chain): Likewise.
35007 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
35008 (expand_vector_condition, optimize_vector_constructor): Likewise.
35009 (lower_vec_perm, get_compute_type): Likewise.
35010 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
35011 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
35012 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
35013 (vect_recog_mask_conversion_pattern): Likewise.
35014 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
35015 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
35016 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
35017 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
35018 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
35019 (vectorizable_shift, vectorizable_operation, vectorizable_store)
35020 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
35021 (supportable_widening_operation): Likewise.
35022 (supportable_narrowing_operation): Likewise.
35023 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
35025 * varasm.c (output_constant): Likewise.
35027 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35028 Alan Hayward <alan.hayward@arm.com>
35029 David Sherwood <david.sherwood@arm.com>
35031 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
35032 so that both the length == 3 and length != 3 cases set up their
35033 own permute vectors. Add comments explaining why we know the
35034 number of elements is constant.
35035 (vect_permute_load_chain): Likewise.
35037 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35038 Alan Hayward <alan.hayward@arm.com>
35039 David Sherwood <david.sherwood@arm.com>
35041 * machmode.h (mode_nunits): Change from unsigned char to
35043 (ONLY_FIXED_SIZE_MODES): New macro.
35044 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
35045 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
35046 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
35048 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
35049 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
35050 or if measurement_type is not polynomial.
35051 * genmodes.c (ZERO_COEFFS): New macro.
35052 (emit_mode_nunits_inline): Make mode_nunits_inline return a
35054 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
35055 Use ZERO_COEFFS when emitting initializers.
35056 * data-streamer.h (bp_pack_poly_value): New function.
35057 (bp_unpack_poly_value): Likewise.
35058 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
35059 for GET_MODE_NUNITS.
35060 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
35061 for GET_MODE_NUNITS.
35062 * tree.c (make_vector_type): Remove temporary shim and make
35063 the real function take the number of units as a poly_uint64
35064 rather than an int.
35065 (build_vector_type_for_mode): Handle polynomial nunits.
35066 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
35067 * emit-rtl.c (const_vec_series_p_1): Likewise.
35068 (gen_rtx_CONST_VECTOR): Likewise.
35069 * fold-const.c (test_vec_duplicate_folding): Likewise.
35070 * genrecog.c (validate_pattern): Likewise.
35071 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
35072 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
35073 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
35074 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
35075 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
35076 * rtlanal.c (subreg_get_info): Likewise.
35077 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
35078 (vect_grouped_load_supported): Likewise.
35079 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
35080 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
35081 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
35082 (simplify_const_unary_operation, simplify_binary_operation_1)
35083 (simplify_const_binary_operation, simplify_ternary_operation)
35084 (test_vector_ops_duplicate, test_vector_ops): Likewise.
35085 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
35086 instead of CONST_VECTOR_NUNITS.
35087 * varasm.c (output_constant_pool_2): Likewise.
35088 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
35089 explicit-encoded elements in the XVEC for variable-length vectors.
35091 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35093 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
35095 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35096 Alan Hayward <alan.hayward@arm.com>
35097 David Sherwood <david.sherwood@arm.com>
35099 * coretypes.h (fixed_size_mode): Declare.
35100 (fixed_size_mode_pod): New typedef.
35101 * builtins.h (target_builtins::x_apply_args_mode)
35102 (target_builtins::x_apply_result_mode): Change type to
35103 fixed_size_mode_pod.
35104 * builtins.c (apply_args_size, apply_result_size, result_vector)
35105 (expand_builtin_apply_args_1, expand_builtin_apply)
35106 (expand_builtin_return): Update accordingly.
35108 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35110 * cse.c (hash_rtx_cb): Hash only the encoded elements.
35111 * cselib.c (cselib_hash_rtx): Likewise.
35112 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
35113 CONST_VECTOR encoding.
35115 2018-01-03 Jakub Jelinek <jakub@redhat.com>
35116 Jeff Law <law@redhat.com>
35119 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
35120 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
35121 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
35122 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
35125 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
35126 explicitly probe *sp in a noreturn function if there were any callee
35127 register saves or frame pointer is needed.
35129 2018-01-03 Jakub Jelinek <jakub@redhat.com>
35132 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
35133 BLKmode for ternary, binary or unary expressions.
35136 * var-tracking.c (delete_vta_debug_insn): New inline function.
35137 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
35138 insns from get_insns () to NULL instead of each bb separately.
35139 Use delete_vta_debug_insn. No longer static.
35140 (vt_debug_insns_local, variable_tracking_main_1): Adjust
35141 delete_vta_debug_insns callers.
35142 * rtl.h (delete_vta_debug_insns): Declare.
35143 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
35144 instead of variable_tracking_main.
35146 2018-01-03 Martin Sebor <msebor@redhat.com>
35148 PR tree-optimization/83603
35149 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
35150 arguments past the endof the argument list in functions declared
35151 without a prototype.
35152 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
35153 Avoid checking when arguments are null.
35155 2018-01-03 Martin Sebor <msebor@redhat.com>
35158 * doc/extend.texi (attribute const): Fix a typo.
35159 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
35160 issuing -Wsuggest-attribute for void functions.
35162 2018-01-03 Martin Sebor <msebor@redhat.com>
35164 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
35165 offset_int::from instead of wide_int::to_shwi.
35166 (maybe_diag_overlap): Remove assertion.
35167 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
35168 * gimple-ssa-sprintf.c (format_directive): Same.
35169 (parse_directive): Same.
35170 (sprintf_dom_walker::compute_format_length): Same.
35171 (try_substitute_return_value): Same.
35173 2018-01-03 Jeff Law <law@redhat.com>
35175 PR middle-end/83654
35176 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
35177 non-constant residual for zero at runtime and avoid probing in
35178 that case. Reorganize code for trailing problem to mirror handling
35181 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
35183 PR tree-optimization/83501
35184 * tree-ssa-strlen.c (get_string_cst): New.
35185 (handle_char_store): Call get_string_cst.
35187 2018-01-03 Martin Liska <mliska@suse.cz>
35189 PR tree-optimization/83593
35190 * tree-ssa-strlen.c: Include tree-cfg.h.
35191 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
35192 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
35193 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
35195 (strlen_dom_walker::before_dom_children): Call
35196 gimple_purge_dead_eh_edges. Dump tranformation with details
35198 (strlen_dom_walker::before_dom_children): Update call by adding
35199 new argument cleanup_eh.
35200 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
35202 2018-01-03 Martin Liska <mliska@suse.cz>
35205 * cif-code.def (VARIADIC_THUNK): New enum value.
35206 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
35209 2018-01-03 Jan Beulich <jbeulich@suse.com>
35211 * sse.md (mov<mode>_internal): Tighten condition for when to use
35212 vmovdqu<ssescalarsize> for TI and OI modes.
35214 2018-01-03 Jakub Jelinek <jakub@redhat.com>
35216 Update copyright years.
35218 2018-01-03 Martin Liska <mliska@suse.cz>
35221 * ipa-visibility.c (function_and_variable_visibility): Skip
35222 functions with noipa attribure.
35224 2018-01-03 Jakub Jelinek <jakub@redhat.com>
35226 * gcc.c (process_command): Update copyright notice dates.
35227 * gcov-dump.c (print_version): Ditto.
35228 * gcov.c (print_version): Ditto.
35229 * gcov-tool.c (print_version): Ditto.
35230 * gengtype.c (create_file): Ditto.
35231 * doc/cpp.texi: Bump @copying's copyright year.
35232 * doc/cppinternals.texi: Ditto.
35233 * doc/gcc.texi: Ditto.
35234 * doc/gccint.texi: Ditto.
35235 * doc/gcov.texi: Ditto.
35236 * doc/install.texi: Ditto.
35237 * doc/invoke.texi: Ditto.
35239 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35241 * vector-builder.h (vector_builder::m_full_nelts): Change from
35242 unsigned int to poly_uint64.
35243 (vector_builder::full_nelts): Update prototype accordingly.
35244 (vector_builder::new_vector): Likewise.
35245 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
35246 (vector_builder::operator ==): Likewise.
35247 (vector_builder::finalize): Likewise.
35248 * int-vector-builder.h (int_vector_builder::int_vector_builder):
35249 Take the number of elements as a poly_uint64 rather than an
35251 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
35252 from unsigned int to poly_uint64.
35253 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
35254 (vec_perm_indices::new_vector): Likewise.
35255 (vec_perm_indices::length): Likewise.
35256 (vec_perm_indices::nelts_per_input): Likewise.
35257 (vec_perm_indices::input_nelts): Likewise.
35258 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
35259 number of elements per input as a poly_uint64 rather than an
35260 unsigned int. Use the original encoding for variable-length
35261 vectors, rather than clamping each individual element.
35262 For the second and subsequent elements in each pattern,
35263 clamp the step and base before clamping their sum.
35264 (vec_perm_indices::series_p): Handle polynomial element counts.
35265 (vec_perm_indices::all_in_range_p): Likewise.
35266 (vec_perm_indices_to_tree): Likewise.
35267 (vec_perm_indices_to_rtx): Likewise.
35268 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
35269 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
35270 (tree_vector_builder::new_binary_operation): Handle polynomial
35271 element counts. Return false if we need to know the number
35272 of elements at compile time.
35273 * fold-const.c (fold_vec_perm): Punt if the number of elements
35274 isn't known at compile time.
35276 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35278 * vec-perm-indices.h (vec_perm_builder): Change element type
35279 from HOST_WIDE_INT to poly_int64.
35280 (vec_perm_indices::element_type): Update accordingly.
35281 (vec_perm_indices::clamp): Handle polynomial element_types.
35282 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
35283 (vec_perm_indices::all_in_range_p): Likewise.
35284 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
35286 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
35287 polynomial vec_perm_indices element types.
35288 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
35289 * fold-const.c (fold_vec_perm): Likewise.
35290 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
35291 * tree-vect-generic.c (lower_vec_perm): Likewise.
35292 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
35293 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
35294 element type to HOST_WIDE_INT.
35296 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35297 Alan Hayward <alan.hayward@arm.com>
35298 David Sherwood <david.sherwood@arm.com>
35300 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
35301 rather than an int. Use plus_constant.
35302 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
35303 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
35305 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35306 Alan Hayward <alan.hayward@arm.com>
35307 David Sherwood <david.sherwood@arm.com>
35309 * calls.c (emit_call_1, expand_call): Change struct_value_size from
35310 a HOST_WIDE_INT to a poly_int64.
35312 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35313 Alan Hayward <alan.hayward@arm.com>
35314 David Sherwood <david.sherwood@arm.com>
35316 * calls.c (load_register_parameters): Cope with polynomial
35317 mode sizes. Require a constant size for BLKmode parameters
35318 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
35319 forces a parameter to be padded at the lsb end in order to
35320 fill a complete number of words, require the parameter size
35321 to be ordered wrt UNITS_PER_WORD.
35323 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35324 Alan Hayward <alan.hayward@arm.com>
35325 David Sherwood <david.sherwood@arm.com>
35327 * reload1.c (spill_stack_slot_width): Change element type
35328 from unsigned int to poly_uint64_pod.
35329 (alter_reg): Treat mode sizes as polynomial.
35331 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35332 Alan Hayward <alan.hayward@arm.com>
35333 David Sherwood <david.sherwood@arm.com>
35335 * reload.c (complex_word_subreg_p): New function.
35336 (reload_inner_reg_of_subreg, push_reload): Use it.
35338 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35339 Alan Hayward <alan.hayward@arm.com>
35340 David Sherwood <david.sherwood@arm.com>
35342 * lra-constraints.c (process_alt_operands): Reject matched
35343 operands whose sizes aren't ordered.
35344 (match_reload): Refer to this check here.
35346 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35347 Alan Hayward <alan.hayward@arm.com>
35348 David Sherwood <david.sherwood@arm.com>
35350 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
35351 that the mode size is in the set {1, 2, 4, 8, 16}.
35353 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35354 Alan Hayward <alan.hayward@arm.com>
35355 David Sherwood <david.sherwood@arm.com>
35357 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
35358 Use plus_constant instead of gen_rtx_PLUS.
35360 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35361 Alan Hayward <alan.hayward@arm.com>
35362 David Sherwood <david.sherwood@arm.com>
35364 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
35365 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
35366 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
35367 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
35368 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
35369 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
35370 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
35371 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
35372 * config/i386/i386.c (ix86_push_rounding): ...this new function.
35373 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
35375 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
35376 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
35377 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
35378 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
35379 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
35380 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
35381 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
35382 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
35383 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
35384 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
35386 * expr.c (emit_move_resolve_push): Treat the input and result
35387 of PUSH_ROUNDING as a poly_int64.
35388 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
35389 (emit_push_insn): Likewise.
35390 * lra-eliminations.c (mark_not_eliminable): Likewise.
35391 * recog.c (push_operand): Likewise.
35392 * reload1.c (elimination_effects): Likewise.
35393 * rtlanal.c (nonzero_bits1): Likewise.
35394 * calls.c (store_one_arg): Likewise. Require the padding to be
35395 known at compile time.
35397 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35398 Alan Hayward <alan.hayward@arm.com>
35399 David Sherwood <david.sherwood@arm.com>
35401 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
35402 Use plus_constant instead of gen_rtx_PLUS.
35404 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35405 Alan Hayward <alan.hayward@arm.com>
35406 David Sherwood <david.sherwood@arm.com>
35408 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
35409 rather than an int.
35411 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35412 Alan Hayward <alan.hayward@arm.com>
35413 David Sherwood <david.sherwood@arm.com>
35415 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
35416 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
35417 via stack temporaries. Treat the mode size as polynomial too.
35419 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35420 Alan Hayward <alan.hayward@arm.com>
35421 David Sherwood <david.sherwood@arm.com>
35423 * expr.c (expand_expr_real_2): When handling conversions involving
35424 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
35425 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
35426 as a poly_uint64 too.
35428 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35429 Alan Hayward <alan.hayward@arm.com>
35430 David Sherwood <david.sherwood@arm.com>
35432 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
35434 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35435 Alan Hayward <alan.hayward@arm.com>
35436 David Sherwood <david.sherwood@arm.com>
35438 * combine.c (can_change_dest_mode): Handle polynomial
35439 REGMODE_NATURAL_SIZE.
35440 * expmed.c (store_bit_field_1): Likewise.
35441 * expr.c (store_constructor): Likewise.
35442 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
35443 and polynomial REGMODE_NATURAL_SIZE.
35444 (gen_lowpart_common): Likewise.
35445 * reginfo.c (record_subregs_of_mode): Likewise.
35446 * rtlanal.c (read_modify_subreg_p): Likewise.
35448 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35449 Alan Hayward <alan.hayward@arm.com>
35450 David Sherwood <david.sherwood@arm.com>
35452 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
35453 numbers of elements.
35455 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35456 Alan Hayward <alan.hayward@arm.com>
35457 David Sherwood <david.sherwood@arm.com>
35459 * match.pd: Cope with polynomial numbers of vector elements.
35461 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35462 Alan Hayward <alan.hayward@arm.com>
35463 David Sherwood <david.sherwood@arm.com>
35465 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
35466 in a POINTER_PLUS_EXPR.
35468 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35469 Alan Hayward <alan.hayward@arm.com>
35470 David Sherwood <david.sherwood@arm.com>
35472 * omp-simd-clone.c (simd_clone_subparts): New function.
35473 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
35474 (ipa_simd_modify_function_body): Likewise.
35476 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35477 Alan Hayward <alan.hayward@arm.com>
35478 David Sherwood <david.sherwood@arm.com>
35480 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
35481 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
35482 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
35483 (expand_vector_condition, vector_element): Likewise.
35484 (subparts_gt): New function.
35485 (get_compute_type): Use subparts_gt.
35486 (count_type_subparts): Delete.
35487 (expand_vector_operations_1): Use subparts_gt instead of
35488 count_type_subparts.
35490 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35491 Alan Hayward <alan.hayward@arm.com>
35492 David Sherwood <david.sherwood@arm.com>
35494 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
35495 (vect_compile_time_alias): ...this new function. Do the calculation
35496 on poly_ints rather than trees.
35497 (vect_prune_runtime_alias_test_list): Update call accordingly.
35499 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35500 Alan Hayward <alan.hayward@arm.com>
35501 David Sherwood <david.sherwood@arm.com>
35503 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
35505 (vect_schedule_slp_instance): Likewise.
35507 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35508 Alan Hayward <alan.hayward@arm.com>
35509 David Sherwood <david.sherwood@arm.com>
35511 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
35512 constant and extern definitions for variable-length vectors.
35513 (vect_get_constant_vectors): Note that the number of units
35514 is known to be constant.
35516 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35517 Alan Hayward <alan.hayward@arm.com>
35518 David Sherwood <david.sherwood@arm.com>
35520 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
35521 of units as polynomial. Choose between WIDE and NARROW based
35524 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35525 Alan Hayward <alan.hayward@arm.com>
35526 David Sherwood <david.sherwood@arm.com>
35528 * tree-vect-stmts.c (simd_clone_subparts): New function.
35529 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
35531 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35532 Alan Hayward <alan.hayward@arm.com>
35533 David Sherwood <david.sherwood@arm.com>
35535 * tree-vect-stmts.c (vectorizable_call): Treat the number of
35536 vectors as polynomial. Use build_index_vector for
35537 IFN_GOMP_SIMD_LANE.
35539 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35540 Alan Hayward <alan.hayward@arm.com>
35541 David Sherwood <david.sherwood@arm.com>
35543 * tree-vect-stmts.c (get_load_store_type): Treat the number of
35544 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
35545 for variable-length vectors.
35546 (vectorizable_mask_load_store): Treat the number of units as
35547 polynomial, asserting that it is constant if the condition has
35548 already been enforced.
35549 (vectorizable_store, vectorizable_load): Likewise.
35551 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35552 Alan Hayward <alan.hayward@arm.com>
35553 David Sherwood <david.sherwood@arm.com>
35555 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
35556 of units as polynomial. Punt if we can't tell at compile time
35557 which vector contains the final result.
35559 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35560 Alan Hayward <alan.hayward@arm.com>
35561 David Sherwood <david.sherwood@arm.com>
35563 * tree-vect-loop.c (vectorizable_induction): Treat the number
35564 of units as polynomial. Punt on SLP inductions. Use an integer
35565 VEC_SERIES_EXPR for variable-length integer reductions. Use a
35566 cast of such a series for variable-length floating-point
35569 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35570 Alan Hayward <alan.hayward@arm.com>
35571 David Sherwood <david.sherwood@arm.com>
35573 * tree.h (build_index_vector): Declare.
35574 * tree.c (build_index_vector): New function.
35575 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
35576 of units as polynomial, forcibly converting it to a constant if
35577 vectorizable_reduction has already enforced the condition.
35578 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
35579 to create a {1,2,3,...} vector.
35580 (vectorizable_reduction): Treat the number of units as polynomial.
35581 Choose vectype_in based on the largest scalar element size rather
35582 than the smallest number of units. Enforce the restrictions
35585 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35586 Alan Hayward <alan.hayward@arm.com>
35587 David Sherwood <david.sherwood@arm.com>
35589 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
35590 number of units as polynomial.
35592 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35593 Alan Hayward <alan.hayward@arm.com>
35594 David Sherwood <david.sherwood@arm.com>
35596 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
35597 * target.def (autovectorize_vector_sizes): Return the vector sizes
35598 by pointer, using vector_sizes rather than a bitmask.
35599 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
35600 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
35601 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
35603 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
35604 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
35605 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
35606 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
35607 * omp-general.c (omp_max_vf): Likewise.
35608 * omp-low.c (omp_clause_aligned_alignment): Likewise.
35609 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
35610 * tree-vect-loop.c (vect_analyze_loop): Likewise.
35611 * tree-vect-slp.c (vect_slp_bb): Likewise.
35612 * doc/tm.texi: Regenerate.
35613 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
35615 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
35616 the vector size as a poly_uint64 rather than an unsigned int.
35617 (current_vector_size): Change from an unsigned int to a poly_uint64.
35618 (get_vectype_for_scalar_type): Update accordingly.
35619 * tree.h (build_truth_vector_type): Take the size and number of
35620 units as a poly_uint64 rather than an unsigned int.
35621 (build_vector_type): Add a temporary overload that takes
35622 the number of units as a poly_uint64 rather than an unsigned int.
35623 * tree.c (make_vector_type): Likewise.
35624 (build_truth_vector_type): Take the number of units as a poly_uint64
35625 rather than an unsigned int.
35627 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35628 Alan Hayward <alan.hayward@arm.com>
35629 David Sherwood <david.sherwood@arm.com>
35631 * target.def (get_mask_mode): Take the number of units and length
35632 as poly_uint64s rather than unsigned ints.
35633 * targhooks.h (default_get_mask_mode): Update accordingly.
35634 * targhooks.c (default_get_mask_mode): Likewise.
35635 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
35636 * doc/tm.texi: Regenerate.
35638 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35639 Alan Hayward <alan.hayward@arm.com>
35640 David Sherwood <david.sherwood@arm.com>
35642 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
35643 * omp-general.c (omp_max_vf): Likewise.
35644 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
35645 (expand_omp_simd): Handle polynomial safelen.
35646 * omp-low.c (omplow_simd_context): Add a default constructor.
35647 (omplow_simd_context::max_vf): Change from int to poly_uint64.
35648 (lower_rec_simd_input_clauses): Update accordingly.
35649 (lower_rec_input_clauses): Likewise.
35651 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35652 Alan Hayward <alan.hayward@arm.com>
35653 David Sherwood <david.sherwood@arm.com>
35655 * tree-vectorizer.h (vect_nunits_for_cost): New function.
35656 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
35657 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
35658 (vect_analyze_slp_cost): Likewise.
35659 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
35660 (vect_model_load_cost): Likewise.
35662 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35663 Alan Hayward <alan.hayward@arm.com>
35664 David Sherwood <david.sherwood@arm.com>
35666 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
35667 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
35668 from an unsigned int * to a poly_uint64_pod *.
35669 (calculate_unrolling_factor): New function.
35670 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
35672 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35673 Alan Hayward <alan.hayward@arm.com>
35674 David Sherwood <david.sherwood@arm.com>
35676 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
35677 from an unsigned int to a poly_uint64.
35678 (_loop_vec_info::slp_unrolling_factor): Likewise.
35679 (_loop_vec_info::vectorization_factor): Change from an int
35681 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
35682 (vect_get_num_vectors): New function.
35683 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
35684 (vect_get_num_copies): Use vect_get_num_vectors.
35685 (vect_analyze_data_ref_dependences): Change max_vf from an int *
35686 to an unsigned int *.
35687 (vect_analyze_data_refs): Change min_vf from an int * to a
35689 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
35690 than an unsigned HOST_WIDE_INT.
35691 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
35692 (vect_analyze_data_ref_dependence): Change max_vf from an int *
35693 to an unsigned int *.
35694 (vect_analyze_data_ref_dependences): Likewise.
35695 (vect_compute_data_ref_alignment): Handle polynomial vf.
35696 (vect_enhance_data_refs_alignment): Likewise.
35697 (vect_prune_runtime_alias_test_list): Likewise.
35698 (vect_shift_permute_load_chain): Likewise.
35699 (vect_supportable_dr_alignment): Likewise.
35700 (dependence_distance_ge_vf): Take the vectorization factor as a
35701 poly_uint64 rather than an unsigned HOST_WIDE_INT.
35702 (vect_analyze_data_refs): Change min_vf from an int * to a
35704 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
35705 vfm1 as a poly_uint64 rather than an int. Make the same change
35706 for the returned bound_scalar.
35707 (vect_gen_vector_loop_niters): Handle polynomial vf.
35708 (vect_do_peeling): Likewise. Update call to
35709 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
35710 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
35712 * tree-vect-loop.c (vect_determine_vectorization_factor)
35713 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
35714 (vect_get_known_peeling_cost): Likewise.
35715 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
35716 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
35717 (vect_transform_loop): Likewise. Use the lowest possible VF when
35718 updating the upper bounds of the loop.
35719 (vect_min_worthwhile_factor): Make static. Return an unsigned int
35720 rather than an int.
35721 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
35722 polynomial unroll factors.
35723 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
35724 (vect_make_slp_decision): Likewise.
35725 (vect_supported_load_permutation_p): Likewise, and polynomial
35727 (vect_analyze_slp_cost): Handle polynomial vf.
35728 (vect_slp_analyze_node_operations): Likewise.
35729 (vect_slp_analyze_bb_1): Likewise.
35730 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
35731 than an unsigned HOST_WIDE_INT.
35732 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
35733 (vectorizable_load): Handle polynomial vf.
35734 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
35736 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
35738 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35739 Alan Hayward <alan.hayward@arm.com>
35740 David Sherwood <david.sherwood@arm.com>
35742 * match.pd: Handle bit operations involving three constants
35743 and try to fold one pair.
35745 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35747 * tree-vect-loop-manip.c: Include gimple-fold.h.
35748 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
35749 niters_maybe_zero parameters. Handle other cases besides a step of 1.
35750 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
35751 Add a path that uses a step of VF instead of 1, but disable it
35753 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
35754 and niters_no_overflow parameters. Update calls to
35755 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
35756 Create a new SSA name if the latter choses to use a ste other
35757 than zero, and return it via niters_vector_mult_vf_var.
35758 * tree-vect-loop.c (vect_transform_loop): Update calls to
35759 vect_do_peeling, vect_gen_vector_loop_niters and
35760 slpeel_make_loop_iterate_ntimes.
35761 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
35762 (vect_gen_vector_loop_niters): Update declarations after above changes.
35764 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
35766 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
35767 128-bit round to integer instructions.
35768 (ceil<mode>2): Likewise.
35769 (btrunc<mode>2): Likewise.
35770 (round<mode>2): Likewise.
35772 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
35774 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
35775 unaligned VSX load/store on P8/P9.
35776 (expand_block_clear): Allow the use of unaligned VSX
35777 load/store on P8/P9.
35779 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
35781 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
35783 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
35784 swap associated with both a load and a store.
35786 2018-01-02 Andrew Waterman <andrew@sifive.com>
35788 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
35789 * config/riscv/riscv.md (clear_cache): Use it.
35791 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
35793 * web.c: Remove out-of-date comment.
35795 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35797 * expr.c (fixup_args_size_notes): Check that any existing
35798 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
35799 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
35800 (emit_single_push_insn): ...here.
35802 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35804 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
35805 (const_vector_encoded_nelts): New function.
35806 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
35807 (const_vector_int_elt, const_vector_elt): Declare.
35808 * emit-rtl.c (const_vector_int_elt_1): New function.
35809 (const_vector_elt): Likewise.
35810 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
35811 of CONST_VECTOR_ELT.
35813 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35815 * expr.c: Include rtx-vector-builder.h.
35816 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
35817 directly on the tree encoding.
35818 (const_vector_from_tree): Likewise.
35819 * optabs.c: Include rtx-vector-builder.h.
35820 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
35821 sequence of "u" values.
35822 * vec-perm-indices.c: Include rtx-vector-builder.h.
35823 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
35824 directly on the vec_perm_indices encoding.
35826 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35828 * doc/rtl.texi (const_vector): Describe new encoding scheme.
35829 * Makefile.in (OBJS): Add rtx-vector-builder.o.
35830 * rtx-vector-builder.h: New file.
35831 * rtx-vector-builder.c: Likewise.
35832 * rtl.h (rtx_def::u2): Add a const_vector field.
35833 (CONST_VECTOR_NPATTERNS): New macro.
35834 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
35835 (CONST_VECTOR_DUPLICATE_P): Likewise.
35836 (CONST_VECTOR_STEPPED_P): Likewise.
35837 (CONST_VECTOR_ENCODED_ELT): Likewise.
35838 (const_vec_duplicate_p): Check for a duplicated vector encoding.
35839 (unwrap_const_vec_duplicate): Likewise.
35840 (const_vec_series_p): Check for a non-duplicated vector encoding.
35841 Say that the function only returns true for integer vectors.
35842 * emit-rtl.c: Include rtx-vector-builder.h.
35843 (gen_const_vec_duplicate_1): Delete.
35844 (gen_const_vector): Call gen_const_vec_duplicate instead of
35845 gen_const_vec_duplicate_1.
35846 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
35847 (gen_const_vec_duplicate): Use rtx_vector_builder.
35848 (gen_const_vec_series): Likewise.
35849 (gen_rtx_CONST_VECTOR): Likewise.
35850 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
35851 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
35852 Build a new vector rather than modifying a CONST_VECTOR in-place.
35853 (handle_special_swappables): Update call accordingly.
35854 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
35855 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
35856 Build a new vector rather than modifying a CONST_VECTOR in-place.
35857 (handle_special_swappables): Update call accordingly.
35859 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35861 * simplify-rtx.c (simplify_const_binary_operation): Use
35862 CONST_VECTOR_ELT instead of XVECEXP.
35864 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35866 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
35867 the selector elements to be different from the data elements
35868 if the selector is a VECTOR_CST.
35869 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
35870 ssizetype for the selector.
35872 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35874 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
35875 before testing each element individually.
35876 * tree-vect-generic.c (lower_vec_perm): Likewise.
35878 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35880 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
35881 * selftest-run-tests.c (selftest::run_tests): Call it.
35882 * vector-builder.h (vector_builder::operator ==): New function.
35883 (vector_builder::operator !=): Likewise.
35884 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
35885 (vec_perm_indices::all_from_input_p): New function.
35886 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
35887 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
35888 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
35889 instead of reading the VECTOR_CST directly. Detect whether both
35890 vector inputs are the same before constructing the vec_perm_indices,
35891 and update the number of inputs argument accordingly. Use the
35892 utility functions added above. Only construct sel2 if we need to.
35894 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35896 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
35897 the broadcast of the low byte.
35898 (expand_mult_highpart): Use an explicit encoding for the permutes.
35899 * optabs-query.c (can_mult_highpart_p): Likewise.
35900 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
35901 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
35902 (vectorizable_bswap): Likewise.
35903 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
35904 explicit encoding for the power-of-2 permutes.
35905 (vect_permute_store_chain): Likewise.
35906 (vect_grouped_load_supported): Likewise.
35907 (vect_permute_load_chain): Likewise.
35909 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35911 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
35912 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
35913 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
35914 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
35915 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
35916 (vect_gen_perm_mask_any): Likewise.
35918 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35920 * int-vector-builder.h: New file.
35921 * vec-perm-indices.h: Include int-vector-builder.h.
35922 (vec_perm_indices): Redefine as an int_vector_builder.
35923 (auto_vec_perm_indices): Delete.
35924 (vec_perm_builder): Redefine as a stand-alone class.
35925 (vec_perm_indices::vec_perm_indices): New function.
35926 (vec_perm_indices::clamp): Likewise.
35927 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
35928 (vec_perm_indices::new_vector): New function.
35929 (vec_perm_indices::new_expanded_vector): Update for new
35930 vec_perm_indices class.
35931 (vec_perm_indices::rotate_inputs): New function.
35932 (vec_perm_indices::all_in_range_p): Operate directly on the
35933 encoded form, without computing elided elements.
35934 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
35935 encoding. Update for new vec_perm_indices class.
35936 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
35937 the given vec_perm_builder.
35938 (expand_vec_perm_var): Update vec_perm_builder constructor.
35939 (expand_mult_highpart): Use vec_perm_builder instead of
35940 auto_vec_perm_indices.
35941 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
35942 vec_perm_indices instead of auto_vec_perm_indices. Use a single
35943 or double series encoding as appropriate.
35944 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
35945 vec_perm_indices instead of auto_vec_perm_indices.
35946 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
35947 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
35948 (vect_permute_store_chain): Likewise.
35949 (vect_grouped_load_supported): Likewise.
35950 (vect_permute_load_chain): Likewise.
35951 (vect_shift_permute_load_chain): Likewise.
35952 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
35953 (vect_transform_slp_perm_load): Likewise.
35954 (vect_schedule_slp_instance): Likewise.
35955 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
35956 (vectorizable_mask_load_store): Likewise.
35957 (vectorizable_bswap): Likewise.
35958 (vectorizable_store): Likewise.
35959 (vectorizable_load): Likewise.
35960 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
35961 vec_perm_indices instead of auto_vec_perm_indices. Use
35962 tree_to_vec_perm_builder to read the vector from a tree.
35963 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
35964 vec_perm_builder instead of a vec_perm_indices.
35965 (have_whole_vector_shift): Use vec_perm_builder and
35966 vec_perm_indices instead of auto_vec_perm_indices. Leave the
35967 truncation to calc_vec_perm_mask_for_shift.
35968 (vect_create_epilog_for_reduction): Likewise.
35969 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
35970 from auto_vec_perm_indices to vec_perm_indices.
35971 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
35972 instead of changing individual elements.
35973 (aarch64_vectorize_vec_perm_const): Use new_vector to install
35974 the vector in d.perm.
35975 * config/arm/arm.c (expand_vec_perm_d::perm): Change
35976 from auto_vec_perm_indices to vec_perm_indices.
35977 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
35978 instead of changing individual elements.
35979 (arm_vectorize_vec_perm_const): Use new_vector to install
35980 the vector in d.perm.
35981 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
35982 Update vec_perm_builder constructor.
35983 (rs6000_expand_interleave): Likewise.
35984 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
35985 (rs6000_expand_interleave): Likewise.
35987 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35989 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
35990 to qimode could truncate the indices.
35991 * optabs.c (expand_vec_perm_var): Likewise.
35993 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35995 * Makefile.in (OBJS): Add vec-perm-indices.o.
35996 * vec-perm-indices.h: New file.
35997 * vec-perm-indices.c: Likewise.
35998 * target.h (vec_perm_indices): Replace with a forward class
36000 (auto_vec_perm_indices): Move to vec-perm-indices.h.
36001 * optabs.h: Include vec-perm-indices.h.
36002 (expand_vec_perm): Delete.
36003 (selector_fits_mode_p, expand_vec_perm_var): Declare.
36004 (expand_vec_perm_const): Declare.
36005 * target.def (vec_perm_const_ok): Replace with...
36006 (vec_perm_const): ...this new hook.
36007 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
36008 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
36009 * doc/tm.texi: Regenerate.
36010 * optabs.def (vec_perm_const): Delete.
36011 * doc/md.texi (vec_perm_const): Likewise.
36012 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
36013 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
36014 expand_vec_perm for constant permutation vectors. Assert that
36015 the mode of variable permutation vectors is the integer equivalent
36016 of the mode that is being permuted.
36017 * optabs-query.h (selector_fits_mode_p): Declare.
36018 * optabs-query.c: Include vec-perm-indices.h.
36019 (selector_fits_mode_p): New function.
36020 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
36021 is defined, instead of checking whether the vec_perm_const_optab
36022 exists. Use targetm.vectorize.vec_perm_const instead of
36023 targetm.vectorize.vec_perm_const_ok. Check whether the indices
36024 fit in the vector mode before using a variable permute.
36025 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
36026 vec_perm_indices instead of an rtx.
36027 (expand_vec_perm): Replace with...
36028 (expand_vec_perm_const): ...this new function. Take the selector
36029 as a vec_perm_indices rather than an rtx. Also take the mode of
36030 the selector. Update call to shift_amt_for_vec_perm_mask.
36031 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
36032 Use vec_perm_indices::new_expanded_vector to expand the original
36033 selector into bytes. Check whether the indices fit in the vector
36034 mode before using a variable permute.
36035 (expand_vec_perm_var): Make global.
36036 (expand_mult_highpart): Use expand_vec_perm_const.
36037 * fold-const.c: Includes vec-perm-indices.h.
36038 * tree-ssa-forwprop.c: Likewise.
36039 * tree-vect-data-refs.c: Likewise.
36040 * tree-vect-generic.c: Likewise.
36041 * tree-vect-loop.c: Likewise.
36042 * tree-vect-slp.c: Likewise.
36043 * tree-vect-stmts.c: Likewise.
36044 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
36046 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
36047 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
36048 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
36049 (aarch64_vectorize_vec_perm_const): ...this new function.
36050 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
36051 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
36052 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
36053 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
36054 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
36055 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
36056 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
36058 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
36059 check for NEON modes.
36060 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
36061 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
36062 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
36063 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
36065 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
36066 the old VEC_PERM_CONST conditions.
36067 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
36068 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
36069 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
36070 (ia64_vectorize_vec_perm_const_ok): Merge into...
36071 (ia64_vectorize_vec_perm_const): ...this new function.
36072 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
36073 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
36074 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
36075 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
36076 * config/mips/mips.c (mips_expand_vec_perm_const)
36077 (mips_vectorize_vec_perm_const_ok): Merge into...
36078 (mips_vectorize_vec_perm_const): ...this new function.
36079 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
36080 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
36081 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
36082 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
36083 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
36084 (rs6000_expand_vec_perm_const): Delete.
36085 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
36087 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
36088 (altivec_expand_vec_perm_const_le): Take each operand individually.
36089 Operate on constant selectors rather than rtxes.
36090 (altivec_expand_vec_perm_const): Likewise. Update call to
36091 altivec_expand_vec_perm_const_le.
36092 (rs6000_expand_vec_perm_const): Delete.
36093 (rs6000_vectorize_vec_perm_const_ok): Delete.
36094 (rs6000_vectorize_vec_perm_const): New function.
36095 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
36096 an element count and rtx array.
36097 (rs6000_expand_extract_even): Update call accordingly.
36098 (rs6000_expand_interleave): Likewise.
36099 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
36100 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
36101 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
36102 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
36103 (rs6000_expand_vec_perm_const): Delete.
36104 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
36105 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
36106 (altivec_expand_vec_perm_const_le): Take each operand individually.
36107 Operate on constant selectors rather than rtxes.
36108 (altivec_expand_vec_perm_const): Likewise. Update call to
36109 altivec_expand_vec_perm_const_le.
36110 (rs6000_expand_vec_perm_const): Delete.
36111 (rs6000_vectorize_vec_perm_const_ok): Delete.
36112 (rs6000_vectorize_vec_perm_const): New function. Remove stray
36113 reference to the SPE evmerge intructions.
36114 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
36115 an element count and rtx array.
36116 (rs6000_expand_extract_even): Update call accordingly.
36117 (rs6000_expand_interleave): Likewise.
36118 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
36119 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
36121 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
36123 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
36125 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
36126 vector mode and that that mode matches the mode of the data
36128 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
36129 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
36130 directly using expand_vec_perm_1 when forcing selectors into
36132 (expand_vec_perm_var): New function, split out from expand_vec_perm.
36134 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
36136 * optabs-query.h (can_vec_perm_p): Delete.
36137 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
36138 * optabs-query.c (can_vec_perm_p): Split into...
36139 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
36140 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
36141 particular selector is valid.
36142 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
36143 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
36144 (vect_grouped_load_supported): Likewise.
36145 (vect_shift_permute_load_chain): Likewise.
36146 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
36147 (vect_transform_slp_perm_load): Likewise.
36148 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
36149 (vectorizable_bswap): Likewise.
36150 (vect_gen_perm_mask_checked): Likewise.
36151 * fold-const.c (fold_ternary_loc): Likewise. Don't take
36152 implementations of variable permutation vectors into account
36153 when deciding which selector to use.
36154 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
36155 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
36156 with a false third argument.
36157 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
36158 to test whether the constant selector is valid and can_vec_perm_var_p
36159 to test whether a variable selector is valid.
36161 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
36163 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
36164 * optabs-query.c (can_vec_perm_p): Likewise.
36165 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
36166 instead of vec_perm_indices.
36167 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
36168 (vect_gen_perm_mask_checked): Likewise,
36169 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
36170 (vect_gen_perm_mask_checked): Likewise,
36172 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
36174 * optabs-query.h (qimode_for_vec_perm): Declare.
36175 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
36176 (qimode_for_vec_perm): ...this new function.
36177 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
36179 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
36181 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
36182 does not have a conditional at the top.
36184 2018-01-02 Richard Biener <rguenther@suse.de>
36186 * ipa-inline.c (big_speedup_p): Fix expression.
36188 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
36191 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
36194 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
36198 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
36199 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
36200 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
36201 cond_taken_branch_cost 3->4.
36203 2018-01-01 Jakub Jelinek <jakub@redhat.com>
36205 PR tree-optimization/83581
36206 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
36207 TODO_cleanup_cfg if any changes have been made.
36209 PR middle-end/83608
36210 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
36211 convert_modes if target mode has the right side, but different mode
36214 PR middle-end/83609
36215 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
36216 last argument when extracting from CONCAT. If either from_real or
36217 from_imag is NULL, use expansion through memory. If result is not
36218 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
36219 the parts directly to inner mode, if even that fails, use expansion
36222 PR middle-end/83623
36223 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
36224 check for bswap in mode rather than HImode and use that in expand_unop
36227 Copyright (C) 2018 Free Software Foundation, Inc.
36229 Copying and distribution of this file, with or without modification,
36230 are permitted in any medium without royalty provided the copyright
36231 notice and this notice are preserved.